Draft
- botType: stringFormat: uuid
_id required - diagramType:requiredProperties: 4
Your diagram, kept as you sent it: keys we do not model, such as notes, come back untouched, and so do your bricks. The one thing we add is
isTarget: true, on any node other than the start point, anoteor aglobal_keywordsblock 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. When present, each must be an object keyed by id whose entries are objects: a list, or an entry that is not an object, is answered400keyed bydiagram. - editedType: nullable
_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.
- requiredType: enum
_tier requiredA subscription tier, ordered from lowest to highest.
valuessandboxstarterprofessionalbusiness - saveType: enum
_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:requiredProperties: 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.
- warningsType:requiredProperties: 5
The blocks of a web bot that the v4 web chat does not render, one item for each thing a block shows that it leaves out. They never block a write, a deploy or a publication: the legacy web chat renders those blocks. Worked out again on every answer, and always empty for a bot of another channel family. Each item has the shape of a violation, with the code
block_not_on_v4_web_chatand the block inblock_id.