@dbx-tools/sdk-shared 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,957 @@
1
+ // AUTO-GENERATED by `bun scripts/codegen.ts` - DO NOT EDIT.
2
+ // Regenerate via `bun run prebuild`.
3
+ // Generated by ts-to-zod
4
+ import { z } from "zod";
5
+ export const authorizationDetailsGrantRuleSchema = z.object({
6
+ /**
7
+ * @description Permission sets for dashboard are defined in iam-common/rbac-common/permission-sets/definitions/TreeStoreBasePermissionSets Ex: `permissionSets/dashboard.runner`
8
+ */
9
+ permission_set: z.string().optional().describe("Permission sets for dashboard are defined in iam-common/rbac-common/permission-sets/definitions/TreeStoreBasePermissionSets Ex: `permissionSets/dashboard.runner`")
10
+ });
11
+ export const cronScheduleSchema = z.object({
12
+ /**
13
+ * @description A cron expression using quartz syntax. EX: `0 0 8 * * ?` represents everyday at 8am. See [Cron Trigger] for details. [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html
14
+ */
15
+ quartz_cron_expression: z.string().describe("A cron expression using quartz syntax. EX: `0 0 8 * * ?` represents everyday at 8am. See [Cron Trigger] for details. [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html"),
16
+ /**
17
+ * @description A Java timezone id. The schedule will be resolved with respect to this timezone. See [Java TimeZone] for details. [Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html
18
+ */
19
+ timezone_id: z.string().describe("A Java timezone id. The schedule will be resolved with respect to this timezone. See [Java TimeZone] for details. [Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html")
20
+ });
21
+ export const lifecycleStateSchema = z.union([z.literal("ACTIVE"), z.literal("TRASHED")]);
22
+ export const dashboardViewSchema = z.literal("DASHBOARD_VIEW_BASIC");
23
+ export const deleteScheduleRequestSchema = z.object({
24
+ /**
25
+ * @description UUID identifying the dashboard to which the schedule belongs.
26
+ */
27
+ dashboard_id: z.string().describe("UUID identifying the dashboard to which the schedule belongs."),
28
+ /**
29
+ * @description The etag for the schedule. Optionally, it can be provided to verify that the schedule has not been modified from its last retrieval.
30
+ */
31
+ etag: z.string().optional().describe("The etag for the schedule. Optionally, it can be provided to verify that the schedule has not been modified from its last retrieval."),
32
+ /**
33
+ * @description UUID identifying the schedule.
34
+ */
35
+ schedule_id: z.string().describe("UUID identifying the schedule.")
36
+ });
37
+ export const deleteSubscriptionRequestSchema = z.object({
38
+ /**
39
+ * @description UUID identifying the dashboard which the subscription belongs.
40
+ */
41
+ dashboard_id: z.string().describe("UUID identifying the dashboard which the subscription belongs."),
42
+ /**
43
+ * @description The etag for the subscription. Can be optionally provided to ensure that the subscription has not been modified since the last read.
44
+ */
45
+ etag: z.string().optional().describe("The etag for the subscription. Can be optionally provided to ensure that the subscription has not been modified since the last read."),
46
+ /**
47
+ * @description UUID identifying the schedule which the subscription belongs.
48
+ */
49
+ schedule_id: z.string().describe("UUID identifying the schedule which the subscription belongs."),
50
+ /**
51
+ * @description UUID identifying the subscription.
52
+ */
53
+ subscription_id: z.string().describe("UUID identifying the subscription.")
54
+ });
55
+ /**
56
+ * @description Follow-up questions suggested by Genie
57
+ */
58
+ export const genieSuggestedQuestionsAttachmentSchema = z.object({
59
+ /**
60
+ * @description The suggested follow-up questions
61
+ */
62
+ questions: z.array(z.string()).optional().describe("The suggested follow-up questions")
63
+ });
64
+ export const genieConversationSchema = z.object({
65
+ /**
66
+ * @description Conversation ID
67
+ */
68
+ conversation_id: z.string().describe("Conversation ID"),
69
+ /**
70
+ * @description Timestamp when the message was created
71
+ */
72
+ created_timestamp: z.number().optional().describe("Timestamp when the message was created"),
73
+ /**
74
+ * @description Conversation ID. Legacy identifier, use conversation_id instead
75
+ */
76
+ id: z.string().describe("Conversation ID. Legacy identifier, use conversation_id instead"),
77
+ /**
78
+ * @description Timestamp when the message was last updated
79
+ */
80
+ last_updated_timestamp: z.number().optional().describe("Timestamp when the message was last updated"),
81
+ /**
82
+ * @description Genie space ID
83
+ */
84
+ space_id: z.string().describe("Genie space ID"),
85
+ /**
86
+ * @description Conversation title
87
+ */
88
+ title: z.string().describe("Conversation title"),
89
+ /**
90
+ * @description ID of the user who created the conversation
91
+ */
92
+ user_id: z.number().describe("ID of the user who created the conversation")
93
+ });
94
+ export const genieConversationSummarySchema = z.object({
95
+ conversation_id: z.string(),
96
+ created_timestamp: z.number(),
97
+ title: z.string()
98
+ });
99
+ export const genieCreateConversationMessageRequestSchema = z.object({
100
+ /**
101
+ * @description User message content.
102
+ */
103
+ content: z.string().describe("User message content."),
104
+ /**
105
+ * @description The ID associated with the conversation.
106
+ */
107
+ conversation_id: z.string().describe("The ID associated with the conversation."),
108
+ /**
109
+ * @description The ID associated with the Genie space where the conversation is started.
110
+ */
111
+ space_id: z.string().describe("The ID associated with the Genie space where the conversation is started.")
112
+ });
113
+ export const genieDeleteConversationMessageRequestSchema = z.object({
114
+ /**
115
+ * @description The ID associated with the conversation.
116
+ */
117
+ conversation_id: z.string().describe("The ID associated with the conversation."),
118
+ /**
119
+ * @description The ID associated with the message to delete.
120
+ */
121
+ message_id: z.string().describe("The ID associated with the message to delete."),
122
+ /**
123
+ * @description The ID associated with the Genie space where the message is located.
124
+ */
125
+ space_id: z.string().describe("The ID associated with the Genie space where the message is located.")
126
+ });
127
+ export const genieDeleteConversationRequestSchema = z.object({
128
+ /**
129
+ * @description The ID of the conversation to delete.
130
+ */
131
+ conversation_id: z.string().describe("The ID of the conversation to delete."),
132
+ /**
133
+ * @description The ID associated with the Genie space where the conversation is located.
134
+ */
135
+ space_id: z.string().describe("The ID associated with the Genie space where the conversation is located.")
136
+ });
137
+ export const genieExecuteMessageAttachmentQueryRequestSchema = z.object({
138
+ /**
139
+ * @description Attachment ID
140
+ */
141
+ attachment_id: z.string().describe("Attachment ID"),
142
+ /**
143
+ * @description Conversation ID
144
+ */
145
+ conversation_id: z.string().describe("Conversation ID"),
146
+ /**
147
+ * @description Message ID
148
+ */
149
+ message_id: z.string().describe("Message ID"),
150
+ /**
151
+ * @description Genie space ID
152
+ */
153
+ space_id: z.string().describe("Genie space ID")
154
+ });
155
+ export const genieExecuteMessageQueryRequestSchema = z.object({
156
+ /**
157
+ * @description Conversation ID
158
+ */
159
+ conversation_id: z.string().describe("Conversation ID"),
160
+ /**
161
+ * @description Message ID
162
+ */
163
+ message_id: z.string().describe("Message ID"),
164
+ /**
165
+ * @description Genie space ID
166
+ */
167
+ space_id: z.string().describe("Genie space ID")
168
+ });
169
+ /**
170
+ * @description Feedback rating for Genie messages
171
+ */
172
+ export const genieFeedbackRatingSchema = z.union([z.literal("NEGATIVE"), z.literal("NONE"), z.literal("POSITIVE")]).describe("Feedback rating for Genie messages");
173
+ export const genieGetConversationMessageRequestSchema = z.object({
174
+ /**
175
+ * @description The ID associated with the target conversation.
176
+ */
177
+ conversation_id: z.string().describe("The ID associated with the target conversation."),
178
+ /**
179
+ * @description The ID associated with the target message from the identified conversation.
180
+ */
181
+ message_id: z.string().describe("The ID associated with the target message from the identified conversation."),
182
+ /**
183
+ * @description The ID associated with the Genie space where the target conversation is located.
184
+ */
185
+ space_id: z.string().describe("The ID associated with the Genie space where the target conversation is located.")
186
+ });
187
+ export const genieGetMessageAttachmentQueryResultRequestSchema = z.object({
188
+ /**
189
+ * @description Attachment ID
190
+ */
191
+ attachment_id: z.string().describe("Attachment ID"),
192
+ /**
193
+ * @description Conversation ID
194
+ */
195
+ conversation_id: z.string().describe("Conversation ID"),
196
+ /**
197
+ * @description Message ID
198
+ */
199
+ message_id: z.string().describe("Message ID"),
200
+ /**
201
+ * @description Genie space ID
202
+ */
203
+ space_id: z.string().describe("Genie space ID")
204
+ });
205
+ export const genieGetMessageQueryResultRequestSchema = z.object({
206
+ /**
207
+ * @description Conversation ID
208
+ */
209
+ conversation_id: z.string().describe("Conversation ID"),
210
+ /**
211
+ * @description Message ID
212
+ */
213
+ message_id: z.string().describe("Message ID"),
214
+ /**
215
+ * @description Genie space ID
216
+ */
217
+ space_id: z.string().describe("Genie space ID")
218
+ });
219
+ export const genieGetMessageQueryResultResponseSchema = z.object({
220
+ /**
221
+ * @description SQL Statement Execution response. See [Get status, manifest, and result first chunk](:method:statementexecution/getstatement) for more details.
222
+ */
223
+ statement_response: z.unknown().optional().describe("SQL Statement Execution response. See [Get status, manifest, and result first chunk](:method:statementexecution/getstatement) for more details.")
224
+ });
225
+ export const genieGetQueryResultByAttachmentRequestSchema = z.object({
226
+ /**
227
+ * @description Attachment ID
228
+ */
229
+ attachment_id: z.string().describe("Attachment ID"),
230
+ /**
231
+ * @description Conversation ID
232
+ */
233
+ conversation_id: z.string().describe("Conversation ID"),
234
+ /**
235
+ * @description Message ID
236
+ */
237
+ message_id: z.string().describe("Message ID"),
238
+ /**
239
+ * @description Genie space ID
240
+ */
241
+ space_id: z.string().describe("Genie space ID")
242
+ });
243
+ export const genieGetSpaceRequestSchema = z.object({
244
+ /**
245
+ * @description The ID associated with the Genie space
246
+ */
247
+ space_id: z.string().describe("The ID associated with the Genie space")
248
+ });
249
+ export const genieListConversationMessagesRequestSchema = z.object({
250
+ /**
251
+ * @description The ID of the conversation to list messages from
252
+ */
253
+ conversation_id: z.string().describe("The ID of the conversation to list messages from"),
254
+ /**
255
+ * @description Maximum number of messages to return per page
256
+ */
257
+ page_size: z.number().optional().describe("Maximum number of messages to return per page"),
258
+ /**
259
+ * @description Token to get the next page of results
260
+ */
261
+ page_token: z.string().optional().describe("Token to get the next page of results"),
262
+ /**
263
+ * @description The ID associated with the Genie space where the conversation is located
264
+ */
265
+ space_id: z.string().describe("The ID associated with the Genie space where the conversation is located")
266
+ });
267
+ export const genieListConversationsRequestSchema = z.object({
268
+ /**
269
+ * @description Include all conversations in the space across all users. Requires at least CAN MANAGE permission on the space.
270
+ */
271
+ include_all: z.boolean().optional().describe("Include all conversations in the space across all users. Requires at least CAN MANAGE permission on the space."),
272
+ /**
273
+ * @description Maximum number of conversations to return per page
274
+ */
275
+ page_size: z.number().optional().describe("Maximum number of conversations to return per page"),
276
+ /**
277
+ * @description Token to get the next page of results
278
+ */
279
+ page_token: z.string().optional().describe("Token to get the next page of results"),
280
+ /**
281
+ * @description The ID of the Genie space to retrieve conversations from.
282
+ */
283
+ space_id: z.string().describe("The ID of the Genie space to retrieve conversations from.")
284
+ });
285
+ export const genieListConversationsResponseSchema = z.object({
286
+ /**
287
+ * @description List of conversations in the Genie space
288
+ */
289
+ conversations: z.array(genieConversationSummarySchema).optional().describe("List of conversations in the Genie space"),
290
+ /**
291
+ * @description Token to get the next page of results
292
+ */
293
+ next_page_token: z.string().optional().describe("Token to get the next page of results")
294
+ });
295
+ export const genieListSpacesRequestSchema = z.object({
296
+ /**
297
+ * @description Maximum number of spaces to return per page
298
+ */
299
+ page_size: z.number().optional().describe("Maximum number of spaces to return per page"),
300
+ /**
301
+ * @description Pagination token for getting the next page of results
302
+ */
303
+ page_token: z.string().optional().describe("Pagination token for getting the next page of results")
304
+ });
305
+ export const genieSpaceSchema = z.object({
306
+ /**
307
+ * @description Description of the Genie Space
308
+ */
309
+ description: z.string().optional().describe("Description of the Genie Space"),
310
+ /**
311
+ * @description Genie space ID
312
+ */
313
+ space_id: z.string().describe("Genie space ID"),
314
+ /**
315
+ * @description Title of the Genie Space
316
+ */
317
+ title: z.string().describe("Title of the Genie Space"),
318
+ /**
319
+ * @description Warehouse associated with the Genie Space
320
+ */
321
+ warehouse_id: z.string().optional().describe("Warehouse associated with the Genie Space")
322
+ });
323
+ /**
324
+ * @description Feedback containing rating and optional comment
325
+ */
326
+ export const genieFeedbackSchema = z.object({
327
+ /**
328
+ * @description The feedback rating
329
+ */
330
+ rating: genieFeedbackRatingSchema.optional().describe("The feedback rating")
331
+ });
332
+ export const resultSchema = z.object({
333
+ /**
334
+ * @description If result is truncated
335
+ */
336
+ is_truncated: z.boolean().optional().describe("If result is truncated"),
337
+ /**
338
+ * @description Row count of the result
339
+ */
340
+ row_count: z.number().optional().describe("Row count of the result"),
341
+ /**
342
+ * @description Statement Execution API statement id. Use [Get status, manifest, and result first chunk](:method:statementexecution/getstatement) to get the full result data.
343
+ */
344
+ statement_id: z.string().optional().describe("Statement Execution API statement id. Use [Get status, manifest, and result first chunk](:method:statementexecution/getstatement) to get the full result data."),
345
+ /**
346
+ * @description JWT corresponding to the statement contained in this result
347
+ */
348
+ statement_id_signature: z.string().optional().describe("JWT corresponding to the statement contained in this result")
349
+ });
350
+ /**
351
+ * @description 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](:method:genie/getMessageAttachmentQueryResult) API. * `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/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](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`: Message has been cancelled.
352
+ */
353
+ export const messageStatusSchema = z.union([z.literal("ASKING_AI"), z.literal("CANCELLED"), z.literal("COMPLETED"), z.literal("EXECUTING_QUERY"), z.literal("FAILED"), z.literal("FETCHING_METADATA"), z.literal("FILTERING_CONTEXT"), z.literal("PENDING_WAREHOUSE"), z.literal("QUERY_RESULT_EXPIRED"), z.literal("SUBMITTED")]).describe("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](:method:genie/getMessageAttachmentQueryResult) API. * `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/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](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`: Message has been cancelled.");
354
+ export const queryAttachmentParameterSchema = z.object({
355
+ keyword: z.string().optional(),
356
+ sql_type: z.string().optional(),
357
+ value: z.string().optional()
358
+ });
359
+ export const genieResultMetadataSchema = z.object({
360
+ /**
361
+ * @description Indicates whether the result set is truncated.
362
+ */
363
+ is_truncated: z.boolean().optional().describe("Indicates whether the result set is truncated."),
364
+ /**
365
+ * @description The number of rows in the result set.
366
+ */
367
+ row_count: z.number().optional().describe("The number of rows in the result set.")
368
+ });
369
+ export const genieSendMessageFeedbackRequestSchema = z.object({
370
+ /**
371
+ * @description The ID associated with the conversation.
372
+ */
373
+ conversation_id: z.string().describe("The ID associated with the conversation."),
374
+ /**
375
+ * @description The ID associated with the message to provide feedback for.
376
+ */
377
+ message_id: z.string().describe("The ID associated with the message to provide feedback for."),
378
+ /**
379
+ * @description The rating (POSITIVE, NEGATIVE, or NONE).
380
+ */
381
+ rating: genieFeedbackRatingSchema.describe("The rating (POSITIVE, NEGATIVE, or NONE)."),
382
+ /**
383
+ * @description The ID associated with the Genie space where the message is located.
384
+ */
385
+ space_id: z.string().describe("The ID associated with the Genie space where the message is located.")
386
+ });
387
+ export const genieStartConversationMessageRequestSchema = z.object({
388
+ /**
389
+ * @description The text of the message that starts the conversation.
390
+ */
391
+ content: z.string().describe("The text of the message that starts the conversation."),
392
+ /**
393
+ * @description The ID associated with the Genie space where you want to start a conversation.
394
+ */
395
+ space_id: z.string().describe("The ID associated with the Genie space where you want to start a conversation.")
396
+ });
397
+ export const genieTrashSpaceRequestSchema = z.object({
398
+ /**
399
+ * @description The ID associated with the Genie space to be sent to the trash.
400
+ */
401
+ space_id: z.string().describe("The ID associated with the Genie space to be sent to the trash.")
402
+ });
403
+ export const getDashboardRequestSchema = z.object({
404
+ /**
405
+ * @description UUID identifying the dashboard.
406
+ */
407
+ dashboard_id: z.string().describe("UUID identifying the dashboard.")
408
+ });
409
+ export const getPublishedDashboardRequestSchema = z.object({
410
+ /**
411
+ * @description UUID identifying the published dashboard.
412
+ */
413
+ dashboard_id: z.string().describe("UUID identifying the published dashboard.")
414
+ });
415
+ export const getPublishedDashboardTokenInfoRequestSchema = z.object({
416
+ /**
417
+ * @description UUID identifying the published dashboard.
418
+ */
419
+ dashboard_id: z.string().describe("UUID identifying the published dashboard."),
420
+ /**
421
+ * @description Provided external value to be included in the custom claim.
422
+ */
423
+ external_value: z.string().optional().describe("Provided external value to be included in the custom claim."),
424
+ /**
425
+ * @description Provided external viewer id to be included in the custom claim.
426
+ */
427
+ external_viewer_id: z.string().optional().describe("Provided external viewer id to be included in the custom claim.")
428
+ });
429
+ export const authorizationDetailsSchema = z.object({
430
+ /**
431
+ * @description Represents downscoped permission rules with specific access rights. This field is specific to `workspace_rule_set` constraint.
432
+ */
433
+ grant_rules: z.array(authorizationDetailsGrantRuleSchema).optional().describe("Represents downscoped permission rules with specific access rights. This field is specific to `workspace_rule_set` constraint."),
434
+ /**
435
+ * @description The acl path of the tree store resource resource.
436
+ */
437
+ resource_legacy_acl_path: z.string().optional().describe("The acl path of the tree store resource resource."),
438
+ /**
439
+ * @description The resource name to which the authorization rule applies. This field is specific to `workspace_rule_set` constraint. Format: `workspaces/{workspace_id}/dashboards/{dashboard_id}`
440
+ */
441
+ resource_name: z.string().optional().describe("The resource name to which the authorization rule applies. This field is specific to `workspace_rule_set` constraint. Format: `workspaces/{workspace_id}/dashboards/{dashboard_id}`"),
442
+ /**
443
+ * @description The type of authorization downscoping policy. Ex: `workspace_rule_set` defines access rules for a specific workspace resource
444
+ */
445
+ type: z.string().optional().describe("The type of authorization downscoping policy. Ex: `workspace_rule_set` defines access rules for a specific workspace resource")
446
+ });
447
+ export const getScheduleRequestSchema = z.object({
448
+ /**
449
+ * @description UUID identifying the dashboard to which the schedule belongs.
450
+ */
451
+ dashboard_id: z.string().describe("UUID identifying the dashboard to which the schedule belongs."),
452
+ /**
453
+ * @description UUID identifying the schedule.
454
+ */
455
+ schedule_id: z.string().describe("UUID identifying the schedule.")
456
+ });
457
+ export const getSubscriptionRequestSchema = z.object({
458
+ /**
459
+ * @description UUID identifying the dashboard which the subscription belongs.
460
+ */
461
+ dashboard_id: z.string().describe("UUID identifying the dashboard which the subscription belongs."),
462
+ /**
463
+ * @description UUID identifying the schedule which the subscription belongs.
464
+ */
465
+ schedule_id: z.string().describe("UUID identifying the schedule which the subscription belongs."),
466
+ /**
467
+ * @description UUID identifying the subscription.
468
+ */
469
+ subscription_id: z.string().describe("UUID identifying the subscription.")
470
+ });
471
+ export const listDashboardsRequestSchema = z.object({
472
+ /**
473
+ * @description The number of dashboards to return per page.
474
+ */
475
+ page_size: z.number().optional().describe("The number of dashboards to return per page."),
476
+ /**
477
+ * @description A page token, received from a previous `ListDashboards` call. This token can be used to retrieve the subsequent page.
478
+ */
479
+ page_token: z.string().optional().describe("A page token, received from a previous `ListDashboards` call. This token can be used to retrieve the subsequent page."),
480
+ /**
481
+ * @description The flag to include dashboards located in the trash. If unspecified, only active dashboards will be returned.
482
+ */
483
+ show_trashed: z.boolean().optional().describe("The flag to include dashboards located in the trash. If unspecified, only active dashboards will be returned."),
484
+ /**
485
+ * @description `DASHBOARD_VIEW_BASIC`only includes summary metadata from the dashboard.
486
+ */
487
+ view: dashboardViewSchema.optional().describe("`DASHBOARD_VIEW_BASIC`only includes summary metadata from the dashboard.")
488
+ });
489
+ export const dashboardSchema = z.object({
490
+ /**
491
+ * @description The timestamp of when the dashboard was created.
492
+ */
493
+ create_time: z.string().optional().describe("The timestamp of when the dashboard was created."),
494
+ /**
495
+ * @description UUID identifying the dashboard.
496
+ */
497
+ dashboard_id: z.string().optional().describe("UUID identifying the dashboard."),
498
+ /**
499
+ * @description The display name of the dashboard.
500
+ */
501
+ display_name: z.string().optional().describe("The display name of the dashboard."),
502
+ /**
503
+ * @description The etag for the dashboard. Can be optionally provided on updates to ensure that the dashboard has not been modified since the last read. This field is excluded in List Dashboards responses.
504
+ */
505
+ etag: z.string().optional().describe("The etag for the dashboard. Can be optionally provided on updates to ensure that the dashboard has not been modified since the last read. This field is excluded in List Dashboards responses."),
506
+ /**
507
+ * @description The state of the dashboard resource. Used for tracking trashed status.
508
+ */
509
+ lifecycle_state: lifecycleStateSchema.optional().describe("The state of the dashboard resource. Used for tracking trashed status."),
510
+ /**
511
+ * @description The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. This field is excluded in List Dashboards responses.
512
+ */
513
+ parent_path: z.string().optional().describe("The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. This field is excluded in List Dashboards responses."),
514
+ /**
515
+ * @description The workspace path of the dashboard asset, including the file name. Exported dashboards always have the file extension `.lvdash.json`. This field is excluded in List Dashboards responses.
516
+ */
517
+ path: z.string().optional().describe("The workspace path of the dashboard asset, including the file name. Exported dashboards always have the file extension `.lvdash.json`. This field is excluded in List Dashboards responses."),
518
+ /**
519
+ * @description The contents of the dashboard in serialized string form. This field is excluded in List Dashboards responses. Use the [get dashboard API] to retrieve an example response, which includes the `serialized_dashboard` field. This field provides the structure of the JSON string that represents the dashboard's layout and components. [get dashboard API]: https://docs.databricks.com/api/workspace/lakeview/get
520
+ */
521
+ serialized_dashboard: z.string().optional().describe("The contents of the dashboard in serialized string form. This field is excluded in List Dashboards responses. Use the [get dashboard API] to retrieve an example response, which includes the `serialized_dashboard` field. This field provides the structure of the JSON string that represents the dashboard's layout and components. [get dashboard API]: https://docs.databricks.com/api/workspace/lakeview/get"),
522
+ /**
523
+ * @description The timestamp of when the dashboard was last updated by the user. This field is excluded in List Dashboards responses.
524
+ */
525
+ update_time: z.string().optional().describe("The timestamp of when the dashboard was last updated by the user. This field is excluded in List Dashboards responses."),
526
+ /**
527
+ * @description The warehouse ID used to run the dashboard.
528
+ */
529
+ warehouse_id: z.string().optional().describe("The warehouse ID used to run the dashboard.")
530
+ });
531
+ export const listSchedulesRequestSchema = z.object({
532
+ /**
533
+ * @description UUID identifying the dashboard to which the schedules belongs.
534
+ */
535
+ dashboard_id: z.string().describe("UUID identifying the dashboard to which the schedules belongs."),
536
+ /**
537
+ * @description The number of schedules to return per page.
538
+ */
539
+ page_size: z.number().optional().describe("The number of schedules to return per page."),
540
+ /**
541
+ * @description A page token, received from a previous `ListSchedules` call. Use this to retrieve the subsequent page.
542
+ */
543
+ page_token: z.string().optional().describe("A page token, received from a previous `ListSchedules` call. Use this to retrieve the subsequent page.")
544
+ });
545
+ export const listSubscriptionsRequestSchema = z.object({
546
+ /**
547
+ * @description UUID identifying the dashboard which the subscriptions belongs.
548
+ */
549
+ dashboard_id: z.string().describe("UUID identifying the dashboard which the subscriptions belongs."),
550
+ /**
551
+ * @description The number of subscriptions to return per page.
552
+ */
553
+ page_size: z.number().optional().describe("The number of subscriptions to return per page."),
554
+ /**
555
+ * @description A page token, received from a previous `ListSubscriptions` call. Use this to retrieve the subsequent page.
556
+ */
557
+ page_token: z.string().optional().describe("A page token, received from a previous `ListSubscriptions` call. Use this to retrieve the subsequent page."),
558
+ /**
559
+ * @description UUID identifying the schedule which the subscriptions belongs.
560
+ */
561
+ schedule_id: z.string().describe("UUID identifying the schedule which the subscriptions belongs.")
562
+ });
563
+ export const messageErrorTypeSchema = z.union([z.literal("BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION"), z.literal("CHAT_COMPLETION_CLIENT_EXCEPTION"), z.literal("CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION"), z.literal("CHAT_COMPLETION_NETWORK_EXCEPTION"), z.literal("CONTENT_FILTER_EXCEPTION"), z.literal("CONTEXT_EXCEEDED_EXCEPTION"), z.literal("COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION"), z.literal("COULD_NOT_GET_UC_SCHEMA_EXCEPTION"), z.literal("DEPLOYMENT_NOT_FOUND_EXCEPTION"), z.literal("DESCRIBE_QUERY_INVALID_SQL_ERROR"), z.literal("DESCRIBE_QUERY_TIMEOUT"), z.literal("DESCRIBE_QUERY_UNEXPECTED_FAILURE"), z.literal("EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION"), z.literal("FUNCTIONS_NOT_AVAILABLE_EXCEPTION"), z.literal("FUNCTION_ARGUMENTS_INVALID_EXCEPTION"), z.literal("FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION"), z.literal("FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION"), z.literal("FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION"), z.literal("GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION"), z.literal("GENERIC_CHAT_COMPLETION_EXCEPTION"), z.literal("GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION"), z.literal("GENERIC_SQL_EXEC_API_CALL_EXCEPTION"), z.literal("ILLEGAL_PARAMETER_DEFINITION_EXCEPTION"), z.literal("INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION"), z.literal("INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION"), z.literal("INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION"), z.literal("INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION"), z.literal("INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION"), z.literal("INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION"), z.literal("INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION"), z.literal("INVALID_CHAT_COMPLETION_ARGUMENTS_JSON_EXCEPTION"), z.literal("INVALID_CHAT_COMPLETION_JSON_EXCEPTION"), z.literal("INVALID_COMPLETION_REQUEST_EXCEPTION"), z.literal("INVALID_FUNCTION_CALL_EXCEPTION"), z.literal("INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION"), z.literal("INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION"), z.literal("INVALID_SQL_UNKNOWN_TABLE_EXCEPTION"), z.literal("INVALID_TABLE_IDENTIFIER_EXCEPTION"), z.literal("LOCAL_CONTEXT_EXCEEDED_EXCEPTION"), z.literal("MESSAGE_ATTACHMENT_TOO_LONG_ERROR"), z.literal("MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION"), z.literal("MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION"), z.literal("MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION"), z.literal("MISSING_SQL_QUERY_EXCEPTION"), z.literal("NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE"), z.literal("NO_QUERY_TO_VISUALIZE_EXCEPTION"), z.literal("NO_TABLES_TO_QUERY_EXCEPTION"), z.literal("RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION"), z.literal("RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION"), z.literal("REPLY_PROCESS_TIMEOUT_EXCEPTION"), z.literal("RETRYABLE_PROCESSING_EXCEPTION"), z.literal("SQL_EXECUTION_EXCEPTION"), z.literal("STOP_PROCESS_DUE_TO_AUTO_REGENERATE"), z.literal("TABLES_MISSING_EXCEPTION"), z.literal("TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION"), z.literal("TOO_MANY_TABLES_EXCEPTION"), z.literal("UNEXPECTED_REPLY_PROCESS_EXCEPTION"), z.literal("UNKNOWN_AI_MODEL"), z.literal("UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION"), z.literal("WAREHOUSE_ACCESS_MISSING_EXCEPTION"), z.literal("WAREHOUSE_NOT_FOUND_EXCEPTION")]);
564
+ export const migrateDashboardRequestSchema = z.object({
565
+ /**
566
+ * @description Display name for the new Lakeview dashboard.
567
+ */
568
+ display_name: z.string().optional().describe("Display name for the new Lakeview dashboard."),
569
+ /**
570
+ * @description The workspace path of the folder to contain the migrated Lakeview dashboard.
571
+ */
572
+ parent_path: z.string().optional().describe("The workspace path of the folder to contain the migrated Lakeview dashboard."),
573
+ /**
574
+ * @description UUID of the dashboard to be migrated.
575
+ */
576
+ source_dashboard_id: z.string().describe("UUID of the dashboard to be migrated."),
577
+ /**
578
+ * @description Flag to indicate if mustache parameter syntax ({{ param }}) should be auto-updated to named syntax (:param) when converting datasets in the dashboard.
579
+ */
580
+ update_parameter_syntax: z.boolean().optional().describe("Flag to indicate if mustache parameter syntax ({{ param }}) should be auto-updated to named syntax (:param) when converting datasets in the dashboard.")
581
+ });
582
+ export const publishRequestSchema = z.object({
583
+ /**
584
+ * @description UUID identifying the dashboard to be published.
585
+ */
586
+ dashboard_id: z.string().describe("UUID identifying the dashboard to be published."),
587
+ /**
588
+ * @description Flag to indicate if the publisher's credentials should be embedded in the published dashboard. These embedded credentials will be used to execute the published dashboard's queries.
589
+ */
590
+ embed_credentials: z.boolean().optional().describe("Flag to indicate if the publisher's credentials should be embedded in the published dashboard. These embedded credentials will be used to execute the published dashboard's queries."),
591
+ /**
592
+ * @description The ID of the warehouse that can be used to override the warehouse which was set in the draft.
593
+ */
594
+ warehouse_id: z.string().optional().describe("The ID of the warehouse that can be used to override the warehouse which was set in the draft.")
595
+ });
596
+ export const publishedDashboardSchema = z.object({
597
+ /**
598
+ * @description The display name of the published dashboard.
599
+ */
600
+ display_name: z.string().optional().describe("The display name of the published dashboard."),
601
+ /**
602
+ * @description Indicates whether credentials are embedded in the published dashboard.
603
+ */
604
+ embed_credentials: z.boolean().optional().describe("Indicates whether credentials are embedded in the published dashboard."),
605
+ /**
606
+ * @description The timestamp of when the published dashboard was last revised.
607
+ */
608
+ revision_create_time: z.string().optional().describe("The timestamp of when the published dashboard was last revised."),
609
+ /**
610
+ * @description The warehouse ID used to run the published dashboard.
611
+ */
612
+ warehouse_id: z.string().optional().describe("The warehouse ID used to run the published dashboard.")
613
+ });
614
+ export const schedulePauseStatusSchema = z.union([z.literal("PAUSED"), z.literal("UNPAUSED")]);
615
+ export const subscriptionSubscriberDestinationSchema = z.object({
616
+ /**
617
+ * @description The canonical identifier of the destination to receive email notification.
618
+ */
619
+ destination_id: z.string().describe("The canonical identifier of the destination to receive email notification.")
620
+ });
621
+ export const subscriptionSubscriberUserSchema = z.object({
622
+ /**
623
+ * @description UserId of the subscriber.
624
+ */
625
+ user_id: z.number().describe("UserId of the subscriber.")
626
+ });
627
+ export const subscriberSchema = z.object({
628
+ /**
629
+ * @description The destination to receive the subscription email. This parameter is mutually exclusive with `user_subscriber`.
630
+ */
631
+ destination_subscriber: subscriptionSubscriberDestinationSchema.optional().describe("The destination to receive the subscription email. This parameter is mutually exclusive with `user_subscriber`."),
632
+ /**
633
+ * @description The user to receive the subscription email. This parameter is mutually exclusive with `destination_subscriber`.
634
+ */
635
+ user_subscriber: subscriptionSubscriberUserSchema.optional().describe("The user to receive the subscription email. This parameter is mutually exclusive with `destination_subscriber`.")
636
+ });
637
+ /**
638
+ * @description Purpose/intent of a text attachment
639
+ */
640
+ export const textAttachmentPurposeSchema = z.literal("FOLLOW_UP_QUESTION").describe("Purpose/intent of a text attachment");
641
+ export const trashDashboardRequestSchema = z.object({
642
+ /**
643
+ * @description UUID identifying the dashboard.
644
+ */
645
+ dashboard_id: z.string().describe("UUID identifying the dashboard.")
646
+ });
647
+ export const unpublishDashboardRequestSchema = z.object({
648
+ /**
649
+ * @description UUID identifying the published dashboard.
650
+ */
651
+ dashboard_id: z.string().describe("UUID identifying the published dashboard.")
652
+ });
653
+ export const updateDashboardRequestSchema = z.object({
654
+ dashboard: dashboardSchema,
655
+ /**
656
+ * @description UUID identifying the dashboard.
657
+ */
658
+ dashboard_id: z.string().describe("UUID identifying the dashboard.")
659
+ });
660
+ export const scheduleSchema = z.object({
661
+ /**
662
+ * @description A timestamp indicating when the schedule was created.
663
+ */
664
+ create_time: z.string().optional().describe("A timestamp indicating when the schedule was created."),
665
+ /**
666
+ * @description The cron expression describing the frequency of the periodic refresh for this schedule.
667
+ */
668
+ cron_schedule: cronScheduleSchema.describe("The cron expression describing the frequency of the periodic refresh for this schedule."),
669
+ /**
670
+ * @description UUID identifying the dashboard to which the schedule belongs.
671
+ */
672
+ dashboard_id: z.string().optional().describe("UUID identifying the dashboard to which the schedule belongs."),
673
+ /**
674
+ * @description The display name for schedule.
675
+ */
676
+ display_name: z.string().optional().describe("The display name for schedule."),
677
+ /**
678
+ * @description The etag for the schedule. Must be left empty on create, must be provided on updates to ensure that the schedule has not been modified since the last read, and can be optionally provided on delete.
679
+ */
680
+ etag: z.string().optional().describe("The etag for the schedule. Must be left empty on create, must be provided on updates to ensure that the schedule has not been modified since the last read, and can be optionally provided on delete."),
681
+ /**
682
+ * @description The status indicates whether this schedule is paused or not.
683
+ */
684
+ pause_status: schedulePauseStatusSchema.optional().describe("The status indicates whether this schedule is paused or not."),
685
+ /**
686
+ * @description UUID identifying the schedule.
687
+ */
688
+ schedule_id: z.string().optional().describe("UUID identifying the schedule."),
689
+ /**
690
+ * @description A timestamp indicating when the schedule was last updated.
691
+ */
692
+ update_time: z.string().optional().describe("A timestamp indicating when the schedule was last updated."),
693
+ /**
694
+ * @description The warehouse id to run the dashboard with for the schedule.
695
+ */
696
+ warehouse_id: z.string().optional().describe("The warehouse id to run the dashboard with for the schedule.")
697
+ });
698
+ export const createDashboardRequestSchema = z.object({
699
+ dashboard: dashboardSchema
700
+ });
701
+ export const createScheduleRequestSchema = z.object({
702
+ /**
703
+ * @description UUID identifying the dashboard to which the schedule belongs.
704
+ */
705
+ dashboard_id: z.string().describe("UUID identifying the dashboard to which the schedule belongs."),
706
+ /**
707
+ * @description The schedule to create. A dashboard is limited to 10 schedules.
708
+ */
709
+ schedule: scheduleSchema.describe("The schedule to create. A dashboard is limited to 10 schedules.")
710
+ });
711
+ export const subscriptionSchema = z.object({
712
+ /**
713
+ * @description A timestamp indicating when the subscription was created.
714
+ */
715
+ create_time: z.string().optional().describe("A timestamp indicating when the subscription was created."),
716
+ /**
717
+ * @description UserId of the user who adds subscribers (users or notification destinations) to the dashboard's schedule.
718
+ */
719
+ created_by_user_id: z.number().optional().describe("UserId of the user who adds subscribers (users or notification destinations) to the dashboard's schedule."),
720
+ /**
721
+ * @description UUID identifying the dashboard to which the subscription belongs.
722
+ */
723
+ dashboard_id: z.string().optional().describe("UUID identifying the dashboard to which the subscription belongs."),
724
+ /**
725
+ * @description The etag for the subscription. Must be left empty on create, can be optionally provided on delete to ensure that the subscription has not been deleted since the last read.
726
+ */
727
+ etag: z.string().optional().describe("The etag for the subscription. Must be left empty on create, can be optionally provided on delete to ensure that the subscription has not been deleted since the last read."),
728
+ /**
729
+ * @description UUID identifying the schedule to which the subscription belongs.
730
+ */
731
+ schedule_id: z.string().optional().describe("UUID identifying the schedule to which the subscription belongs."),
732
+ /**
733
+ * @description Subscriber details for users and destinations to be added as subscribers to the schedule.
734
+ */
735
+ subscriber: subscriberSchema.describe("Subscriber details for users and destinations to be added as subscribers to the schedule."),
736
+ /**
737
+ * @description UUID identifying the subscription.
738
+ */
739
+ subscription_id: z.string().optional().describe("UUID identifying the subscription."),
740
+ /**
741
+ * @description A timestamp indicating when the subscription was last updated.
742
+ */
743
+ update_time: z.string().optional().describe("A timestamp indicating when the subscription was last updated.")
744
+ });
745
+ export const genieQueryAttachmentSchema = z.object({
746
+ /**
747
+ * @description Description of the query
748
+ */
749
+ description: z.string().optional().describe("Description of the query"),
750
+ id: z.string().optional(),
751
+ /**
752
+ * @description Time when the user updated the query last
753
+ */
754
+ last_updated_timestamp: z.number().optional().describe("Time when the user updated the query last"),
755
+ parameters: z.array(queryAttachmentParameterSchema).optional(),
756
+ /**
757
+ * @description AI generated SQL query
758
+ */
759
+ query: z.string().optional().describe("AI generated SQL query"),
760
+ /**
761
+ * @description Metadata associated with the query result.
762
+ */
763
+ query_result_metadata: genieResultMetadataSchema.optional().describe("Metadata associated with the query result."),
764
+ /**
765
+ * @description Statement Execution API statement id. Use [Get status, manifest, and result first chunk](:method:statementexecution/getstatement) to get the full result data.
766
+ */
767
+ statement_id: z.string().optional().describe("Statement Execution API statement id. Use [Get status, manifest, and result first chunk](:method:statementexecution/getstatement) to get the full result data."),
768
+ /**
769
+ * @description Name of the query
770
+ */
771
+ title: z.string().optional().describe("Name of the query")
772
+ });
773
+ export const textAttachmentSchema = z.object({
774
+ /**
775
+ * @description AI generated message
776
+ */
777
+ content: z.string().optional().describe("AI generated message"),
778
+ id: z.string().optional(),
779
+ /**
780
+ * @description Purpose/intent of this text attachment
781
+ */
782
+ purpose: textAttachmentPurposeSchema.optional().describe("Purpose/intent of this text attachment")
783
+ });
784
+ export const genieListSpacesResponseSchema = z.object({
785
+ /**
786
+ * @description Token to get the next page of results
787
+ */
788
+ next_page_token: z.string().optional().describe("Token to get the next page of results"),
789
+ /**
790
+ * @description List of Genie spaces
791
+ */
792
+ spaces: z.array(genieSpaceSchema).optional().describe("List of Genie spaces")
793
+ });
794
+ /**
795
+ * @description Genie AI Response
796
+ */
797
+ export const genieAttachmentSchema = z.object({
798
+ /**
799
+ * @description Attachment ID
800
+ */
801
+ attachment_id: z.string().optional().describe("Attachment ID"),
802
+ /**
803
+ * @description Query Attachment if Genie responds with a SQL query
804
+ */
805
+ query: genieQueryAttachmentSchema.optional().describe("Query Attachment if Genie responds with a SQL query"),
806
+ /**
807
+ * @description Follow-up questions suggested by Genie
808
+ */
809
+ suggested_questions: genieSuggestedQuestionsAttachmentSchema.optional().describe("Follow-up questions suggested by Genie"),
810
+ /**
811
+ * @description Text Attachment if Genie responds with text
812
+ */
813
+ text: textAttachmentSchema.optional().describe("Text Attachment if Genie responds with text")
814
+ });
815
+ export const messageErrorSchema = z.object({
816
+ error: z.string().optional(),
817
+ type: messageErrorTypeSchema.optional()
818
+ });
819
+ export const genieMessageSchema = z.object({
820
+ /**
821
+ * @description AI-generated response to the message
822
+ */
823
+ attachments: z.array(genieAttachmentSchema).optional().describe("AI-generated response to the message"),
824
+ /**
825
+ * @description User message content
826
+ */
827
+ content: z.string().describe("User message content"),
828
+ /**
829
+ * @description Conversation ID
830
+ */
831
+ conversation_id: z.string().describe("Conversation ID"),
832
+ /**
833
+ * @description Timestamp when the message was created
834
+ */
835
+ created_timestamp: z.number().optional().describe("Timestamp when the message was created"),
836
+ /**
837
+ * @description Error message if Genie failed to respond to the message
838
+ */
839
+ error: messageErrorSchema.optional().describe("Error message if Genie failed to respond to the message"),
840
+ /**
841
+ * @description User feedback for the message if provided
842
+ */
843
+ feedback: genieFeedbackSchema.optional().describe("User feedback for the message if provided"),
844
+ /**
845
+ * @description Message ID. Legacy identifier, use message_id instead
846
+ */
847
+ id: z.string().describe("Message ID. Legacy identifier, use message_id instead"),
848
+ /**
849
+ * @description Timestamp when the message was last updated
850
+ */
851
+ last_updated_timestamp: z.number().optional().describe("Timestamp when the message was last updated"),
852
+ /**
853
+ * @description Message ID
854
+ */
855
+ message_id: z.string().describe("Message ID"),
856
+ /**
857
+ * @description The result of SQL query if the message includes a query attachment. Deprecated. Use `query_result_metadata` in `GenieQueryAttachment` instead.
858
+ */
859
+ query_result: resultSchema.optional().describe("The result of SQL query if the message includes a query attachment. Deprecated. Use `query_result_metadata` in `GenieQueryAttachment` instead."),
860
+ /**
861
+ * @description Genie space ID
862
+ */
863
+ space_id: z.string().describe("Genie space ID"),
864
+ /**
865
+ * @description 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](:method:genie/getMessageAttachmentQueryResult) API. * `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/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](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`: Message has been cancelled.
866
+ */
867
+ status: messageStatusSchema.optional().describe("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](:method:genie/getMessageAttachmentQueryResult) API. * `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/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](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`: Message has been cancelled."),
868
+ /**
869
+ * @description ID of the user who created the message
870
+ */
871
+ user_id: z.number().optional().describe("ID of the user who created the message")
872
+ });
873
+ export const getPublishedDashboardTokenInfoResponseSchema = z.object({
874
+ /**
875
+ * @description Authorization constraints for accessing the published dashboard. Currently includes `workspace_rule_set` and could be enriched with `unity_catalog_privileges` before oAuth token generation.
876
+ */
877
+ authorization_details: z.array(authorizationDetailsSchema).optional().describe("Authorization constraints for accessing the published dashboard. Currently includes `workspace_rule_set` and could be enriched with `unity_catalog_privileges` before oAuth token generation."),
878
+ /**
879
+ * @description Custom claim generated from external_value and external_viewer_id. Format: `urn:aibi:external_data:<external_value>:<external_viewer_id>:<dashboard_id>`
880
+ */
881
+ custom_claim: z.string().optional().describe("Custom claim generated from external_value and external_viewer_id. Format: `urn:aibi:external_data:<external_value>:<external_viewer_id>:<dashboard_id>`"),
882
+ /**
883
+ * @description Scope defining access permissions.
884
+ */
885
+ scope: z.string().optional().describe("Scope defining access permissions.")
886
+ });
887
+ export const listDashboardsResponseSchema = z.object({
888
+ dashboards: z.array(dashboardSchema).optional(),
889
+ /**
890
+ * @description A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent dashboards.
891
+ */
892
+ next_page_token: z.string().optional().describe("A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent dashboards.")
893
+ });
894
+ export const listSchedulesResponseSchema = z.object({
895
+ /**
896
+ * @description A token that can be used as a `page_token` in subsequent requests to retrieve the next page of results. If this field is omitted, there are no subsequent schedules.
897
+ */
898
+ next_page_token: z.string().optional().describe("A token that can be used as a `page_token` in subsequent requests to retrieve the next page of results. If this field is omitted, there are no subsequent schedules."),
899
+ schedules: z.array(scheduleSchema).optional()
900
+ });
901
+ export const listSubscriptionsResponseSchema = z.object({
902
+ /**
903
+ * @description A token that can be used as a `page_token` in subsequent requests to retrieve the next page of results. If this field is omitted, there are no subsequent subscriptions.
904
+ */
905
+ next_page_token: z.string().optional().describe("A token that can be used as a `page_token` in subsequent requests to retrieve the next page of results. If this field is omitted, there are no subsequent subscriptions."),
906
+ subscriptions: z.array(subscriptionSchema).optional()
907
+ });
908
+ export const updateScheduleRequestSchema = z.object({
909
+ /**
910
+ * @description UUID identifying the dashboard to which the schedule belongs.
911
+ */
912
+ dashboard_id: z.string().describe("UUID identifying the dashboard to which the schedule belongs."),
913
+ /**
914
+ * @description The schedule to update.
915
+ */
916
+ schedule: scheduleSchema.describe("The schedule to update."),
917
+ /**
918
+ * @description UUID identifying the schedule.
919
+ */
920
+ schedule_id: z.string().describe("UUID identifying the schedule.")
921
+ });
922
+ export const createSubscriptionRequestSchema = z.object({
923
+ /**
924
+ * @description UUID identifying the dashboard to which the subscription belongs.
925
+ */
926
+ dashboard_id: z.string().describe("UUID identifying the dashboard to which the subscription belongs."),
927
+ /**
928
+ * @description UUID identifying the schedule to which the subscription belongs.
929
+ */
930
+ schedule_id: z.string().describe("UUID identifying the schedule to which the subscription belongs."),
931
+ /**
932
+ * @description The subscription to create. A schedule is limited to 100 subscriptions.
933
+ */
934
+ subscription: subscriptionSchema.describe("The subscription to create. A schedule is limited to 100 subscriptions.")
935
+ });
936
+ export const genieListConversationMessagesResponseSchema = z.object({
937
+ /**
938
+ * @description List of messages in the conversation.
939
+ */
940
+ messages: z.array(genieMessageSchema).optional().describe("List of messages in the conversation."),
941
+ /**
942
+ * @description The token to use for retrieving the next page of results.
943
+ */
944
+ next_page_token: z.string().optional().describe("The token to use for retrieving the next page of results.")
945
+ });
946
+ export const genieStartConversationResponseSchema = z.object({
947
+ conversation: genieConversationSchema.optional(),
948
+ /**
949
+ * @description Conversation ID
950
+ */
951
+ conversation_id: z.string().describe("Conversation ID"),
952
+ message: genieMessageSchema.optional(),
953
+ /**
954
+ * @description Message ID
955
+ */
956
+ message_id: z.string().describe("Message ID")
957
+ });