DraftChanged
The draft, as answered by an operation that can drop wiring the caller did not name. Only those operations answer this shape; the ones that add or edit a block answer a plain
Draft, having nothing to remove.- botType: stringFormat: uuid
_id required - diagramType: DiagramrequiredProperties: 3
Your diagram, kept as you sent it: keys we do not model — notes, embedded bricks — come back untouched. The one thing we add is
isTarget: true, on any node that does not already say whether a connection may end at it.We read
nodesandconnectionsto check it. A diagram missing either is stored anyway and reported as breaking rules. - editedType: Timestampnullable
_at requiredWhen the draft was last written.
nullon a bot whose draft has never been written, under the convention above for a representation that carries a stored diagram. - hasType: boolean
_unpublished _changes requiredWhether this diagram differs from the one the channels run, so that reading the draft answers both what is being edited and whether it is still to be published. Same field and same answer as the bot's.
- removedType: array of ConnectionRef
_connections requiredProperties: 2The wiring that was in the draft and is no longer there. Always sent, and empty when nothing was removed. Reported so that no wiring disappears without the caller being told. What removes it depends on the operation:
DELETE /bots/{bot_id}/draft/blocks/{block_id}reports what went with the block, andPATCH /bots/{bot_id}/draftreports that and the connections the change set deleted by name, each one listed once. - requiredType: PlanTierenum
_tier requiredA subscription tier, ordered from lowest to highest.
valuessandboxstarterprofessionalbusiness - saveType: SaveStateenum
_state requiredThe outcome of the last write to the draft.
IS_PRESAVEDis a stored diagram with no violations,HAS_ERRORSa stored diagram that broke at least one rule,IS_VALIDATEDa draft deployed for testing andIS_PUBLISHEDone that has been published.HAS_ERRORSis the one that matters: while the draft is in it, the bot cannot be published.valuesIS_PRESAVEDHAS_ERRORSIS_VALIDATEDIS_PUBLISHED - violationsType: array of RuleViolationrequiredProperties: 5
The business rules the diagram broke on the last write. Empty on a bot that has just been created, because creating a bot does not validate.