# ChartRequestMessageSchema
Source: https://docs.maelstrom-ai.co/0.2/reference/protocol/variables/chartrequestmessageschema/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> `const` **ChartRequestMessageSchema**: `ZodObject`<{ `id`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `request`: `ZodObject`<{ `context`: `ZodObject`<{ `chartDimensions`: `ZodObject`<{ `columns`: `ZodNumber`; `rows`: `ZodNumber`; }, `$strip`\>; `layoutMode`: `ZodEnum`<{ `grid`: `"grid"`; `tiling`: `"tiling"`; }>; `updateReasons`: `ZodArray`<`ZodDiscriminatedUnion`<\[`ZodObject`<{ `intent`: …; `type`: …; }, `$strip`\>, `ZodObject`<{ `current`: …; `previous`: …; `type`: …; }, `$strip`\>, `ZodObject`<{ `changes`: …; `instanceId`: …; `type`: …; }, `$strip`\>\], `"type"`\>>; }, `$strip`\>; `instances`: `ZodArray`<`ZodObject`<{ `instanceId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`InstanceId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/instanceid/), `string`\>>; `variant`: `ZodPipe`<`ZodString`, `ZodTransform`<[`VariantName`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/variantname/), `string`\>>; `vesselId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`VesselId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/vesselid/), `string`\>>; }, `$strip`\>>; `intentFacts`: `ZodOptional`<`ZodRecord`<`ZodString`, `ZodType`<`Mutable`<[`JsonValue`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/jsonvalue/)\>, `unknown`, `$ZodTypeInternals`<`Mutable`<[`JsonValue`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/jsonvalue/)\>, `unknown`\>>>>; `layout`: `ZodDiscriminatedUnion`<\[`ZodObject`<{ `positions`: `ZodArray`<`ZodObject`<{ `instanceId`: …; `position`: …; `size`: …; }, `$strip`\>>; `type`: `ZodLiteral`<`"grid"`\>; }, `$strip`\>, `ZodObject`<{ `instances`: `ZodArray`<`ZodObject`<{ `instanceId`: …; `variant`: …; `vesselId`: …; }, `$strip`\>>; `tree`: `ZodArray`<`ZodPipe`<`ZodNullable`<…>, `ZodTransform`<…, …>>>; `type`: `ZodLiteral`<`"tiling"`\>; }, `$strip`\>\], `"type"`\>; `skipReply`: `ZodOptional`<`ZodBoolean`\>; `type`: `ZodLiteral`<`"chart_request"`\>; `vessels`: `ZodArray`<`ZodObject`<{ `defaultVariant`: `ZodPipe`<`ZodString`, `ZodTransform`<[`VariantName`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/variantname/), `string`\>>; `description`: `ZodString`; `id`: `ZodPipe`<`ZodString`, `ZodTransform`<[`VesselId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/vesselid/), `string`\>>; `name`: `ZodString`; `variants`: `ZodRecord`<`ZodPipe`<`ZodString`, `ZodTransform`<[`VariantName`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/variantname/), `string`\>>, `ZodObject`<{ `actions`: `ZodArray`<…>; `description`: `ZodOptional`<…>; `minSize`: `ZodObject`<…, …>; `props`: `ZodRecord`<…, …>; }, `$strip`\>>; }, `$strip`\>>; }, `$strip`\>; `sessionId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`SessionId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/sessionid/), `string`\>>; `timestamp`: `ZodNumber`; `type`: `ZodLiteral`<`"chart_request"`\>; }, `$strip`\>

Defined in: packages/protocol/src/lib/engine-message.ts:128

Wire-format Zod parser for [ChartRequestMessage](https://docs.maelstrom-ai.co/0.2/reference/protocol/variables/chartrequestmessage/) envelopes. Validates the discriminator, all envelope-level fields (sessionId, id, timestamp), and the inner ChartRequest payload in a single pass.
