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