/** * Wire-format zod schemas + types and high-level event vocabulary * for the Genie chat driver. * * Two related layers live here: * * 1. Genie wire shapes derived from this package's own generated * `dashboards` schemas (regenerated from the upstream * `@databricks/sdk-experimental` `apis/dashboards/model.d.ts` * by the engine's codegen on synth). We extend the SDK schemas where Genie * ships fields on the wire that the SDK doesn't currently type: * * - `GenieMessage.auto_regenerate_count: number` (stamped * on every wire message, omitted from the SDK shape). * - `GenieQueryAttachment.thoughts: GenieThought[]` (the * streamed reasoning payload with `DESCRIPTION`, * `DATA_SOURCING`, `STEPS`, and `UNDERSTANDING` thought * kinds). * - `GenieAttachment.attachment_type: AttachmentType` * (an optional discriminator literal so callers can * `switch (att.attachment_type)` instead of probing * which sub-key is populated; compute it with * {@link detectAttachmentType}). * * 2. Event vocabulary for the high-level `genieEventChat` * driver. Each event is a flat `z.object` with a `type` * literal discriminator and snake_case payload fields hoisted * to the top level (no `payload` wrapper). Events that share * the attachment-scoped location use * {@link GenieChatLocationSchema} as a base; events that * don't carry an `attachment_id` (status, result) omit it. * {@link GenieChatEventSchema} bundles the variants into one * discriminated union. * * Pure types: no runtime imports beyond zod + the generated * `dashboards` schemas, no Node-only code, safe for browser bundles. * * @module */ import { z } from "zod"; import * as dashboards from "./dashboards.ts"; declare const MessageStatusSchema: z.ZodUnion, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>; /** * The SDK's `MessageStatus` type, re-exported so consumers of the * Genie contract get the full wire vocabulary from a single import * path - mirrors the re-exports of the other SDK-derived schemas * below. */ export type MessageStatus = dashboards.MessageStatus; export { MessageStatusSchema }; /** * Genie's per-query "thoughts" surface. These appear on the * `/messages/{id}` wire under `attachments[i].query.thoughts[]` but * are not typed on the SDK's `GenieQueryAttachment` at v0.17. * * Known thought types observed in production polls: * * - `THOUGHT_TYPE_DESCRIPTION`: a one-paragraph restatement of * what the user asked. The final `query.description` field on * the attachment carries the same text. * - `THOUGHT_TYPE_DATA_SOURCING`: markdown bullets of the * fully-qualified `catalog.schema.table` sources Genie chose. * - `THOUGHT_TYPE_STEPS`: the high-level plan Genie wrote before * running SQL (one bullet per step). * - `THOUGHT_TYPE_UNDERSTANDING`: ambiguity / interpretation * notes (e.g. "'revenue' could be interpreted as gross, * net, or recognized revenue..."). * * Open at the type level (`| (string & {})`) so a new server-side * thought type doesn't break compilation; the four known types * still narrow correctly under `switch`. */ export type GenieThoughtType = "THOUGHT_TYPE_DESCRIPTION" | "THOUGHT_TYPE_DATA_SOURCING" | "THOUGHT_TYPE_STEPS" | "THOUGHT_TYPE_UNDERSTANDING" | (string & {}); /** * One reasoning step on a query attachment. See * {@link GenieThoughtType} for the known `thought_type` values. */ export declare const GenieThoughtSchema: z.ZodObject<{ thought_type: z.ZodCustom; content: z.ZodString; }, z.core.$strip>; export type GenieThought = z.infer; /** * Discriminator for what's inside a `GenieAttachment`. Genie only * ever populates one of `query` / `text` / `suggested_questions` * per attachment. Open via `(string & {})` so a new server-side * type doesn't break compilation; the three known types still * narrow correctly under `switch`. * * Lifted into the schema as the optional * {@link GenieAttachmentSchema}.`attachment_type` field (compute * it with {@link detectAttachmentType}) so consumers can branch * on a literal instead of probing which sub-object key is * present. Also surfaced on {@link AttachmentEvent}'s payload as * `attachment_type` (vs a bare `type`) to keep the field clear of * the event-union discriminator key. */ export declare const ATTACHMENT_TYPES: readonly ["query", "text", "suggested_questions"]; export type KnownAttachmentType = (typeof ATTACHMENT_TYPES)[number]; export type AttachmentType = KnownAttachmentType | (string & {}); /** * `GenieQueryAttachment` widened with the `thoughts[]` field the * Genie wire exposes but the SDK doesn't currently type. Every * other field (`description`, `query`, `statement_id`, * `query_result_metadata`, `title`, `parameters`, * `last_updated_timestamp`, `id`) flows through verbatim from * the SDK schema. */ export declare const GenieQueryAttachmentSchema: z.ZodObject<{ description: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; export type GenieQueryAttachment = z.infer; /** * Purpose attached to a Genie text response. * * The generated Databricks SDK schema currently knows only * `FOLLOW_UP_QUESTION`, while the live Genie API also emits * `TEXT_ATTACHMENT_PURPOSE_ANSWER` for the primary answer text. Keep the * known values discoverable and accept future string values so an additive * server-side enum change cannot invalidate an otherwise complete message. */ export type GenieTextAttachmentPurpose = "FOLLOW_UP_QUESTION" | "TEXT_ATTACHMENT_PURPOSE_ANSWER" | (string & {}); /** Text attachment schema widened for forward-compatible purpose values. */ export declare const GenieTextAttachmentSchema: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>; export type GenieTextAttachment = z.infer; /** * `GenieAttachment` with: * * - `query` re-typed to the thoughts-aware * {@link GenieQueryAttachmentSchema}. * - `attachment_type` discriminator literal * ({@link AttachmentType}) so consumers can `switch * (att.attachment_type)` to narrow which sub-object is * populated. Optional on the wire (Genie doesn't send it); * callers compute it with {@link detectAttachmentType} when * they want the literal up-front. * * `text` is re-typed to the forward-compatible * {@link GenieTextAttachmentSchema}. `attachment_id` and * `suggested_questions` pass through unchanged. `attachment_id` is genuinely * optional on the wire: * the first text attachment Genie emits per turn (the "main * answer text") arrives with no id, only the follow-up text * attachment gets one. */ export declare const GenieAttachmentSchema: z.ZodObject<{ attachment_id: z.ZodOptional; suggested_questions: z.ZodOptional>; }, z.core.$strip>>; query: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; text: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>>; attachment_type: z.ZodOptional>; }, z.core.$strip>; export type GenieAttachment = z.infer; /** * `GenieMessage` widened with: * * - `auto_regenerate_count`: number stamped on every wire * message that the SDK type omits at v0.17. * - `attachments`: re-typed to the local * {@link GenieAttachmentSchema} so * `attachment.query?.thoughts` (and the * `attachment_type` discriminator) is reachable without a * cast. * * Every other field (`id`, `space_id`, `conversation_id`, * `user_id`, `created_timestamp`, `last_updated_timestamp`, * `status`, `content`, `message_id`, `query_result`, `error`, * `feedback`) passes through from the SDK schema. */ export declare const GenieMessageSchema: z.ZodObject<{ content: z.ZodString; conversation_id: z.ZodString; created_timestamp: z.ZodOptional; error: z.ZodOptional; type: z.ZodOptional, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_NETWORK_EXCEPTION">, z.ZodLiteral<"CONTENT_FILTER_EXCEPTION">, z.ZodLiteral<"CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_UC_SCHEMA_EXCEPTION">, z.ZodLiteral<"DEPLOYMENT_NOT_FOUND_EXCEPTION">, z.ZodLiteral<"DESCRIBE_QUERY_INVALID_SQL_ERROR">, z.ZodLiteral<"DESCRIBE_QUERY_TIMEOUT">, z.ZodLiteral<"DESCRIBE_QUERY_UNEXPECTED_FAILURE">, z.ZodLiteral<"EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION">, z.ZodLiteral<"FUNCTIONS_NOT_AVAILABLE_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION">, z.ZodLiteral<"FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION">, z.ZodLiteral<"GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION">, z.ZodLiteral<"GENERIC_SQL_EXEC_API_CALL_EXCEPTION">, z.ZodLiteral<"ILLEGAL_PARAMETER_DEFINITION_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_COMPLETION_REQUEST_EXCEPTION">, z.ZodLiteral<"INVALID_FUNCTION_CALL_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_UNKNOWN_TABLE_EXCEPTION">, z.ZodLiteral<"INVALID_TABLE_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"LOCAL_CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"MESSAGE_ATTACHMENT_TOO_LONG_ERROR">, z.ZodLiteral<"MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MISSING_SQL_QUERY_EXCEPTION">, z.ZodLiteral<"NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE">, z.ZodLiteral<"NO_QUERY_TO_VISUALIZE_EXCEPTION">, z.ZodLiteral<"NO_TABLES_TO_QUERY_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION">, z.ZodLiteral<"REPLY_PROCESS_TIMEOUT_EXCEPTION">, z.ZodLiteral<"RETRYABLE_PROCESSING_EXCEPTION">, z.ZodLiteral<"SQL_EXECUTION_EXCEPTION">, z.ZodLiteral<"STOP_PROCESS_DUE_TO_AUTO_REGENERATE">, z.ZodLiteral<"TABLES_MISSING_EXCEPTION">, z.ZodLiteral<"TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION">, z.ZodLiteral<"TOO_MANY_TABLES_EXCEPTION">, z.ZodLiteral<"UNEXPECTED_REPLY_PROCESS_EXCEPTION">, z.ZodLiteral<"UNKNOWN_AI_MODEL">, z.ZodLiteral<"UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_ACCESS_MISSING_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_NOT_FOUND_EXCEPTION">]>>; }, z.core.$strip>>; feedback: z.ZodOptional, z.ZodLiteral<"NONE">, z.ZodLiteral<"POSITIVE">]>>; }, z.core.$strip>>; id: z.ZodString; last_updated_timestamp: z.ZodOptional; message_id: z.ZodString; query_result: z.ZodOptional; row_count: z.ZodOptional; statement_id: z.ZodOptional; statement_id_signature: z.ZodOptional; }, z.core.$strip>>; space_id: z.ZodString; status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; user_id: z.ZodOptional; attachments: z.ZodOptional; suggested_questions: z.ZodOptional>; }, z.core.$strip>>; query: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; text: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>>; attachment_type: z.ZodOptional>; }, z.core.$strip>>>; auto_regenerate_count: z.ZodOptional; }, z.core.$strip>; export type GenieMessage = z.infer; /** * Domain projection of {@link GenieMessageSchema} that drops every * turn-level field (`id`, `status`, `created_timestamp`, * `query_result`, ...) and yields just the response payload as a * flat `GenieAttachment[]`. Parses the same wire shape as * {@link GenieMessageSchema}; missing `attachments` defaults to * `[]` so the output is always an array. * * Use when consumers only care about the model's response * attachments and not the surrounding message envelope. */ export declare const GenieResponseSchema: z.ZodPipe; error: z.ZodOptional; type: z.ZodOptional, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_NETWORK_EXCEPTION">, z.ZodLiteral<"CONTENT_FILTER_EXCEPTION">, z.ZodLiteral<"CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_UC_SCHEMA_EXCEPTION">, z.ZodLiteral<"DEPLOYMENT_NOT_FOUND_EXCEPTION">, z.ZodLiteral<"DESCRIBE_QUERY_INVALID_SQL_ERROR">, z.ZodLiteral<"DESCRIBE_QUERY_TIMEOUT">, z.ZodLiteral<"DESCRIBE_QUERY_UNEXPECTED_FAILURE">, z.ZodLiteral<"EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION">, z.ZodLiteral<"FUNCTIONS_NOT_AVAILABLE_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION">, z.ZodLiteral<"FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION">, z.ZodLiteral<"GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION">, z.ZodLiteral<"GENERIC_SQL_EXEC_API_CALL_EXCEPTION">, z.ZodLiteral<"ILLEGAL_PARAMETER_DEFINITION_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_COMPLETION_REQUEST_EXCEPTION">, z.ZodLiteral<"INVALID_FUNCTION_CALL_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_UNKNOWN_TABLE_EXCEPTION">, z.ZodLiteral<"INVALID_TABLE_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"LOCAL_CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"MESSAGE_ATTACHMENT_TOO_LONG_ERROR">, z.ZodLiteral<"MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MISSING_SQL_QUERY_EXCEPTION">, z.ZodLiteral<"NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE">, z.ZodLiteral<"NO_QUERY_TO_VISUALIZE_EXCEPTION">, z.ZodLiteral<"NO_TABLES_TO_QUERY_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION">, z.ZodLiteral<"REPLY_PROCESS_TIMEOUT_EXCEPTION">, z.ZodLiteral<"RETRYABLE_PROCESSING_EXCEPTION">, z.ZodLiteral<"SQL_EXECUTION_EXCEPTION">, z.ZodLiteral<"STOP_PROCESS_DUE_TO_AUTO_REGENERATE">, z.ZodLiteral<"TABLES_MISSING_EXCEPTION">, z.ZodLiteral<"TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION">, z.ZodLiteral<"TOO_MANY_TABLES_EXCEPTION">, z.ZodLiteral<"UNEXPECTED_REPLY_PROCESS_EXCEPTION">, z.ZodLiteral<"UNKNOWN_AI_MODEL">, z.ZodLiteral<"UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_ACCESS_MISSING_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_NOT_FOUND_EXCEPTION">]>>; }, z.core.$strip>>; feedback: z.ZodOptional, z.ZodLiteral<"NONE">, z.ZodLiteral<"POSITIVE">]>>; }, z.core.$strip>>; id: z.ZodString; last_updated_timestamp: z.ZodOptional; message_id: z.ZodString; query_result: z.ZodOptional; row_count: z.ZodOptional; statement_id: z.ZodOptional; statement_id_signature: z.ZodOptional; }, z.core.$strip>>; space_id: z.ZodString; status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; user_id: z.ZodOptional; attachments: z.ZodOptional; suggested_questions: z.ZodOptional>; }, z.core.$strip>>; query: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; text: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>>; attachment_type: z.ZodOptional>; }, z.core.$strip>>>; auto_regenerate_count: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ attachment_id?: string | undefined; suggested_questions?: { questions?: string[] | undefined; } | undefined; query?: { description?: string | undefined; id?: string | undefined; last_updated_timestamp?: number | undefined; parameters?: { keyword?: string | undefined; sql_type?: string | undefined; value?: string | undefined; }[] | undefined; query?: string | undefined; query_result_metadata?: { is_truncated?: boolean | undefined; row_count?: number | undefined; } | undefined; statement_id?: string | undefined; title?: string | undefined; thoughts?: { thought_type: GenieThoughtType; content: string; }[] | undefined; } | undefined; text?: { content?: string | undefined; id?: string | undefined; purpose?: GenieTextAttachmentPurpose | undefined; } | undefined; attachment_type?: AttachmentType | undefined; }[], { content: string; conversation_id: string; id: string; message_id: string; space_id: string; created_timestamp?: number | undefined; error?: { error?: string | undefined; type?: "BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION" | "CHAT_COMPLETION_CLIENT_EXCEPTION" | "CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION" | "CHAT_COMPLETION_NETWORK_EXCEPTION" | "CONTENT_FILTER_EXCEPTION" | "CONTEXT_EXCEEDED_EXCEPTION" | "COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION" | "COULD_NOT_GET_UC_SCHEMA_EXCEPTION" | "DEPLOYMENT_NOT_FOUND_EXCEPTION" | "DESCRIBE_QUERY_INVALID_SQL_ERROR" | "DESCRIBE_QUERY_TIMEOUT" | "DESCRIBE_QUERY_UNEXPECTED_FAILURE" | "EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION" | "FUNCTIONS_NOT_AVAILABLE_EXCEPTION" | "FUNCTION_ARGUMENTS_INVALID_EXCEPTION" | "FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION" | "FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION" | "FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION" | "GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION" | "GENERIC_CHAT_COMPLETION_EXCEPTION" | "GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION" | "GENERIC_SQL_EXEC_API_CALL_EXCEPTION" | "ILLEGAL_PARAMETER_DEFINITION_EXCEPTION" | "INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION" | "INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION" | "INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION" | "INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION" | "INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION" | "INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION" | "INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION" | "INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION" | "INVALID_CHAT_COMPLETION_JSON_EXCEPTION" | "INVALID_COMPLETION_REQUEST_EXCEPTION" | "INVALID_FUNCTION_CALL_EXCEPTION" | "INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION" | "INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION" | "INVALID_SQL_UNKNOWN_TABLE_EXCEPTION" | "INVALID_TABLE_IDENTIFIER_EXCEPTION" | "LOCAL_CONTEXT_EXCEEDED_EXCEPTION" | "MESSAGE_ATTACHMENT_TOO_LONG_ERROR" | "MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION" | "MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION" | "MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION" | "MISSING_SQL_QUERY_EXCEPTION" | "NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE" | "NO_QUERY_TO_VISUALIZE_EXCEPTION" | "NO_TABLES_TO_QUERY_EXCEPTION" | "RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION" | "RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION" | "REPLY_PROCESS_TIMEOUT_EXCEPTION" | "RETRYABLE_PROCESSING_EXCEPTION" | "SQL_EXECUTION_EXCEPTION" | "STOP_PROCESS_DUE_TO_AUTO_REGENERATE" | "TABLES_MISSING_EXCEPTION" | "TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION" | "TOO_MANY_TABLES_EXCEPTION" | "UNEXPECTED_REPLY_PROCESS_EXCEPTION" | "UNKNOWN_AI_MODEL" | "UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION" | "WAREHOUSE_ACCESS_MISSING_EXCEPTION" | "WAREHOUSE_NOT_FOUND_EXCEPTION" | undefined; } | undefined; feedback?: { rating?: "NEGATIVE" | "NONE" | "POSITIVE" | undefined; } | undefined; last_updated_timestamp?: number | undefined; query_result?: { is_truncated?: boolean | undefined; row_count?: number | undefined; statement_id?: string | undefined; statement_id_signature?: string | undefined; } | undefined; status?: "ASKING_AI" | "CANCELLED" | "COMPLETED" | "EXECUTING_QUERY" | "FAILED" | "FETCHING_METADATA" | "FILTERING_CONTEXT" | "PENDING_WAREHOUSE" | "QUERY_RESULT_EXPIRED" | "SUBMITTED" | undefined; user_id?: number | undefined; attachments?: { attachment_id?: string | undefined; suggested_questions?: { questions?: string[] | undefined; } | undefined; query?: { description?: string | undefined; id?: string | undefined; last_updated_timestamp?: number | undefined; parameters?: { keyword?: string | undefined; sql_type?: string | undefined; value?: string | undefined; }[] | undefined; query?: string | undefined; query_result_metadata?: { is_truncated?: boolean | undefined; row_count?: number | undefined; } | undefined; statement_id?: string | undefined; title?: string | undefined; thoughts?: { thought_type: GenieThoughtType; content: string; }[] | undefined; } | undefined; text?: { content?: string | undefined; id?: string | undefined; purpose?: GenieTextAttachmentPurpose | undefined; } | undefined; attachment_type?: AttachmentType | undefined; }[] | undefined; auto_regenerate_count?: number | undefined; }>>; export type GenieResponse = z.infer; /** * `GenieSpace` widened with an optional `serialized_space` field * carrying a JSON-string representation of the space's full * definition (catalogs, schemas, tables, sample questions, prompts, * etc.) as exported by the workspace export endpoint. * * The base SDK shape (`description`, `space_id`, `title`, * `warehouse_id`) covers the directory-listing surface - enough to * route a chat. `serialized_space` is opt-in so callers that need * the full space schema (e.g. to seed a system prompt or to ship * the definition to an agent) can attach it without a second type. */ export declare const GenieSpaceSchema: z.ZodObject<{ description: z.ZodOptional; space_id: z.ZodString; title: z.ZodString; warehouse_id: z.ZodOptional; serialized_space: z.ZodOptional; }, z.core.$strip>; export type GenieSpace = z.infer; /** * Terminal Genie message statuses. The polling loop in the chat * driver stops as soon as the latest message has one of these * statuses. */ export declare const TERMINAL_STATUSES: readonly ["COMPLETED", "FAILED", "CANCELLED"]; export type TerminalStatus = (typeof TERMINAL_STATUSES)[number]; /** Narrow `MessageStatus | undefined` to a {@link TerminalStatus}. */ export declare function isTerminalStatus(s: MessageStatus | undefined): s is TerminalStatus; /** * Convert a raw Genie wire status (`FETCHING_METADATA`, * `ASKING_AI`, `EXECUTING_QUERY`, ...) into a short, sentence-cased * label safe to drop into a UI pill. Known states get a curated * label; unknown states fall back to `string.tokenizeWithOptions` * so new states still render cleanly without code changes. * * Pure (no Node-only deps), safe for browser bundles. Both the * Genie agent (server) and any UI that subscribes to status events * call this so labels stay in lock-step across the wire. */ export declare function humanizeStatus(status: MessageStatus): string; /** * Inspect a {@link GenieAttachment} and return the * {@link AttachmentType} of payload it carries. Returns the first * known sub-object that's present; if none of the known ones are * populated, falls back to the first non-bookkeeping key * (forward-compat for types we don't model yet), else `"unknown"`. * * Honors a pre-set `attachment_type` if one is already on the * value, so this is idempotent across re-detections. */ export declare function detectAttachmentType(att: GenieAttachment): AttachmentType; /** * Where on the wire an event was observed. Spread into every * attachment-scoped event payload so subscribers can route, log, * or correlate without re-walking the message. * * Fields: * - `space_id`: the Genie space the conversation lives in. * - `conversation_id`: conversation id once Genie has assigned one. * - `message_id`: Genie message id for the active turn. * - `attachment_id`: attachment the event came from. Optional * because Genie sometimes emits an anonymous main-answer * attachment without an id; those still get events, just with * `attachment_id` undefined. */ export declare const GenieChatLocationSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; }, z.core.$strip>; export type GenieChatLocation = z.infer; /** * Lifecycle event: the question this turn is asking Genie. Fires * once per `genieEventChat` call, the first time the underlying * `genieChat` loop yields a `GenieMessage`. Carries the prompt * text Genie echoed back on `message.content` and the assigned * `message_id` so subscribers can group every subsequent event * for this turn under one stable key. `conversation_id` is * populated for both opening and follow-up turns (Genie assigns * it on `startConversation`). * * Deferred (instead of fired synchronously on entry) so the * `message_id` is available when the event lands - that one round * trip costs ~200ms but lets UIs render question / thinking / * query / text as a single grouped block per Genie call instead * of a flat stream. * * `attachment_id` is intentionally absent - questions are turn * scoped, not attachment scoped. */ export declare const QuestionEventSchema: z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"question">; content: z.ZodString; }, z.core.$strip>; export type QuestionEvent = z.infer; /** * Lifecycle event: raw `GenieMessage` snapshot for the active * turn. Fires once per poll yield. The full message shape * (including the widened thought / regen / attachment-type * fields) is exposed inline as `message`; consumers narrow on * `event.type === "message"` and reach for `event.message`. */ export declare const MessageEventSchema: z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"message">; message: z.ZodObject<{ content: z.ZodString; conversation_id: z.ZodString; created_timestamp: z.ZodOptional; error: z.ZodOptional; type: z.ZodOptional, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_NETWORK_EXCEPTION">, z.ZodLiteral<"CONTENT_FILTER_EXCEPTION">, z.ZodLiteral<"CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_UC_SCHEMA_EXCEPTION">, z.ZodLiteral<"DEPLOYMENT_NOT_FOUND_EXCEPTION">, z.ZodLiteral<"DESCRIBE_QUERY_INVALID_SQL_ERROR">, z.ZodLiteral<"DESCRIBE_QUERY_TIMEOUT">, z.ZodLiteral<"DESCRIBE_QUERY_UNEXPECTED_FAILURE">, z.ZodLiteral<"EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION">, z.ZodLiteral<"FUNCTIONS_NOT_AVAILABLE_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION">, z.ZodLiteral<"FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION">, z.ZodLiteral<"GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION">, z.ZodLiteral<"GENERIC_SQL_EXEC_API_CALL_EXCEPTION">, z.ZodLiteral<"ILLEGAL_PARAMETER_DEFINITION_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_COMPLETION_REQUEST_EXCEPTION">, z.ZodLiteral<"INVALID_FUNCTION_CALL_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_UNKNOWN_TABLE_EXCEPTION">, z.ZodLiteral<"INVALID_TABLE_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"LOCAL_CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"MESSAGE_ATTACHMENT_TOO_LONG_ERROR">, z.ZodLiteral<"MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MISSING_SQL_QUERY_EXCEPTION">, z.ZodLiteral<"NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE">, z.ZodLiteral<"NO_QUERY_TO_VISUALIZE_EXCEPTION">, z.ZodLiteral<"NO_TABLES_TO_QUERY_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION">, z.ZodLiteral<"REPLY_PROCESS_TIMEOUT_EXCEPTION">, z.ZodLiteral<"RETRYABLE_PROCESSING_EXCEPTION">, z.ZodLiteral<"SQL_EXECUTION_EXCEPTION">, z.ZodLiteral<"STOP_PROCESS_DUE_TO_AUTO_REGENERATE">, z.ZodLiteral<"TABLES_MISSING_EXCEPTION">, z.ZodLiteral<"TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION">, z.ZodLiteral<"TOO_MANY_TABLES_EXCEPTION">, z.ZodLiteral<"UNEXPECTED_REPLY_PROCESS_EXCEPTION">, z.ZodLiteral<"UNKNOWN_AI_MODEL">, z.ZodLiteral<"UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_ACCESS_MISSING_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_NOT_FOUND_EXCEPTION">]>>; }, z.core.$strip>>; feedback: z.ZodOptional, z.ZodLiteral<"NONE">, z.ZodLiteral<"POSITIVE">]>>; }, z.core.$strip>>; id: z.ZodString; last_updated_timestamp: z.ZodOptional; message_id: z.ZodString; query_result: z.ZodOptional; row_count: z.ZodOptional; statement_id: z.ZodOptional; statement_id_signature: z.ZodOptional; }, z.core.$strip>>; space_id: z.ZodString; status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; user_id: z.ZodOptional; attachments: z.ZodOptional; suggested_questions: z.ZodOptional>; }, z.core.$strip>>; query: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; text: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>>; attachment_type: z.ZodOptional>; }, z.core.$strip>>>; auto_regenerate_count: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; export type MessageEvent = z.infer; /** * Top-level `message.status` transitioned. Fires for every * distinct status seen on the wire (e.g. `SUBMITTED` -> * `FILTERING_CONTEXT` -> `ASKING_AI` -> `PENDING_WAREHOUSE` -> * `ASKING_AI` -> `COMPLETED`). */ export declare const StatusEventSchema: z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"status">; status: z.ZodUnion, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>; previous_status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; }, z.core.$strip>; export type StatusEvent = z.infer; /** * A new attachment slot appeared in `message.attachments[]`. * Fires exactly once per attachment (matched by `attachment_id`, * positionally for anonymous attachments) the first time we see * it. The slot's payload kind lands in `attachment_type` so the * outer `type` discriminator stays unambiguous. */ export declare const AttachmentEventSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"attachment">; index: z.ZodNumber; attachment_type: z.ZodCustom; }, z.core.$strip>; export type AttachmentEvent = z.infer; /** * A new reasoning step appeared on a query attachment * (`attachments[i].query.thoughts[i]`). Deduplicated per * `(thought_type, content)` tuple within an attachment so * subscribers don't see the same thought multiple times - Genie * sometimes mutates existing thought slots in place, so the diff * is value-based rather than positional. */ export declare const ThinkingEventSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"thinking">; text: z.ZodString; thought_type: z.ZodCustom; }, z.core.$strip>; export type ThinkingEvent = z.infer; /** * A text-attachment `content` field appeared or changed * (`attachments[i].text.content`). Fires whenever the snapshot * value differs from the previous one for the same attachment. */ export declare const TextEventSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>; export type TextEvent = z.infer; /** * SQL was finalized on a query attachment * (`attachments[i].query.query`). Fires once when the SQL string * transitions from undefined to defined, and again if Genie ever * rewrites it. `title` and `description` are denormalised off the * attachment's `query.title` / `query.description` so consumers * can label the SQL pill without re-walking the message. */ export declare const QueryEventSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"query">; sql: z.ZodString; title: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; export type QueryEvent = z.infer; /** * SQL was submitted to a SQL warehouse and a statement id was * assigned (`attachments[i].query.statement_id`). Fires when the * statement id transitions from undefined to defined - this is the * point at which `client.statementExecution.getStatement({ statement_id })` * becomes a valid call. */ export declare const StatementEventSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"statement">; statement_id: z.ZodString; }, z.core.$strip>; export type StatementEvent = z.infer; /** * Row count for a query attachment's result changed * (`attachments[i].query.query_result_metadata.row_count`). Fires * on every change, including the initial `undefined -> 0` and the * later `0 -> N` once the warehouse finishes execution. */ export declare const RowsEventSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"rows">; row_count: z.ZodNumber; previous_row_count: z.ZodOptional; statement_id: z.ZodOptional; }, z.core.$strip>; export type RowsEvent = z.infer; /** * Genie produced a follow-up suggested-questions list * (`attachments[i].suggested_questions.questions[]`). Fires once * when the list appears, and again if Genie rewrites it. */ export declare const SuggestedQuestionsEventSchema: z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"suggested_questions">; questions: z.ZodArray; }, z.core.$strip>; export type SuggestedQuestionsEvent = z.infer; /** * The active turn reached a terminal status. Always fires once * per turn (immediately after the terminal `message` event). * Carries the final `GenieMessage` snapshot inline so subscribers * don't need to keep their own copy of the last message. */ export declare const ResultEventSchema: z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"result">; status: z.ZodEnum<{ CANCELLED: "CANCELLED"; COMPLETED: "COMPLETED"; FAILED: "FAILED"; }>; message: z.ZodObject<{ content: z.ZodString; conversation_id: z.ZodString; created_timestamp: z.ZodOptional; error: z.ZodOptional; type: z.ZodOptional, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_NETWORK_EXCEPTION">, z.ZodLiteral<"CONTENT_FILTER_EXCEPTION">, z.ZodLiteral<"CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_UC_SCHEMA_EXCEPTION">, z.ZodLiteral<"DEPLOYMENT_NOT_FOUND_EXCEPTION">, z.ZodLiteral<"DESCRIBE_QUERY_INVALID_SQL_ERROR">, z.ZodLiteral<"DESCRIBE_QUERY_TIMEOUT">, z.ZodLiteral<"DESCRIBE_QUERY_UNEXPECTED_FAILURE">, z.ZodLiteral<"EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION">, z.ZodLiteral<"FUNCTIONS_NOT_AVAILABLE_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION">, z.ZodLiteral<"FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION">, z.ZodLiteral<"GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION">, z.ZodLiteral<"GENERIC_SQL_EXEC_API_CALL_EXCEPTION">, z.ZodLiteral<"ILLEGAL_PARAMETER_DEFINITION_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_COMPLETION_REQUEST_EXCEPTION">, z.ZodLiteral<"INVALID_FUNCTION_CALL_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_UNKNOWN_TABLE_EXCEPTION">, z.ZodLiteral<"INVALID_TABLE_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"LOCAL_CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"MESSAGE_ATTACHMENT_TOO_LONG_ERROR">, z.ZodLiteral<"MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MISSING_SQL_QUERY_EXCEPTION">, z.ZodLiteral<"NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE">, z.ZodLiteral<"NO_QUERY_TO_VISUALIZE_EXCEPTION">, z.ZodLiteral<"NO_TABLES_TO_QUERY_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION">, z.ZodLiteral<"REPLY_PROCESS_TIMEOUT_EXCEPTION">, z.ZodLiteral<"RETRYABLE_PROCESSING_EXCEPTION">, z.ZodLiteral<"SQL_EXECUTION_EXCEPTION">, z.ZodLiteral<"STOP_PROCESS_DUE_TO_AUTO_REGENERATE">, z.ZodLiteral<"TABLES_MISSING_EXCEPTION">, z.ZodLiteral<"TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION">, z.ZodLiteral<"TOO_MANY_TABLES_EXCEPTION">, z.ZodLiteral<"UNEXPECTED_REPLY_PROCESS_EXCEPTION">, z.ZodLiteral<"UNKNOWN_AI_MODEL">, z.ZodLiteral<"UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_ACCESS_MISSING_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_NOT_FOUND_EXCEPTION">]>>; }, z.core.$strip>>; feedback: z.ZodOptional, z.ZodLiteral<"NONE">, z.ZodLiteral<"POSITIVE">]>>; }, z.core.$strip>>; id: z.ZodString; last_updated_timestamp: z.ZodOptional; message_id: z.ZodString; query_result: z.ZodOptional; row_count: z.ZodOptional; statement_id: z.ZodOptional; statement_id_signature: z.ZodOptional; }, z.core.$strip>>; space_id: z.ZodString; status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; user_id: z.ZodOptional; attachments: z.ZodOptional; suggested_questions: z.ZodOptional>; }, z.core.$strip>>; query: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; text: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>>; attachment_type: z.ZodOptional>; }, z.core.$strip>>>; auto_regenerate_count: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; export type ResultEvent = z.infer; /** * Discriminated union yielded by `genieEventChat`. Each variant * is a single flat object with `type` as the discriminator and * the payload fields hoisted directly to the top level - no * `payload` wrapper. Consumers narrow on `type` and read fields * inline: * * @example * for await (const event of genieEventChat(spaceId, "Top stores?")) { * switch (event.type) { * case "thinking": * console.log(event.thought_type, event.text); * break; * case "result": * console.log("done:", event.status); * break; * } * } * * Stream order per turn: * * 1. `question`, emitted with the first `message` yield (deferred so * the assigned `message_id` is available), carrying the prompt * this turn sent to Genie. * 2. `message` for every poll yield (raw `GenieMessage` on * `event.message`). * 3. Any derived events the snapshot diff produced (`status`, * `attachment`, `thinking`, `text`, `query`, `statement`, * `rows`, `suggested_questions`) in that fixed order. * 4. On the terminal snapshot, a final `result` event. * * Errors propagate via the generator throwing (`try`/`catch` the * `for await`), not via an `error` variant on this union. */ export declare const GenieChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"question">; content: z.ZodString; }, z.core.$strip>, z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"message">; message: z.ZodObject<{ content: z.ZodString; conversation_id: z.ZodString; created_timestamp: z.ZodOptional; error: z.ZodOptional; type: z.ZodOptional, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_NETWORK_EXCEPTION">, z.ZodLiteral<"CONTENT_FILTER_EXCEPTION">, z.ZodLiteral<"CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_UC_SCHEMA_EXCEPTION">, z.ZodLiteral<"DEPLOYMENT_NOT_FOUND_EXCEPTION">, z.ZodLiteral<"DESCRIBE_QUERY_INVALID_SQL_ERROR">, z.ZodLiteral<"DESCRIBE_QUERY_TIMEOUT">, z.ZodLiteral<"DESCRIBE_QUERY_UNEXPECTED_FAILURE">, z.ZodLiteral<"EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION">, z.ZodLiteral<"FUNCTIONS_NOT_AVAILABLE_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION">, z.ZodLiteral<"FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION">, z.ZodLiteral<"GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION">, z.ZodLiteral<"GENERIC_SQL_EXEC_API_CALL_EXCEPTION">, z.ZodLiteral<"ILLEGAL_PARAMETER_DEFINITION_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_COMPLETION_REQUEST_EXCEPTION">, z.ZodLiteral<"INVALID_FUNCTION_CALL_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_UNKNOWN_TABLE_EXCEPTION">, z.ZodLiteral<"INVALID_TABLE_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"LOCAL_CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"MESSAGE_ATTACHMENT_TOO_LONG_ERROR">, z.ZodLiteral<"MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MISSING_SQL_QUERY_EXCEPTION">, z.ZodLiteral<"NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE">, z.ZodLiteral<"NO_QUERY_TO_VISUALIZE_EXCEPTION">, z.ZodLiteral<"NO_TABLES_TO_QUERY_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION">, z.ZodLiteral<"REPLY_PROCESS_TIMEOUT_EXCEPTION">, z.ZodLiteral<"RETRYABLE_PROCESSING_EXCEPTION">, z.ZodLiteral<"SQL_EXECUTION_EXCEPTION">, z.ZodLiteral<"STOP_PROCESS_DUE_TO_AUTO_REGENERATE">, z.ZodLiteral<"TABLES_MISSING_EXCEPTION">, z.ZodLiteral<"TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION">, z.ZodLiteral<"TOO_MANY_TABLES_EXCEPTION">, z.ZodLiteral<"UNEXPECTED_REPLY_PROCESS_EXCEPTION">, z.ZodLiteral<"UNKNOWN_AI_MODEL">, z.ZodLiteral<"UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_ACCESS_MISSING_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_NOT_FOUND_EXCEPTION">]>>; }, z.core.$strip>>; feedback: z.ZodOptional, z.ZodLiteral<"NONE">, z.ZodLiteral<"POSITIVE">]>>; }, z.core.$strip>>; id: z.ZodString; last_updated_timestamp: z.ZodOptional; message_id: z.ZodString; query_result: z.ZodOptional; row_count: z.ZodOptional; statement_id: z.ZodOptional; statement_id_signature: z.ZodOptional; }, z.core.$strip>>; space_id: z.ZodString; status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; user_id: z.ZodOptional; attachments: z.ZodOptional; suggested_questions: z.ZodOptional>; }, z.core.$strip>>; query: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; text: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>>; attachment_type: z.ZodOptional>; }, z.core.$strip>>>; auto_regenerate_count: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"status">; status: z.ZodUnion, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>; previous_status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; }, z.core.$strip>, z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"attachment">; index: z.ZodNumber; attachment_type: z.ZodCustom; }, z.core.$strip>, z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"thinking">; text: z.ZodString; thought_type: z.ZodCustom; }, z.core.$strip>, z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"query">; sql: z.ZodString; title: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"statement">; statement_id: z.ZodString; }, z.core.$strip>, z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"rows">; row_count: z.ZodNumber; previous_row_count: z.ZodOptional; statement_id: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ space_id: z.ZodString; conversation_id: z.ZodOptional; message_id: z.ZodOptional; attachment_id: z.ZodOptional; type: z.ZodLiteral<"suggested_questions">; questions: z.ZodArray; }, z.core.$strip>, z.ZodObject<{ conversation_id: z.ZodOptional; space_id: z.ZodString; message_id: z.ZodOptional; type: z.ZodLiteral<"result">; status: z.ZodEnum<{ CANCELLED: "CANCELLED"; COMPLETED: "COMPLETED"; FAILED: "FAILED"; }>; message: z.ZodObject<{ content: z.ZodString; conversation_id: z.ZodString; created_timestamp: z.ZodOptional; error: z.ZodOptional; type: z.ZodOptional, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION">, z.ZodLiteral<"CHAT_COMPLETION_NETWORK_EXCEPTION">, z.ZodLiteral<"CONTENT_FILTER_EXCEPTION">, z.ZodLiteral<"CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION">, z.ZodLiteral<"COULD_NOT_GET_UC_SCHEMA_EXCEPTION">, z.ZodLiteral<"DEPLOYMENT_NOT_FOUND_EXCEPTION">, z.ZodLiteral<"DESCRIBE_QUERY_INVALID_SQL_ERROR">, z.ZodLiteral<"DESCRIBE_QUERY_TIMEOUT">, z.ZodLiteral<"DESCRIBE_QUERY_UNEXPECTED_FAILURE">, z.ZodLiteral<"EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION">, z.ZodLiteral<"FUNCTIONS_NOT_AVAILABLE_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION">, z.ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION">, z.ZodLiteral<"FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION">, z.ZodLiteral<"GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_EXCEPTION">, z.ZodLiteral<"GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION">, z.ZodLiteral<"GENERIC_SQL_EXEC_API_CALL_EXCEPTION">, z.ZodLiteral<"ILLEGAL_PARAMETER_DEFINITION_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION">, z.ZodLiteral<"INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION">, z.ZodLiteral<"INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_CHAT_COMPLETION_JSON_EXCEPTION">, z.ZodLiteral<"INVALID_COMPLETION_REQUEST_EXCEPTION">, z.ZodLiteral<"INVALID_FUNCTION_CALL_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION">, z.ZodLiteral<"INVALID_SQL_UNKNOWN_TABLE_EXCEPTION">, z.ZodLiteral<"INVALID_TABLE_IDENTIFIER_EXCEPTION">, z.ZodLiteral<"LOCAL_CONTEXT_EXCEEDED_EXCEPTION">, z.ZodLiteral<"MESSAGE_ATTACHMENT_TOO_LONG_ERROR">, z.ZodLiteral<"MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION">, z.ZodLiteral<"MISSING_SQL_QUERY_EXCEPTION">, z.ZodLiteral<"NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE">, z.ZodLiteral<"NO_QUERY_TO_VISUALIZE_EXCEPTION">, z.ZodLiteral<"NO_TABLES_TO_QUERY_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION">, z.ZodLiteral<"RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION">, z.ZodLiteral<"REPLY_PROCESS_TIMEOUT_EXCEPTION">, z.ZodLiteral<"RETRYABLE_PROCESSING_EXCEPTION">, z.ZodLiteral<"SQL_EXECUTION_EXCEPTION">, z.ZodLiteral<"STOP_PROCESS_DUE_TO_AUTO_REGENERATE">, z.ZodLiteral<"TABLES_MISSING_EXCEPTION">, z.ZodLiteral<"TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION">, z.ZodLiteral<"TOO_MANY_TABLES_EXCEPTION">, z.ZodLiteral<"UNEXPECTED_REPLY_PROCESS_EXCEPTION">, z.ZodLiteral<"UNKNOWN_AI_MODEL">, z.ZodLiteral<"UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_ACCESS_MISSING_EXCEPTION">, z.ZodLiteral<"WAREHOUSE_NOT_FOUND_EXCEPTION">]>>; }, z.core.$strip>>; feedback: z.ZodOptional, z.ZodLiteral<"NONE">, z.ZodLiteral<"POSITIVE">]>>; }, z.core.$strip>>; id: z.ZodString; last_updated_timestamp: z.ZodOptional; message_id: z.ZodString; query_result: z.ZodOptional; row_count: z.ZodOptional; statement_id: z.ZodOptional; statement_id_signature: z.ZodOptional; }, z.core.$strip>>; space_id: z.ZodString; status: z.ZodOptional, z.ZodLiteral<"CANCELLED">, z.ZodLiteral<"COMPLETED">, z.ZodLiteral<"EXECUTING_QUERY">, z.ZodLiteral<"FAILED">, z.ZodLiteral<"FETCHING_METADATA">, z.ZodLiteral<"FILTERING_CONTEXT">, z.ZodLiteral<"PENDING_WAREHOUSE">, z.ZodLiteral<"QUERY_RESULT_EXPIRED">, z.ZodLiteral<"SUBMITTED">]>>; user_id: z.ZodOptional; attachments: z.ZodOptional; suggested_questions: z.ZodOptional>; }, z.core.$strip>>; query: z.ZodOptional; id: z.ZodOptional; last_updated_timestamp: z.ZodOptional; parameters: z.ZodOptional; sql_type: z.ZodOptional; value: z.ZodOptional; }, z.core.$strip>>>; query: z.ZodOptional; query_result_metadata: z.ZodOptional; row_count: z.ZodOptional; }, z.core.$strip>>; statement_id: z.ZodOptional; title: z.ZodOptional; thoughts: z.ZodOptional; content: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; text: z.ZodOptional; id: z.ZodOptional; purpose: z.ZodOptional>; }, z.core.$strip>>; attachment_type: z.ZodOptional>; }, z.core.$strip>>>; auto_regenerate_count: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>], "type">; export type GenieChatEvent = z.infer; /** Discriminator type for {@link GenieChatEvent}. */ export type GenieChatEventType = GenieChatEvent["type"]; /** * Field set for a given {@link GenieChatEventType} - the variant * with the `type` discriminator stripped. Used by detectors in * `event.ts` so each detector returns just the payload fields and * the orchestrator stamps `type` at yield time. */ export type GenieChatEventFields = Omit, "type">;