@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/package.js +7 -0
- package/dist/package.js.map +1 -0
- package/dist/v1/client.d.ts +39 -35
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +139 -176
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +3 -7
- package/dist/v1/index.js +4 -7
- package/dist/v1/model.d.ts +208 -214
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +233 -392
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.d.ts +21 -17
- package/dist/v1/transport.d.ts.map +1 -1
- package/dist/v1/transport.js +60 -69
- package/dist/v1/transport.js.map +1 -1
- package/dist/v1/utils.d.ts +21 -18
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +90 -118
- package/dist/v1/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/v1/index.d.ts.map +0 -1
- package/dist/v1/index.js.map +0 -1
package/dist/v1/model.js
CHANGED
|
@@ -1,396 +1,237 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}))
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
})
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
})
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
})
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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
|