BlockWrite
- typeType: stringrequired
- brickType:Properties: 4
What a brick holds, in the vocabulary of the block-level operations: the blocks it holds, named by the names
GET /blockslists, the outputs it declares and the connections between them. It is what a block that runs a brick (nests_a_diagram) brings, and it is refused on any other block withblock_not_a_brick. Without it, such a block answersbrick_missing.The brick starts at its block placed under the id
brick_start, so name the first block that. A connection inside it ending atoutputs.$Nleaves the brick by the output$Nit declares; the connections leaving the brick block name that same$Nas theirtype, ordefault. Every refusal about something inside names it by its trail,B0->n0.It is written whole: on an update it replaces the blocks, connections and notes the brick held, and an output it no longer declares that a connection still leaves the block by is refused with
connection_output_removed, unless the same change set removes that connection. A block inside it may not run a brick of its own (brick_nesting_unsupported), and the brick reads back fromGET /bots/{bot_id}/draftin the builder's shape, as aBrick. - idType: string
The id to give the block. Generated when omitted. A client that sends connections in the same request needs to set it.
- leftType: integer
How far across the builder's canvas to place the block. Omitted, it is placed at the origin.
- nameType: string
- paramsType: objectProperties: 1
Required unless
brickis sent. A block that runs a brick has no params of its own: it bringsbrick, orparams: {}to run the brick the document already keeps under its id. - topType: integer
How far down the builder's canvas to place the block. Omitted, it is placed at the origin.
{
"id": "n1",
"type": "send_text",
"params": {
"messages": [
{
"entity": "text",
"text": "Thanks!",
"id": "$0"
}
]
}
}