Variable: GenieMessageSchema
constGenieMessageSchema:ZodObject<{attachments:ZodOptional<ZodArray<ZodObject<{attachment_id:ZodOptional<ZodString>;attachment_type:ZodOptional<ZodString>;query:ZodOptional<ZodObject<{description:ZodOptional<ZodString>;id:ZodOptional<ZodString>;last_updated_timestamp:ZodOptional<ZodNumber>;parameters:ZodOptional<ZodArray<…>>;query:ZodOptional<ZodString>;query_result_metadata:ZodOptional<ZodObject<…, …>>;statement_id:ZodOptional<ZodString>;thoughts:ZodOptional<ZodArray<…>>;title:ZodOptional<ZodString>; },$strip>>;suggested_questions:ZodOptional<ZodObject<{questions:ZodOptional<ZodArray<…>>; },$strip>>;text:ZodOptional<ZodObject<{content:ZodOptional<ZodString>;id:ZodOptional<ZodString>;metadata:ZodOptional<ZodUnknown>;purpose:ZodOptional<ZodString>; },$strip>>; },$strip>>>;auto_regenerate_count:ZodOptional<ZodNumber>;content:ZodString;conversation_id:ZodString;created_timestamp:ZodOptional<ZodNumber>;error:ZodOptional<ZodObject<{error:ZodOptional<ZodString>;type:ZodOptional<ZodUnion<readonly [ZodLiteral<"BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION">,ZodLiteral<"CHAT_COMPLETION_CLIENT_EXCEPTION">,ZodLiteral<"CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION">,ZodLiteral<"CHAT_COMPLETION_NETWORK_EXCEPTION">,ZodLiteral<"CONTENT_FILTER_EXCEPTION">,ZodLiteral<"CONTEXT_EXCEEDED_EXCEPTION">,ZodLiteral<"COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION">,ZodLiteral<"COULD_NOT_GET_UC_SCHEMA_EXCEPTION">,ZodLiteral<"DEPLOYMENT_NOT_FOUND_EXCEPTION">,ZodLiteral<"DESCRIBE_QUERY_INVALID_SQL_ERROR">,ZodLiteral<"DESCRIBE_QUERY_TIMEOUT">,ZodLiteral<"DESCRIBE_QUERY_UNEXPECTED_FAILURE">,ZodLiteral<"EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION">,ZodLiteral<"FUNCTIONS_NOT_AVAILABLE_EXCEPTION">,ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_EXCEPTION">,ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION">,ZodLiteral<"FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION">,ZodLiteral<"FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION">,ZodLiteral<"GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION">,ZodLiteral<"GENERIC_CHAT_COMPLETION_EXCEPTION">,ZodLiteral<"GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION">,ZodLiteral<"GENERIC_SQL_EXEC_API_CALL_EXCEPTION">,ZodLiteral<"ILLEGAL_PARAMETER_DEFINITION_EXCEPTION">,ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION">,ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION">,ZodLiteral<"INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION">,ZodLiteral<"INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION">,ZodLiteral<"INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION">,ZodLiteral<"INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION">,ZodLiteral<"INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION">,ZodLiteral<"INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION">,ZodLiteral<"INVALID_CHAT_COMPLETION_JSON_EXCEPTION">,ZodLiteral<"INVALID_COMPLETION_REQUEST_EXCEPTION">,ZodLiteral<"INVALID_FUNCTION_CALL_EXCEPTION">,ZodLiteral<"INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION">,ZodLiteral<"INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION">,ZodLiteral<"INVALID_SQL_UNKNOWN_TABLE_EXCEPTION">,ZodLiteral<"INVALID_TABLE_IDENTIFIER_EXCEPTION">,ZodLiteral<"LOCAL_CONTEXT_EXCEEDED_EXCEPTION">,ZodLiteral<"MESSAGE_ATTACHMENT_TOO_LONG_ERROR">,ZodLiteral<"MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION">,ZodLiteral<"MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION">,ZodLiteral<"MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION">,ZodLiteral<"MISSING_SQL_QUERY_EXCEPTION">,ZodLiteral<"NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE">,ZodLiteral<"NO_QUERY_TO_VISUALIZE_EXCEPTION">,ZodLiteral<"NO_TABLES_TO_QUERY_EXCEPTION">,ZodLiteral<"RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION">,ZodLiteral<"RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION">,ZodLiteral<"REPLY_PROCESS_TIMEOUT_EXCEPTION">,ZodLiteral<"RETRYABLE_PROCESSING_EXCEPTION">,ZodLiteral<"SQL_EXECUTION_EXCEPTION">,ZodLiteral<"STOP_PROCESS_DUE_TO_AUTO_REGENERATE">,ZodLiteral<"TABLES_MISSING_EXCEPTION">,ZodLiteral<"TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION">,ZodLiteral<"TOO_MANY_TABLES_EXCEPTION">,ZodLiteral<"UNEXPECTED_REPLY_PROCESS_EXCEPTION">,ZodLiteral<"UNKNOWN_AI_MODEL">,ZodLiteral<"UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION">,ZodLiteral<"WAREHOUSE_ACCESS_MISSING_EXCEPTION">,ZodLiteral<"WAREHOUSE_NOT_FOUND_EXCEPTION">]>>; },$strip>>;feedback:ZodOptional<ZodObject<{rating:ZodOptional<ZodUnion<readonly [ZodLiteral<"NEGATIVE">,ZodLiteral<"NONE">,ZodLiteral<"POSITIVE">]>>; },$strip>>;id:ZodString;last_updated_timestamp:ZodOptional<ZodNumber>;message_id:ZodString;query_result:ZodOptional<ZodObject<{is_truncated:ZodOptional<ZodBoolean>;row_count:ZodOptional<ZodNumber>;statement_id:ZodOptional<ZodString>;statement_id_signature:ZodOptional<ZodString>; },$strip>>;space_id:ZodString;status:ZodOptional<ZodUnion<readonly [ZodLiteral<"ASKING_AI">,ZodLiteral<"CANCELLED">,ZodLiteral<"COMPLETED">,ZodLiteral<"EXECUTING_QUERY">,ZodLiteral<"FAILED">,ZodLiteral<"FETCHING_METADATA">,ZodLiteral<"FILTERING_CONTEXT">,ZodLiteral<"PENDING_WAREHOUSE">,ZodLiteral<"QUERY_RESULT_EXPIRED">,ZodLiteral<"SUBMITTED">]>>;user_id:ZodOptional<ZodNumber>; },$strip>
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 GenieAttachmentSchema soattachment.query?.thoughts(and theattachment_typediscriminator) 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.
GenieMessage fields
Section titled “GenieMessage fields”content: User message contentconversation_id: Conversation IDcreated_timestamp(optional): Timestamp when the message was createderror(optional): Error message if Genie failed to respond to the messagefeedback(optional): User feedback for the message if providedfeedback.rating(optional): The feedback ratingid: Message ID. Legacy identifier, use message_id insteadlast_updated_timestamp(optional): Timestamp when the message was last updatedmessage_id: Message IDquery_result(optional): The result of SQL query if the message includes a query attachment. Deprecated. Usequery_result_metadatainGenieQueryAttachmentinstead.query_result.is_truncated(optional): If result is truncatedquery_result.row_count(optional): Row count of the resultquery_result.statement_id(optional): Statement Execution API statement id. Use Get status, manifest, and result first chunk to get the full result data.query_result.statement_id_signature(optional): JWT corresponding to the statement contained in this resultspace_id: Genie space IDstatus(optional): MessageStatus. The possible values are: *FETCHING_METADATA: Fetching metadata from the data sources. *FILTERING_CONTEXT: Running smart context step to determine relevant context. *ASKING_AI: Waiting for the LLM to respond to the user’s question. *PENDING_WAREHOUSE: Waiting for warehouse before the SQL query can start executing. *EXECUTING_QUERY: Executing a generated SQL query. Get the SQL query result by calling getMessageAttachmentQueryResult API. *FAILED: The response generation or query execution failed. Seeerrorfield. *COMPLETED: Message processing is completed. Results are in theattachmentsfield. Get the SQL query result by calling getMessageAttachmentQueryResult API. *SUBMITTED: Message has been submitted. *QUERY_RESULT_EXPIRED: SQL result is not available anymore. The user needs to rerun the query. Rerun the SQL query result by calling executeMessageAttachmentQuery API. *CANCELLED: Message has been cancelled.user_id(optional): ID of the user who created the message