Skip to content

@sqlrooms/documents / createBlockDocumentCommands

Function: createBlockDocumentCommands() ​

createBlockDocumentCommands<TRoomState>(options?): RoomCommand<TRoomState>[]

Builds the set of room commands (list, get, create, append-blocks, …) for a block-document artifact type using canonical block-document.* command IDs.

Type Parameters ​

Type ParameterDefault type
TRoomState extends BlockDocumentCommandStateBlockDocumentCommandState

Parameters ​

ParameterTypeDescription
optionsCreateBlockDocumentCommandsOptions<TRoomState>Command group, default title, supported stateful block types, and optional generic-mutation constraints. When allowedBlockTypes includes statefulBlock, only types configured in statefulBlockTypes are accepted.

Returns ​

RoomCommand<TRoomState>[]

The list of RoomCommands to register with the host store.