@databricks/sdk-genie 0.33.0 → 0.35.0

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/dist/v1/model.js CHANGED
@@ -1,1642 +1,946 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- import { z } from 'zod';
3
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
4
- export const ColumnTypeName = {
5
- BOOLEAN: 'BOOLEAN',
6
- BYTE: 'BYTE',
7
- SHORT: 'SHORT',
8
- INT: 'INT',
9
- LONG: 'LONG',
10
- FLOAT: 'FLOAT',
11
- DOUBLE: 'DOUBLE',
12
- DATE: 'DATE',
13
- TIMESTAMP: 'TIMESTAMP',
14
- STRING: 'STRING',
15
- BINARY: 'BINARY',
16
- DECIMAL: 'DECIMAL',
17
- INTERVAL: 'INTERVAL',
18
- ARRAY: 'ARRAY',
19
- STRUCT: 'STRUCT',
20
- MAP: 'MAP',
21
- CHAR: 'CHAR',
22
- NULL: 'NULL',
23
- USER_DEFINED_TYPE: 'USER_DEFINED_TYPE',
24
- TIMESTAMP_NTZ: 'TIMESTAMP_NTZ',
25
- VARIANT: 'VARIANT',
26
- GEOMETRY: 'GEOMETRY',
27
- GEOGRAPHY: 'GEOGRAPHY',
28
- TABLE_TYPE: 'TABLE_TYPE',
1
+ import { z } from "zod";
2
+
3
+ //#region src/v1/model.ts
4
+ const ColumnTypeName = {
5
+ BOOLEAN: "BOOLEAN",
6
+ BYTE: "BYTE",
7
+ SHORT: "SHORT",
8
+ INT: "INT",
9
+ LONG: "LONG",
10
+ FLOAT: "FLOAT",
11
+ DOUBLE: "DOUBLE",
12
+ DATE: "DATE",
13
+ TIMESTAMP: "TIMESTAMP",
14
+ STRING: "STRING",
15
+ BINARY: "BINARY",
16
+ DECIMAL: "DECIMAL",
17
+ INTERVAL: "INTERVAL",
18
+ ARRAY: "ARRAY",
19
+ STRUCT: "STRUCT",
20
+ MAP: "MAP",
21
+ CHAR: "CHAR",
22
+ NULL: "NULL",
23
+ USER_DEFINED_TYPE: "USER_DEFINED_TYPE",
24
+ TIMESTAMP_NTZ: "TIMESTAMP_NTZ",
25
+ VARIANT: "VARIANT",
26
+ GEOMETRY: "GEOMETRY",
27
+ GEOGRAPHY: "GEOGRAPHY",
28
+ TABLE_TYPE: "TABLE_TYPE"
29
29
  };
30
30
  /** Error codes returned by Databricks APIs to indicate specific failure conditions. */
31
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
32
- export const ErrorCode = {
33
- /**
34
- * Unknown error. This error generally should not be returned explicitly, but will be used
35
- * as a fallback if the error enum is missing from the message for some reason.
36
- *
37
- * It's assigned tag 0 to follow the best practice from
38
- * https://developers.google.com/protocol-buffers/docs/style#enums
39
- *
40
- * TODO(PLAT-55898): Add custom option to declare HTTP and gRPC mappings.
41
- * Maps to:
42
- * - google.rpc.Code: UNKNOWN = 2;
43
- * - HTTP code: 500 Internal Server Error
44
- */
45
- UNKNOWN: 'UNKNOWN',
46
- /**
47
- * Internal error. This means that some invariants expected by the underlying system have been
48
- * broken. This error code is reserved for serious errors, which generally cannot be resolved
49
- * by the user.
50
- *
51
- * Prefer this over all kinds of detailed error messages (e.g IO_ERROR), unless there's some
52
- * automation that relies on the custom error code.
53
- *
54
- * Maps to:
55
- * - google.rpc.Code: INTERNAL = 13;
56
- * - HTTP code: 500 Internal Server Error
57
- */
58
- INTERNAL_ERROR: 'INTERNAL_ERROR',
59
- /**
60
- * The service is currently unavailable. This is most likely a transient condition, which can be
61
- * corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent
62
- * operations.
63
- *
64
- * Prefer this over SERVICE_UNDER_MAINTENANCE, WORKSPACE_TEMPORARILY_UNAVAILABLE.
65
- *
66
- * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
67
- * for guideline on how to pick this vs RESOURCE_EXHAUSTED.
68
- *
69
- * Maps to:
70
- * - google.rpc.Code: UNAVAILABLE = 14;
71
- * - HTTP code: 503 Service Unavailable
72
- */
73
- TEMPORARILY_UNAVAILABLE: 'TEMPORARILY_UNAVAILABLE',
74
- /**
75
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
76
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
77
- * Indicates that an IOException has been internally thrown.
78
- */
79
- IO_ERROR: 'IO_ERROR',
80
- /**
81
- * The request is invalid. Prefer more specific error code whenever possible.
82
- * Also see similar recommendation for the google.rpc.Code.FAILED_PRECONDITION.
83
- *
84
- * Prefer this error code over MALFORMED_REQUEST, INVALID_STATE, UNPARSEABLE_HTTP_ERROR.
85
- *
86
- * Maps to:
87
- * - google.rpc.Code: FAILED_PRECONDITION = 9;
88
- * - HTTP code: 400 Bad Request
89
- */
90
- BAD_REQUEST: 'BAD_REQUEST',
91
- /**
92
- * An external service is unavailable temporarily as it is being updated/re-deployed. Indicates
93
- * gateway proxy to safely retry the request.
94
- */
95
- SERVICE_UNDER_MAINTENANCE: 'SERVICE_UNDER_MAINTENANCE',
96
- /** A workspace is temporarily unavailable as the workspace is being re-assigned. */
97
- WORKSPACE_TEMPORARILY_UNAVAILABLE: 'WORKSPACE_TEMPORARILY_UNAVAILABLE',
98
- /**
99
- * The deadline expired before the operation could complete. For operations that change the state
100
- * of the system, this error may be returned even if the operation has completed successfully.
101
- * For example, a successful response from a server could have been delayed long enough for
102
- * the deadline to expire. When possible - implementations should make sure further processing of
103
- * the request is aborted, e.g. by throwing an exception instead of making the RPC request,
104
- * making the database query, etc.
105
- *
106
- * Maps to:
107
- * - google.rpc.Code: DEADLINE_EXCEEDED = 4;
108
- * - HTTP code: 504 Gateway Timeout
109
- */
110
- DEADLINE_EXCEEDED: 'DEADLINE_EXCEEDED',
111
- /**
112
- * The operation was canceled by the caller. An example - client closed the connection without
113
- * waiting for a response.
114
- *
115
- * Maps to:
116
- * - google.rpc.Code: CANCELLED = 1;
117
- * - HTTP code: 499 Client Closed Request
118
- */
119
- CANCELLED: 'CANCELLED',
120
- /**
121
- * The operation is rejected because of either rate limiting or resource quota,
122
- * such as the client has sent too many requests recently or the client has allocated too many
123
- * resources.
124
- *
125
- * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
126
- * for guideline on how to pick this vs TEMPORARILY_UNAVAILABLE.
127
- *
128
- * Maps to:
129
- * - google.rpc.Code: RESOURCE_EXHAUSTED = 8;
130
- * - HTTP code: 429 Too Many Requests
131
- */
132
- RESOURCE_EXHAUSTED: 'RESOURCE_EXHAUSTED',
133
- /**
134
- * The operation was aborted, typically due to a concurrency issue such as a sequencer
135
- * check failure, transaction abort, or transaction conflict.
136
- *
137
- * Maps to:
138
- * - google.rpc.Code: ABORTED = 10;
139
- * - HTTP code: 409 Conflict
140
- */
141
- ABORTED: 'ABORTED',
142
- /**
143
- * Operation was performed on a resource that does not exist,
144
- * e.g. file or directory was not found.
145
- *
146
- * Maps to:
147
- * - google.rpc.Code: NOT_FOUND = 5;
148
- * - HTTP code: 404 Not Found
149
- */
150
- NOT_FOUND: 'NOT_FOUND',
151
- /**
152
- * Operation was rejected due a conflict with an existing resource, e.g. attempted to create
153
- * file or directory that already exists.
154
- *
155
- * Prefer this over RESOURCE_CONFLICT.
156
- *
157
- * Maps to:
158
- * - google.rpc.Code: ALREADY_EXISTS = 6;
159
- * - HTTP code: 409 Conflict
160
- */
161
- ALREADY_EXISTS: 'ALREADY_EXISTS',
162
- /**
163
- * The request does not have valid authentication (AuthN) credentials for the operation.
164
- *
165
- * Prefer this over CUSTOMER_UNAUTHORIZED, unless you need to keep consistent behavior with legacy
166
- * code.
167
- * For authorization (AuthZ) errors use PERMISSION_DENIED.
168
- *
169
- * Maps to:
170
- * - google.rpc.Code: UNAUTHENTICATED = 16;
171
- * - HTTP code: 401 Unauthorized
172
- */
173
- UNAUTHENTICATED: 'UNAUTHENTICATED',
174
- /**
175
- * The service is currently unavailable. Please note that the unavailability may or may not be transient.
176
- * That means if this is a non-transient condition, retrying it does not work. If the unavailability
177
- * is certainly a transient condition, pleases use `TEMPORARILY_UNAVAILABLE` which signals its transient
178
- * nature explicitly.
179
- * An example of this error code’s use case is that when DNS resolution fails, the DNS resolver does
180
- * not know whether it is because the domain name is completely wrong (non-transient situation) or
181
- * the domain name is valid but the DNS server does not have an entry for this domain name yet (transient
182
- * situation). Hence, `UNAVAILABLE` is suitable for this case.
183
- *
184
- * Maps to:
185
- * - google.rpc.Code: UNAVAILABLE = 14;
186
- * - HTTP code: 503 Service Unavailable
187
- */
188
- UNAVAILABLE: 'UNAVAILABLE',
189
- /**
190
- * Supplied value for a parameter was invalid (e.g., giving a number for a string parameter).
191
- *
192
- * Maps to:
193
- * - google.rpc.Code: INVALID_ARGUMENT = 3;
194
- * - HTTP code: 400 Bad Request
195
- */
196
- INVALID_PARAMETER_VALUE: 'INVALID_PARAMETER_VALUE',
197
- /**
198
- * Indicates that the given API endpoint does not exist. Legacy, when possible - NOT_IMPLEMENTED
199
- * should be used instead to indicate that API doesn't exist.
200
- *
201
- * Maps to:
202
- * - google.rpc.Code: NOT_FOUND = 5;
203
- * - HTTP code: 404 Not Found
204
- */
205
- ENDPOINT_NOT_FOUND: 'ENDPOINT_NOT_FOUND',
206
- /** Indicates that the given API request was malformed. */
207
- MALFORMED_REQUEST: 'MALFORMED_REQUEST',
208
- /**
209
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
210
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
211
- * If one or more of the inputs to a given RPC are not in a valid state for the action.
212
- */
213
- INVALID_STATE: 'INVALID_STATE',
214
- /**
215
- * The caller does not have permission to execute the specified operation.
216
- * PERMISSION_DENIED must not be used for rejections caused by exhausting some resource,
217
- * use RESOURCE_EXHAUSTED instead for those errors.
218
- * PERMISSION_DENIED must not be used if the caller can not be identified,
219
- * use CUSTOMER_UNAUTHORIZED instead for those errors.
220
- * This error code does not imply the request is valid or the requested entity exists or
221
- * satisfies other pre-conditions.
222
- *
223
- * Maps to:
224
- * - google.rpc.Code: PERMISSION_DENIED = 7;
225
- * - HTTP code: 403 Forbidden
226
- */
227
- PERMISSION_DENIED: 'PERMISSION_DENIED',
228
- /**
229
- * NOTE: Deprecated due to inconsistent mapping in legacy code, see
230
- * https://docs.google.com/document/d/17TZIKX_Y39cJMBr333lc-d5dTvvBLSu3DPUyGU5eMJg/edit?disco=AAAAzVGt6FA.
231
- * Prefer using NOT_FOUND or PERMISSION_DENIED.
232
- *
233
- * If a given user/entity is trying to use a feature which has been disabled.
234
- *
235
- * Maps to:
236
- * - google.rpc.Code: NOT_FOUND = 5;
237
- * - HTTP code: 404 Not Found
238
- */
239
- FEATURE_DISABLED: 'FEATURE_DISABLED',
240
- /**
241
- * The request does not have valid authentication (AuthN) credentials for the operation.
242
- *
243
- * For authentication (AuthN) errors prefer using UNAUTHENTICATED, unless you need to keep
244
- * consistent behavior with legacy code.
245
- * For authorization (AuthZ) errors use PERMISSION_DENIED.
246
- *
247
- * Important: name is confusing, this error code is for authentication (AuthN) errors, not
248
- * authorization (AuthZ) errors. It maps to 401 Unauthorized and suffers from the same confusing
249
- * naming. See https://datatracker.ietf.org/doc/html/rfc7235#section-3.1 - "[...] status code
250
- * indicates that the request has not been applied because it lacks valid authentication
251
- * credentials for the target resource. [...] If the request included authentication credentials,
252
- * then the 401 response indicates that authorization has been refused for those credentials."
253
- *
254
- * Also, see https://stackoverflow.com/a/6937030/16352922, it covers it pretty well.
255
- *
256
- * Maps to:
257
- * - google.rpc.Code: UNAUTHENTICATED = 16;
258
- * - HTTP code: 401 Unauthorized
259
- */
260
- CUSTOMER_UNAUTHORIZED: 'CUSTOMER_UNAUTHORIZED',
261
- /**
262
- * The operation is rejected because of request rate limit, for example rate limiting applied to
263
- * users, workspaces, IP addresses, etc.
264
- *
265
- * Prefer a more generic RESOURCE_EXHAUSTED for the new use cases.
266
- *
267
- * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
268
- * for guideline on the rate limiting vs throttling.
269
- *
270
- * Maps to:
271
- * - google.rpc.Code: RESOURCE_EXHAUSTED = 8;
272
- * - HTTP code: 429 Too Many Requests
273
- */
274
- REQUEST_LIMIT_EXCEEDED: 'REQUEST_LIMIT_EXCEEDED',
275
- /** Indicates API request was rejected due a conflict with an existing resource. */
276
- RESOURCE_CONFLICT: 'RESOURCE_CONFLICT',
277
- /**
278
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
279
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
280
- * Indicates that the HTTP response cannot be correctly deserialized.
281
- * This currently is only used in DUST test clients, and not by any real service code.
282
- */
283
- UNPARSEABLE_HTTP_ERROR: 'UNPARSEABLE_HTTP_ERROR',
284
- /**
285
- * The operation is not implemented or is not supported/enabled in this service.
286
- *
287
- * Maps to:
288
- * - google.rpc.Code: UNIMPLEMENTED = 12;
289
- * - HTTP code: 501 Not Implemented
290
- */
291
- NOT_IMPLEMENTED: 'NOT_IMPLEMENTED',
292
- /**
293
- * Unrecoverable data loss or corruption.
294
- *
295
- * One of the major use cases is to indicate that server failed to validate the integrity of
296
- * the request. This error can occur when the checksum specified in the `X-Databricks-Checksum`
297
- * request header (or trailer) doesn't match the actual request content checksum.
298
- *
299
- * Note, in case of the severe corruption that results in a malformed request, the server may
300
- * send a generic `400 Bad Request` response rather than sending this error code.
301
- *
302
- * Maps to:
303
- * - google.rpc.Code: DATA_LOSS = 15;
304
- * - HTTP code: 500 Internal Server Error
305
- */
306
- DATA_LOSS: 'DATA_LOSS',
307
- /** If the user attempts to perform an invalid state transition on a shard. */
308
- INVALID_STATE_TRANSITION: 'INVALID_STATE_TRANSITION',
309
- /**
310
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
311
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
312
- * Unable to perform the operation because the shard was locked by some other operation.
313
- */
314
- COULD_NOT_ACQUIRE_LOCK: 'COULD_NOT_ACQUIRE_LOCK',
315
- /**
316
- * NOTE: Deprecated, prefer using ALREADY_EXISTS.
317
- * Unlike ALREADY_EXISTS - this maps to HTTP code 400 Bad Request due to legacy reasons,
318
- * remapping will be a backwards incompatible change.
319
- *
320
- * Operation was performed on a resource that already exists.
321
- */
322
- RESOURCE_ALREADY_EXISTS: 'RESOURCE_ALREADY_EXISTS',
323
- /**
324
- * NOTE: Deprecated, prefer using NOT_FOUND - see the note for the RESOURCE_ALREADY_EXISTS,
325
- * because this pair of codes is related and RESOURCE_ALREADY_EXISTS has bad mapping to the HTTP
326
- * codes we added new error codes NOT_FOUND and ALREADY_EXISTS, and recommend to use them instead.
327
- *
328
- * Operation was performed on a resource that does not exist.
329
- */
330
- RESOURCE_DOES_NOT_EXIST: 'RESOURCE_DOES_NOT_EXIST',
331
- /**
332
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
333
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
334
- */
335
- QUOTA_EXCEEDED: 'QUOTA_EXCEEDED',
336
- /**
337
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
338
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
339
- */
340
- MAX_BLOCK_SIZE_EXCEEDED: 'MAX_BLOCK_SIZE_EXCEEDED',
341
- /**
342
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
343
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
344
- */
345
- MAX_READ_SIZE_EXCEEDED: 'MAX_READ_SIZE_EXCEEDED',
346
- PARTIAL_DELETE: 'PARTIAL_DELETE',
347
- MAX_LIST_SIZE_EXCEEDED: 'MAX_LIST_SIZE_EXCEEDED',
348
- /**
349
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
350
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
351
- */
352
- DRY_RUN_FAILED: 'DRY_RUN_FAILED',
353
- /**
354
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
355
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
356
- * Cluster request was rejected because it would exceed a resource limit.
357
- */
358
- RESOURCE_LIMIT_EXCEEDED: 'RESOURCE_LIMIT_EXCEEDED',
359
- /**
360
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
361
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
362
- */
363
- DIRECTORY_NOT_EMPTY: 'DIRECTORY_NOT_EMPTY',
364
- /**
365
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
366
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
367
- */
368
- DIRECTORY_PROTECTED: 'DIRECTORY_PROTECTED',
369
- /**
370
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
371
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
372
- */
373
- MAX_NOTEBOOK_SIZE_EXCEEDED: 'MAX_NOTEBOOK_SIZE_EXCEEDED',
374
- MAX_CHILD_NODE_SIZE_EXCEEDED: 'MAX_CHILD_NODE_SIZE_EXCEEDED',
375
- /**
376
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
377
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
378
- */
379
- SEARCH_QUERY_TOO_LONG: 'SEARCH_QUERY_TOO_LONG',
380
- /**
381
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
382
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
383
- */
384
- SEARCH_QUERY_TOO_SHORT: 'SEARCH_QUERY_TOO_SHORT',
385
- /**
386
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
387
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
388
- */
389
- MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST: 'MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST',
390
- /**
391
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
392
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
393
- */
394
- PERMISSION_NOT_PROPAGATED: 'PERMISSION_NOT_PROPAGATED',
395
- /**
396
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
397
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
398
- */
399
- DEPLOYMENT_TIMEOUT: 'DEPLOYMENT_TIMEOUT',
400
- /**
401
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
402
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
403
- */
404
- GIT_CONFLICT: 'GIT_CONFLICT',
405
- /**
406
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
407
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
408
- */
409
- GIT_UNKNOWN_REF: 'GIT_UNKNOWN_REF',
410
- /**
411
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
412
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
413
- */
414
- GIT_SENSITIVE_TOKEN_DETECTED: 'GIT_SENSITIVE_TOKEN_DETECTED',
415
- /**
416
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
417
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
418
- */
419
- GIT_URL_NOT_ON_ALLOW_LIST: 'GIT_URL_NOT_ON_ALLOW_LIST',
420
- /**
421
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
422
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
423
- */
424
- GIT_REMOTE_ERROR: 'GIT_REMOTE_ERROR',
425
- /**
426
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
427
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
428
- */
429
- PROJECTS_OPERATION_TIMEOUT: 'PROJECTS_OPERATION_TIMEOUT',
430
- /**
431
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
432
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
433
- */
434
- IPYNB_FILE_IN_REPO: 'IPYNB_FILE_IN_REPO',
435
- /**
436
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
437
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
438
- */
439
- INSECURE_PARTNER_RESPONSE: 'INSECURE_PARTNER_RESPONSE',
440
- /**
441
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
442
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
443
- */
444
- MALFORMED_PARTNER_RESPONSE: 'MALFORMED_PARTNER_RESPONSE',
445
- METASTORE_DOES_NOT_EXIST: 'METASTORE_DOES_NOT_EXIST',
446
- /**
447
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
448
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
449
- */
450
- DAC_DOES_NOT_EXIST: 'DAC_DOES_NOT_EXIST',
451
- CATALOG_DOES_NOT_EXIST: 'CATALOG_DOES_NOT_EXIST',
452
- SCHEMA_DOES_NOT_EXIST: 'SCHEMA_DOES_NOT_EXIST',
453
- TABLE_DOES_NOT_EXIST: 'TABLE_DOES_NOT_EXIST',
454
- SHARE_DOES_NOT_EXIST: 'SHARE_DOES_NOT_EXIST',
455
- RECIPIENT_DOES_NOT_EXIST: 'RECIPIENT_DOES_NOT_EXIST',
456
- STORAGE_CREDENTIAL_DOES_NOT_EXIST: 'STORAGE_CREDENTIAL_DOES_NOT_EXIST',
457
- EXTERNAL_LOCATION_DOES_NOT_EXIST: 'EXTERNAL_LOCATION_DOES_NOT_EXIST',
458
- PRINCIPAL_DOES_NOT_EXIST: 'PRINCIPAL_DOES_NOT_EXIST',
459
- PROVIDER_DOES_NOT_EXIST: 'PROVIDER_DOES_NOT_EXIST',
460
- /**
461
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
462
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
463
- */
464
- METASTORE_ALREADY_EXISTS: 'METASTORE_ALREADY_EXISTS',
465
- /**
466
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
467
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
468
- */
469
- DAC_ALREADY_EXISTS: 'DAC_ALREADY_EXISTS',
470
- /**
471
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
472
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
473
- */
474
- CATALOG_ALREADY_EXISTS: 'CATALOG_ALREADY_EXISTS',
475
- /**
476
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
477
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
478
- */
479
- SCHEMA_ALREADY_EXISTS: 'SCHEMA_ALREADY_EXISTS',
480
- /**
481
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
482
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
483
- */
484
- TABLE_ALREADY_EXISTS: 'TABLE_ALREADY_EXISTS',
485
- /**
486
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
487
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
488
- */
489
- SHARE_ALREADY_EXISTS: 'SHARE_ALREADY_EXISTS',
490
- /**
491
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
492
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
493
- */
494
- RECIPIENT_ALREADY_EXISTS: 'RECIPIENT_ALREADY_EXISTS',
495
- /**
496
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
497
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
498
- */
499
- STORAGE_CREDENTIAL_ALREADY_EXISTS: 'STORAGE_CREDENTIAL_ALREADY_EXISTS',
500
- /**
501
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
502
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
503
- */
504
- EXTERNAL_LOCATION_ALREADY_EXISTS: 'EXTERNAL_LOCATION_ALREADY_EXISTS',
505
- /**
506
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
507
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
508
- */
509
- PROVIDER_ALREADY_EXISTS: 'PROVIDER_ALREADY_EXISTS',
510
- /**
511
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
512
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
513
- */
514
- CATALOG_NOT_EMPTY: 'CATALOG_NOT_EMPTY',
515
- /**
516
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
517
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
518
- */
519
- SCHEMA_NOT_EMPTY: 'SCHEMA_NOT_EMPTY',
520
- /**
521
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
522
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
523
- */
524
- METASTORE_NOT_EMPTY: 'METASTORE_NOT_EMPTY',
525
- /**
526
- * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
527
- * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
528
- */
529
- PROVIDER_SHARE_NOT_ACCESSIBLE: 'PROVIDER_SHARE_NOT_ACCESSIBLE',
31
+ const ErrorCode = {
32
+ UNKNOWN: "UNKNOWN",
33
+ INTERNAL_ERROR: "INTERNAL_ERROR",
34
+ TEMPORARILY_UNAVAILABLE: "TEMPORARILY_UNAVAILABLE",
35
+ IO_ERROR: "IO_ERROR",
36
+ BAD_REQUEST: "BAD_REQUEST",
37
+ SERVICE_UNDER_MAINTENANCE: "SERVICE_UNDER_MAINTENANCE",
38
+ WORKSPACE_TEMPORARILY_UNAVAILABLE: "WORKSPACE_TEMPORARILY_UNAVAILABLE",
39
+ DEADLINE_EXCEEDED: "DEADLINE_EXCEEDED",
40
+ CANCELLED: "CANCELLED",
41
+ RESOURCE_EXHAUSTED: "RESOURCE_EXHAUSTED",
42
+ ABORTED: "ABORTED",
43
+ NOT_FOUND: "NOT_FOUND",
44
+ ALREADY_EXISTS: "ALREADY_EXISTS",
45
+ UNAUTHENTICATED: "UNAUTHENTICATED",
46
+ UNAVAILABLE: "UNAVAILABLE",
47
+ INVALID_PARAMETER_VALUE: "INVALID_PARAMETER_VALUE",
48
+ ENDPOINT_NOT_FOUND: "ENDPOINT_NOT_FOUND",
49
+ MALFORMED_REQUEST: "MALFORMED_REQUEST",
50
+ INVALID_STATE: "INVALID_STATE",
51
+ PERMISSION_DENIED: "PERMISSION_DENIED",
52
+ FEATURE_DISABLED: "FEATURE_DISABLED",
53
+ CUSTOMER_UNAUTHORIZED: "CUSTOMER_UNAUTHORIZED",
54
+ REQUEST_LIMIT_EXCEEDED: "REQUEST_LIMIT_EXCEEDED",
55
+ RESOURCE_CONFLICT: "RESOURCE_CONFLICT",
56
+ UNPARSEABLE_HTTP_ERROR: "UNPARSEABLE_HTTP_ERROR",
57
+ NOT_IMPLEMENTED: "NOT_IMPLEMENTED",
58
+ DATA_LOSS: "DATA_LOSS",
59
+ INVALID_STATE_TRANSITION: "INVALID_STATE_TRANSITION",
60
+ COULD_NOT_ACQUIRE_LOCK: "COULD_NOT_ACQUIRE_LOCK",
61
+ RESOURCE_ALREADY_EXISTS: "RESOURCE_ALREADY_EXISTS",
62
+ RESOURCE_DOES_NOT_EXIST: "RESOURCE_DOES_NOT_EXIST",
63
+ QUOTA_EXCEEDED: "QUOTA_EXCEEDED",
64
+ MAX_BLOCK_SIZE_EXCEEDED: "MAX_BLOCK_SIZE_EXCEEDED",
65
+ MAX_READ_SIZE_EXCEEDED: "MAX_READ_SIZE_EXCEEDED",
66
+ PARTIAL_DELETE: "PARTIAL_DELETE",
67
+ MAX_LIST_SIZE_EXCEEDED: "MAX_LIST_SIZE_EXCEEDED",
68
+ DRY_RUN_FAILED: "DRY_RUN_FAILED",
69
+ RESOURCE_LIMIT_EXCEEDED: "RESOURCE_LIMIT_EXCEEDED",
70
+ DIRECTORY_NOT_EMPTY: "DIRECTORY_NOT_EMPTY",
71
+ DIRECTORY_PROTECTED: "DIRECTORY_PROTECTED",
72
+ MAX_NOTEBOOK_SIZE_EXCEEDED: "MAX_NOTEBOOK_SIZE_EXCEEDED",
73
+ MAX_CHILD_NODE_SIZE_EXCEEDED: "MAX_CHILD_NODE_SIZE_EXCEEDED",
74
+ SEARCH_QUERY_TOO_LONG: "SEARCH_QUERY_TOO_LONG",
75
+ SEARCH_QUERY_TOO_SHORT: "SEARCH_QUERY_TOO_SHORT",
76
+ MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST: "MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST",
77
+ PERMISSION_NOT_PROPAGATED: "PERMISSION_NOT_PROPAGATED",
78
+ DEPLOYMENT_TIMEOUT: "DEPLOYMENT_TIMEOUT",
79
+ GIT_CONFLICT: "GIT_CONFLICT",
80
+ GIT_UNKNOWN_REF: "GIT_UNKNOWN_REF",
81
+ GIT_SENSITIVE_TOKEN_DETECTED: "GIT_SENSITIVE_TOKEN_DETECTED",
82
+ GIT_URL_NOT_ON_ALLOW_LIST: "GIT_URL_NOT_ON_ALLOW_LIST",
83
+ GIT_REMOTE_ERROR: "GIT_REMOTE_ERROR",
84
+ PROJECTS_OPERATION_TIMEOUT: "PROJECTS_OPERATION_TIMEOUT",
85
+ IPYNB_FILE_IN_REPO: "IPYNB_FILE_IN_REPO",
86
+ INSECURE_PARTNER_RESPONSE: "INSECURE_PARTNER_RESPONSE",
87
+ MALFORMED_PARTNER_RESPONSE: "MALFORMED_PARTNER_RESPONSE",
88
+ METASTORE_DOES_NOT_EXIST: "METASTORE_DOES_NOT_EXIST",
89
+ DAC_DOES_NOT_EXIST: "DAC_DOES_NOT_EXIST",
90
+ CATALOG_DOES_NOT_EXIST: "CATALOG_DOES_NOT_EXIST",
91
+ SCHEMA_DOES_NOT_EXIST: "SCHEMA_DOES_NOT_EXIST",
92
+ TABLE_DOES_NOT_EXIST: "TABLE_DOES_NOT_EXIST",
93
+ SHARE_DOES_NOT_EXIST: "SHARE_DOES_NOT_EXIST",
94
+ RECIPIENT_DOES_NOT_EXIST: "RECIPIENT_DOES_NOT_EXIST",
95
+ STORAGE_CREDENTIAL_DOES_NOT_EXIST: "STORAGE_CREDENTIAL_DOES_NOT_EXIST",
96
+ EXTERNAL_LOCATION_DOES_NOT_EXIST: "EXTERNAL_LOCATION_DOES_NOT_EXIST",
97
+ PRINCIPAL_DOES_NOT_EXIST: "PRINCIPAL_DOES_NOT_EXIST",
98
+ PROVIDER_DOES_NOT_EXIST: "PROVIDER_DOES_NOT_EXIST",
99
+ METASTORE_ALREADY_EXISTS: "METASTORE_ALREADY_EXISTS",
100
+ DAC_ALREADY_EXISTS: "DAC_ALREADY_EXISTS",
101
+ CATALOG_ALREADY_EXISTS: "CATALOG_ALREADY_EXISTS",
102
+ SCHEMA_ALREADY_EXISTS: "SCHEMA_ALREADY_EXISTS",
103
+ TABLE_ALREADY_EXISTS: "TABLE_ALREADY_EXISTS",
104
+ SHARE_ALREADY_EXISTS: "SHARE_ALREADY_EXISTS",
105
+ RECIPIENT_ALREADY_EXISTS: "RECIPIENT_ALREADY_EXISTS",
106
+ STORAGE_CREDENTIAL_ALREADY_EXISTS: "STORAGE_CREDENTIAL_ALREADY_EXISTS",
107
+ EXTERNAL_LOCATION_ALREADY_EXISTS: "EXTERNAL_LOCATION_ALREADY_EXISTS",
108
+ PROVIDER_ALREADY_EXISTS: "PROVIDER_ALREADY_EXISTS",
109
+ CATALOG_NOT_EMPTY: "CATALOG_NOT_EMPTY",
110
+ SCHEMA_NOT_EMPTY: "SCHEMA_NOT_EMPTY",
111
+ METASTORE_NOT_EMPTY: "METASTORE_NOT_EMPTY",
112
+ PROVIDER_SHARE_NOT_ACCESSIBLE: "PROVIDER_SHARE_NOT_ACCESSIBLE"
530
113
  };
531
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
532
- export const EvaluationStatusType = {
533
- EVALUATION_STATUS_TYPE_UNSPECIFIED: 'EVALUATION_STATUS_TYPE_UNSPECIFIED',
534
- RUNNING: 'RUNNING',
535
- DONE: 'DONE',
536
- NOT_STARTED: 'NOT_STARTED',
537
- EVALUATION_FAILED: 'EVALUATION_FAILED',
538
- EVALUATION_CANCELLED: 'EVALUATION_CANCELLED',
539
- EVALUATION_TIMEOUT: 'EVALUATION_TIMEOUT',
114
+ const EvaluationStatusType = {
115
+ EVALUATION_STATUS_TYPE_UNSPECIFIED: "EVALUATION_STATUS_TYPE_UNSPECIFIED",
116
+ RUNNING: "RUNNING",
117
+ DONE: "DONE",
118
+ NOT_STARTED: "NOT_STARTED",
119
+ EVALUATION_FAILED: "EVALUATION_FAILED",
120
+ EVALUATION_CANCELLED: "EVALUATION_CANCELLED",
121
+ EVALUATION_TIMEOUT: "EVALUATION_TIMEOUT"
540
122
  };
541
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
542
- export const Format = {
543
- FORMAT_UNSPECIFIED: 'FORMAT_UNSPECIFIED',
544
- JSON_ARRAY: 'JSON_ARRAY',
545
- ARROW_STREAM: 'ARROW_STREAM',
546
- CSV: 'CSV',
123
+ const Format = {
124
+ FORMAT_UNSPECIFIED: "FORMAT_UNSPECIFIED",
125
+ JSON_ARRAY: "JSON_ARRAY",
126
+ ARROW_STREAM: "ARROW_STREAM",
127
+ CSV: "CSV"
547
128
  };
548
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
549
- export const GenieEvalAssessment = {
550
- GENIE_EVAL_ASSESSMENT_UNSPECIFIED: 'GENIE_EVAL_ASSESSMENT_UNSPECIFIED',
551
- GOOD: 'GOOD',
552
- BAD: 'BAD',
553
- NEEDS_REVIEW: 'NEEDS_REVIEW',
129
+ const GenieEvalAssessment = {
130
+ GENIE_EVAL_ASSESSMENT_UNSPECIFIED: "GENIE_EVAL_ASSESSMENT_UNSPECIFIED",
131
+ GOOD: "GOOD",
132
+ BAD: "BAD",
133
+ NEEDS_REVIEW: "NEEDS_REVIEW"
554
134
  };
555
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
556
- export const GenieEvalResponseType = {
557
- GENIE_EVAL_RESPONSE_TYPE_UNSPECIFIED: 'GENIE_EVAL_RESPONSE_TYPE_UNSPECIFIED',
558
- TEXT: 'TEXT',
559
- SQL: 'SQL',
135
+ const GenieEvalResponseType = {
136
+ GENIE_EVAL_RESPONSE_TYPE_UNSPECIFIED: "GENIE_EVAL_RESPONSE_TYPE_UNSPECIFIED",
137
+ TEXT: "TEXT",
138
+ SQL: "SQL"
560
139
  };
561
140
  /** Feedback rating for Genie messages */
562
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
563
- export const GenieFeedbackRating = {
564
- GENIE_FEEDBACK_RATING_UNSPECIFIED: 'GENIE_FEEDBACK_RATING_UNSPECIFIED',
565
- POSITIVE: 'POSITIVE',
566
- NEGATIVE: 'NEGATIVE',
567
- NONE: 'NONE',
141
+ const GenieFeedbackRating = {
142
+ GENIE_FEEDBACK_RATING_UNSPECIFIED: "GENIE_FEEDBACK_RATING_UNSPECIFIED",
143
+ POSITIVE: "POSITIVE",
144
+ NEGATIVE: "NEGATIVE",
145
+ NONE: "NONE"
568
146
  };
569
147
  /**
570
- * copied from proto3 / Google Well Known Types, source:
571
- * https://github.com/protocolbuffers/protobuf/blob/450d24ca820750c5db5112a6f0b0c2efb9758021/src/google/protobuf/struct.proto
572
- * `NullValue` is a singleton enumeration to represent the null value for the
573
- * `Value` type union.
574
- *
575
- * The JSON representation for `NullValue` is JSON `null`.
576
- */
577
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
578
- export const NullValue = {
579
- /** Null value. */
580
- NULL_VALUE: 'NULL_VALUE',
581
- };
582
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
583
- export const ScoreReason = {
584
- SCORE_REASON_UNSPECIFIED: 'SCORE_REASON_UNSPECIFIED',
585
- EMPTY_RESULT: 'EMPTY_RESULT',
586
- RESULT_MISSING_ROWS: 'RESULT_MISSING_ROWS',
587
- RESULT_EXTRA_ROWS: 'RESULT_EXTRA_ROWS',
588
- RESULT_MISSING_COLUMNS: 'RESULT_MISSING_COLUMNS',
589
- RESULT_EXTRA_COLUMNS: 'RESULT_EXTRA_COLUMNS',
590
- SINGLE_CELL_DIFFERENCE: 'SINGLE_CELL_DIFFERENCE',
591
- EMPTY_GOOD_SQL: 'EMPTY_GOOD_SQL',
592
- COLUMN_TYPE_DIFFERENCE: 'COLUMN_TYPE_DIFFERENCE',
593
- /** Deprecated LLM Judge error categories - kept for backward compatibility */
594
- LLM_JUDGE_MISSING_JOIN: 'LLM_JUDGE_MISSING_JOIN',
595
- LLM_JUDGE_WRONG_FILTER: 'LLM_JUDGE_WRONG_FILTER',
596
- LLM_JUDGE_WRONG_AGGREGATION: 'LLM_JUDGE_WRONG_AGGREGATION',
597
- LLM_JUDGE_WRONG_COLUMNS: 'LLM_JUDGE_WRONG_COLUMNS',
598
- LLM_JUDGE_SYNTAX_ERROR: 'LLM_JUDGE_SYNTAX_ERROR',
599
- LLM_JUDGE_SEMANTIC_ERROR: 'LLM_JUDGE_SEMANTIC_ERROR',
600
- /** New LLM Judge error categories - aligned with LlmJudgeFunctionSpec */
601
- LLM_JUDGE_OTHER: 'LLM_JUDGE_OTHER',
602
- LLM_JUDGE_MISSING_OR_INCORRECT_FILTER: 'LLM_JUDGE_MISSING_OR_INCORRECT_FILTER',
603
- LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT: 'LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT',
604
- LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST: 'LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST',
605
- LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC: 'LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC',
606
- LLM_JUDGE_INCORRECT_METRIC_CALCULATION: 'LLM_JUDGE_INCORRECT_METRIC_CALCULATION',
607
- LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE: 'LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE',
608
- LLM_JUDGE_INCORRECT_FUNCTION_USAGE: 'LLM_JUDGE_INCORRECT_FUNCTION_USAGE',
609
- LLM_JUDGE_MISSING_OR_INCORRECT_JOIN: 'LLM_JUDGE_MISSING_OR_INCORRECT_JOIN',
610
- LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION: 'LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION',
611
- LLM_JUDGE_FORMATTING_ERROR: 'LLM_JUDGE_FORMATTING_ERROR',
148
+ * copied from proto3 / Google Well Known Types, source:
149
+ * https://github.com/protocolbuffers/protobuf/blob/450d24ca820750c5db5112a6f0b0c2efb9758021/src/google/protobuf/struct.proto
150
+ * `NullValue` is a singleton enumeration to represent the null value for the
151
+ * `Value` type union.
152
+ *
153
+ * The JSON representation for `NullValue` is JSON `null`.
154
+ */
155
+ const NullValue = { NULL_VALUE: "NULL_VALUE" };
156
+ const ScoreReason = {
157
+ SCORE_REASON_UNSPECIFIED: "SCORE_REASON_UNSPECIFIED",
158
+ EMPTY_RESULT: "EMPTY_RESULT",
159
+ RESULT_MISSING_ROWS: "RESULT_MISSING_ROWS",
160
+ RESULT_EXTRA_ROWS: "RESULT_EXTRA_ROWS",
161
+ RESULT_MISSING_COLUMNS: "RESULT_MISSING_COLUMNS",
162
+ RESULT_EXTRA_COLUMNS: "RESULT_EXTRA_COLUMNS",
163
+ SINGLE_CELL_DIFFERENCE: "SINGLE_CELL_DIFFERENCE",
164
+ EMPTY_GOOD_SQL: "EMPTY_GOOD_SQL",
165
+ COLUMN_TYPE_DIFFERENCE: "COLUMN_TYPE_DIFFERENCE",
166
+ LLM_JUDGE_MISSING_JOIN: "LLM_JUDGE_MISSING_JOIN",
167
+ LLM_JUDGE_WRONG_FILTER: "LLM_JUDGE_WRONG_FILTER",
168
+ LLM_JUDGE_WRONG_AGGREGATION: "LLM_JUDGE_WRONG_AGGREGATION",
169
+ LLM_JUDGE_WRONG_COLUMNS: "LLM_JUDGE_WRONG_COLUMNS",
170
+ LLM_JUDGE_SYNTAX_ERROR: "LLM_JUDGE_SYNTAX_ERROR",
171
+ LLM_JUDGE_SEMANTIC_ERROR: "LLM_JUDGE_SEMANTIC_ERROR",
172
+ LLM_JUDGE_OTHER: "LLM_JUDGE_OTHER",
173
+ LLM_JUDGE_MISSING_OR_INCORRECT_FILTER: "LLM_JUDGE_MISSING_OR_INCORRECT_FILTER",
174
+ LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT: "LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT",
175
+ LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST: "LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST",
176
+ LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC: "LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC",
177
+ LLM_JUDGE_INCORRECT_METRIC_CALCULATION: "LLM_JUDGE_INCORRECT_METRIC_CALCULATION",
178
+ LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE: "LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE",
179
+ LLM_JUDGE_INCORRECT_FUNCTION_USAGE: "LLM_JUDGE_INCORRECT_FUNCTION_USAGE",
180
+ LLM_JUDGE_MISSING_OR_INCORRECT_JOIN: "LLM_JUDGE_MISSING_OR_INCORRECT_JOIN",
181
+ LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION: "LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION",
182
+ LLM_JUDGE_FORMATTING_ERROR: "LLM_JUDGE_FORMATTING_ERROR"
612
183
  };
613
184
  /** Purpose/intent of a text attachment */
614
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
615
- export const TextAttachmentPurpose = {
616
- /** Default value. Returned when the text attachment purpose is not set. */
617
- TEXT_ATTACHMENT_PURPOSE_UNSPECIFIED: 'TEXT_ATTACHMENT_PURPOSE_UNSPECIFIED',
618
- /** A clarifying question Genie asks back to the user, not the answer. */
619
- FOLLOW_UP_QUESTION: 'FOLLOW_UP_QUESTION',
185
+ const TextAttachmentPurpose = {
186
+ TEXT_ATTACHMENT_PURPOSE_UNSPECIFIED: "TEXT_ATTACHMENT_PURPOSE_UNSPECIFIED",
187
+ FOLLOW_UP_QUESTION: "FOLLOW_UP_QUESTION"
620
188
  };
621
189
  /**
622
- * ThoughtType.
623
- * The possible values are:
624
- * * `THOUGHT_TYPE_UNSPECIFIED`: Default value that should not be used.
625
- * * `THOUGHT_TYPE_DESCRIPTION`: A high-level description of how the question was interpreted.
626
- * * `THOUGHT_TYPE_UNDERSTANDING`: How ambiguous parts of the question were resolved.
627
- * * `THOUGHT_TYPE_DATA_SOURCING`: Which tables or datasets were identified as relevant.
628
- * * `THOUGHT_TYPE_INSTRUCTIONS`: Which author-defined instructions were referenced.
629
- * * `THOUGHT_TYPE_STEPS`: The logical steps taken to compute the answer.
630
- * The category of a Thought.
631
- * Additional values may be added in the future.
632
- */
633
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
634
- export const ThoughtType = {
635
- THOUGHT_TYPE_UNSPECIFIED: 'THOUGHT_TYPE_UNSPECIFIED',
636
- /** A high-level description of how the question was interpreted. */
637
- THOUGHT_TYPE_DESCRIPTION: 'THOUGHT_TYPE_DESCRIPTION',
638
- /** How ambiguous parts of the question were resolved. */
639
- THOUGHT_TYPE_UNDERSTANDING: 'THOUGHT_TYPE_UNDERSTANDING',
640
- /** Which tables or datasets were identified as relevant. */
641
- THOUGHT_TYPE_DATA_SOURCING: 'THOUGHT_TYPE_DATA_SOURCING',
642
- /** Which author-defined instructions were referenced. */
643
- THOUGHT_TYPE_INSTRUCTIONS: 'THOUGHT_TYPE_INSTRUCTIONS',
644
- /** The logical steps taken to compute the answer. */
645
- THOUGHT_TYPE_STEPS: 'THOUGHT_TYPE_STEPS',
190
+ * ThoughtType.
191
+ * The possible values are:
192
+ * * `THOUGHT_TYPE_UNSPECIFIED`: Default value that should not be used.
193
+ * * `THOUGHT_TYPE_DESCRIPTION`: A high-level description of how the question was interpreted.
194
+ * * `THOUGHT_TYPE_UNDERSTANDING`: How ambiguous parts of the question were resolved.
195
+ * * `THOUGHT_TYPE_DATA_SOURCING`: Which tables or datasets were identified as relevant.
196
+ * * `THOUGHT_TYPE_INSTRUCTIONS`: Which author-defined instructions were referenced.
197
+ * * `THOUGHT_TYPE_STEPS`: The logical steps taken to compute the answer.
198
+ * The category of a Thought.
199
+ * Additional values may be added in the future.
200
+ */
201
+ const ThoughtType = {
202
+ THOUGHT_TYPE_UNSPECIFIED: "THOUGHT_TYPE_UNSPECIFIED",
203
+ THOUGHT_TYPE_DESCRIPTION: "THOUGHT_TYPE_DESCRIPTION",
204
+ THOUGHT_TYPE_UNDERSTANDING: "THOUGHT_TYPE_UNDERSTANDING",
205
+ THOUGHT_TYPE_DATA_SOURCING: "THOUGHT_TYPE_DATA_SOURCING",
206
+ THOUGHT_TYPE_INSTRUCTIONS: "THOUGHT_TYPE_INSTRUCTIONS",
207
+ THOUGHT_TYPE_STEPS: "THOUGHT_TYPE_STEPS"
646
208
  };
647
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
648
- export const MessageError_Type = {
649
- TYPE_UNSPECIFIED: 'TYPE_UNSPECIFIED',
650
- UNEXPECTED_REPLY_PROCESS_EXCEPTION: 'UNEXPECTED_REPLY_PROCESS_EXCEPTION',
651
- GENERIC_CHAT_COMPLETION_EXCEPTION: 'GENERIC_CHAT_COMPLETION_EXCEPTION',
652
- /** TokenCounter estimates were off and OpenAi responds with an error due to the token limit. */
653
- CONTEXT_EXCEEDED_EXCEPTION: 'CONTEXT_EXCEEDED_EXCEPTION',
654
- DEPLOYMENT_NOT_FOUND_EXCEPTION: 'DEPLOYMENT_NOT_FOUND_EXCEPTION',
655
- FUNCTIONS_NOT_AVAILABLE_EXCEPTION: 'FUNCTIONS_NOT_AVAILABLE_EXCEPTION',
656
- INVALID_COMPLETION_REQUEST_EXCEPTION: 'INVALID_COMPLETION_REQUEST_EXCEPTION',
657
- CONTENT_FILTER_EXCEPTION: 'CONTENT_FILTER_EXCEPTION',
658
- FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION: 'FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION',
659
- RETRYABLE_PROCESSING_EXCEPTION: 'RETRYABLE_PROCESSING_EXCEPTION',
660
- INVALID_FUNCTION_CALL_EXCEPTION: 'INVALID_FUNCTION_CALL_EXCEPTION',
661
- /** Request can not fit into model or the configured limits and TokenCounter registers token limit exceeded. */
662
- LOCAL_CONTEXT_EXCEEDED_EXCEPTION: 'LOCAL_CONTEXT_EXCEEDED_EXCEPTION',
663
- CHAT_COMPLETION_NETWORK_EXCEPTION: 'CHAT_COMPLETION_NETWORK_EXCEPTION',
664
- INVALID_CHAT_COMPLETION_JSON_EXCEPTION: 'INVALID_CHAT_COMPLETION_JSON_EXCEPTION',
665
- GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION: 'GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION',
666
- WAREHOUSE_ACCESS_MISSING_EXCEPTION: 'WAREHOUSE_ACCESS_MISSING_EXCEPTION',
667
- WAREHOUSE_NOT_FOUND_EXCEPTION: 'WAREHOUSE_NOT_FOUND_EXCEPTION',
668
- NO_TABLES_TO_QUERY_EXCEPTION: 'NO_TABLES_TO_QUERY_EXCEPTION',
669
- SQL_EXECUTION_EXCEPTION: 'SQL_EXECUTION_EXCEPTION',
670
- REPLY_PROCESS_TIMEOUT_EXCEPTION: 'REPLY_PROCESS_TIMEOUT_EXCEPTION',
671
- COULD_NOT_GET_UC_SCHEMA_EXCEPTION: 'COULD_NOT_GET_UC_SCHEMA_EXCEPTION',
672
- INVALID_TABLE_IDENTIFIER_EXCEPTION: 'INVALID_TABLE_IDENTIFIER_EXCEPTION',
673
- TOO_MANY_TABLES_EXCEPTION: 'TOO_MANY_TABLES_EXCEPTION',
674
- FUNCTION_ARGUMENTS_INVALID_EXCEPTION: 'FUNCTION_ARGUMENTS_INVALID_EXCEPTION',
675
- GENERIC_SQL_EXEC_API_CALL_EXCEPTION: 'GENERIC_SQL_EXEC_API_CALL_EXCEPTION',
676
- CHAT_COMPLETION_CLIENT_EXCEPTION: 'CHAT_COMPLETION_CLIENT_EXCEPTION',
677
- CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION: 'CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION',
678
- UNKNOWN_AI_MODEL: 'UNKNOWN_AI_MODEL',
679
- TABLES_MISSING_EXCEPTION: 'TABLES_MISSING_EXCEPTION',
680
- MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION: 'MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION',
681
- MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION: 'MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION',
682
- BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION: 'BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION',
683
- INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION: 'INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION',
684
- TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION: 'TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION',
685
- RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION: 'RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION',
686
- RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION: 'RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION',
687
- FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION: 'FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION',
688
- INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION: 'INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION',
689
- ILLEGAL_PARAMETER_DEFINITION_EXCEPTION: 'ILLEGAL_PARAMETER_DEFINITION_EXCEPTION',
690
- NO_QUERY_TO_VISUALIZE_EXCEPTION: 'NO_QUERY_TO_VISUALIZE_EXCEPTION',
691
- NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE: 'NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE',
692
- STOP_PROCESS_DUE_TO_AUTO_REGENERATE: 'STOP_PROCESS_DUE_TO_AUTO_REGENERATE',
693
- FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION: 'FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION',
694
- MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION: 'MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION',
695
- COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION: 'COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION',
696
- GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION: 'GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION',
697
- MISSING_SQL_QUERY_EXCEPTION: 'MISSING_SQL_QUERY_EXCEPTION',
698
- DESCRIBE_QUERY_UNEXPECTED_FAILURE: 'DESCRIBE_QUERY_UNEXPECTED_FAILURE',
699
- DESCRIBE_QUERY_TIMEOUT: 'DESCRIBE_QUERY_TIMEOUT',
700
- DESCRIBE_QUERY_INVALID_SQL_ERROR: 'DESCRIBE_QUERY_INVALID_SQL_ERROR',
701
- INVALID_SQL_UNKNOWN_TABLE_EXCEPTION: 'INVALID_SQL_UNKNOWN_TABLE_EXCEPTION',
702
- INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION: 'INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION',
703
- INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION: 'INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION',
704
- MESSAGE_ATTACHMENT_TOO_LONG_ERROR: 'MESSAGE_ATTACHMENT_TOO_LONG_ERROR',
705
- INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION: 'INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION',
706
- INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION: 'INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION',
707
- EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION: 'EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION',
708
- INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION: 'INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION',
709
- INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION: 'INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION',
710
- INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION: 'INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION',
711
- UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION: 'UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION',
712
- COULD_NOT_GET_DASHBOARD_SCHEMA_EXCEPTION: 'COULD_NOT_GET_DASHBOARD_SCHEMA_EXCEPTION',
209
+ const MessageError_Type = {
210
+ TYPE_UNSPECIFIED: "TYPE_UNSPECIFIED",
211
+ UNEXPECTED_REPLY_PROCESS_EXCEPTION: "UNEXPECTED_REPLY_PROCESS_EXCEPTION",
212
+ GENERIC_CHAT_COMPLETION_EXCEPTION: "GENERIC_CHAT_COMPLETION_EXCEPTION",
213
+ CONTEXT_EXCEEDED_EXCEPTION: "CONTEXT_EXCEEDED_EXCEPTION",
214
+ DEPLOYMENT_NOT_FOUND_EXCEPTION: "DEPLOYMENT_NOT_FOUND_EXCEPTION",
215
+ FUNCTIONS_NOT_AVAILABLE_EXCEPTION: "FUNCTIONS_NOT_AVAILABLE_EXCEPTION",
216
+ INVALID_COMPLETION_REQUEST_EXCEPTION: "INVALID_COMPLETION_REQUEST_EXCEPTION",
217
+ CONTENT_FILTER_EXCEPTION: "CONTENT_FILTER_EXCEPTION",
218
+ FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION: "FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION",
219
+ RETRYABLE_PROCESSING_EXCEPTION: "RETRYABLE_PROCESSING_EXCEPTION",
220
+ INVALID_FUNCTION_CALL_EXCEPTION: "INVALID_FUNCTION_CALL_EXCEPTION",
221
+ LOCAL_CONTEXT_EXCEEDED_EXCEPTION: "LOCAL_CONTEXT_EXCEEDED_EXCEPTION",
222
+ CHAT_COMPLETION_NETWORK_EXCEPTION: "CHAT_COMPLETION_NETWORK_EXCEPTION",
223
+ INVALID_CHAT_COMPLETION_JSON_EXCEPTION: "INVALID_CHAT_COMPLETION_JSON_EXCEPTION",
224
+ GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION: "GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION",
225
+ WAREHOUSE_ACCESS_MISSING_EXCEPTION: "WAREHOUSE_ACCESS_MISSING_EXCEPTION",
226
+ WAREHOUSE_NOT_FOUND_EXCEPTION: "WAREHOUSE_NOT_FOUND_EXCEPTION",
227
+ NO_TABLES_TO_QUERY_EXCEPTION: "NO_TABLES_TO_QUERY_EXCEPTION",
228
+ SQL_EXECUTION_EXCEPTION: "SQL_EXECUTION_EXCEPTION",
229
+ REPLY_PROCESS_TIMEOUT_EXCEPTION: "REPLY_PROCESS_TIMEOUT_EXCEPTION",
230
+ COULD_NOT_GET_UC_SCHEMA_EXCEPTION: "COULD_NOT_GET_UC_SCHEMA_EXCEPTION",
231
+ INVALID_TABLE_IDENTIFIER_EXCEPTION: "INVALID_TABLE_IDENTIFIER_EXCEPTION",
232
+ TOO_MANY_TABLES_EXCEPTION: "TOO_MANY_TABLES_EXCEPTION",
233
+ FUNCTION_ARGUMENTS_INVALID_EXCEPTION: "FUNCTION_ARGUMENTS_INVALID_EXCEPTION",
234
+ GENERIC_SQL_EXEC_API_CALL_EXCEPTION: "GENERIC_SQL_EXEC_API_CALL_EXCEPTION",
235
+ CHAT_COMPLETION_CLIENT_EXCEPTION: "CHAT_COMPLETION_CLIENT_EXCEPTION",
236
+ CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION: "CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION",
237
+ UNKNOWN_AI_MODEL: "UNKNOWN_AI_MODEL",
238
+ TABLES_MISSING_EXCEPTION: "TABLES_MISSING_EXCEPTION",
239
+ MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION: "MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION",
240
+ MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION: "MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION",
241
+ BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION: "BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION",
242
+ INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION: "INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION",
243
+ TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION: "TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION",
244
+ RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION: "RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION",
245
+ RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION: "RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION",
246
+ FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION: "FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION",
247
+ INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION: "INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION",
248
+ ILLEGAL_PARAMETER_DEFINITION_EXCEPTION: "ILLEGAL_PARAMETER_DEFINITION_EXCEPTION",
249
+ NO_QUERY_TO_VISUALIZE_EXCEPTION: "NO_QUERY_TO_VISUALIZE_EXCEPTION",
250
+ NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE: "NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE",
251
+ STOP_PROCESS_DUE_TO_AUTO_REGENERATE: "STOP_PROCESS_DUE_TO_AUTO_REGENERATE",
252
+ FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION: "FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION",
253
+ MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION: "MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION",
254
+ COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION: "COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION",
255
+ GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION: "GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION",
256
+ MISSING_SQL_QUERY_EXCEPTION: "MISSING_SQL_QUERY_EXCEPTION",
257
+ DESCRIBE_QUERY_UNEXPECTED_FAILURE: "DESCRIBE_QUERY_UNEXPECTED_FAILURE",
258
+ DESCRIBE_QUERY_TIMEOUT: "DESCRIBE_QUERY_TIMEOUT",
259
+ DESCRIBE_QUERY_INVALID_SQL_ERROR: "DESCRIBE_QUERY_INVALID_SQL_ERROR",
260
+ INVALID_SQL_UNKNOWN_TABLE_EXCEPTION: "INVALID_SQL_UNKNOWN_TABLE_EXCEPTION",
261
+ INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION: "INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION",
262
+ INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION: "INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION",
263
+ MESSAGE_ATTACHMENT_TOO_LONG_ERROR: "MESSAGE_ATTACHMENT_TOO_LONG_ERROR",
264
+ INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION: "INTERNAL_CATALOG_PATH_OVERLAP_EXCEPTION",
265
+ INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION: "INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION",
266
+ EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION: "EXCEEDED_MAX_TOKEN_LENGTH_EXCEPTION",
267
+ INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION: "INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION",
268
+ INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION: "INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION",
269
+ INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION: "INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION",
270
+ UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION: "UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION",
271
+ COULD_NOT_GET_DASHBOARD_SCHEMA_EXCEPTION: "COULD_NOT_GET_DASHBOARD_SCHEMA_EXCEPTION"
713
272
  };
714
273
  /**
715
- * MessageStatus.
716
- * The possible values are:
717
- * * `FETCHING_METADATA`: Fetching metadata from the data sources.
718
- * * `FILTERING_CONTEXT`: Running smart context step to determine relevant context.
719
- * * `ASKING_AI`: Waiting for the LLM to respond to the user's question.
720
- * * `PENDING_WAREHOUSE`: Waiting for warehouse before the SQL query can start executing.
721
- * * `EXECUTING_QUERY`: Executing a generated SQL query. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.
722
- * * `FAILED`: The response generation or query execution failed. See `error` field.
723
- * * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.
724
- * * `SUBMITTED`: Message has been submitted.
725
- * * `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.
726
- * * `CANCELLED`: Message has been cancelled.
727
- */
728
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
729
- export const MessageStatus_MessageStatus = {
730
- FETCHING_METADATA: 'FETCHING_METADATA',
731
- FILTERING_CONTEXT: 'FILTERING_CONTEXT',
732
- ASKING_AI: 'ASKING_AI',
733
- PENDING_WAREHOUSE: 'PENDING_WAREHOUSE',
734
- EXECUTING_QUERY: 'EXECUTING_QUERY',
735
- FAILED: 'FAILED',
736
- COMPLETED: 'COMPLETED',
737
- SUBMITTED: 'SUBMITTED',
738
- QUERY_RESULT_EXPIRED: 'QUERY_RESULT_EXPIRED',
739
- CANCELLED: 'CANCELLED',
274
+ * MessageStatus.
275
+ * The possible values are:
276
+ * * `FETCHING_METADATA`: Fetching metadata from the data sources.
277
+ * * `FILTERING_CONTEXT`: Running smart context step to determine relevant context.
278
+ * * `ASKING_AI`: Waiting for the LLM to respond to the user's question.
279
+ * * `PENDING_WAREHOUSE`: Waiting for warehouse before the SQL query can start executing.
280
+ * * `EXECUTING_QUERY`: Executing a generated SQL query. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.
281
+ * * `FAILED`: The response generation or query execution failed. See `error` field.
282
+ * * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.
283
+ * * `SUBMITTED`: Message has been submitted.
284
+ * * `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.
285
+ * * `CANCELLED`: Message has been cancelled.
286
+ */
287
+ const MessageStatus_MessageStatus = {
288
+ FETCHING_METADATA: "FETCHING_METADATA",
289
+ FILTERING_CONTEXT: "FILTERING_CONTEXT",
290
+ ASKING_AI: "ASKING_AI",
291
+ PENDING_WAREHOUSE: "PENDING_WAREHOUSE",
292
+ EXECUTING_QUERY: "EXECUTING_QUERY",
293
+ FAILED: "FAILED",
294
+ COMPLETED: "COMPLETED",
295
+ SUBMITTED: "SUBMITTED",
296
+ QUERY_RESULT_EXPIRED: "QUERY_RESULT_EXPIRED",
297
+ CANCELLED: "CANCELLED"
740
298
  };
741
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
742
- export const StatementStatus_State = {
743
- STATE_UNSPECIFIED: 'STATE_UNSPECIFIED',
744
- PENDING: 'PENDING',
745
- RUNNING: 'RUNNING',
746
- SUCCEEDED: 'SUCCEEDED',
747
- FAILED: 'FAILED',
748
- CANCELED: 'CANCELED',
749
- CLOSED: 'CLOSED',
299
+ const StatementStatus_State = {
300
+ STATE_UNSPECIFIED: "STATE_UNSPECIFIED",
301
+ PENDING: "PENDING",
302
+ RUNNING: "RUNNING",
303
+ SUCCEEDED: "SUCCEEDED",
304
+ FAILED: "FAILED",
305
+ CANCELED: "CANCELED",
306
+ CLOSED: "CLOSED"
750
307
  };
751
- export const unmarshalChunkInfoSchema = z
752
- .object({
753
- chunk_index: z.number().optional(),
754
- row_offset: z
755
- .union([z.number(), z.bigint()])
756
- .transform(v => BigInt(v))
757
- .optional(),
758
- row_count: z
759
- .union([z.number(), z.bigint()])
760
- .transform(v => BigInt(v))
761
- .optional(),
762
- byte_count: z
763
- .union([z.number(), z.bigint()])
764
- .transform(v => BigInt(v))
765
- .optional(),
766
- next_chunk_index: z.number().optional(),
767
- next_chunk_internal_link: z.string().optional(),
768
- })
769
- .transform(d => ({
770
- chunkIndex: d.chunk_index,
771
- rowOffset: d.row_offset,
772
- rowCount: d.row_count,
773
- byteCount: d.byte_count,
774
- nextChunkIndex: d.next_chunk_index,
775
- nextChunkInternalLink: d.next_chunk_internal_link,
776
- }));
777
- export const unmarshalColumnInfoSchema = z
778
- .object({
779
- name: z.string().optional(),
780
- type_text: z.string().optional(),
781
- type_name: z.string().optional(),
782
- position: z.number().optional(),
783
- type_precision: z.number().optional(),
784
- type_scale: z.number().optional(),
785
- type_interval_type: z.string().optional(),
786
- type_json: z.string().optional(),
787
- comment: z.string().optional(),
788
- nullable: z.boolean().optional(),
789
- partition_index: z.number().optional(),
790
- mask: z.lazy(() => unmarshalColumnMaskSchema).optional(),
791
- })
792
- .transform(d => ({
793
- name: d.name,
794
- typeText: d.type_text,
795
- typeName: d.type_name,
796
- position: d.position,
797
- typePrecision: d.type_precision,
798
- typeScale: d.type_scale,
799
- typeIntervalType: d.type_interval_type,
800
- typeJson: d.type_json,
801
- comment: d.comment,
802
- nullable: d.nullable,
803
- partitionIndex: d.partition_index,
804
- mask: d.mask,
805
- }));
806
- export const unmarshalColumnMaskSchema = z
807
- .object({
808
- function_name: z.string().optional(),
809
- using_column_names: z.array(z.string()).optional(),
810
- using_arguments: z
811
- .array(z.lazy(() => unmarshalPolicyFunctionArgumentSchema))
812
- .optional(),
813
- })
814
- .transform(d => ({
815
- functionName: d.function_name,
816
- usingColumnNames: d.using_column_names,
817
- usingArguments: d.using_arguments,
818
- }));
819
- export const unmarshalDatabricksServiceExceptionProtoSchema = z
820
- .object({
821
- error_code: z.string().optional(),
822
- message: z.string().optional(),
823
- stack_trace: z.string().optional(),
824
- })
825
- .transform(d => ({
826
- errorCode: d.error_code,
827
- message: d.message,
828
- stackTrace: d.stack_trace,
829
- }));
830
- export const unmarshalExternalLinkSchema = z
831
- .object({
832
- external_link: z.string().optional(),
833
- expiration: z.string().optional(),
834
- http_headers: z.record(z.string(), z.string()).optional(),
835
- chunk_index: z.number().optional(),
836
- row_offset: z
837
- .union([z.number(), z.bigint()])
838
- .transform(v => BigInt(v))
839
- .optional(),
840
- row_count: z
841
- .union([z.number(), z.bigint()])
842
- .transform(v => BigInt(v))
843
- .optional(),
844
- byte_count: z
845
- .union([z.number(), z.bigint()])
846
- .transform(v => BigInt(v))
847
- .optional(),
848
- next_chunk_index: z.number().optional(),
849
- next_chunk_internal_link: z.string().optional(),
850
- })
851
- .transform(d => ({
852
- externalLink: d.external_link,
853
- expiration: d.expiration,
854
- httpHeaders: d.http_headers,
855
- chunkIndex: d.chunk_index,
856
- rowOffset: d.row_offset,
857
- rowCount: d.row_count,
858
- byteCount: d.byte_count,
859
- nextChunkIndex: d.next_chunk_index,
860
- nextChunkInternalLink: d.next_chunk_internal_link,
861
- }));
862
- export const unmarshalGenieAttachmentSchema = z
863
- .object({
864
- text: z.lazy(() => unmarshalTextAttachmentSchema).optional(),
865
- query: z.lazy(() => unmarshalGenieQueryAttachmentSchema).optional(),
866
- suggested_questions: z
867
- .lazy(() => unmarshalGenieSuggestedQuestionsAttachmentSchema)
868
- .optional(),
869
- viz: z.lazy(() => unmarshalGenieVizAttachmentSchema).optional(),
870
- attachment_id: z.string().optional(),
871
- })
872
- .transform(d => ({
873
- attachment: d.text !== undefined
874
- ? { $case: 'text', text: d.text }
875
- : d.query !== undefined
876
- ? { $case: 'query', query: d.query }
877
- : d.suggested_questions !== undefined
878
- ? {
879
- $case: 'suggestedQuestions',
880
- suggestedQuestions: d.suggested_questions,
881
- }
882
- : d.viz !== undefined
883
- ? { $case: 'viz', viz: d.viz }
884
- : undefined,
885
- attachmentId: d.attachment_id,
886
- }));
887
- export const unmarshalGenieConversationSchema = z
888
- .object({
889
- id: z.string().optional(),
890
- space_id: z.string().optional(),
891
- user_id: z
892
- .union([z.number(), z.bigint()])
893
- .transform(v => BigInt(v))
894
- .optional(),
895
- created_timestamp: z
896
- .union([z.number(), z.bigint()])
897
- .transform(v => BigInt(v))
898
- .optional(),
899
- last_updated_timestamp: z
900
- .union([z.number(), z.bigint()])
901
- .transform(v => BigInt(v))
902
- .optional(),
903
- title: z.string().optional(),
904
- conversation_id: z.string().optional(),
905
- })
906
- .transform(d => ({
907
- id: d.id,
908
- spaceId: d.space_id,
909
- userId: d.user_id,
910
- createdTimestamp: d.created_timestamp,
911
- lastUpdatedTimestamp: d.last_updated_timestamp,
912
- title: d.title,
913
- conversationId: d.conversation_id,
914
- }));
915
- export const unmarshalGenieConversationSummarySchema = z
916
- .object({
917
- conversation_id: z.string().optional(),
918
- title: z.string().optional(),
919
- created_timestamp: z
920
- .union([z.number(), z.bigint()])
921
- .transform(v => BigInt(v))
922
- .optional(),
923
- })
924
- .transform(d => ({
925
- conversationId: d.conversation_id,
926
- title: d.title,
927
- createdTimestamp: d.created_timestamp,
928
- }));
929
- export const unmarshalGenieEvalResponseSchema = z
930
- .object({
931
- response: z.string().optional(),
932
- sql_execution_result: z
933
- .lazy(() => unmarshalStatementResponseSchema)
934
- .optional(),
935
- response_type: z.string().optional(),
936
- })
937
- .transform(d => ({
938
- response: d.response,
939
- sqlExecutionResult: d.sql_execution_result,
940
- responseType: d.response_type,
941
- }));
942
- export const unmarshalGenieEvalResultSchema = z
943
- .object({
944
- result_id: z.string().optional(),
945
- space_id: z.string().optional(),
946
- benchmark_question_id: z.string().optional(),
947
- status: z.string().optional(),
948
- question: z.string().optional(),
949
- benchmark_answer: z.string().optional(),
950
- created_by_user: z
951
- .union([z.number(), z.bigint()])
952
- .transform(v => BigInt(v))
953
- .optional(),
954
- })
955
- .transform(d => ({
956
- resultId: d.result_id,
957
- spaceId: d.space_id,
958
- benchmarkQuestionId: d.benchmark_question_id,
959
- status: d.status,
960
- question: d.question,
961
- benchmarkAnswer: d.benchmark_answer,
962
- createdByUser: d.created_by_user,
963
- }));
964
- export const unmarshalGenieEvalResultDetailsSchema = z
965
- .object({
966
- result_id: z.string().optional(),
967
- space_id: z.string().optional(),
968
- benchmark_question_id: z.string().optional(),
969
- eval_run_status: z.string().optional(),
970
- assessment: z.string().optional(),
971
- manual_assessment: z.boolean().optional(),
972
- assessment_reasons: z.array(z.string()).optional(),
973
- actual_response: z
974
- .array(z.lazy(() => unmarshalGenieEvalResponseSchema))
975
- .optional(),
976
- expected_response: z
977
- .array(z.lazy(() => unmarshalGenieEvalResponseSchema))
978
- .optional(),
979
- })
980
- .transform(d => ({
981
- resultId: d.result_id,
982
- spaceId: d.space_id,
983
- benchmarkQuestionId: d.benchmark_question_id,
984
- evalRunStatus: d.eval_run_status,
985
- assessment: d.assessment,
986
- manualAssessment: d.manual_assessment,
987
- assessmentReasons: d.assessment_reasons,
988
- actualResponse: d.actual_response,
989
- expectedResponse: d.expected_response,
990
- }));
991
- export const unmarshalGenieEvalRunResponseSchema = z
992
- .object({
993
- eval_run_id: z.string().optional(),
994
- eval_run_status: z.string().optional(),
995
- run_by_user: z
996
- .union([z.number(), z.bigint()])
997
- .transform(v => BigInt(v))
998
- .optional(),
999
- created_timestamp: z
1000
- .union([z.number(), z.bigint()])
1001
- .transform(v => BigInt(v))
1002
- .optional(),
1003
- num_questions: z
1004
- .union([z.number(), z.bigint()])
1005
- .transform(v => BigInt(v))
1006
- .optional(),
1007
- num_correct: z
1008
- .union([z.number(), z.bigint()])
1009
- .transform(v => BigInt(v))
1010
- .optional(),
1011
- num_needs_review: z
1012
- .union([z.number(), z.bigint()])
1013
- .transform(v => BigInt(v))
1014
- .optional(),
1015
- num_done: z
1016
- .union([z.number(), z.bigint()])
1017
- .transform(v => BigInt(v))
1018
- .optional(),
1019
- last_updated_timestamp: z
1020
- .union([z.number(), z.bigint()])
1021
- .transform(v => BigInt(v))
1022
- .optional(),
1023
- })
1024
- .transform(d => ({
1025
- evalRunId: d.eval_run_id,
1026
- evalRunStatus: d.eval_run_status,
1027
- runByUser: d.run_by_user,
1028
- createdTimestamp: d.created_timestamp,
1029
- numQuestions: d.num_questions,
1030
- numCorrect: d.num_correct,
1031
- numNeedsReview: d.num_needs_review,
1032
- numDone: d.num_done,
1033
- lastUpdatedTimestamp: d.last_updated_timestamp,
1034
- }));
1035
- export const unmarshalGenieFeedbackSchema = z
1036
- .object({
1037
- rating: z.string().optional(),
1038
- comment: z.string().optional(),
1039
- })
1040
- .transform(d => ({
1041
- rating: d.rating,
1042
- comment: d.comment,
1043
- }));
1044
- export const unmarshalGenieGenerateDownloadFullQueryResultResponseSchema = z
1045
- .object({
1046
- download_id: z.string().optional(),
1047
- download_id_signature: z.string().optional(),
1048
- })
1049
- .transform(d => ({
1050
- downloadId: d.download_id,
1051
- downloadIdSignature: d.download_id_signature,
1052
- }));
1053
- export const unmarshalGenieGetDownloadFullQueryResultResponseSchema = z
1054
- .object({
1055
- statement_response: z
1056
- .lazy(() => unmarshalStatementResponseSchema)
1057
- .optional(),
1058
- })
1059
- .transform(d => ({
1060
- statementResponse: d.statement_response,
1061
- }));
1062
- export const unmarshalGenieGetMessageQueryResultResponseSchema = z
1063
- .object({
1064
- statement_response: z
1065
- .lazy(() => unmarshalStatementResponseSchema)
1066
- .optional(),
1067
- })
1068
- .transform(d => ({
1069
- statementResponse: d.statement_response,
1070
- }));
1071
- export const unmarshalGenieListConversationCommentsResponseSchema = z
1072
- .object({
1073
- comments: z
1074
- .array(z.lazy(() => unmarshalGenieMessageCommentSchema))
1075
- .optional(),
1076
- next_page_token: z.string().optional(),
1077
- })
1078
- .transform(d => ({
1079
- comments: d.comments,
1080
- nextPageToken: d.next_page_token,
1081
- }));
1082
- export const unmarshalGenieListConversationMessagesResponseSchema = z
1083
- .object({
1084
- messages: z.array(z.lazy(() => unmarshalGenieMessageSchema)).optional(),
1085
- next_page_token: z.string().optional(),
1086
- })
1087
- .transform(d => ({
1088
- messages: d.messages,
1089
- nextPageToken: d.next_page_token,
1090
- }));
1091
- export const unmarshalGenieListConversationsResponseSchema = z
1092
- .object({
1093
- conversations: z
1094
- .array(z.lazy(() => unmarshalGenieConversationSummarySchema))
1095
- .optional(),
1096
- next_page_token: z.string().optional(),
1097
- })
1098
- .transform(d => ({
1099
- conversations: d.conversations,
1100
- nextPageToken: d.next_page_token,
1101
- }));
1102
- export const unmarshalGenieListEvalResultsResponseSchema = z
1103
- .object({
1104
- eval_results: z
1105
- .array(z.lazy(() => unmarshalGenieEvalResultSchema))
1106
- .optional(),
1107
- next_page_token: z.string().optional(),
1108
- })
1109
- .transform(d => ({
1110
- evalResults: d.eval_results,
1111
- nextPageToken: d.next_page_token,
1112
- }));
1113
- export const unmarshalGenieListEvalRunsResponseSchema = z
1114
- .object({
1115
- eval_runs: z
1116
- .array(z.lazy(() => unmarshalGenieEvalRunResponseSchema))
1117
- .optional(),
1118
- next_page_token: z.string().optional(),
1119
- })
1120
- .transform(d => ({
1121
- evalRuns: d.eval_runs,
1122
- nextPageToken: d.next_page_token,
1123
- }));
1124
- export const unmarshalGenieListMessageCommentsResponseSchema = z
1125
- .object({
1126
- comments: z
1127
- .array(z.lazy(() => unmarshalGenieMessageCommentSchema))
1128
- .optional(),
1129
- next_page_token: z.string().optional(),
1130
- })
1131
- .transform(d => ({
1132
- comments: d.comments,
1133
- nextPageToken: d.next_page_token,
1134
- }));
1135
- export const unmarshalGenieListSpacesResponseSchema = z
1136
- .object({
1137
- spaces: z.array(z.lazy(() => unmarshalGenieSpaceSchema)).optional(),
1138
- next_page_token: z.string().optional(),
1139
- })
1140
- .transform(d => ({
1141
- spaces: d.spaces,
1142
- nextPageToken: d.next_page_token,
1143
- }));
1144
- export const unmarshalGenieMessageSchema = z
1145
- .object({
1146
- id: z.string().optional(),
1147
- space_id: z.string().optional(),
1148
- conversation_id: z.string().optional(),
1149
- user_id: z
1150
- .union([z.number(), z.bigint()])
1151
- .transform(v => BigInt(v))
1152
- .optional(),
1153
- created_timestamp: z
1154
- .union([z.number(), z.bigint()])
1155
- .transform(v => BigInt(v))
1156
- .optional(),
1157
- last_updated_timestamp: z
1158
- .union([z.number(), z.bigint()])
1159
- .transform(v => BigInt(v))
1160
- .optional(),
1161
- status: z.string().optional(),
1162
- content: z.string().optional(),
1163
- attachments: z
1164
- .array(z.lazy(() => unmarshalGenieAttachmentSchema))
1165
- .optional(),
1166
- query_result: z.lazy(() => unmarshalResultSchema).optional(),
1167
- error: z.lazy(() => unmarshalMessageErrorSchema).optional(),
1168
- message_id: z.string().optional(),
1169
- feedback: z.lazy(() => unmarshalGenieFeedbackSchema).optional(),
1170
- })
1171
- .transform(d => ({
1172
- id: d.id,
1173
- spaceId: d.space_id,
1174
- conversationId: d.conversation_id,
1175
- userId: d.user_id,
1176
- createdTimestamp: d.created_timestamp,
1177
- lastUpdatedTimestamp: d.last_updated_timestamp,
1178
- status: d.status,
1179
- content: d.content,
1180
- attachments: d.attachments,
1181
- queryResult: d.query_result,
1182
- error: d.error,
1183
- messageId: d.message_id,
1184
- feedback: d.feedback,
1185
- }));
1186
- export const unmarshalGenieMessageCommentSchema = z
1187
- .object({
1188
- space_id: z.string().optional(),
1189
- conversation_id: z.string().optional(),
1190
- message_id: z.string().optional(),
1191
- message_comment_id: z.string().optional(),
1192
- user_id: z
1193
- .union([z.number(), z.bigint()])
1194
- .transform(v => BigInt(v))
1195
- .optional(),
1196
- content: z.string().optional(),
1197
- created_timestamp: z
1198
- .union([z.number(), z.bigint()])
1199
- .transform(v => BigInt(v))
1200
- .optional(),
1201
- })
1202
- .transform(d => ({
1203
- spaceId: d.space_id,
1204
- conversationId: d.conversation_id,
1205
- messageId: d.message_id,
1206
- messageCommentId: d.message_comment_id,
1207
- userId: d.user_id,
1208
- content: d.content,
1209
- createdTimestamp: d.created_timestamp,
1210
- }));
1211
- export const unmarshalGenieQueryAttachmentSchema = z
1212
- .object({
1213
- title: z.string().optional(),
1214
- query: z.string().optional(),
1215
- description: z.string().optional(),
1216
- last_updated_timestamp: z
1217
- .union([z.number(), z.bigint()])
1218
- .transform(v => BigInt(v))
1219
- .optional(),
1220
- parameters: z
1221
- .array(z.lazy(() => unmarshalQueryAttachmentParameterSchema))
1222
- .optional(),
1223
- id: z.string().optional(),
1224
- statement_id: z.string().optional(),
1225
- query_result_metadata: z
1226
- .lazy(() => unmarshalGenieResultMetadataSchema)
1227
- .optional(),
1228
- thoughts: z.array(z.lazy(() => unmarshalThoughtSchema)).optional(),
1229
- })
1230
- .transform(d => ({
1231
- title: d.title,
1232
- query: d.query,
1233
- description: d.description,
1234
- lastUpdatedTimestamp: d.last_updated_timestamp,
1235
- parameters: d.parameters,
1236
- id: d.id,
1237
- statementId: d.statement_id,
1238
- queryResultMetadata: d.query_result_metadata,
1239
- thoughts: d.thoughts,
1240
- }));
1241
- export const unmarshalGenieResultMetadataSchema = z
1242
- .object({
1243
- row_count: z
1244
- .union([z.number(), z.bigint()])
1245
- .transform(v => BigInt(v))
1246
- .optional(),
1247
- is_truncated: z.boolean().optional(),
1248
- })
1249
- .transform(d => ({
1250
- rowCount: d.row_count,
1251
- isTruncated: d.is_truncated,
1252
- }));
1253
- export const unmarshalGenieSpaceSchema = z
1254
- .object({
1255
- space_id: z.string().optional(),
1256
- title: z.string().optional(),
1257
- description: z.string().optional(),
1258
- warehouse_id: z.string().optional(),
1259
- parent_path: z.string().optional(),
1260
- serialized_space: z.string().optional(),
1261
- etag: z.string().optional(),
1262
- })
1263
- .transform(d => ({
1264
- spaceId: d.space_id,
1265
- title: d.title,
1266
- description: d.description,
1267
- warehouseId: d.warehouse_id,
1268
- parentPath: d.parent_path,
1269
- serializedSpace: d.serialized_space,
1270
- etag: d.etag,
1271
- }));
1272
- export const unmarshalGenieStartConversationResponseSchema = z
1273
- .object({
1274
- message_id: z.string().optional(),
1275
- message: z.lazy(() => unmarshalGenieMessageSchema).optional(),
1276
- conversation_id: z.string().optional(),
1277
- conversation: z.lazy(() => unmarshalGenieConversationSchema).optional(),
1278
- })
1279
- .transform(d => ({
1280
- messageId: d.message_id,
1281
- message: d.message,
1282
- conversationId: d.conversation_id,
1283
- conversation: d.conversation,
1284
- }));
1285
- export const unmarshalGenieSuggestedQuestionsAttachmentSchema = z
1286
- .object({
1287
- questions: z.array(z.string()).optional(),
1288
- })
1289
- .transform(d => ({
1290
- questions: d.questions,
1291
- }));
1292
- export const unmarshalGenieVizAttachmentSchema = z
1293
- .object({
1294
- title: z.string().optional(),
1295
- query_attachment_id: z.string().optional(),
1296
- })
1297
- .transform(d => ({
1298
- title: d.title,
1299
- queryAttachmentId: d.query_attachment_id,
1300
- }));
1301
- export const unmarshalListValueSchema = z
1302
- .object({
1303
- values: z.array(z.lazy(() => unmarshalValueSchema)).optional(),
1304
- })
1305
- .transform(d => ({
1306
- values: d.values,
1307
- }));
1308
- export const unmarshalMapStringValueEntrySchema = z
1309
- .object({
1310
- key: z.string().optional(),
1311
- value: z.lazy(() => unmarshalValueSchema).optional(),
1312
- })
1313
- .transform(d => ({
1314
- key: d.key,
1315
- value: d.value,
1316
- }));
1317
- export const unmarshalMessageErrorSchema = z
1318
- .object({
1319
- error: z.string().optional(),
1320
- type: z.string().optional(),
1321
- })
1322
- .transform(d => ({
1323
- error: d.error,
1324
- type: d.type,
1325
- }));
1326
- export const unmarshalPolicyFunctionArgumentSchema = z
1327
- .object({
1328
- column: z.string().optional(),
1329
- constant: z.string().optional(),
1330
- })
1331
- .transform(d => ({
1332
- arg: d.column !== undefined
1333
- ? { $case: 'column', column: d.column }
1334
- : d.constant !== undefined
1335
- ? { $case: 'constant', constant: d.constant }
1336
- : undefined,
1337
- }));
1338
- export const unmarshalQueryAttachmentParameterSchema = z
1339
- .object({
1340
- keyword: z.string().optional(),
1341
- value: z.string().optional(),
1342
- sql_type: z.string().optional(),
1343
- })
1344
- .transform(d => ({
1345
- keyword: d.keyword,
1346
- value: d.value,
1347
- sqlType: d.sql_type,
1348
- }));
1349
- export const unmarshalResultSchema = z
1350
- .object({
1351
- statement_id: z.string().optional(),
1352
- row_count: z
1353
- .union([z.number(), z.bigint()])
1354
- .transform(v => BigInt(v))
1355
- .optional(),
1356
- is_truncated: z.boolean().optional(),
1357
- statement_id_signature: z.string().optional(),
1358
- })
1359
- .transform(d => ({
1360
- statementId: d.statement_id,
1361
- rowCount: d.row_count,
1362
- isTruncated: d.is_truncated,
1363
- statementIdSignature: d.statement_id_signature,
1364
- }));
1365
- export const unmarshalResultDataSchema = z
1366
- .object({
1367
- external_links: z
1368
- .array(z.lazy(() => unmarshalExternalLinkSchema))
1369
- .optional(),
1370
- data_array: z.array(z.lazy(() => unmarshalListValueSchema)).optional(),
1371
- chunk_index: z.number().optional(),
1372
- row_offset: z
1373
- .union([z.number(), z.bigint()])
1374
- .transform(v => BigInt(v))
1375
- .optional(),
1376
- row_count: z
1377
- .union([z.number(), z.bigint()])
1378
- .transform(v => BigInt(v))
1379
- .optional(),
1380
- byte_count: z
1381
- .union([z.number(), z.bigint()])
1382
- .transform(v => BigInt(v))
1383
- .optional(),
1384
- next_chunk_index: z.number().optional(),
1385
- next_chunk_internal_link: z.string().optional(),
1386
- })
1387
- .transform(d => ({
1388
- externalLinks: d.external_links,
1389
- dataArray: d.data_array,
1390
- chunkIndex: d.chunk_index,
1391
- rowOffset: d.row_offset,
1392
- rowCount: d.row_count,
1393
- byteCount: d.byte_count,
1394
- nextChunkIndex: d.next_chunk_index,
1395
- nextChunkInternalLink: d.next_chunk_internal_link,
1396
- }));
1397
- export const unmarshalResultManifestSchema = z
1398
- .object({
1399
- format: z.string().optional(),
1400
- schema: z.lazy(() => unmarshalSchemaSchema).optional(),
1401
- total_chunk_count: z.number().optional(),
1402
- chunks: z.array(z.lazy(() => unmarshalChunkInfoSchema)).optional(),
1403
- total_row_count: z
1404
- .union([z.number(), z.bigint()])
1405
- .transform(v => BigInt(v))
1406
- .optional(),
1407
- total_byte_count: z
1408
- .union([z.number(), z.bigint()])
1409
- .transform(v => BigInt(v))
1410
- .optional(),
1411
- truncated: z.boolean().optional(),
1412
- })
1413
- .transform(d => ({
1414
- format: d.format,
1415
- schema: d.schema,
1416
- totalChunkCount: d.total_chunk_count,
1417
- chunks: d.chunks,
1418
- totalRowCount: d.total_row_count,
1419
- totalByteCount: d.total_byte_count,
1420
- truncated: d.truncated,
1421
- }));
1422
- export const unmarshalSchemaSchema = z
1423
- .object({
1424
- column_count: z.number().optional(),
1425
- columns: z.array(z.lazy(() => unmarshalColumnInfoSchema)).optional(),
1426
- })
1427
- .transform(d => ({
1428
- columnCount: d.column_count,
1429
- columns: d.columns,
1430
- }));
1431
- export const unmarshalStatementResponseSchema = z
1432
- .object({
1433
- statement_id: z.string().optional(),
1434
- status: z.lazy(() => unmarshalStatementStatusSchema).optional(),
1435
- manifest: z.lazy(() => unmarshalResultManifestSchema).optional(),
1436
- result: z.lazy(() => unmarshalResultDataSchema).optional(),
1437
- })
1438
- .transform(d => ({
1439
- statementId: d.statement_id,
1440
- status: d.status,
1441
- manifest: d.manifest,
1442
- result: d.result,
1443
- }));
1444
- export const unmarshalStatementStatusSchema = z
1445
- .object({
1446
- state: z.string().optional(),
1447
- error: z
1448
- .lazy(() => unmarshalDatabricksServiceExceptionProtoSchema)
1449
- .optional(),
1450
- sql_state: z.string().optional(),
1451
- })
1452
- .transform(d => ({
1453
- state: d.state,
1454
- error: d.error,
1455
- sqlState: d.sql_state,
1456
- }));
1457
- export const unmarshalStructSchema = z
1458
- .object({
1459
- fields: z
1460
- .array(z.lazy(() => unmarshalMapStringValueEntrySchema))
1461
- .optional(),
1462
- })
1463
- .transform(d => ({
1464
- fields: d.fields,
1465
- }));
1466
- export const unmarshalTextAttachmentSchema = z
1467
- .object({
1468
- content: z.string().optional(),
1469
- id: z.string().optional(),
1470
- purpose: z.string().optional(),
1471
- })
1472
- .transform(d => ({
1473
- content: d.content,
1474
- id: d.id,
1475
- purpose: d.purpose,
1476
- }));
1477
- export const unmarshalThoughtSchema = z
1478
- .object({
1479
- thought_type: z.string().optional(),
1480
- content: z.string().optional(),
1481
- })
1482
- .transform(d => ({
1483
- thoughtType: d.thought_type,
1484
- content: d.content,
1485
- }));
1486
- export const unmarshalValueSchema = z
1487
- .object({
1488
- null_value: z.string().optional(),
1489
- number_value: z.number().optional(),
1490
- string_value: z.string().optional(),
1491
- bool_value: z.boolean().optional(),
1492
- struct_value: z.lazy(() => unmarshalStructSchema).optional(),
1493
- list_value: z.lazy(() => unmarshalListValueSchema).optional(),
1494
- })
1495
- .transform(d => ({
1496
- kind: d.null_value !== undefined
1497
- ? { $case: 'nullValue', nullValue: d.null_value }
1498
- : d.number_value !== undefined
1499
- ? { $case: 'numberValue', numberValue: d.number_value }
1500
- : d.string_value !== undefined
1501
- ? { $case: 'stringValue', stringValue: d.string_value }
1502
- : d.bool_value !== undefined
1503
- ? { $case: 'boolValue', boolValue: d.bool_value }
1504
- : d.struct_value !== undefined
1505
- ? { $case: 'structValue', structValue: d.struct_value }
1506
- : d.list_value !== undefined
1507
- ? { $case: 'listValue', listValue: d.list_value }
1508
- : undefined,
1509
- }));
1510
- export const marshalGenieCreateConversationMessageRequestSchema = z
1511
- .object({
1512
- spaceId: z.string().optional(),
1513
- conversationId: z.string().optional(),
1514
- content: z.string().optional(),
1515
- enableVisualization: z.boolean().optional(),
1516
- })
1517
- .transform(d => ({
1518
- space_id: d.spaceId,
1519
- conversation_id: d.conversationId,
1520
- content: d.content,
1521
- enable_visualization: d.enableVisualization,
1522
- }));
1523
- export const marshalGenieCreateEvalRunRequestSchema = z
1524
- .object({
1525
- spaceId: z.string().optional(),
1526
- benchmarkQuestionIds: z.array(z.string()).optional(),
1527
- })
1528
- .transform(d => ({
1529
- space_id: d.spaceId,
1530
- benchmark_question_ids: d.benchmarkQuestionIds,
1531
- }));
1532
- export const marshalGenieCreateMessageCommentRequestSchema = z
1533
- .object({
1534
- spaceId: z.string().optional(),
1535
- conversationId: z.string().optional(),
1536
- messageId: z.string().optional(),
1537
- content: z.string().optional(),
1538
- })
1539
- .transform(d => ({
1540
- space_id: d.spaceId,
1541
- conversation_id: d.conversationId,
1542
- message_id: d.messageId,
1543
- content: d.content,
1544
- }));
1545
- export const marshalGenieCreateSpaceRequestSchema = z
1546
- .object({
1547
- warehouseId: z.string().optional(),
1548
- parentPath: z.string().optional(),
1549
- serializedSpace: z.string().optional(),
1550
- title: z.string().optional(),
1551
- description: z.string().optional(),
1552
- })
1553
- .transform(d => ({
1554
- warehouse_id: d.warehouseId,
1555
- parent_path: d.parentPath,
1556
- serialized_space: d.serializedSpace,
1557
- title: d.title,
1558
- description: d.description,
1559
- }));
1560
- export const marshalGenieExecuteMessageAttachmentQueryRequestSchema = z
1561
- .object({
1562
- messageId: z.string().optional(),
1563
- spaceId: z.string().optional(),
1564
- conversationId: z.string().optional(),
1565
- attachmentId: z.string().optional(),
1566
- })
1567
- .transform(d => ({
1568
- message_id: d.messageId,
1569
- space_id: d.spaceId,
1570
- conversation_id: d.conversationId,
1571
- attachment_id: d.attachmentId,
1572
- }));
1573
- export const marshalGenieExecuteMessageQueryRequestSchema = z
1574
- .object({
1575
- messageId: z.string().optional(),
1576
- spaceId: z.string().optional(),
1577
- conversationId: z.string().optional(),
1578
- })
1579
- .transform(d => ({
1580
- message_id: d.messageId,
1581
- space_id: d.spaceId,
1582
- conversation_id: d.conversationId,
1583
- }));
1584
- export const marshalGenieGenerateDownloadFullQueryResultRequestSchema = z
1585
- .object({
1586
- spaceId: z.string().optional(),
1587
- conversationId: z.string().optional(),
1588
- messageId: z.string().optional(),
1589
- attachmentId: z.string().optional(),
1590
- })
1591
- .transform(d => ({
1592
- space_id: d.spaceId,
1593
- conversation_id: d.conversationId,
1594
- message_id: d.messageId,
1595
- attachment_id: d.attachmentId,
1596
- }));
1597
- export const marshalGenieSendMessageFeedbackRequestSchema = z
1598
- .object({
1599
- spaceId: z.string().optional(),
1600
- conversationId: z.string().optional(),
1601
- messageId: z.string().optional(),
1602
- rating: z.string().optional(),
1603
- comment: z.string().optional(),
1604
- })
1605
- .transform(d => ({
1606
- space_id: d.spaceId,
1607
- conversation_id: d.conversationId,
1608
- message_id: d.messageId,
1609
- rating: d.rating,
1610
- comment: d.comment,
1611
- }));
1612
- export const marshalGenieStartConversationRequestSchema = z
1613
- .object({
1614
- spaceId: z.string().optional(),
1615
- content: z.string().optional(),
1616
- enableVisualization: z.boolean().optional(),
1617
- })
1618
- .transform(d => ({
1619
- space_id: d.spaceId,
1620
- content: d.content,
1621
- enable_visualization: d.enableVisualization,
1622
- }));
1623
- export const marshalGenieUpdateSpaceRequestSchema = z
1624
- .object({
1625
- spaceId: z.string().optional(),
1626
- serializedSpace: z.string().optional(),
1627
- title: z.string().optional(),
1628
- description: z.string().optional(),
1629
- warehouseId: z.string().optional(),
1630
- etag: z.string().optional(),
1631
- parentPath: z.string().optional(),
1632
- })
1633
- .transform(d => ({
1634
- space_id: d.spaceId,
1635
- serialized_space: d.serializedSpace,
1636
- title: d.title,
1637
- description: d.description,
1638
- warehouse_id: d.warehouseId,
1639
- etag: d.etag,
1640
- parent_path: d.parentPath,
1641
- }));
308
+ const unmarshalChunkInfoSchema = z.object({
309
+ chunk_index: z.number().optional(),
310
+ row_offset: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
311
+ row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
312
+ byte_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
313
+ next_chunk_index: z.number().optional(),
314
+ next_chunk_internal_link: z.string().optional()
315
+ }).transform((d) => ({
316
+ chunkIndex: d.chunk_index,
317
+ rowOffset: d.row_offset,
318
+ rowCount: d.row_count,
319
+ byteCount: d.byte_count,
320
+ nextChunkIndex: d.next_chunk_index,
321
+ nextChunkInternalLink: d.next_chunk_internal_link
322
+ }));
323
+ const unmarshalColumnInfoSchema = z.object({
324
+ name: z.string().optional(),
325
+ type_text: z.string().optional(),
326
+ type_name: z.string().optional(),
327
+ position: z.number().optional(),
328
+ type_precision: z.number().optional(),
329
+ type_scale: z.number().optional(),
330
+ type_interval_type: z.string().optional(),
331
+ type_json: z.string().optional(),
332
+ comment: z.string().optional(),
333
+ nullable: z.boolean().optional(),
334
+ partition_index: z.number().optional(),
335
+ mask: z.lazy(() => unmarshalColumnMaskSchema).optional()
336
+ }).transform((d) => ({
337
+ name: d.name,
338
+ typeText: d.type_text,
339
+ typeName: d.type_name,
340
+ position: d.position,
341
+ typePrecision: d.type_precision,
342
+ typeScale: d.type_scale,
343
+ typeIntervalType: d.type_interval_type,
344
+ typeJson: d.type_json,
345
+ comment: d.comment,
346
+ nullable: d.nullable,
347
+ partitionIndex: d.partition_index,
348
+ mask: d.mask
349
+ }));
350
+ const unmarshalColumnMaskSchema = z.object({
351
+ function_name: z.string().optional(),
352
+ using_column_names: z.array(z.string()).optional(),
353
+ using_arguments: z.array(z.lazy(() => unmarshalPolicyFunctionArgumentSchema)).optional()
354
+ }).transform((d) => ({
355
+ functionName: d.function_name,
356
+ usingColumnNames: d.using_column_names,
357
+ usingArguments: d.using_arguments
358
+ }));
359
+ const unmarshalDatabricksServiceExceptionProtoSchema = z.object({
360
+ error_code: z.string().optional(),
361
+ message: z.string().optional(),
362
+ stack_trace: z.string().optional()
363
+ }).transform((d) => ({
364
+ errorCode: d.error_code,
365
+ message: d.message,
366
+ stackTrace: d.stack_trace
367
+ }));
368
+ const unmarshalExternalLinkSchema = z.object({
369
+ external_link: z.string().optional(),
370
+ expiration: z.string().optional(),
371
+ http_headers: z.record(z.string(), z.string()).optional(),
372
+ chunk_index: z.number().optional(),
373
+ row_offset: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
374
+ row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
375
+ byte_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
376
+ next_chunk_index: z.number().optional(),
377
+ next_chunk_internal_link: z.string().optional()
378
+ }).transform((d) => ({
379
+ externalLink: d.external_link,
380
+ expiration: d.expiration,
381
+ httpHeaders: d.http_headers,
382
+ chunkIndex: d.chunk_index,
383
+ rowOffset: d.row_offset,
384
+ rowCount: d.row_count,
385
+ byteCount: d.byte_count,
386
+ nextChunkIndex: d.next_chunk_index,
387
+ nextChunkInternalLink: d.next_chunk_internal_link
388
+ }));
389
+ const unmarshalGenieAttachmentSchema = z.object({
390
+ text: z.lazy(() => unmarshalTextAttachmentSchema).optional(),
391
+ query: z.lazy(() => unmarshalGenieQueryAttachmentSchema).optional(),
392
+ suggested_questions: z.lazy(() => unmarshalGenieSuggestedQuestionsAttachmentSchema).optional(),
393
+ viz: z.lazy(() => unmarshalGenieVizAttachmentSchema).optional(),
394
+ attachment_id: z.string().optional()
395
+ }).transform((d) => ({
396
+ attachment: d.text !== void 0 ? {
397
+ $case: "text",
398
+ text: d.text
399
+ } : d.query !== void 0 ? {
400
+ $case: "query",
401
+ query: d.query
402
+ } : d.suggested_questions !== void 0 ? {
403
+ $case: "suggestedQuestions",
404
+ suggestedQuestions: d.suggested_questions
405
+ } : d.viz !== void 0 ? {
406
+ $case: "viz",
407
+ viz: d.viz
408
+ } : void 0,
409
+ attachmentId: d.attachment_id
410
+ }));
411
+ const unmarshalGenieConversationSchema = z.object({
412
+ id: z.string().optional(),
413
+ space_id: z.string().optional(),
414
+ user_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
415
+ created_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
416
+ last_updated_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
417
+ title: z.string().optional(),
418
+ conversation_id: z.string().optional()
419
+ }).transform((d) => ({
420
+ id: d.id,
421
+ spaceId: d.space_id,
422
+ userId: d.user_id,
423
+ createdTimestamp: d.created_timestamp,
424
+ lastUpdatedTimestamp: d.last_updated_timestamp,
425
+ title: d.title,
426
+ conversationId: d.conversation_id
427
+ }));
428
+ const unmarshalGenieConversationSummarySchema = z.object({
429
+ conversation_id: z.string().optional(),
430
+ title: z.string().optional(),
431
+ created_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
432
+ }).transform((d) => ({
433
+ conversationId: d.conversation_id,
434
+ title: d.title,
435
+ createdTimestamp: d.created_timestamp
436
+ }));
437
+ const unmarshalGenieEvalResponseSchema = z.object({
438
+ response: z.string().optional(),
439
+ sql_execution_result: z.lazy(() => unmarshalStatementResponseSchema).optional(),
440
+ response_type: z.string().optional()
441
+ }).transform((d) => ({
442
+ response: d.response,
443
+ sqlExecutionResult: d.sql_execution_result,
444
+ responseType: d.response_type
445
+ }));
446
+ const unmarshalGenieEvalResultSchema = z.object({
447
+ result_id: z.string().optional(),
448
+ space_id: z.string().optional(),
449
+ benchmark_question_id: z.string().optional(),
450
+ status: z.string().optional(),
451
+ question: z.string().optional(),
452
+ benchmark_answer: z.string().optional(),
453
+ created_by_user: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
454
+ }).transform((d) => ({
455
+ resultId: d.result_id,
456
+ spaceId: d.space_id,
457
+ benchmarkQuestionId: d.benchmark_question_id,
458
+ status: d.status,
459
+ question: d.question,
460
+ benchmarkAnswer: d.benchmark_answer,
461
+ createdByUser: d.created_by_user
462
+ }));
463
+ const unmarshalGenieEvalResultDetailsSchema = z.object({
464
+ result_id: z.string().optional(),
465
+ space_id: z.string().optional(),
466
+ benchmark_question_id: z.string().optional(),
467
+ eval_run_status: z.string().optional(),
468
+ assessment: z.string().optional(),
469
+ manual_assessment: z.boolean().optional(),
470
+ assessment_reasons: z.array(z.string()).optional(),
471
+ actual_response: z.array(z.lazy(() => unmarshalGenieEvalResponseSchema)).optional(),
472
+ expected_response: z.array(z.lazy(() => unmarshalGenieEvalResponseSchema)).optional()
473
+ }).transform((d) => ({
474
+ resultId: d.result_id,
475
+ spaceId: d.space_id,
476
+ benchmarkQuestionId: d.benchmark_question_id,
477
+ evalRunStatus: d.eval_run_status,
478
+ assessment: d.assessment,
479
+ manualAssessment: d.manual_assessment,
480
+ assessmentReasons: d.assessment_reasons,
481
+ actualResponse: d.actual_response,
482
+ expectedResponse: d.expected_response
483
+ }));
484
+ const unmarshalGenieEvalRunResponseSchema = z.object({
485
+ eval_run_id: z.string().optional(),
486
+ eval_run_status: z.string().optional(),
487
+ run_by_user: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
488
+ created_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
489
+ num_questions: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
490
+ num_correct: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
491
+ num_needs_review: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
492
+ num_done: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
493
+ last_updated_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
494
+ }).transform((d) => ({
495
+ evalRunId: d.eval_run_id,
496
+ evalRunStatus: d.eval_run_status,
497
+ runByUser: d.run_by_user,
498
+ createdTimestamp: d.created_timestamp,
499
+ numQuestions: d.num_questions,
500
+ numCorrect: d.num_correct,
501
+ numNeedsReview: d.num_needs_review,
502
+ numDone: d.num_done,
503
+ lastUpdatedTimestamp: d.last_updated_timestamp
504
+ }));
505
+ const unmarshalGenieFeedbackSchema = z.object({
506
+ rating: z.string().optional(),
507
+ comment: z.string().optional()
508
+ }).transform((d) => ({
509
+ rating: d.rating,
510
+ comment: d.comment
511
+ }));
512
+ const unmarshalGenieGenerateDownloadFullQueryResultResponseSchema = z.object({
513
+ download_id: z.string().optional(),
514
+ download_id_signature: z.string().optional()
515
+ }).transform((d) => ({
516
+ downloadId: d.download_id,
517
+ downloadIdSignature: d.download_id_signature
518
+ }));
519
+ const unmarshalGenieGetDownloadFullQueryResultResponseSchema = z.object({ statement_response: z.lazy(() => unmarshalStatementResponseSchema).optional() }).transform((d) => ({ statementResponse: d.statement_response }));
520
+ const unmarshalGenieGetMessageQueryResultResponseSchema = z.object({ statement_response: z.lazy(() => unmarshalStatementResponseSchema).optional() }).transform((d) => ({ statementResponse: d.statement_response }));
521
+ const unmarshalGenieListConversationCommentsResponseSchema = z.object({
522
+ comments: z.array(z.lazy(() => unmarshalGenieMessageCommentSchema)).optional(),
523
+ next_page_token: z.string().optional()
524
+ }).transform((d) => ({
525
+ comments: d.comments,
526
+ nextPageToken: d.next_page_token
527
+ }));
528
+ const unmarshalGenieListConversationMessagesResponseSchema = z.object({
529
+ messages: z.array(z.lazy(() => unmarshalGenieMessageSchema)).optional(),
530
+ next_page_token: z.string().optional()
531
+ }).transform((d) => ({
532
+ messages: d.messages,
533
+ nextPageToken: d.next_page_token
534
+ }));
535
+ const unmarshalGenieListConversationsResponseSchema = z.object({
536
+ conversations: z.array(z.lazy(() => unmarshalGenieConversationSummarySchema)).optional(),
537
+ next_page_token: z.string().optional()
538
+ }).transform((d) => ({
539
+ conversations: d.conversations,
540
+ nextPageToken: d.next_page_token
541
+ }));
542
+ const unmarshalGenieListEvalResultsResponseSchema = z.object({
543
+ eval_results: z.array(z.lazy(() => unmarshalGenieEvalResultSchema)).optional(),
544
+ next_page_token: z.string().optional()
545
+ }).transform((d) => ({
546
+ evalResults: d.eval_results,
547
+ nextPageToken: d.next_page_token
548
+ }));
549
+ const unmarshalGenieListEvalRunsResponseSchema = z.object({
550
+ eval_runs: z.array(z.lazy(() => unmarshalGenieEvalRunResponseSchema)).optional(),
551
+ next_page_token: z.string().optional()
552
+ }).transform((d) => ({
553
+ evalRuns: d.eval_runs,
554
+ nextPageToken: d.next_page_token
555
+ }));
556
+ const unmarshalGenieListMessageCommentsResponseSchema = z.object({
557
+ comments: z.array(z.lazy(() => unmarshalGenieMessageCommentSchema)).optional(),
558
+ next_page_token: z.string().optional()
559
+ }).transform((d) => ({
560
+ comments: d.comments,
561
+ nextPageToken: d.next_page_token
562
+ }));
563
+ const unmarshalGenieListSpacesResponseSchema = z.object({
564
+ spaces: z.array(z.lazy(() => unmarshalGenieSpaceSchema)).optional(),
565
+ next_page_token: z.string().optional()
566
+ }).transform((d) => ({
567
+ spaces: d.spaces,
568
+ nextPageToken: d.next_page_token
569
+ }));
570
+ const unmarshalGenieMessageSchema = z.object({
571
+ id: z.string().optional(),
572
+ space_id: z.string().optional(),
573
+ conversation_id: z.string().optional(),
574
+ user_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
575
+ created_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
576
+ last_updated_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
577
+ status: z.string().optional(),
578
+ content: z.string().optional(),
579
+ attachments: z.array(z.lazy(() => unmarshalGenieAttachmentSchema)).optional(),
580
+ query_result: z.lazy(() => unmarshalResultSchema).optional(),
581
+ error: z.lazy(() => unmarshalMessageErrorSchema).optional(),
582
+ message_id: z.string().optional(),
583
+ feedback: z.lazy(() => unmarshalGenieFeedbackSchema).optional()
584
+ }).transform((d) => ({
585
+ id: d.id,
586
+ spaceId: d.space_id,
587
+ conversationId: d.conversation_id,
588
+ userId: d.user_id,
589
+ createdTimestamp: d.created_timestamp,
590
+ lastUpdatedTimestamp: d.last_updated_timestamp,
591
+ status: d.status,
592
+ content: d.content,
593
+ attachments: d.attachments,
594
+ queryResult: d.query_result,
595
+ error: d.error,
596
+ messageId: d.message_id,
597
+ feedback: d.feedback
598
+ }));
599
+ const unmarshalGenieMessageCommentSchema = z.object({
600
+ space_id: z.string().optional(),
601
+ conversation_id: z.string().optional(),
602
+ message_id: z.string().optional(),
603
+ message_comment_id: z.string().optional(),
604
+ user_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
605
+ content: z.string().optional(),
606
+ created_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
607
+ }).transform((d) => ({
608
+ spaceId: d.space_id,
609
+ conversationId: d.conversation_id,
610
+ messageId: d.message_id,
611
+ messageCommentId: d.message_comment_id,
612
+ userId: d.user_id,
613
+ content: d.content,
614
+ createdTimestamp: d.created_timestamp
615
+ }));
616
+ const unmarshalGenieQueryAttachmentSchema = z.object({
617
+ title: z.string().optional(),
618
+ query: z.string().optional(),
619
+ description: z.string().optional(),
620
+ last_updated_timestamp: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
621
+ parameters: z.array(z.lazy(() => unmarshalQueryAttachmentParameterSchema)).optional(),
622
+ id: z.string().optional(),
623
+ statement_id: z.string().optional(),
624
+ query_result_metadata: z.lazy(() => unmarshalGenieResultMetadataSchema).optional(),
625
+ thoughts: z.array(z.lazy(() => unmarshalThoughtSchema)).optional()
626
+ }).transform((d) => ({
627
+ title: d.title,
628
+ query: d.query,
629
+ description: d.description,
630
+ lastUpdatedTimestamp: d.last_updated_timestamp,
631
+ parameters: d.parameters,
632
+ id: d.id,
633
+ statementId: d.statement_id,
634
+ queryResultMetadata: d.query_result_metadata,
635
+ thoughts: d.thoughts
636
+ }));
637
+ const unmarshalGenieResultMetadataSchema = z.object({
638
+ row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
639
+ is_truncated: z.boolean().optional()
640
+ }).transform((d) => ({
641
+ rowCount: d.row_count,
642
+ isTruncated: d.is_truncated
643
+ }));
644
+ const unmarshalGenieSpaceSchema = z.object({
645
+ space_id: z.string().optional(),
646
+ title: z.string().optional(),
647
+ description: z.string().optional(),
648
+ warehouse_id: z.string().optional(),
649
+ parent_path: z.string().optional(),
650
+ serialized_space: z.string().optional(),
651
+ etag: z.string().optional()
652
+ }).transform((d) => ({
653
+ spaceId: d.space_id,
654
+ title: d.title,
655
+ description: d.description,
656
+ warehouseId: d.warehouse_id,
657
+ parentPath: d.parent_path,
658
+ serializedSpace: d.serialized_space,
659
+ etag: d.etag
660
+ }));
661
+ const unmarshalGenieStartConversationResponseSchema = z.object({
662
+ message_id: z.string().optional(),
663
+ message: z.lazy(() => unmarshalGenieMessageSchema).optional(),
664
+ conversation_id: z.string().optional(),
665
+ conversation: z.lazy(() => unmarshalGenieConversationSchema).optional()
666
+ }).transform((d) => ({
667
+ messageId: d.message_id,
668
+ message: d.message,
669
+ conversationId: d.conversation_id,
670
+ conversation: d.conversation
671
+ }));
672
+ const unmarshalGenieSuggestedQuestionsAttachmentSchema = z.object({ questions: z.array(z.string()).optional() }).transform((d) => ({ questions: d.questions }));
673
+ const unmarshalGenieVizAttachmentSchema = z.object({
674
+ title: z.string().optional(),
675
+ query_attachment_id: z.string().optional()
676
+ }).transform((d) => ({
677
+ title: d.title,
678
+ queryAttachmentId: d.query_attachment_id
679
+ }));
680
+ const unmarshalListValueSchema = z.object({ values: z.array(z.lazy(() => unmarshalValueSchema)).optional() }).transform((d) => ({ values: d.values }));
681
+ const unmarshalMapStringValueEntrySchema = z.object({
682
+ key: z.string().optional(),
683
+ value: z.lazy(() => unmarshalValueSchema).optional()
684
+ }).transform((d) => ({
685
+ key: d.key,
686
+ value: d.value
687
+ }));
688
+ const unmarshalMessageErrorSchema = z.object({
689
+ error: z.string().optional(),
690
+ type: z.string().optional()
691
+ }).transform((d) => ({
692
+ error: d.error,
693
+ type: d.type
694
+ }));
695
+ const unmarshalPolicyFunctionArgumentSchema = z.object({
696
+ column: z.string().optional(),
697
+ constant: z.string().optional()
698
+ }).transform((d) => ({ arg: d.column !== void 0 ? {
699
+ $case: "column",
700
+ column: d.column
701
+ } : d.constant !== void 0 ? {
702
+ $case: "constant",
703
+ constant: d.constant
704
+ } : void 0 }));
705
+ const unmarshalQueryAttachmentParameterSchema = z.object({
706
+ keyword: z.string().optional(),
707
+ value: z.string().optional(),
708
+ sql_type: z.string().optional()
709
+ }).transform((d) => ({
710
+ keyword: d.keyword,
711
+ value: d.value,
712
+ sqlType: d.sql_type
713
+ }));
714
+ const unmarshalResultSchema = z.object({
715
+ statement_id: z.string().optional(),
716
+ row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
717
+ is_truncated: z.boolean().optional(),
718
+ statement_id_signature: z.string().optional()
719
+ }).transform((d) => ({
720
+ statementId: d.statement_id,
721
+ rowCount: d.row_count,
722
+ isTruncated: d.is_truncated,
723
+ statementIdSignature: d.statement_id_signature
724
+ }));
725
+ const unmarshalResultDataSchema = z.object({
726
+ external_links: z.array(z.lazy(() => unmarshalExternalLinkSchema)).optional(),
727
+ data_array: z.array(z.lazy(() => unmarshalListValueSchema)).optional(),
728
+ chunk_index: z.number().optional(),
729
+ row_offset: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
730
+ row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
731
+ byte_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
732
+ next_chunk_index: z.number().optional(),
733
+ next_chunk_internal_link: z.string().optional()
734
+ }).transform((d) => ({
735
+ externalLinks: d.external_links,
736
+ dataArray: d.data_array,
737
+ chunkIndex: d.chunk_index,
738
+ rowOffset: d.row_offset,
739
+ rowCount: d.row_count,
740
+ byteCount: d.byte_count,
741
+ nextChunkIndex: d.next_chunk_index,
742
+ nextChunkInternalLink: d.next_chunk_internal_link
743
+ }));
744
+ const unmarshalResultManifestSchema = z.object({
745
+ format: z.string().optional(),
746
+ schema: z.lazy(() => unmarshalSchemaSchema).optional(),
747
+ total_chunk_count: z.number().optional(),
748
+ chunks: z.array(z.lazy(() => unmarshalChunkInfoSchema)).optional(),
749
+ total_row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
750
+ total_byte_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
751
+ truncated: z.boolean().optional()
752
+ }).transform((d) => ({
753
+ format: d.format,
754
+ schema: d.schema,
755
+ totalChunkCount: d.total_chunk_count,
756
+ chunks: d.chunks,
757
+ totalRowCount: d.total_row_count,
758
+ totalByteCount: d.total_byte_count,
759
+ truncated: d.truncated
760
+ }));
761
+ const unmarshalSchemaSchema = z.object({
762
+ column_count: z.number().optional(),
763
+ columns: z.array(z.lazy(() => unmarshalColumnInfoSchema)).optional()
764
+ }).transform((d) => ({
765
+ columnCount: d.column_count,
766
+ columns: d.columns
767
+ }));
768
+ const unmarshalStatementResponseSchema = z.object({
769
+ statement_id: z.string().optional(),
770
+ status: z.lazy(() => unmarshalStatementStatusSchema).optional(),
771
+ manifest: z.lazy(() => unmarshalResultManifestSchema).optional(),
772
+ result: z.lazy(() => unmarshalResultDataSchema).optional()
773
+ }).transform((d) => ({
774
+ statementId: d.statement_id,
775
+ status: d.status,
776
+ manifest: d.manifest,
777
+ result: d.result
778
+ }));
779
+ const unmarshalStatementStatusSchema = z.object({
780
+ state: z.string().optional(),
781
+ error: z.lazy(() => unmarshalDatabricksServiceExceptionProtoSchema).optional(),
782
+ sql_state: z.string().optional()
783
+ }).transform((d) => ({
784
+ state: d.state,
785
+ error: d.error,
786
+ sqlState: d.sql_state
787
+ }));
788
+ const unmarshalStructSchema = z.object({ fields: z.array(z.lazy(() => unmarshalMapStringValueEntrySchema)).optional() }).transform((d) => ({ fields: d.fields }));
789
+ const unmarshalTextAttachmentSchema = z.object({
790
+ content: z.string().optional(),
791
+ id: z.string().optional(),
792
+ purpose: z.string().optional()
793
+ }).transform((d) => ({
794
+ content: d.content,
795
+ id: d.id,
796
+ purpose: d.purpose
797
+ }));
798
+ const unmarshalThoughtSchema = z.object({
799
+ thought_type: z.string().optional(),
800
+ content: z.string().optional()
801
+ }).transform((d) => ({
802
+ thoughtType: d.thought_type,
803
+ content: d.content
804
+ }));
805
+ const unmarshalValueSchema = z.object({
806
+ null_value: z.string().optional(),
807
+ number_value: z.number().optional(),
808
+ string_value: z.string().optional(),
809
+ bool_value: z.boolean().optional(),
810
+ struct_value: z.lazy(() => unmarshalStructSchema).optional(),
811
+ list_value: z.lazy(() => unmarshalListValueSchema).optional()
812
+ }).transform((d) => ({ kind: d.null_value !== void 0 ? {
813
+ $case: "nullValue",
814
+ nullValue: d.null_value
815
+ } : d.number_value !== void 0 ? {
816
+ $case: "numberValue",
817
+ numberValue: d.number_value
818
+ } : d.string_value !== void 0 ? {
819
+ $case: "stringValue",
820
+ stringValue: d.string_value
821
+ } : d.bool_value !== void 0 ? {
822
+ $case: "boolValue",
823
+ boolValue: d.bool_value
824
+ } : d.struct_value !== void 0 ? {
825
+ $case: "structValue",
826
+ structValue: d.struct_value
827
+ } : d.list_value !== void 0 ? {
828
+ $case: "listValue",
829
+ listValue: d.list_value
830
+ } : void 0 }));
831
+ const marshalGenieCreateConversationMessageRequestSchema = z.object({
832
+ spaceId: z.string().optional(),
833
+ conversationId: z.string().optional(),
834
+ content: z.string().optional(),
835
+ enableVisualization: z.boolean().optional()
836
+ }).transform((d) => ({
837
+ space_id: d.spaceId,
838
+ conversation_id: d.conversationId,
839
+ content: d.content,
840
+ enable_visualization: d.enableVisualization
841
+ }));
842
+ const marshalGenieCreateEvalRunRequestSchema = z.object({
843
+ spaceId: z.string().optional(),
844
+ benchmarkQuestionIds: z.array(z.string()).optional()
845
+ }).transform((d) => ({
846
+ space_id: d.spaceId,
847
+ benchmark_question_ids: d.benchmarkQuestionIds
848
+ }));
849
+ const marshalGenieCreateMessageCommentRequestSchema = z.object({
850
+ spaceId: z.string().optional(),
851
+ conversationId: z.string().optional(),
852
+ messageId: z.string().optional(),
853
+ content: z.string().optional()
854
+ }).transform((d) => ({
855
+ space_id: d.spaceId,
856
+ conversation_id: d.conversationId,
857
+ message_id: d.messageId,
858
+ content: d.content
859
+ }));
860
+ const marshalGenieCreateSpaceRequestSchema = z.object({
861
+ warehouseId: z.string().optional(),
862
+ parentPath: z.string().optional(),
863
+ serializedSpace: z.string().optional(),
864
+ title: z.string().optional(),
865
+ description: z.string().optional()
866
+ }).transform((d) => ({
867
+ warehouse_id: d.warehouseId,
868
+ parent_path: d.parentPath,
869
+ serialized_space: d.serializedSpace,
870
+ title: d.title,
871
+ description: d.description
872
+ }));
873
+ const marshalGenieExecuteMessageAttachmentQueryRequestSchema = z.object({
874
+ messageId: z.string().optional(),
875
+ spaceId: z.string().optional(),
876
+ conversationId: z.string().optional(),
877
+ attachmentId: z.string().optional()
878
+ }).transform((d) => ({
879
+ message_id: d.messageId,
880
+ space_id: d.spaceId,
881
+ conversation_id: d.conversationId,
882
+ attachment_id: d.attachmentId
883
+ }));
884
+ const marshalGenieExecuteMessageQueryRequestSchema = z.object({
885
+ messageId: z.string().optional(),
886
+ spaceId: z.string().optional(),
887
+ conversationId: z.string().optional()
888
+ }).transform((d) => ({
889
+ message_id: d.messageId,
890
+ space_id: d.spaceId,
891
+ conversation_id: d.conversationId
892
+ }));
893
+ const marshalGenieGenerateDownloadFullQueryResultRequestSchema = z.object({
894
+ spaceId: z.string().optional(),
895
+ conversationId: z.string().optional(),
896
+ messageId: z.string().optional(),
897
+ attachmentId: z.string().optional()
898
+ }).transform((d) => ({
899
+ space_id: d.spaceId,
900
+ conversation_id: d.conversationId,
901
+ message_id: d.messageId,
902
+ attachment_id: d.attachmentId
903
+ }));
904
+ const marshalGenieSendMessageFeedbackRequestSchema = z.object({
905
+ spaceId: z.string().optional(),
906
+ conversationId: z.string().optional(),
907
+ messageId: z.string().optional(),
908
+ rating: z.string().optional(),
909
+ comment: z.string().optional()
910
+ }).transform((d) => ({
911
+ space_id: d.spaceId,
912
+ conversation_id: d.conversationId,
913
+ message_id: d.messageId,
914
+ rating: d.rating,
915
+ comment: d.comment
916
+ }));
917
+ const marshalGenieStartConversationRequestSchema = z.object({
918
+ spaceId: z.string().optional(),
919
+ content: z.string().optional(),
920
+ enableVisualization: z.boolean().optional()
921
+ }).transform((d) => ({
922
+ space_id: d.spaceId,
923
+ content: d.content,
924
+ enable_visualization: d.enableVisualization
925
+ }));
926
+ const marshalGenieUpdateSpaceRequestSchema = z.object({
927
+ spaceId: z.string().optional(),
928
+ serializedSpace: z.string().optional(),
929
+ title: z.string().optional(),
930
+ description: z.string().optional(),
931
+ warehouseId: z.string().optional(),
932
+ etag: z.string().optional(),
933
+ parentPath: z.string().optional()
934
+ }).transform((d) => ({
935
+ space_id: d.spaceId,
936
+ serialized_space: d.serializedSpace,
937
+ title: d.title,
938
+ description: d.description,
939
+ warehouse_id: d.warehouseId,
940
+ etag: d.etag,
941
+ parent_path: d.parentPath
942
+ }));
943
+
944
+ //#endregion
945
+ export { ColumnTypeName, ErrorCode, EvaluationStatusType, Format, GenieEvalAssessment, GenieEvalResponseType, GenieFeedbackRating, MessageError_Type, MessageStatus_MessageStatus, NullValue, ScoreReason, StatementStatus_State, TextAttachmentPurpose, ThoughtType, marshalGenieCreateConversationMessageRequestSchema, marshalGenieCreateEvalRunRequestSchema, marshalGenieCreateMessageCommentRequestSchema, marshalGenieCreateSpaceRequestSchema, marshalGenieExecuteMessageAttachmentQueryRequestSchema, marshalGenieExecuteMessageQueryRequestSchema, marshalGenieGenerateDownloadFullQueryResultRequestSchema, marshalGenieSendMessageFeedbackRequestSchema, marshalGenieStartConversationRequestSchema, marshalGenieUpdateSpaceRequestSchema, unmarshalChunkInfoSchema, unmarshalColumnInfoSchema, unmarshalColumnMaskSchema, unmarshalDatabricksServiceExceptionProtoSchema, unmarshalExternalLinkSchema, unmarshalGenieAttachmentSchema, unmarshalGenieConversationSchema, unmarshalGenieConversationSummarySchema, unmarshalGenieEvalResponseSchema, unmarshalGenieEvalResultDetailsSchema, unmarshalGenieEvalResultSchema, unmarshalGenieEvalRunResponseSchema, unmarshalGenieFeedbackSchema, unmarshalGenieGenerateDownloadFullQueryResultResponseSchema, unmarshalGenieGetDownloadFullQueryResultResponseSchema, unmarshalGenieGetMessageQueryResultResponseSchema, unmarshalGenieListConversationCommentsResponseSchema, unmarshalGenieListConversationMessagesResponseSchema, unmarshalGenieListConversationsResponseSchema, unmarshalGenieListEvalResultsResponseSchema, unmarshalGenieListEvalRunsResponseSchema, unmarshalGenieListMessageCommentsResponseSchema, unmarshalGenieListSpacesResponseSchema, unmarshalGenieMessageCommentSchema, unmarshalGenieMessageSchema, unmarshalGenieQueryAttachmentSchema, unmarshalGenieResultMetadataSchema, unmarshalGenieSpaceSchema, unmarshalGenieStartConversationResponseSchema, unmarshalGenieSuggestedQuestionsAttachmentSchema, unmarshalGenieVizAttachmentSchema, unmarshalListValueSchema, unmarshalMapStringValueEntrySchema, unmarshalMessageErrorSchema, unmarshalPolicyFunctionArgumentSchema, unmarshalQueryAttachmentParameterSchema, unmarshalResultDataSchema, unmarshalResultManifestSchema, unmarshalResultSchema, unmarshalSchemaSchema, unmarshalStatementResponseSchema, unmarshalStatementStatusSchema, unmarshalStructSchema, unmarshalTextAttachmentSchema, unmarshalThoughtSchema, unmarshalValueSchema };
1642
946
  //# sourceMappingURL=model.js.map