Variable: MessageSchema
Makaio Framework / contracts/shared / MessageSchema
Variable: MessageSchema
Section titled “Variable: MessageSchema”
constMessageSchema:ZodObject<{blocks:ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{content:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{source:ZodDiscriminatedUnion<[ZodObject<…, …>,ZodObject<…, …>],"type">;type:ZodLiteral<"image">; },$strip>,ZodObject<{source:ZodDiscriminatedUnion<[ZodObject<…, …>,ZodObject<…, …>],"type">;type:ZodLiteral<"document">; },$strip>,ZodObject<{attachmentType:ZodEnum<{directory:"directory";file:"file"; }>;displayName:ZodOptional<ZodString>;fileName:ZodString;filePath:ZodString;source:ZodDiscriminatedUnion<[ZodObject<…, …>,ZodObject<…, …>],"type">;type:ZodLiteral<"attachment">; },$strip>],"type">,ZodArray<ZodDiscriminatedUnion<[ZodObject<{content:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{source:ZodDiscriminatedUnion<[…, …],"type">;type:ZodLiteral<"image">; },$strip>,ZodObject<{source:ZodDiscriminatedUnion<[…, …],"type">;type:ZodLiteral<"document">; },$strip>,ZodObject<{attachmentType:ZodEnum<{directory: …;file: …; }>;displayName:ZodOptional<ZodString>;fileName:ZodString;filePath:ZodString;source:ZodDiscriminatedUnion<[…, …],"type">;type:ZodLiteral<"attachment">; },$strip>],"type">>]>;role:ZodOptional<ZodEnum<{assistant:"assistant";system:"system";user:"user"; }>>; },$strip>
Defined in: ../../../packages/contracts/src/shared/index.ts:93
Structured message with role and content blocks. Blocks can be a single block or an array of blocks.