@databricks/sdk-uc-onlinetables 0.34.0 → 0.36.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,396 +1,237 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- import { Temporal } from '@js-temporal/polyfill';
3
- import { z } from 'zod';
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import { z } from "zod";
3
+
4
+ //#region src/v1/model.ts
4
5
  /** The state of an online table. */
5
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
6
- export const OnlineTableState = {
7
- /** The default state. It should not be reported by any online tables. */
8
- ONLINE_TABLE_STATE_UNSPECIFIED: 'ONLINE_TABLE_STATE_UNSPECIFIED',
9
- /**
10
- * The online table has just been created and resources are being provisioned. This is also the
11
- * catch-all state if there is not a more suitable state to report for the online table.
12
- */
13
- PROVISIONING: 'PROVISIONING',
14
- /** The online table is provisioning resources for the data synchronization pipeline. */
15
- PROVISIONING_PIPELINE_RESOURCES: 'PROVISIONING_PIPELINE_RESOURCES',
16
- /** The online table is executing the initial data synchronization. */
17
- PROVISIONING_INITIAL_SNAPSHOT: 'PROVISIONING_INITIAL_SNAPSHOT',
18
- /** The online table is ready to serve data. */
19
- ONLINE: 'ONLINE',
20
- /**
21
- * The online table is ready to serve data and is continuously updating. Only shown for online
22
- * tables using the "Continuous" sync mode.
23
- */
24
- ONLINE_CONTINUOUS_UPDATE: 'ONLINE_CONTINUOUS_UPDATE',
25
- /**
26
- * The online table is ready to serve data and an active update is in progress. Only shown for
27
- * online tables using the "Triggered" sync mode.
28
- */
29
- ONLINE_TRIGGERED_UPDATE: 'ONLINE_TRIGGERED_UPDATE',
30
- /**
31
- * The online table is ready to serve data and there are no active updates. Only shown for online
32
- * tables using the "Triggered" sync mode.
33
- */
34
- ONLINE_NO_PENDING_UPDATE: 'ONLINE_NO_PENDING_UPDATE',
35
- /** The online table has encountered an internal error and is not available for serving. */
36
- OFFLINE: 'OFFLINE',
37
- /**
38
- * The online table is not available for serving because the data synchronization pipeline has
39
- * failed. Please review the pipeline event logs to troubleshoot.
40
- */
41
- OFFLINE_FAILED: 'OFFLINE_FAILED',
42
- /**
43
- * The data synchronization pipeline has encountered an error but the online table is still
44
- * available for serving (potentially stale) data. Please review the pipeline event logs to
45
- * troubleshoot.
46
- */
47
- ONLINE_PIPELINE_FAILED: 'ONLINE_PIPELINE_FAILED',
48
- /**
49
- * The online table is available for serving, and is provisioning resources for a newly started
50
- * data synchronization pipeline.
51
- */
52
- ONLINE_UPDATING_PIPELINE_RESOURCES: 'ONLINE_UPDATING_PIPELINE_RESOURCES',
6
+ const OnlineTableState = {
7
+ ONLINE_TABLE_STATE_UNSPECIFIED: "ONLINE_TABLE_STATE_UNSPECIFIED",
8
+ PROVISIONING: "PROVISIONING",
9
+ PROVISIONING_PIPELINE_RESOURCES: "PROVISIONING_PIPELINE_RESOURCES",
10
+ PROVISIONING_INITIAL_SNAPSHOT: "PROVISIONING_INITIAL_SNAPSHOT",
11
+ ONLINE: "ONLINE",
12
+ ONLINE_CONTINUOUS_UPDATE: "ONLINE_CONTINUOUS_UPDATE",
13
+ ONLINE_TRIGGERED_UPDATE: "ONLINE_TRIGGERED_UPDATE",
14
+ ONLINE_NO_PENDING_UPDATE: "ONLINE_NO_PENDING_UPDATE",
15
+ OFFLINE: "OFFLINE",
16
+ OFFLINE_FAILED: "OFFLINE_FAILED",
17
+ ONLINE_PIPELINE_FAILED: "ONLINE_PIPELINE_FAILED",
18
+ ONLINE_UPDATING_PIPELINE_RESOURCES: "ONLINE_UPDATING_PIPELINE_RESOURCES"
53
19
  };
54
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
55
- export const ProvisioningInfo_State = {
56
- STATE_UNSPECIFIED: 'STATE_UNSPECIFIED',
57
- PROVISIONING: 'PROVISIONING',
58
- ACTIVE: 'ACTIVE',
59
- FAILED: 'FAILED',
60
- DELETING: 'DELETING',
61
- UPDATING: 'UPDATING',
62
- DEGRADED: 'DEGRADED',
20
+ const ProvisioningInfo_State = {
21
+ STATE_UNSPECIFIED: "STATE_UNSPECIFIED",
22
+ PROVISIONING: "PROVISIONING",
23
+ ACTIVE: "ACTIVE",
24
+ FAILED: "FAILED",
25
+ DELETING: "DELETING",
26
+ UPDATING: "UPDATING",
27
+ DEGRADED: "DEGRADED"
63
28
  };
64
- export const unmarshalContinuousUpdateStatusSchema = z
65
- .object({
66
- last_processed_commit_version: z
67
- .union([z.number(), z.bigint()])
68
- .transform(v => BigInt(v))
69
- .optional(),
70
- timestamp: z
71
- .string()
72
- .transform(s => Temporal.Instant.from(s))
73
- .optional(),
74
- initial_pipeline_sync_progress: z
75
- .lazy(() => unmarshalPipelineProgressSchema)
76
- .optional(),
77
- })
78
- .transform(d => ({
79
- lastProcessedCommitVersion: d.last_processed_commit_version,
80
- timestamp: d.timestamp,
81
- initialPipelineSyncProgress: d.initial_pipeline_sync_progress,
82
- }));
83
- export const unmarshalFailedStatusSchema = z
84
- .object({
85
- last_processed_commit_version: z
86
- .union([z.number(), z.bigint()])
87
- .transform(v => BigInt(v))
88
- .optional(),
89
- timestamp: z
90
- .string()
91
- .transform(s => Temporal.Instant.from(s))
92
- .optional(),
93
- })
94
- .transform(d => ({
95
- lastProcessedCommitVersion: d.last_processed_commit_version,
96
- timestamp: d.timestamp,
97
- }));
98
- export const unmarshalOnlineTableSchema = z
99
- .object({
100
- name: z.string().optional(),
101
- spec: z.lazy(() => unmarshalOnlineTableSpecSchema).optional(),
102
- status: z.lazy(() => unmarshalOnlineTableStatusSchema).optional(),
103
- table_serving_url: z.string().optional(),
104
- unity_catalog_provisioning_state: z.string().optional(),
105
- })
106
- .transform(d => ({
107
- name: d.name,
108
- spec: d.spec,
109
- status: d.status,
110
- tableServingUrl: d.table_serving_url,
111
- unityCatalogProvisioningState: d.unity_catalog_provisioning_state,
112
- }));
113
- export const unmarshalOnlineTableSpecSchema = z
114
- .object({
115
- run_continuously: z
116
- .lazy(() => unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema)
117
- .optional(),
118
- run_triggered: z
119
- .lazy(() => unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema)
120
- .optional(),
121
- source_table_full_name: z.string().optional(),
122
- primary_key_columns: z.array(z.string()).optional(),
123
- timeseries_key: z.string().optional(),
124
- perform_full_copy: z.boolean().optional(),
125
- pipeline_id: z.string().optional(),
126
- })
127
- .transform(d => ({
128
- schedulingPolicy: d.run_continuously !== undefined
129
- ? {
130
- $case: 'runContinuously',
131
- runContinuously: d.run_continuously,
132
- }
133
- : d.run_triggered !== undefined
134
- ? { $case: 'runTriggered', runTriggered: d.run_triggered }
135
- : undefined,
136
- sourceTableFullName: d.source_table_full_name,
137
- primaryKeyColumns: d.primary_key_columns,
138
- timeseriesKey: d.timeseries_key,
139
- performFullCopy: d.perform_full_copy,
140
- pipelineId: d.pipeline_id,
141
- }));
142
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
143
- export const unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema = z.object({});
144
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
145
- export const unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema = z.object({});
146
- export const unmarshalOnlineTableStatusSchema = z
147
- .object({
148
- detailed_state: z.string().optional(),
149
- message: z.string().optional(),
150
- provisioning_status: z
151
- .lazy(() => unmarshalProvisioningStatusSchema)
152
- .optional(),
153
- continuous_update_status: z
154
- .lazy(() => unmarshalContinuousUpdateStatusSchema)
155
- .optional(),
156
- triggered_update_status: z
157
- .lazy(() => unmarshalTriggeredUpdateStatusSchema)
158
- .optional(),
159
- failed_status: z.lazy(() => unmarshalFailedStatusSchema).optional(),
160
- })
161
- .transform(d => ({
162
- detailedState: d.detailed_state,
163
- message: d.message,
164
- detailedStatus: d.provisioning_status !== undefined
165
- ? {
166
- $case: 'provisioningStatus',
167
- provisioningStatus: d.provisioning_status,
168
- }
169
- : d.continuous_update_status !== undefined
170
- ? {
171
- $case: 'continuousUpdateStatus',
172
- continuousUpdateStatus: d.continuous_update_status,
173
- }
174
- : d.triggered_update_status !== undefined
175
- ? {
176
- $case: 'triggeredUpdateStatus',
177
- triggeredUpdateStatus: d.triggered_update_status,
178
- }
179
- : d.failed_status !== undefined
180
- ? { $case: 'failedStatus', failedStatus: d.failed_status }
181
- : undefined,
182
- }));
183
- export const unmarshalPipelineProgressSchema = z
184
- .object({
185
- latest_version_currently_processing: z
186
- .union([z.number(), z.bigint()])
187
- .transform(v => BigInt(v))
188
- .optional(),
189
- synced_row_count: z
190
- .union([z.number(), z.bigint()])
191
- .transform(v => BigInt(v))
192
- .optional(),
193
- total_row_count: z
194
- .union([z.number(), z.bigint()])
195
- .transform(v => BigInt(v))
196
- .optional(),
197
- sync_progress_completion: z.number().optional(),
198
- estimated_completion_time_seconds: z.number().optional(),
199
- })
200
- .transform(d => ({
201
- latestVersionCurrentlyProcessing: d.latest_version_currently_processing,
202
- syncedRowCount: d.synced_row_count,
203
- totalRowCount: d.total_row_count,
204
- syncProgressCompletion: d.sync_progress_completion,
205
- estimatedCompletionTimeSeconds: d.estimated_completion_time_seconds,
206
- }));
207
- export const unmarshalProvisioningStatusSchema = z
208
- .object({
209
- initial_pipeline_sync_progress: z
210
- .lazy(() => unmarshalPipelineProgressSchema)
211
- .optional(),
212
- })
213
- .transform(d => ({
214
- initialPipelineSyncProgress: d.initial_pipeline_sync_progress,
215
- }));
216
- export const unmarshalTriggeredUpdateStatusSchema = z
217
- .object({
218
- last_processed_commit_version: z
219
- .union([z.number(), z.bigint()])
220
- .transform(v => BigInt(v))
221
- .optional(),
222
- timestamp: z
223
- .string()
224
- .transform(s => Temporal.Instant.from(s))
225
- .optional(),
226
- triggered_update_progress: z
227
- .lazy(() => unmarshalPipelineProgressSchema)
228
- .optional(),
229
- })
230
- .transform(d => ({
231
- lastProcessedCommitVersion: d.last_processed_commit_version,
232
- timestamp: d.timestamp,
233
- triggeredUpdateProgress: d.triggered_update_progress,
234
- }));
235
- export const marshalContinuousUpdateStatusSchema = z
236
- .object({
237
- lastProcessedCommitVersion: z.bigint().optional(),
238
- timestamp: z
239
- .any()
240
- .transform((d) => d.toString())
241
- .optional(),
242
- initialPipelineSyncProgress: z
243
- .lazy(() => marshalPipelineProgressSchema)
244
- .optional(),
245
- })
246
- .transform(d => ({
247
- last_processed_commit_version: d.lastProcessedCommitVersion,
248
- timestamp: d.timestamp,
249
- initial_pipeline_sync_progress: d.initialPipelineSyncProgress,
250
- }));
251
- export const marshalFailedStatusSchema = z
252
- .object({
253
- lastProcessedCommitVersion: z.bigint().optional(),
254
- timestamp: z
255
- .any()
256
- .transform((d) => d.toString())
257
- .optional(),
258
- })
259
- .transform(d => ({
260
- last_processed_commit_version: d.lastProcessedCommitVersion,
261
- timestamp: d.timestamp,
262
- }));
263
- export const marshalOnlineTableSchema = z
264
- .object({
265
- name: z.string().optional(),
266
- spec: z.lazy(() => marshalOnlineTableSpecSchema).optional(),
267
- status: z.lazy(() => marshalOnlineTableStatusSchema).optional(),
268
- tableServingUrl: z.string().optional(),
269
- unityCatalogProvisioningState: z.string().optional(),
270
- })
271
- .transform(d => ({
272
- name: d.name,
273
- spec: d.spec,
274
- status: d.status,
275
- table_serving_url: d.tableServingUrl,
276
- unity_catalog_provisioning_state: d.unityCatalogProvisioningState,
277
- }));
278
- export const marshalOnlineTableSpecSchema = z
279
- .object({
280
- schedulingPolicy: z
281
- .discriminatedUnion('$case', [
282
- z.object({
283
- $case: z.literal('runContinuously'),
284
- runContinuously: z.lazy(() => marshalOnlineTableSpec_ContinuousSchedulingPolicySchema),
285
- }),
286
- z.object({
287
- $case: z.literal('runTriggered'),
288
- runTriggered: z.lazy(() => marshalOnlineTableSpec_TriggeredSchedulingPolicySchema),
289
- }),
290
- ])
291
- .optional(),
292
- sourceTableFullName: z.string().optional(),
293
- primaryKeyColumns: z.array(z.string()).optional(),
294
- timeseriesKey: z.string().optional(),
295
- performFullCopy: z.boolean().optional(),
296
- pipelineId: z.string().optional(),
297
- })
298
- .transform(d => ({
299
- ...(d.schedulingPolicy?.$case === 'runContinuously' && {
300
- run_continuously: d.schedulingPolicy.runContinuously,
301
- }),
302
- ...(d.schedulingPolicy?.$case === 'runTriggered' && {
303
- run_triggered: d.schedulingPolicy.runTriggered,
304
- }),
305
- source_table_full_name: d.sourceTableFullName,
306
- primary_key_columns: d.primaryKeyColumns,
307
- timeseries_key: d.timeseriesKey,
308
- perform_full_copy: d.performFullCopy,
309
- pipeline_id: d.pipelineId,
310
- }));
311
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
312
- export const marshalOnlineTableSpec_ContinuousSchedulingPolicySchema = z.object({});
313
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
314
- export const marshalOnlineTableSpec_TriggeredSchedulingPolicySchema = z.object({});
315
- export const marshalOnlineTableStatusSchema = z
316
- .object({
317
- detailedState: z.string().optional(),
318
- message: z.string().optional(),
319
- detailedStatus: z
320
- .discriminatedUnion('$case', [
321
- z.object({
322
- $case: z.literal('provisioningStatus'),
323
- provisioningStatus: z.lazy(() => marshalProvisioningStatusSchema),
324
- }),
325
- z.object({
326
- $case: z.literal('continuousUpdateStatus'),
327
- continuousUpdateStatus: z.lazy(() => marshalContinuousUpdateStatusSchema),
328
- }),
329
- z.object({
330
- $case: z.literal('triggeredUpdateStatus'),
331
- triggeredUpdateStatus: z.lazy(() => marshalTriggeredUpdateStatusSchema),
332
- }),
333
- z.object({
334
- $case: z.literal('failedStatus'),
335
- failedStatus: z.lazy(() => marshalFailedStatusSchema),
336
- }),
337
- ])
338
- .optional(),
339
- })
340
- .transform(d => ({
341
- detailed_state: d.detailedState,
342
- message: d.message,
343
- ...(d.detailedStatus?.$case === 'provisioningStatus' && {
344
- provisioning_status: d.detailedStatus.provisioningStatus,
345
- }),
346
- ...(d.detailedStatus?.$case === 'continuousUpdateStatus' && {
347
- continuous_update_status: d.detailedStatus.continuousUpdateStatus,
348
- }),
349
- ...(d.detailedStatus?.$case === 'triggeredUpdateStatus' && {
350
- triggered_update_status: d.detailedStatus.triggeredUpdateStatus,
351
- }),
352
- ...(d.detailedStatus?.$case === 'failedStatus' && {
353
- failed_status: d.detailedStatus.failedStatus,
354
- }),
355
- }));
356
- export const marshalPipelineProgressSchema = z
357
- .object({
358
- latestVersionCurrentlyProcessing: z.bigint().optional(),
359
- syncedRowCount: z.bigint().optional(),
360
- totalRowCount: z.bigint().optional(),
361
- syncProgressCompletion: z.number().optional(),
362
- estimatedCompletionTimeSeconds: z.number().optional(),
363
- })
364
- .transform(d => ({
365
- latest_version_currently_processing: d.latestVersionCurrentlyProcessing,
366
- synced_row_count: d.syncedRowCount,
367
- total_row_count: d.totalRowCount,
368
- sync_progress_completion: d.syncProgressCompletion,
369
- estimated_completion_time_seconds: d.estimatedCompletionTimeSeconds,
370
- }));
371
- export const marshalProvisioningStatusSchema = z
372
- .object({
373
- initialPipelineSyncProgress: z
374
- .lazy(() => marshalPipelineProgressSchema)
375
- .optional(),
376
- })
377
- .transform(d => ({
378
- initial_pipeline_sync_progress: d.initialPipelineSyncProgress,
379
- }));
380
- export const marshalTriggeredUpdateStatusSchema = z
381
- .object({
382
- lastProcessedCommitVersion: z.bigint().optional(),
383
- timestamp: z
384
- .any()
385
- .transform((d) => d.toString())
386
- .optional(),
387
- triggeredUpdateProgress: z
388
- .lazy(() => marshalPipelineProgressSchema)
389
- .optional(),
390
- })
391
- .transform(d => ({
392
- last_processed_commit_version: d.lastProcessedCommitVersion,
393
- timestamp: d.timestamp,
394
- triggered_update_progress: d.triggeredUpdateProgress,
395
- }));
29
+ const unmarshalContinuousUpdateStatusSchema = z.object({
30
+ last_processed_commit_version: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
31
+ timestamp: z.string().transform((s) => Temporal.Instant.from(s)).optional(),
32
+ initial_pipeline_sync_progress: z.lazy(() => unmarshalPipelineProgressSchema).optional()
33
+ }).transform((d) => ({
34
+ lastProcessedCommitVersion: d.last_processed_commit_version,
35
+ timestamp: d.timestamp,
36
+ initialPipelineSyncProgress: d.initial_pipeline_sync_progress
37
+ }));
38
+ const unmarshalFailedStatusSchema = z.object({
39
+ last_processed_commit_version: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
40
+ timestamp: z.string().transform((s) => Temporal.Instant.from(s)).optional()
41
+ }).transform((d) => ({
42
+ lastProcessedCommitVersion: d.last_processed_commit_version,
43
+ timestamp: d.timestamp
44
+ }));
45
+ const unmarshalOnlineTableSchema = z.object({
46
+ name: z.string().optional(),
47
+ spec: z.lazy(() => unmarshalOnlineTableSpecSchema).optional(),
48
+ status: z.lazy(() => unmarshalOnlineTableStatusSchema).optional(),
49
+ table_serving_url: z.string().optional(),
50
+ unity_catalog_provisioning_state: z.string().optional()
51
+ }).transform((d) => ({
52
+ name: d.name,
53
+ spec: d.spec,
54
+ status: d.status,
55
+ tableServingUrl: d.table_serving_url,
56
+ unityCatalogProvisioningState: d.unity_catalog_provisioning_state
57
+ }));
58
+ const unmarshalOnlineTableSpecSchema = z.object({
59
+ run_continuously: z.lazy(() => unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema).optional(),
60
+ run_triggered: z.lazy(() => unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema).optional(),
61
+ source_table_full_name: z.string().optional(),
62
+ primary_key_columns: z.array(z.string()).optional(),
63
+ timeseries_key: z.string().optional(),
64
+ perform_full_copy: z.boolean().optional(),
65
+ pipeline_id: z.string().optional()
66
+ }).transform((d) => ({
67
+ schedulingPolicy: d.run_continuously !== void 0 ? {
68
+ $case: "runContinuously",
69
+ runContinuously: d.run_continuously
70
+ } : d.run_triggered !== void 0 ? {
71
+ $case: "runTriggered",
72
+ runTriggered: d.run_triggered
73
+ } : void 0,
74
+ sourceTableFullName: d.source_table_full_name,
75
+ primaryKeyColumns: d.primary_key_columns,
76
+ timeseriesKey: d.timeseries_key,
77
+ performFullCopy: d.perform_full_copy,
78
+ pipelineId: d.pipeline_id
79
+ }));
80
+ const unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema = z.object({});
81
+ const unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema = z.object({});
82
+ const unmarshalOnlineTableStatusSchema = z.object({
83
+ detailed_state: z.string().optional(),
84
+ message: z.string().optional(),
85
+ provisioning_status: z.lazy(() => unmarshalProvisioningStatusSchema).optional(),
86
+ continuous_update_status: z.lazy(() => unmarshalContinuousUpdateStatusSchema).optional(),
87
+ triggered_update_status: z.lazy(() => unmarshalTriggeredUpdateStatusSchema).optional(),
88
+ failed_status: z.lazy(() => unmarshalFailedStatusSchema).optional()
89
+ }).transform((d) => ({
90
+ detailedState: d.detailed_state,
91
+ message: d.message,
92
+ detailedStatus: d.provisioning_status !== void 0 ? {
93
+ $case: "provisioningStatus",
94
+ provisioningStatus: d.provisioning_status
95
+ } : d.continuous_update_status !== void 0 ? {
96
+ $case: "continuousUpdateStatus",
97
+ continuousUpdateStatus: d.continuous_update_status
98
+ } : d.triggered_update_status !== void 0 ? {
99
+ $case: "triggeredUpdateStatus",
100
+ triggeredUpdateStatus: d.triggered_update_status
101
+ } : d.failed_status !== void 0 ? {
102
+ $case: "failedStatus",
103
+ failedStatus: d.failed_status
104
+ } : void 0
105
+ }));
106
+ const unmarshalPipelineProgressSchema = z.object({
107
+ latest_version_currently_processing: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
108
+ synced_row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
109
+ total_row_count: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
110
+ sync_progress_completion: z.number().optional(),
111
+ estimated_completion_time_seconds: z.number().optional()
112
+ }).transform((d) => ({
113
+ latestVersionCurrentlyProcessing: d.latest_version_currently_processing,
114
+ syncedRowCount: d.synced_row_count,
115
+ totalRowCount: d.total_row_count,
116
+ syncProgressCompletion: d.sync_progress_completion,
117
+ estimatedCompletionTimeSeconds: d.estimated_completion_time_seconds
118
+ }));
119
+ const unmarshalProvisioningStatusSchema = z.object({ initial_pipeline_sync_progress: z.lazy(() => unmarshalPipelineProgressSchema).optional() }).transform((d) => ({ initialPipelineSyncProgress: d.initial_pipeline_sync_progress }));
120
+ const unmarshalTriggeredUpdateStatusSchema = z.object({
121
+ last_processed_commit_version: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
122
+ timestamp: z.string().transform((s) => Temporal.Instant.from(s)).optional(),
123
+ triggered_update_progress: z.lazy(() => unmarshalPipelineProgressSchema).optional()
124
+ }).transform((d) => ({
125
+ lastProcessedCommitVersion: d.last_processed_commit_version,
126
+ timestamp: d.timestamp,
127
+ triggeredUpdateProgress: d.triggered_update_progress
128
+ }));
129
+ const marshalContinuousUpdateStatusSchema = z.object({
130
+ lastProcessedCommitVersion: z.bigint().optional(),
131
+ timestamp: z.any().transform((d) => d.toString()).optional(),
132
+ initialPipelineSyncProgress: z.lazy(() => marshalPipelineProgressSchema).optional()
133
+ }).transform((d) => ({
134
+ last_processed_commit_version: d.lastProcessedCommitVersion,
135
+ timestamp: d.timestamp,
136
+ initial_pipeline_sync_progress: d.initialPipelineSyncProgress
137
+ }));
138
+ const marshalFailedStatusSchema = z.object({
139
+ lastProcessedCommitVersion: z.bigint().optional(),
140
+ timestamp: z.any().transform((d) => d.toString()).optional()
141
+ }).transform((d) => ({
142
+ last_processed_commit_version: d.lastProcessedCommitVersion,
143
+ timestamp: d.timestamp
144
+ }));
145
+ const marshalOnlineTableSchema = z.object({
146
+ name: z.string().optional(),
147
+ spec: z.lazy(() => marshalOnlineTableSpecSchema).optional(),
148
+ status: z.lazy(() => marshalOnlineTableStatusSchema).optional(),
149
+ tableServingUrl: z.string().optional(),
150
+ unityCatalogProvisioningState: z.string().optional()
151
+ }).transform((d) => ({
152
+ name: d.name,
153
+ spec: d.spec,
154
+ status: d.status,
155
+ table_serving_url: d.tableServingUrl,
156
+ unity_catalog_provisioning_state: d.unityCatalogProvisioningState
157
+ }));
158
+ const marshalOnlineTableSpecSchema = z.object({
159
+ schedulingPolicy: z.discriminatedUnion("$case", [z.object({
160
+ $case: z.literal("runContinuously"),
161
+ runContinuously: z.lazy(() => marshalOnlineTableSpec_ContinuousSchedulingPolicySchema)
162
+ }), z.object({
163
+ $case: z.literal("runTriggered"),
164
+ runTriggered: z.lazy(() => marshalOnlineTableSpec_TriggeredSchedulingPolicySchema)
165
+ })]).optional(),
166
+ sourceTableFullName: z.string().optional(),
167
+ primaryKeyColumns: z.array(z.string()).optional(),
168
+ timeseriesKey: z.string().optional(),
169
+ performFullCopy: z.boolean().optional(),
170
+ pipelineId: z.string().optional()
171
+ }).transform((d) => ({
172
+ ...d.schedulingPolicy?.$case === "runContinuously" && { run_continuously: d.schedulingPolicy.runContinuously },
173
+ ...d.schedulingPolicy?.$case === "runTriggered" && { run_triggered: d.schedulingPolicy.runTriggered },
174
+ source_table_full_name: d.sourceTableFullName,
175
+ primary_key_columns: d.primaryKeyColumns,
176
+ timeseries_key: d.timeseriesKey,
177
+ perform_full_copy: d.performFullCopy,
178
+ pipeline_id: d.pipelineId
179
+ }));
180
+ const marshalOnlineTableSpec_ContinuousSchedulingPolicySchema = z.object({});
181
+ const marshalOnlineTableSpec_TriggeredSchedulingPolicySchema = z.object({});
182
+ const marshalOnlineTableStatusSchema = z.object({
183
+ detailedState: z.string().optional(),
184
+ message: z.string().optional(),
185
+ detailedStatus: z.discriminatedUnion("$case", [
186
+ z.object({
187
+ $case: z.literal("provisioningStatus"),
188
+ provisioningStatus: z.lazy(() => marshalProvisioningStatusSchema)
189
+ }),
190
+ z.object({
191
+ $case: z.literal("continuousUpdateStatus"),
192
+ continuousUpdateStatus: z.lazy(() => marshalContinuousUpdateStatusSchema)
193
+ }),
194
+ z.object({
195
+ $case: z.literal("triggeredUpdateStatus"),
196
+ triggeredUpdateStatus: z.lazy(() => marshalTriggeredUpdateStatusSchema)
197
+ }),
198
+ z.object({
199
+ $case: z.literal("failedStatus"),
200
+ failedStatus: z.lazy(() => marshalFailedStatusSchema)
201
+ })
202
+ ]).optional()
203
+ }).transform((d) => ({
204
+ detailed_state: d.detailedState,
205
+ message: d.message,
206
+ ...d.detailedStatus?.$case === "provisioningStatus" && { provisioning_status: d.detailedStatus.provisioningStatus },
207
+ ...d.detailedStatus?.$case === "continuousUpdateStatus" && { continuous_update_status: d.detailedStatus.continuousUpdateStatus },
208
+ ...d.detailedStatus?.$case === "triggeredUpdateStatus" && { triggered_update_status: d.detailedStatus.triggeredUpdateStatus },
209
+ ...d.detailedStatus?.$case === "failedStatus" && { failed_status: d.detailedStatus.failedStatus }
210
+ }));
211
+ const marshalPipelineProgressSchema = z.object({
212
+ latestVersionCurrentlyProcessing: z.bigint().optional(),
213
+ syncedRowCount: z.bigint().optional(),
214
+ totalRowCount: z.bigint().optional(),
215
+ syncProgressCompletion: z.number().optional(),
216
+ estimatedCompletionTimeSeconds: z.number().optional()
217
+ }).transform((d) => ({
218
+ latest_version_currently_processing: d.latestVersionCurrentlyProcessing,
219
+ synced_row_count: d.syncedRowCount,
220
+ total_row_count: d.totalRowCount,
221
+ sync_progress_completion: d.syncProgressCompletion,
222
+ estimated_completion_time_seconds: d.estimatedCompletionTimeSeconds
223
+ }));
224
+ const marshalProvisioningStatusSchema = z.object({ initialPipelineSyncProgress: z.lazy(() => marshalPipelineProgressSchema).optional() }).transform((d) => ({ initial_pipeline_sync_progress: d.initialPipelineSyncProgress }));
225
+ const marshalTriggeredUpdateStatusSchema = z.object({
226
+ lastProcessedCommitVersion: z.bigint().optional(),
227
+ timestamp: z.any().transform((d) => d.toString()).optional(),
228
+ triggeredUpdateProgress: z.lazy(() => marshalPipelineProgressSchema).optional()
229
+ }).transform((d) => ({
230
+ last_processed_commit_version: d.lastProcessedCommitVersion,
231
+ timestamp: d.timestamp,
232
+ triggered_update_progress: d.triggeredUpdateProgress
233
+ }));
234
+
235
+ //#endregion
236
+ export { OnlineTableState, ProvisioningInfo_State, marshalContinuousUpdateStatusSchema, marshalFailedStatusSchema, marshalOnlineTableSchema, marshalOnlineTableSpecSchema, marshalOnlineTableSpec_ContinuousSchedulingPolicySchema, marshalOnlineTableSpec_TriggeredSchedulingPolicySchema, marshalOnlineTableStatusSchema, marshalPipelineProgressSchema, marshalProvisioningStatusSchema, marshalTriggeredUpdateStatusSchema, unmarshalContinuousUpdateStatusSchema, unmarshalFailedStatusSchema, unmarshalOnlineTableSchema, unmarshalOnlineTableSpecSchema, unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema, unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema, unmarshalOnlineTableStatusSchema, unmarshalPipelineProgressSchema, unmarshalProvisioningStatusSchema, unmarshalTriggeredUpdateStatusSchema };
396
237
  //# sourceMappingURL=model.js.map