@databricks/sdk-sharing 0.0.0-dev → 0.1.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1150 @@
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';
4
+ /**
5
+ * UC supported column types
6
+ * Copied from https://src.dev.databricks.com/databricks/universe@23a85902bb58695ab9293adc9f327b0714b55e72/-/blob/managed-catalog/api/messages/table.proto?L68
7
+ */
8
+ export var ColumnTypeName;
9
+ (function (ColumnTypeName) {
10
+ ColumnTypeName["COLUMN_TYPE_NAME_UNSPECIFIED"] = "COLUMN_TYPE_NAME_UNSPECIFIED";
11
+ ColumnTypeName["BOOLEAN"] = "BOOLEAN";
12
+ ColumnTypeName["BYTE"] = "BYTE";
13
+ ColumnTypeName["SHORT"] = "SHORT";
14
+ ColumnTypeName["INT"] = "INT";
15
+ ColumnTypeName["LONG"] = "LONG";
16
+ ColumnTypeName["FLOAT"] = "FLOAT";
17
+ ColumnTypeName["DOUBLE"] = "DOUBLE";
18
+ ColumnTypeName["DATE"] = "DATE";
19
+ ColumnTypeName["TIMESTAMP"] = "TIMESTAMP";
20
+ ColumnTypeName["STRING"] = "STRING";
21
+ ColumnTypeName["BINARY"] = "BINARY";
22
+ ColumnTypeName["DECIMAL"] = "DECIMAL";
23
+ ColumnTypeName["INTERVAL"] = "INTERVAL";
24
+ ColumnTypeName["ARRAY"] = "ARRAY";
25
+ ColumnTypeName["STRUCT"] = "STRUCT";
26
+ ColumnTypeName["MAP"] = "MAP";
27
+ ColumnTypeName["CHAR"] = "CHAR";
28
+ ColumnTypeName["NULL"] = "NULL";
29
+ ColumnTypeName["USER_DEFINED_TYPE"] = "USER_DEFINED_TYPE";
30
+ ColumnTypeName["TIMESTAMP_NTZ"] = "TIMESTAMP_NTZ";
31
+ ColumnTypeName["VARIANT"] = "VARIANT";
32
+ ColumnTypeName["TABLE_TYPE"] = "TABLE_TYPE";
33
+ })(ColumnTypeName || (ColumnTypeName = {}));
34
+ /** The delta sharing authentication type. */
35
+ export var DeltaSharingAuthenticationType;
36
+ (function (DeltaSharingAuthenticationType) {
37
+ /** Token-based authentication. */
38
+ DeltaSharingAuthenticationType["TOKEN"] = "TOKEN";
39
+ /** Databricks-managed authentication. */
40
+ DeltaSharingAuthenticationType["DATABRICKS"] = "DATABRICKS";
41
+ /** OIDC Federation authentication */
42
+ DeltaSharingAuthenticationType["OIDC_FEDERATION"] = "OIDC_FEDERATION";
43
+ /** OAuth Client Credentials Grant based authentication. This option is for provider imports only. */
44
+ DeltaSharingAuthenticationType["OAUTH_CLIENT_CREDENTIALS"] = "OAUTH_CLIENT_CREDENTIALS";
45
+ })(DeltaSharingAuthenticationType || (DeltaSharingAuthenticationType = {}));
46
+ export var FunctionParameterMode;
47
+ (function (FunctionParameterMode) {
48
+ FunctionParameterMode["FUNCTION_PARAMETER_MODE_UNSPECIFIED"] = "FUNCTION_PARAMETER_MODE_UNSPECIFIED";
49
+ FunctionParameterMode["IN"] = "IN";
50
+ FunctionParameterMode["OUT"] = "OUT";
51
+ FunctionParameterMode["INOUT"] = "INOUT";
52
+ })(FunctionParameterMode || (FunctionParameterMode = {}));
53
+ export var FunctionParameterType;
54
+ (function (FunctionParameterType) {
55
+ FunctionParameterType["FUNCTION_PARAMETER_TYPE_UNSPECIFIED"] = "FUNCTION_PARAMETER_TYPE_UNSPECIFIED";
56
+ FunctionParameterType["PARAM"] = "PARAM";
57
+ FunctionParameterType["COLUMN"] = "COLUMN";
58
+ })(FunctionParameterType || (FunctionParameterType = {}));
59
+ /** The SecurableKind of a delta-shared object. */
60
+ export var SharedSecurableKind;
61
+ (function (SharedSecurableKind) {
62
+ SharedSecurableKind["SHARED_SECURABLE_KIND_UNSPECIFIED"] = "SHARED_SECURABLE_KIND_UNSPECIFIED";
63
+ SharedSecurableKind["FUNCTION_STANDARD"] = "FUNCTION_STANDARD";
64
+ SharedSecurableKind["FUNCTION_REGISTERED_MODEL"] = "FUNCTION_REGISTERED_MODEL";
65
+ SharedSecurableKind["FUNCTION_FEATURE_SPEC"] = "FUNCTION_FEATURE_SPEC";
66
+ })(SharedSecurableKind || (SharedSecurableKind = {}));
67
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
68
+ export var PartitionSpecification_Partition_PartitionValue_PartitionValueOp;
69
+ (function (PartitionSpecification_Partition_PartitionValue_PartitionValueOp) {
70
+ PartitionSpecification_Partition_PartitionValue_PartitionValueOp["EQUAL"] = "EQUAL";
71
+ PartitionSpecification_Partition_PartitionValue_PartitionValueOp["LIKE"] = "LIKE";
72
+ })(PartitionSpecification_Partition_PartitionValue_PartitionValueOp || (PartitionSpecification_Partition_PartitionValue_PartitionValueOp = {}));
73
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
74
+ export var SharedDataObject_HistoryDataSharingStatus_Enum;
75
+ (function (SharedDataObject_HistoryDataSharingStatus_Enum) {
76
+ SharedDataObject_HistoryDataSharingStatus_Enum["DISABLED"] = "DISABLED";
77
+ SharedDataObject_HistoryDataSharingStatus_Enum["ENABLED"] = "ENABLED";
78
+ })(SharedDataObject_HistoryDataSharingStatus_Enum || (SharedDataObject_HistoryDataSharingStatus_Enum = {}));
79
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
80
+ export var SharedDataObject_Status_Enum;
81
+ (function (SharedDataObject_Status_Enum) {
82
+ /** Object is being shared with recipients without any issues. */
83
+ SharedDataObject_Status_Enum["ACTIVE"] = "ACTIVE";
84
+ /**
85
+ * For securables, the share owner has lost access to the securable,
86
+ * so the securable is not being shared with the recipient.
87
+ */
88
+ SharedDataObject_Status_Enum["PERMISSION_DENIED"] = "PERMISSION_DENIED";
89
+ })(SharedDataObject_Status_Enum || (SharedDataObject_Status_Enum = {}));
90
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
91
+ export var UpdateShareRequest_SharedDataObjectUpdate_Action;
92
+ (function (UpdateShareRequest_SharedDataObjectUpdate_Action) {
93
+ UpdateShareRequest_SharedDataObjectUpdate_Action["ADD"] = "ADD";
94
+ UpdateShareRequest_SharedDataObjectUpdate_Action["REMOVE"] = "REMOVE";
95
+ UpdateShareRequest_SharedDataObjectUpdate_Action["UPDATE"] = "UPDATE";
96
+ })(UpdateShareRequest_SharedDataObjectUpdate_Action || (UpdateShareRequest_SharedDataObjectUpdate_Action = {}));
97
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
98
+ export const unmarshalDeleteProviderRequest_ResponseSchema = z.object({});
99
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
100
+ export const unmarshalDeleteRecipientRequest_ResponseSchema = z.object({});
101
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
102
+ export const unmarshalDeleteShareRequest_ResponseSchema = z.object({});
103
+ export const unmarshalDependencySchema = z
104
+ .object({
105
+ table: z.lazy(() => unmarshalTableDependencySchema).optional(),
106
+ function: z.lazy(() => unmarshalFunctionDependencySchema).optional(),
107
+ })
108
+ .transform(d => ({
109
+ value: d.table !== undefined
110
+ ? { $case: 'table', table: d.table }
111
+ : d.function !== undefined
112
+ ? { $case: 'function', function: d.function }
113
+ : undefined,
114
+ }));
115
+ export const unmarshalDependencyListSchema = z
116
+ .object({
117
+ dependencies: z.array(z.lazy(() => unmarshalDependencySchema)).optional(),
118
+ })
119
+ .transform(d => ({
120
+ dependencies: d.dependencies,
121
+ }));
122
+ export const unmarshalFederationPolicySchema = z
123
+ .object({
124
+ name: z.string().optional(),
125
+ oidc_policy: z.lazy(() => unmarshalOidcFederationPolicySchema).optional(),
126
+ create_time: z
127
+ .string()
128
+ .transform(s => Temporal.Instant.from(s))
129
+ .optional(),
130
+ comment: z.string().optional(),
131
+ update_time: z
132
+ .string()
133
+ .transform(s => Temporal.Instant.from(s))
134
+ .optional(),
135
+ id: z.string().optional(),
136
+ })
137
+ .transform(d => ({
138
+ name: d.name,
139
+ policy: d.oidc_policy !== undefined
140
+ ? { $case: 'oidcPolicy', oidcPolicy: d.oidc_policy }
141
+ : undefined,
142
+ createTime: d.create_time,
143
+ comment: d.comment,
144
+ updateTime: d.update_time,
145
+ id: d.id,
146
+ }));
147
+ export const unmarshalFunctionSchema = z
148
+ .object({
149
+ name: z.string().optional(),
150
+ schema: z.string().optional(),
151
+ share: z.string().optional(),
152
+ share_id: z.string().optional(),
153
+ id: z.string().optional(),
154
+ storage_location: z.string().optional(),
155
+ comment: z.string().optional(),
156
+ aliases: z
157
+ .array(z.lazy(() => unmarshalRegisteredModelAliasSchema))
158
+ .optional(),
159
+ tags: z.array(z.lazy(() => unmarshalTagKeyValueSchema)).optional(),
160
+ securable_kind: z.enum(SharedSecurableKind).optional(),
161
+ full_data_type: z.string().optional(),
162
+ data_type: z.enum(ColumnTypeName).optional(),
163
+ routine_definition: z.string().optional(),
164
+ input_params: z
165
+ .lazy(() => unmarshalFunctionParameterInfosSchema)
166
+ .optional(),
167
+ dependency_list: z.lazy(() => unmarshalDependencyListSchema).optional(),
168
+ properties: z.string().optional(),
169
+ })
170
+ .transform(d => ({
171
+ name: d.name,
172
+ schema: d.schema,
173
+ share: d.share,
174
+ shareId: d.share_id,
175
+ id: d.id,
176
+ storageLocation: d.storage_location,
177
+ comment: d.comment,
178
+ aliases: d.aliases,
179
+ tags: d.tags,
180
+ securableKind: d.securable_kind,
181
+ fullDataType: d.full_data_type,
182
+ dataType: d.data_type,
183
+ routineDefinition: d.routine_definition,
184
+ inputParams: d.input_params,
185
+ dependencyList: d.dependency_list,
186
+ properties: d.properties,
187
+ }));
188
+ export const unmarshalFunctionDependencySchema = z
189
+ .object({
190
+ schema_name: z.string().optional(),
191
+ function_name: z.string().optional(),
192
+ })
193
+ .transform(d => ({
194
+ schemaName: d.schema_name,
195
+ functionName: d.function_name,
196
+ }));
197
+ export const unmarshalFunctionParameterInfoSchema = z
198
+ .object({
199
+ name: z.string().optional(),
200
+ type_text: z.string().optional(),
201
+ type_json: z.string().optional(),
202
+ type_name: z.enum(ColumnTypeName).optional(),
203
+ type_precision: z.number().optional(),
204
+ type_scale: z.number().optional(),
205
+ type_interval_type: z.string().optional(),
206
+ position: z.number().optional(),
207
+ parameter_mode: z.enum(FunctionParameterMode).optional(),
208
+ parameter_type: z.enum(FunctionParameterType).optional(),
209
+ parameter_default: z.string().optional(),
210
+ comment: z.string().optional(),
211
+ })
212
+ .transform(d => ({
213
+ name: d.name,
214
+ typeText: d.type_text,
215
+ typeJson: d.type_json,
216
+ typeName: d.type_name,
217
+ typePrecision: d.type_precision,
218
+ typeScale: d.type_scale,
219
+ typeIntervalType: d.type_interval_type,
220
+ position: d.position,
221
+ parameterMode: d.parameter_mode,
222
+ parameterType: d.parameter_type,
223
+ parameterDefault: d.parameter_default,
224
+ comment: d.comment,
225
+ }));
226
+ export const unmarshalFunctionParameterInfosSchema = z
227
+ .object({
228
+ parameters: z
229
+ .array(z.lazy(() => unmarshalFunctionParameterInfoSchema))
230
+ .optional(),
231
+ })
232
+ .transform(d => ({
233
+ parameters: d.parameters,
234
+ }));
235
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
236
+ export const unmarshalGetActivationUrlInfoRequest_ResponseSchema = z.object({});
237
+ export const unmarshalIpAccessListSchema = z
238
+ .object({
239
+ allowed_ip_addresses: z.array(z.string()).optional(),
240
+ })
241
+ .transform(d => ({
242
+ allowedIpAddresses: d.allowed_ip_addresses,
243
+ }));
244
+ export const unmarshalListFederationPoliciesResponseSchema = z
245
+ .object({
246
+ policies: z
247
+ .array(z.lazy(() => unmarshalFederationPolicySchema))
248
+ .optional(),
249
+ next_page_token: z.string().optional(),
250
+ })
251
+ .transform(d => ({
252
+ policies: d.policies,
253
+ nextPageToken: d.next_page_token,
254
+ }));
255
+ export const unmarshalListProviderShareAssetsResponseSchema = z
256
+ .object({
257
+ tables: z.array(z.lazy(() => unmarshalTableSchema)).optional(),
258
+ functions: z.array(z.lazy(() => unmarshalFunctionSchema)).optional(),
259
+ notebooks: z.array(z.lazy(() => unmarshalNotebookFileSchema)).optional(),
260
+ volumes: z.array(z.lazy(() => unmarshalVolumeSchema)).optional(),
261
+ share: z.lazy(() => unmarshalShareSchema).optional(),
262
+ })
263
+ .transform(d => ({
264
+ tables: d.tables,
265
+ functions: d.functions,
266
+ notebooks: d.notebooks,
267
+ volumes: d.volumes,
268
+ share: d.share,
269
+ }));
270
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
271
+ export const unmarshalListProviderSharesRequest_ResponseSchema = z
272
+ .object({
273
+ shares: z.array(z.lazy(() => unmarshalProviderShareSchema)).optional(),
274
+ next_page_token: z.string().optional(),
275
+ })
276
+ .transform(d => ({
277
+ shares: d.shares,
278
+ nextPageToken: d.next_page_token,
279
+ }));
280
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
281
+ export const unmarshalListProvidersRequest_ResponseSchema = z
282
+ .object({
283
+ providers: z.array(z.lazy(() => unmarshalProviderInfoSchema)).optional(),
284
+ next_page_token: z.string().optional(),
285
+ })
286
+ .transform(d => ({
287
+ providers: d.providers,
288
+ nextPageToken: d.next_page_token,
289
+ }));
290
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
291
+ export const unmarshalListRecipientSharePermissionsRequest_ResponseSchema = z
292
+ .object({
293
+ permissions_out: z
294
+ .array(z.lazy(() => unmarshalShareToPrivilegeAssignmentSchema))
295
+ .optional(),
296
+ next_page_token: z.string().optional(),
297
+ })
298
+ .transform(d => ({
299
+ permissionsOut: d.permissions_out,
300
+ nextPageToken: d.next_page_token,
301
+ }));
302
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
303
+ export const unmarshalListRecipientsRequest_ResponseSchema = z
304
+ .object({
305
+ recipients: z
306
+ .array(z.lazy(() => unmarshalRecipientInfoSchema))
307
+ .optional(),
308
+ next_page_token: z.string().optional(),
309
+ })
310
+ .transform(d => ({
311
+ recipients: d.recipients,
312
+ nextPageToken: d.next_page_token,
313
+ }));
314
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
315
+ export const unmarshalListSharePermissionsRequest_ResponseSchema = z
316
+ .object({
317
+ next_page_token: z.string().optional(),
318
+ privilege_assignments: z
319
+ .array(z.lazy(() => unmarshalPrivilegeAssignmentSchema))
320
+ .optional(),
321
+ })
322
+ .transform(d => ({
323
+ nextPageToken: d.next_page_token,
324
+ privilegeAssignments: d.privilege_assignments,
325
+ }));
326
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
327
+ export const unmarshalListSharesRequest_ResponseSchema = z
328
+ .object({
329
+ shares: z.array(z.lazy(() => unmarshalShareInfoSchema)).optional(),
330
+ next_page_token: z.string().optional(),
331
+ })
332
+ .transform(d => ({
333
+ shares: d.shares,
334
+ nextPageToken: d.next_page_token,
335
+ }));
336
+ export const unmarshalNotebookFileSchema = z
337
+ .object({
338
+ name: z.string().optional(),
339
+ share: z.string().optional(),
340
+ share_id: z.string().optional(),
341
+ id: z.string().optional(),
342
+ comment: z.string().optional(),
343
+ tags: z.array(z.lazy(() => unmarshalTagKeyValueSchema)).optional(),
344
+ })
345
+ .transform(d => ({
346
+ name: d.name,
347
+ share: d.share,
348
+ shareId: d.share_id,
349
+ id: d.id,
350
+ comment: d.comment,
351
+ tags: d.tags,
352
+ }));
353
+ export const unmarshalOidcFederationPolicySchema = z
354
+ .object({
355
+ issuer: z.string().optional(),
356
+ subject_claim: z.string().optional(),
357
+ subject: z.string().optional(),
358
+ audiences: z.array(z.string()).optional(),
359
+ })
360
+ .transform(d => ({
361
+ issuer: d.issuer,
362
+ subjectClaim: d.subject_claim,
363
+ subject: d.subject,
364
+ audiences: d.audiences,
365
+ }));
366
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
367
+ export const unmarshalPartitionSpecification_PartitionSchema = z
368
+ .object({
369
+ values: z
370
+ .array(z.lazy(() => unmarshalPartitionSpecification_Partition_PartitionValueSchema))
371
+ .optional(),
372
+ })
373
+ .transform(d => ({
374
+ values: d.values,
375
+ }));
376
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
377
+ export const unmarshalPartitionSpecification_Partition_PartitionValueSchema = z
378
+ .object({
379
+ name: z.string().optional(),
380
+ value: z.string().optional(),
381
+ recipient_property_key: z.string().optional(),
382
+ op: z
383
+ .enum(PartitionSpecification_Partition_PartitionValue_PartitionValueOp)
384
+ .optional(),
385
+ })
386
+ .transform(d => ({
387
+ name: d.name,
388
+ value: d.value,
389
+ recipientPropertyKey: d.recipient_property_key,
390
+ op: d.op,
391
+ }));
392
+ export const unmarshalPrivilegeAssignmentSchema = z
393
+ .object({
394
+ principal: z.string().optional(),
395
+ privileges: z.array(z.string()).optional(),
396
+ })
397
+ .transform(d => ({
398
+ principal: d.principal,
399
+ privileges: d.privileges,
400
+ }));
401
+ export const unmarshalPropertiesKvPairsSchema = z
402
+ .object({
403
+ properties: z.record(z.string(), z.string()).optional(),
404
+ })
405
+ .transform(d => ({
406
+ properties: d.properties,
407
+ }));
408
+ export const unmarshalProviderInfoSchema = z
409
+ .object({
410
+ name: z.string().optional(),
411
+ authentication_type: z.enum(DeltaSharingAuthenticationType).optional(),
412
+ recipient_profile_str: z.string().optional(),
413
+ comment: z.string().optional(),
414
+ owner: z.string().optional(),
415
+ recipient_profile: z.lazy(() => unmarshalRecipientProfileSchema).optional(),
416
+ created_at: z
417
+ .union([z.number(), z.bigint()])
418
+ .transform(v => BigInt(v))
419
+ .optional(),
420
+ created_by: z.string().optional(),
421
+ updated_at: z
422
+ .union([z.number(), z.bigint()])
423
+ .transform(v => BigInt(v))
424
+ .optional(),
425
+ updated_by: z.string().optional(),
426
+ cloud: z.string().optional(),
427
+ region: z.string().optional(),
428
+ metastore_id: z.string().optional(),
429
+ data_provider_global_metastore_id: z.string().optional(),
430
+ })
431
+ .transform(d => ({
432
+ name: d.name,
433
+ authenticationType: d.authentication_type,
434
+ recipientProfileStr: d.recipient_profile_str,
435
+ comment: d.comment,
436
+ owner: d.owner,
437
+ recipientProfile: d.recipient_profile,
438
+ createdAt: d.created_at,
439
+ createdBy: d.created_by,
440
+ updatedAt: d.updated_at,
441
+ updatedBy: d.updated_by,
442
+ cloud: d.cloud,
443
+ region: d.region,
444
+ metastoreId: d.metastore_id,
445
+ dataProviderGlobalMetastoreId: d.data_provider_global_metastore_id,
446
+ }));
447
+ export const unmarshalProviderShareSchema = z
448
+ .object({
449
+ name: z.string().optional(),
450
+ })
451
+ .transform(d => ({
452
+ name: d.name,
453
+ }));
454
+ export const unmarshalRecipientInfoSchema = z
455
+ .object({
456
+ name: z.string().optional(),
457
+ authentication_type: z.enum(DeltaSharingAuthenticationType).optional(),
458
+ sharing_code: z.string().optional(),
459
+ data_recipient_global_metastore_id: z.string().optional(),
460
+ owner: z.string().optional(),
461
+ comment: z.string().optional(),
462
+ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional(),
463
+ properties_kvpairs: z
464
+ .lazy(() => unmarshalPropertiesKvPairsSchema)
465
+ .optional(),
466
+ expiration_time: z
467
+ .union([z.number(), z.bigint()])
468
+ .transform(v => BigInt(v))
469
+ .optional(),
470
+ activation_url: z.string().optional(),
471
+ activated: z.boolean().optional(),
472
+ created_at: z
473
+ .union([z.number(), z.bigint()])
474
+ .transform(v => BigInt(v))
475
+ .optional(),
476
+ created_by: z.string().optional(),
477
+ tokens: z.array(z.lazy(() => unmarshalRecipientTokenInfoSchema)).optional(),
478
+ updated_at: z
479
+ .union([z.number(), z.bigint()])
480
+ .transform(v => BigInt(v))
481
+ .optional(),
482
+ updated_by: z.string().optional(),
483
+ cloud: z.string().optional(),
484
+ region: z.string().optional(),
485
+ metastore_id: z.string().optional(),
486
+ id: z.string().optional(),
487
+ })
488
+ .transform(d => ({
489
+ name: d.name,
490
+ authenticationType: d.authentication_type,
491
+ sharingCode: d.sharing_code,
492
+ dataRecipientGlobalMetastoreId: d.data_recipient_global_metastore_id,
493
+ owner: d.owner,
494
+ comment: d.comment,
495
+ ipAccessList: d.ip_access_list,
496
+ propertiesKvpairs: d.properties_kvpairs,
497
+ expirationTime: d.expiration_time,
498
+ activationUrl: d.activation_url,
499
+ activated: d.activated,
500
+ createdAt: d.created_at,
501
+ createdBy: d.created_by,
502
+ tokens: d.tokens,
503
+ updatedAt: d.updated_at,
504
+ updatedBy: d.updated_by,
505
+ cloud: d.cloud,
506
+ region: d.region,
507
+ metastoreId: d.metastore_id,
508
+ id: d.id,
509
+ }));
510
+ export const unmarshalRecipientProfileSchema = z
511
+ .object({
512
+ share_credentials_version: z.number().optional(),
513
+ endpoint: z.string().optional(),
514
+ bearer_token: z.string().optional(),
515
+ })
516
+ .transform(d => ({
517
+ shareCredentialsVersion: d.share_credentials_version,
518
+ endpoint: d.endpoint,
519
+ bearerToken: d.bearer_token,
520
+ }));
521
+ export const unmarshalRecipientTokenInfoSchema = z
522
+ .object({
523
+ id: z.string().optional(),
524
+ created_at: z
525
+ .union([z.number(), z.bigint()])
526
+ .transform(v => BigInt(v))
527
+ .optional(),
528
+ created_by: z.string().optional(),
529
+ activation_url: z.string().optional(),
530
+ expiration_time: z
531
+ .union([z.number(), z.bigint()])
532
+ .transform(v => BigInt(v))
533
+ .optional(),
534
+ updated_at: z
535
+ .union([z.number(), z.bigint()])
536
+ .transform(v => BigInt(v))
537
+ .optional(),
538
+ updated_by: z.string().optional(),
539
+ })
540
+ .transform(d => ({
541
+ id: d.id,
542
+ createdAt: d.created_at,
543
+ createdBy: d.created_by,
544
+ activationUrl: d.activation_url,
545
+ expirationTime: d.expiration_time,
546
+ updatedAt: d.updated_at,
547
+ updatedBy: d.updated_by,
548
+ }));
549
+ export const unmarshalRegisteredModelAliasSchema = z
550
+ .object({
551
+ alias_name: z.string().optional(),
552
+ version_num: z
553
+ .union([z.number(), z.bigint()])
554
+ .transform(v => BigInt(v))
555
+ .optional(),
556
+ })
557
+ .transform(d => ({
558
+ aliasName: d.alias_name,
559
+ versionNum: d.version_num,
560
+ }));
561
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
562
+ export const unmarshalRetrieveToken_ResponseSchema = z
563
+ .object({
564
+ shareCredentialsVersion: z.number().optional(),
565
+ bearerToken: z.string().optional(),
566
+ endpoint: z.string().optional(),
567
+ expirationTime: z.string().optional(),
568
+ })
569
+ .transform(d => ({
570
+ shareCredentialsVersion: d.shareCredentialsVersion,
571
+ bearerToken: d.bearerToken,
572
+ endpoint: d.endpoint,
573
+ expirationTime: d.expirationTime,
574
+ }));
575
+ export const unmarshalShareSchema = z
576
+ .object({
577
+ name: z.string().optional(),
578
+ id: z.string().optional(),
579
+ })
580
+ .transform(d => ({
581
+ name: d.name,
582
+ id: d.id,
583
+ }));
584
+ export const unmarshalShareInfoSchema = z
585
+ .object({
586
+ name: z.string().optional(),
587
+ owner: z.string().optional(),
588
+ comment: z.string().optional(),
589
+ storage_root: z.string().optional(),
590
+ objects: z.array(z.lazy(() => unmarshalSharedDataObjectSchema)).optional(),
591
+ created_at: z
592
+ .union([z.number(), z.bigint()])
593
+ .transform(v => BigInt(v))
594
+ .optional(),
595
+ created_by: z.string().optional(),
596
+ updated_at: z
597
+ .union([z.number(), z.bigint()])
598
+ .transform(v => BigInt(v))
599
+ .optional(),
600
+ updated_by: z.string().optional(),
601
+ storage_location: z.string().optional(),
602
+ })
603
+ .transform(d => ({
604
+ name: d.name,
605
+ owner: d.owner,
606
+ comment: d.comment,
607
+ storageRoot: d.storage_root,
608
+ objects: d.objects,
609
+ createdAt: d.created_at,
610
+ createdBy: d.created_by,
611
+ updatedAt: d.updated_at,
612
+ updatedBy: d.updated_by,
613
+ storageLocation: d.storage_location,
614
+ }));
615
+ export const unmarshalShareToPrivilegeAssignmentSchema = z
616
+ .object({
617
+ share_name: z.string().optional(),
618
+ privilege_assignments: z
619
+ .array(z.lazy(() => unmarshalPrivilegeAssignmentSchema))
620
+ .optional(),
621
+ })
622
+ .transform(d => ({
623
+ shareName: d.share_name,
624
+ privilegeAssignments: d.privilege_assignments,
625
+ }));
626
+ export const unmarshalSharedDataObjectSchema = z
627
+ .object({
628
+ name: z.string().optional(),
629
+ data_object_type: z.string().optional(),
630
+ added_at: z
631
+ .union([z.number(), z.bigint()])
632
+ .transform(v => BigInt(v))
633
+ .optional(),
634
+ added_by: z.string().optional(),
635
+ comment: z.string().optional(),
636
+ shared_as: z.string().optional(),
637
+ cdf_enabled: z.boolean().optional(),
638
+ history_data_sharing_status: z
639
+ .enum(SharedDataObject_HistoryDataSharingStatus_Enum)
640
+ .optional(),
641
+ start_version: z
642
+ .union([z.number(), z.bigint()])
643
+ .transform(v => BigInt(v))
644
+ .optional(),
645
+ status: z.enum(SharedDataObject_Status_Enum).optional(),
646
+ content: z.string().optional(),
647
+ string_shared_as: z.string().optional(),
648
+ partitions: z
649
+ .array(z.lazy(() => unmarshalPartitionSpecification_PartitionSchema))
650
+ .optional(),
651
+ })
652
+ .transform(d => ({
653
+ name: d.name,
654
+ dataObjectType: d.data_object_type,
655
+ addedAt: d.added_at,
656
+ addedBy: d.added_by,
657
+ comment: d.comment,
658
+ sharedAs: d.shared_as,
659
+ cdfEnabled: d.cdf_enabled,
660
+ historyDataSharingStatus: d.history_data_sharing_status,
661
+ startVersion: d.start_version,
662
+ status: d.status,
663
+ content: d.content,
664
+ stringSharedAs: d.string_shared_as,
665
+ partitions: d.partitions,
666
+ }));
667
+ export const unmarshalTableSchema = z
668
+ .object({
669
+ name: z.string().optional(),
670
+ schema: z.string().optional(),
671
+ share: z.string().optional(),
672
+ share_id: z.string().optional(),
673
+ id: z.string().optional(),
674
+ comment: z.string().optional(),
675
+ tags: z.array(z.lazy(() => unmarshalTagKeyValueSchema)).optional(),
676
+ materialized_table_name: z.string().optional(),
677
+ materialization_namespace: z.string().optional(),
678
+ })
679
+ .transform(d => ({
680
+ name: d.name,
681
+ schema: d.schema,
682
+ share: d.share,
683
+ shareId: d.share_id,
684
+ id: d.id,
685
+ comment: d.comment,
686
+ tags: d.tags,
687
+ materializedTableName: d.materialized_table_name,
688
+ materializationNamespace: d.materialization_namespace,
689
+ }));
690
+ export const unmarshalTableDependencySchema = z
691
+ .object({
692
+ schema_name: z.string().optional(),
693
+ table_name: z.string().optional(),
694
+ })
695
+ .transform(d => ({
696
+ schemaName: d.schema_name,
697
+ tableName: d.table_name,
698
+ }));
699
+ export const unmarshalTagKeyValueSchema = z
700
+ .object({
701
+ key: z.string().optional(),
702
+ value: z.string().optional(),
703
+ })
704
+ .transform(d => ({
705
+ key: d.key,
706
+ value: d.value,
707
+ }));
708
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
709
+ export const unmarshalUpdateSharePermissionsRequest_ResponseSchema = z
710
+ .object({
711
+ privilege_assignments: z
712
+ .array(z.lazy(() => unmarshalPrivilegeAssignmentSchema))
713
+ .optional(),
714
+ })
715
+ .transform(d => ({
716
+ privilegeAssignments: d.privilege_assignments,
717
+ }));
718
+ export const unmarshalVolumeSchema = z
719
+ .object({
720
+ name: z.string().optional(),
721
+ id: z.string().optional(),
722
+ schema: z.string().optional(),
723
+ share: z.string().optional(),
724
+ share_id: z.string().optional(),
725
+ comment: z.string().optional(),
726
+ tags: z.array(z.lazy(() => unmarshalTagKeyValueSchema)).optional(),
727
+ })
728
+ .transform(d => ({
729
+ name: d.name,
730
+ id: d.id,
731
+ schema: d.schema,
732
+ share: d.share,
733
+ shareId: d.share_id,
734
+ comment: d.comment,
735
+ tags: d.tags,
736
+ }));
737
+ export const marshalCreateProviderRequestSchema = z
738
+ .object({
739
+ name: z.string().optional(),
740
+ authenticationType: z.enum(DeltaSharingAuthenticationType).optional(),
741
+ recipientProfileStr: z.string().optional(),
742
+ comment: z.string().optional(),
743
+ owner: z.string().optional(),
744
+ recipientProfile: z.lazy(() => marshalRecipientProfileSchema).optional(),
745
+ createdAt: z.bigint().optional(),
746
+ createdBy: z.string().optional(),
747
+ updatedAt: z.bigint().optional(),
748
+ updatedBy: z.string().optional(),
749
+ cloud: z.string().optional(),
750
+ region: z.string().optional(),
751
+ metastoreId: z.string().optional(),
752
+ dataProviderGlobalMetastoreId: z.string().optional(),
753
+ })
754
+ .transform(d => ({
755
+ name: d.name,
756
+ authentication_type: d.authenticationType,
757
+ recipient_profile_str: d.recipientProfileStr,
758
+ comment: d.comment,
759
+ owner: d.owner,
760
+ recipient_profile: d.recipientProfile,
761
+ created_at: d.createdAt,
762
+ created_by: d.createdBy,
763
+ updated_at: d.updatedAt,
764
+ updated_by: d.updatedBy,
765
+ cloud: d.cloud,
766
+ region: d.region,
767
+ metastore_id: d.metastoreId,
768
+ data_provider_global_metastore_id: d.dataProviderGlobalMetastoreId,
769
+ }));
770
+ export const marshalCreateRecipientRequestSchema = z
771
+ .object({
772
+ name: z.string().optional(),
773
+ authenticationType: z.enum(DeltaSharingAuthenticationType).optional(),
774
+ sharingCode: z.string().optional(),
775
+ dataRecipientGlobalMetastoreId: z.string().optional(),
776
+ owner: z.string().optional(),
777
+ comment: z.string().optional(),
778
+ ipAccessList: z.lazy(() => marshalIpAccessListSchema).optional(),
779
+ propertiesKvpairs: z.lazy(() => marshalPropertiesKvPairsSchema).optional(),
780
+ expirationTime: z.bigint().optional(),
781
+ activationUrl: z.string().optional(),
782
+ activated: z.boolean().optional(),
783
+ createdAt: z.bigint().optional(),
784
+ createdBy: z.string().optional(),
785
+ tokens: z.array(z.lazy(() => marshalRecipientTokenInfoSchema)).optional(),
786
+ updatedAt: z.bigint().optional(),
787
+ updatedBy: z.string().optional(),
788
+ cloud: z.string().optional(),
789
+ region: z.string().optional(),
790
+ metastoreId: z.string().optional(),
791
+ id: z.string().optional(),
792
+ })
793
+ .transform(d => ({
794
+ name: d.name,
795
+ authentication_type: d.authenticationType,
796
+ sharing_code: d.sharingCode,
797
+ data_recipient_global_metastore_id: d.dataRecipientGlobalMetastoreId,
798
+ owner: d.owner,
799
+ comment: d.comment,
800
+ ip_access_list: d.ipAccessList,
801
+ properties_kvpairs: d.propertiesKvpairs,
802
+ expiration_time: d.expirationTime,
803
+ activation_url: d.activationUrl,
804
+ activated: d.activated,
805
+ created_at: d.createdAt,
806
+ created_by: d.createdBy,
807
+ tokens: d.tokens,
808
+ updated_at: d.updatedAt,
809
+ updated_by: d.updatedBy,
810
+ cloud: d.cloud,
811
+ region: d.region,
812
+ metastore_id: d.metastoreId,
813
+ id: d.id,
814
+ }));
815
+ export const marshalCreateShareRequestSchema = z
816
+ .object({
817
+ name: z.string().optional(),
818
+ owner: z.string().optional(),
819
+ comment: z.string().optional(),
820
+ storageRoot: z.string().optional(),
821
+ objects: z.array(z.lazy(() => marshalSharedDataObjectSchema)).optional(),
822
+ createdAt: z.bigint().optional(),
823
+ createdBy: z.string().optional(),
824
+ updatedAt: z.bigint().optional(),
825
+ updatedBy: z.string().optional(),
826
+ storageLocation: z.string().optional(),
827
+ })
828
+ .transform(d => ({
829
+ name: d.name,
830
+ owner: d.owner,
831
+ comment: d.comment,
832
+ storage_root: d.storageRoot,
833
+ objects: d.objects,
834
+ created_at: d.createdAt,
835
+ created_by: d.createdBy,
836
+ updated_at: d.updatedAt,
837
+ updated_by: d.updatedBy,
838
+ storage_location: d.storageLocation,
839
+ }));
840
+ export const marshalFederationPolicySchema = z
841
+ .object({
842
+ name: z.string().optional(),
843
+ policy: z
844
+ .discriminatedUnion('$case', [
845
+ z.object({
846
+ $case: z.literal('oidcPolicy'),
847
+ oidcPolicy: z.lazy(() => marshalOidcFederationPolicySchema),
848
+ }),
849
+ ])
850
+ .optional(),
851
+ createTime: z
852
+ .any()
853
+ .transform((d) => d.toString())
854
+ .optional(),
855
+ comment: z.string().optional(),
856
+ updateTime: z
857
+ .any()
858
+ .transform((d) => d.toString())
859
+ .optional(),
860
+ id: z.string().optional(),
861
+ })
862
+ .transform(d => ({
863
+ name: d.name,
864
+ ...(d.policy?.$case === 'oidcPolicy' && { oidc_policy: d.policy.oidcPolicy }),
865
+ create_time: d.createTime,
866
+ comment: d.comment,
867
+ update_time: d.updateTime,
868
+ id: d.id,
869
+ }));
870
+ export const marshalIpAccessListSchema = z
871
+ .object({
872
+ allowedIpAddresses: z.array(z.string()).optional(),
873
+ })
874
+ .transform(d => ({
875
+ allowed_ip_addresses: d.allowedIpAddresses,
876
+ }));
877
+ export const marshalOidcFederationPolicySchema = z
878
+ .object({
879
+ issuer: z.string().optional(),
880
+ subjectClaim: z.string().optional(),
881
+ subject: z.string().optional(),
882
+ audiences: z.array(z.string()).optional(),
883
+ })
884
+ .transform(d => ({
885
+ issuer: d.issuer,
886
+ subject_claim: d.subjectClaim,
887
+ subject: d.subject,
888
+ audiences: d.audiences,
889
+ }));
890
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
891
+ export const marshalPartitionSpecification_PartitionSchema = z
892
+ .object({
893
+ values: z
894
+ .array(z.lazy(() => marshalPartitionSpecification_Partition_PartitionValueSchema))
895
+ .optional(),
896
+ })
897
+ .transform(d => ({
898
+ values: d.values,
899
+ }));
900
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
901
+ export const marshalPartitionSpecification_Partition_PartitionValueSchema = z
902
+ .object({
903
+ name: z.string().optional(),
904
+ value: z.string().optional(),
905
+ recipientPropertyKey: z.string().optional(),
906
+ op: z
907
+ .enum(PartitionSpecification_Partition_PartitionValue_PartitionValueOp)
908
+ .optional(),
909
+ })
910
+ .transform(d => ({
911
+ name: d.name,
912
+ value: d.value,
913
+ recipient_property_key: d.recipientPropertyKey,
914
+ op: d.op,
915
+ }));
916
+ export const marshalPermissionsChangeSchema = z
917
+ .object({
918
+ principal: z.string().optional(),
919
+ add: z.array(z.string()).optional(),
920
+ remove: z.array(z.string()).optional(),
921
+ })
922
+ .transform(d => ({
923
+ principal: d.principal,
924
+ add: d.add,
925
+ remove: d.remove,
926
+ }));
927
+ export const marshalPropertiesKvPairsSchema = z
928
+ .object({
929
+ properties: z.record(z.string(), z.string()).optional(),
930
+ })
931
+ .transform(d => ({
932
+ properties: d.properties,
933
+ }));
934
+ export const marshalRecipientProfileSchema = z
935
+ .object({
936
+ shareCredentialsVersion: z.number().optional(),
937
+ endpoint: z.string().optional(),
938
+ bearerToken: z.string().optional(),
939
+ })
940
+ .transform(d => ({
941
+ share_credentials_version: d.shareCredentialsVersion,
942
+ endpoint: d.endpoint,
943
+ bearer_token: d.bearerToken,
944
+ }));
945
+ export const marshalRecipientTokenInfoSchema = z
946
+ .object({
947
+ id: z.string().optional(),
948
+ createdAt: z.bigint().optional(),
949
+ createdBy: z.string().optional(),
950
+ activationUrl: z.string().optional(),
951
+ expirationTime: z.bigint().optional(),
952
+ updatedAt: z.bigint().optional(),
953
+ updatedBy: z.string().optional(),
954
+ })
955
+ .transform(d => ({
956
+ id: d.id,
957
+ created_at: d.createdAt,
958
+ created_by: d.createdBy,
959
+ activation_url: d.activationUrl,
960
+ expiration_time: d.expirationTime,
961
+ updated_at: d.updatedAt,
962
+ updated_by: d.updatedBy,
963
+ }));
964
+ export const marshalRotateRecipientTokenRequestSchema = z
965
+ .object({
966
+ name: z.string().optional(),
967
+ existingTokenExpireInSeconds: z.bigint().optional(),
968
+ })
969
+ .transform(d => ({
970
+ name: d.name,
971
+ existing_token_expire_in_seconds: d.existingTokenExpireInSeconds,
972
+ }));
973
+ export const marshalSharedDataObjectSchema = z
974
+ .object({
975
+ name: z.string().optional(),
976
+ dataObjectType: z.string().optional(),
977
+ addedAt: z.bigint().optional(),
978
+ addedBy: z.string().optional(),
979
+ comment: z.string().optional(),
980
+ sharedAs: z.string().optional(),
981
+ cdfEnabled: z.boolean().optional(),
982
+ historyDataSharingStatus: z
983
+ .enum(SharedDataObject_HistoryDataSharingStatus_Enum)
984
+ .optional(),
985
+ startVersion: z.bigint().optional(),
986
+ status: z.enum(SharedDataObject_Status_Enum).optional(),
987
+ content: z.string().optional(),
988
+ stringSharedAs: z.string().optional(),
989
+ partitions: z
990
+ .array(z.lazy(() => marshalPartitionSpecification_PartitionSchema))
991
+ .optional(),
992
+ })
993
+ .transform(d => ({
994
+ name: d.name,
995
+ data_object_type: d.dataObjectType,
996
+ added_at: d.addedAt,
997
+ added_by: d.addedBy,
998
+ comment: d.comment,
999
+ shared_as: d.sharedAs,
1000
+ cdf_enabled: d.cdfEnabled,
1001
+ history_data_sharing_status: d.historyDataSharingStatus,
1002
+ start_version: d.startVersion,
1003
+ status: d.status,
1004
+ content: d.content,
1005
+ string_shared_as: d.stringSharedAs,
1006
+ partitions: d.partitions,
1007
+ }));
1008
+ export const marshalUpdateProviderRequestSchema = z
1009
+ .object({
1010
+ nameArg: z.string().optional(),
1011
+ newName: z.string().optional(),
1012
+ name: z.string().optional(),
1013
+ authenticationType: z.enum(DeltaSharingAuthenticationType).optional(),
1014
+ recipientProfileStr: z.string().optional(),
1015
+ comment: z.string().optional(),
1016
+ owner: z.string().optional(),
1017
+ recipientProfile: z.lazy(() => marshalRecipientProfileSchema).optional(),
1018
+ createdAt: z.bigint().optional(),
1019
+ createdBy: z.string().optional(),
1020
+ updatedAt: z.bigint().optional(),
1021
+ updatedBy: z.string().optional(),
1022
+ cloud: z.string().optional(),
1023
+ region: z.string().optional(),
1024
+ metastoreId: z.string().optional(),
1025
+ dataProviderGlobalMetastoreId: z.string().optional(),
1026
+ })
1027
+ .transform(d => ({
1028
+ name_arg: d.nameArg,
1029
+ new_name: d.newName,
1030
+ name: d.name,
1031
+ authentication_type: d.authenticationType,
1032
+ recipient_profile_str: d.recipientProfileStr,
1033
+ comment: d.comment,
1034
+ owner: d.owner,
1035
+ recipient_profile: d.recipientProfile,
1036
+ created_at: d.createdAt,
1037
+ created_by: d.createdBy,
1038
+ updated_at: d.updatedAt,
1039
+ updated_by: d.updatedBy,
1040
+ cloud: d.cloud,
1041
+ region: d.region,
1042
+ metastore_id: d.metastoreId,
1043
+ data_provider_global_metastore_id: d.dataProviderGlobalMetastoreId,
1044
+ }));
1045
+ export const marshalUpdateRecipientRequestSchema = z
1046
+ .object({
1047
+ nameArg: z.string().optional(),
1048
+ newName: z.string().optional(),
1049
+ name: z.string().optional(),
1050
+ authenticationType: z.enum(DeltaSharingAuthenticationType).optional(),
1051
+ sharingCode: z.string().optional(),
1052
+ dataRecipientGlobalMetastoreId: z.string().optional(),
1053
+ owner: z.string().optional(),
1054
+ comment: z.string().optional(),
1055
+ ipAccessList: z.lazy(() => marshalIpAccessListSchema).optional(),
1056
+ propertiesKvpairs: z.lazy(() => marshalPropertiesKvPairsSchema).optional(),
1057
+ expirationTime: z.bigint().optional(),
1058
+ activationUrl: z.string().optional(),
1059
+ activated: z.boolean().optional(),
1060
+ createdAt: z.bigint().optional(),
1061
+ createdBy: z.string().optional(),
1062
+ tokens: z.array(z.lazy(() => marshalRecipientTokenInfoSchema)).optional(),
1063
+ updatedAt: z.bigint().optional(),
1064
+ updatedBy: z.string().optional(),
1065
+ cloud: z.string().optional(),
1066
+ region: z.string().optional(),
1067
+ metastoreId: z.string().optional(),
1068
+ id: z.string().optional(),
1069
+ })
1070
+ .transform(d => ({
1071
+ name_arg: d.nameArg,
1072
+ new_name: d.newName,
1073
+ name: d.name,
1074
+ authentication_type: d.authenticationType,
1075
+ sharing_code: d.sharingCode,
1076
+ data_recipient_global_metastore_id: d.dataRecipientGlobalMetastoreId,
1077
+ owner: d.owner,
1078
+ comment: d.comment,
1079
+ ip_access_list: d.ipAccessList,
1080
+ properties_kvpairs: d.propertiesKvpairs,
1081
+ expiration_time: d.expirationTime,
1082
+ activation_url: d.activationUrl,
1083
+ activated: d.activated,
1084
+ created_at: d.createdAt,
1085
+ created_by: d.createdBy,
1086
+ tokens: d.tokens,
1087
+ updated_at: d.updatedAt,
1088
+ updated_by: d.updatedBy,
1089
+ cloud: d.cloud,
1090
+ region: d.region,
1091
+ metastore_id: d.metastoreId,
1092
+ id: d.id,
1093
+ }));
1094
+ export const marshalUpdateSharePermissionsRequestSchema = z
1095
+ .object({
1096
+ name: z.string().optional(),
1097
+ omitPermissionsList: z.boolean().optional(),
1098
+ changes: z.array(z.lazy(() => marshalPermissionsChangeSchema)).optional(),
1099
+ })
1100
+ .transform(d => ({
1101
+ name: d.name,
1102
+ omit_permissions_list: d.omitPermissionsList,
1103
+ changes: d.changes,
1104
+ }));
1105
+ export const marshalUpdateShareRequestSchema = z
1106
+ .object({
1107
+ nameArg: z.string().optional(),
1108
+ newName: z.string().optional(),
1109
+ updates: z
1110
+ .array(z.lazy(() => marshalUpdateShareRequest_SharedDataObjectUpdateSchema))
1111
+ .optional(),
1112
+ name: z.string().optional(),
1113
+ owner: z.string().optional(),
1114
+ comment: z.string().optional(),
1115
+ storageRoot: z.string().optional(),
1116
+ objects: z.array(z.lazy(() => marshalSharedDataObjectSchema)).optional(),
1117
+ createdAt: z.bigint().optional(),
1118
+ createdBy: z.string().optional(),
1119
+ updatedAt: z.bigint().optional(),
1120
+ updatedBy: z.string().optional(),
1121
+ storageLocation: z.string().optional(),
1122
+ })
1123
+ .transform(d => ({
1124
+ name_arg: d.nameArg,
1125
+ new_name: d.newName,
1126
+ updates: d.updates,
1127
+ name: d.name,
1128
+ owner: d.owner,
1129
+ comment: d.comment,
1130
+ storage_root: d.storageRoot,
1131
+ objects: d.objects,
1132
+ created_at: d.createdAt,
1133
+ created_by: d.createdBy,
1134
+ updated_at: d.updatedAt,
1135
+ updated_by: d.updatedBy,
1136
+ storage_location: d.storageLocation,
1137
+ }));
1138
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1139
+ export const marshalUpdateShareRequest_SharedDataObjectUpdateSchema = z
1140
+ .object({
1141
+ action: z
1142
+ .enum(UpdateShareRequest_SharedDataObjectUpdate_Action)
1143
+ .optional(),
1144
+ dataObject: z.lazy(() => marshalSharedDataObjectSchema).optional(),
1145
+ })
1146
+ .transform(d => ({
1147
+ action: d.action,
1148
+ data_object: d.dataObject,
1149
+ }));
1150
+ //# sourceMappingURL=model.js.map