BrickWrite
What a brick holds, in the vocabulary of the block-level operations: the blocks it holds, named
by the names GET /blocks lists, 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
with block_not_a_brick. Without it, such a block answers brick_missing.
The brick starts at its block placed under the id brick_start, so name the first block that.
A connection inside it ending at outputs.$N leaves the brick by the output $N it declares;
the connections leaving the brick block name that same $N as their type, or default. 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 from
GET /bots/{bot_id}/draft in the builder's shape, as a Brick.
- blocksType:requiredProperties: 7
The blocks inside, written as any other block. An id is given to the ones that bring none, scoped to the brick;
outputsis the brick's own. - Properties: 5connectionsType:required
- outputsType:requiredProperties: 2
The ways out of the brick.
defaultis always one of them and is never declared. - nameType: string
The name the builder shows on the block. Omitted, the block's own name is taken, or
Brickwhen it has none, and on an update the brick keeps the one it had.
{
"name": "Ask for the email",
"outputs": [
{
"id": "$0",
"title": "Done"
}
],
"blocks": [
{
"id": "brick_start",
"type": "ask_email",
"params": {
"text": "Your email?",
"destination": "email"
}
}
],
"connections": [
{
"type": "$success",
"sourcePath": "brick_start",
"targetPath": "outputs.$0"
}
]
}