Skip to content

AddOp

Builder add operation for shapes, things, assertions, and collections.

readonly operation: "add"

Operation discriminator. Always add.


readonly name: string

Target name. Use Shape/localName for things and assertions; use the plain shape name for shapes.


readonly optional kind?: string

Optional kind override: shape, thing, assertion, or collection.


readonly optional about?: string | CollectionAbout

Assertion target wref or inline collection descriptor. Presence of about makes the add an assertion unless kind overrides it.


readonly optional type?: string

Collection type. Used only for collection adds.


readonly optional members?: string[]

Collection member wrefs. Used only for collection adds.


readonly optional shapeWref?: string

Optional shape wref used by local validation.


readonly optional aboutWref?: string

Deprecated spelling for about; retained for compatibility.


readonly optional data?: unknown

Shape-validated data payload for shape, thing, or assertion adds.


readonly optional skipExisting?: boolean

When true, an existing target returns noop instead of failing.