Skip to content

Variable: GenieAgentEventSchema

const GenieAgentEventSchema: ZodDiscriminatedUnion<[ZodObject<{ content: ZodString; conversationId: ZodOptional<ZodString>; messageId: ZodOptional<ZodString>; spaceId: ZodString; type: ZodLiteral<"started">; }, $strip>, ZodObject<{ answer: ZodOptional<ZodString>; conversationId: ZodOptional<ZodString>; messageId: ZodOptional<ZodString>; spaceId: ZodString; statementIds: ZodArray<ZodString>; status: ZodCustom<"ASKING_AI" | "CANCELLED" | "COMPLETED" | "EXECUTING_QUERY" | "FAILED" | "FETCHING_METADATA" | "FILTERING_CONTEXT" | "PENDING_WAREHOUSE" | "QUERY_RESULT_EXPIRED" | "SUBMITTED", "ASKING_AI" | "CANCELLED" | "COMPLETED" | "EXECUTING_QUERY" | "FAILED" | "FETCHING_METADATA" | "FILTERING_CONTEXT" | "PENDING_WAREHOUSE" | "QUERY_RESULT_EXPIRED" | "SUBMITTED">; type: ZodLiteral<"ask_genie_done">; }, $strip>, ZodObject<{ conversationId: ZodOptional<ZodString>; error: ZodString; messageId: ZodOptional<ZodString>; spaceId: ZodOptional<ZodString>; type: ZodLiteral<"error">; }, $strip>, ZodObject<{ dataItems: ZodNumber; items: ZodNumber; spaceId: ZodString; textItems: ZodNumber; type: ZodLiteral<"summary">; }, $strip>], "type">

Mastra-only event union. Each variant uses the same flat {type, ...fields} shape as GenieChatEvent so subscribers union both with a single switch (event.type).