Custom data types
Create a data type
Section titled “Create a data type”Open Types, select Data types, and choose the add action. Enter an identifier and choose a shape:
- Struct groups named fields into one value.
- Enum limits a value to one of several named options.
An enum needs its first option before it can be created.
Edit a struct
Section titled “Edit a struct”Open the data type, then add or remove fields. Each field has a name and a value definition. A definition can use primitive values, dates, another custom data type, or the other supported composite kinds.
Use clear identifiers because they become labels in property editors.
Edit an enum
Section titled “Edit an enum”Add, remove, or rename options. Existing stored values must match an available option after the schema is saved.
Save schema changes
Section titled “Save schema changes”Schema edits remain a draft until you choose Save. If properties or data types already reference the schema, Weave asks for confirmation because existing values may no longer conform.
Renaming the data type identifier is blocked while other definitions reference it. Remove those references before renaming.
Some definitions received from the API may be shown read-only when the current editor cannot represent their shape, including payload enums or unsupported field kinds. The page preserves them rather than silently rewriting them.
Delete a data type
Section titled “Delete a data type”Return to the Data types list and use the delete action. Referenced data types cannot be deleted; first detach them from properties and from other custom data type fields.