Skip to content

MessageIdSchema

const MessageIdSchema: ZodPipe<ZodString, ZodTransform<MessageId, string>>

Defined in: packages/protocol/src/lib/message.ts:47

Wire-format Zod parser for MessageId. Mirrors the non-empty-string invariant enforced by requireNonEmptyBrand (rejects '', ' ', '\t', etc.) and carries the MessageId brand on z.infer output so consumer schemas that reference it stay branded end-to-end.