AddOperation
Add operation accepted by client.commit.apply. Use this shape to create new
shapes, things, assertions, or collections in a single commit.
https://docs.warmhub.ai/writes/operations/#add-operations
Properties
Section titled “Properties”operation?
Section titled “operation?”
optionaloperation?:"add"
Operation discriminator. Defaults to add when omitted.
optionalkind?:"shape"|"thing"|"assertion"|"collection"
Optional kind override: shape, thing, assertion, or collection.
When omitted, kind is inferred: about present → assertion; collection
type plus members → collection; otherwise by name segmentation
(1–2 segments → thing, 3+ segments → assertion). Shape adds always
require explicit kind: 'shape'.
optionalname?:string
Target name. Use Shape/localName for things and assertions; use the
plain shape name for shapes.
about?
Section titled “about?”
optionalabout?:string|CollectionAbout
Assertion target wref or inline collection descriptor. Presence of
about makes the add an assertion unless kind overrides it.
optionaldata?:unknown
Shape-validated data payload for shape, thing, or assertion adds.
optionaltype?:CollectionTag
Collection type. Used only for collection adds.
members?
Section titled “members?”
optionalmembers?:string[]
Collection member wrefs. Used only for collection adds.
skipExisting?
Section titled “skipExisting?”
optionalskipExisting?:boolean
When true, an existing target returns noop instead of failing with
ALREADY_EXISTS. Use for caller-side idempotency on retried writes.
Hit a problem or have a question? Get in touch.