Skip to content

@sqlrooms/room-store / RoomCommand

Type Alias: RoomCommand<RS> ​

RoomCommand<RS> = object

Type Parameters ​

Type ParameterDefault type
RS extends BaseRoomStoreStateBaseRoomStoreState

Properties ​

id ​

id: string


name ​

name: string


description? ​

optional description?: string


group? ​

optional group?: string


keywords? ​

optional keywords?: string[]


inputSchema? ​

optional inputSchema?: ZodType<unknown>


inputDescription? ​

optional inputDescription?: string


validateInput? ​

optional validateInput?: (input, context) => void | Promise<void>

Parameters ​

ParameterType
inputunknown
contextRoomCommandExecutionContext<RS>

Returns ​

void | Promise<void>


execute ​

execute: (context, input?) => RoomCommandExecuteOutput | Promise<RoomCommandExecuteOutput>

Parameters ​

ParameterType
contextRoomCommandExecutionContext<RS>
input?unknown

Returns ​

RoomCommandExecuteOutput | Promise<RoomCommandExecuteOutput>


isVisible? ​

optional isVisible?: RoomCommandPredicate<RS>


isEnabled? ​

optional isEnabled?: RoomCommandPredicate<RS>


metadata? ​

optional metadata?: RoomCommandPolicyMetadata


ui? ​

optional ui?: RoomCommandUiMetadata


keystrokes? ​

optional keystrokes?: RoomCommandKeystrokes

Deprecated ​

Use ui?.keystrokes


shortcut? ​

optional shortcut?: string

Deprecated ​

Use ui?.shortcut


inputComponent? ​

optional inputComponent?: RoomCommandInputComponent

Deprecated ​

Use ui?.inputComponent


readOnly? ​

optional readOnly?: boolean

Deprecated ​

Use metadata?.readOnly


idempotent? ​

optional idempotent?: boolean

Deprecated ​

Use metadata?.idempotent


riskLevel? ​

optional riskLevel?: RoomCommandRiskLevel

Deprecated ​

Use metadata?.riskLevel


requiresConfirmation? ​

optional requiresConfirmation?: boolean

Deprecated ​

Use metadata?.requiresConfirmation