@databricks/sdk-scim 0.0.0-dev → 0.1.0-dev.1

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,907 @@
1
+ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
+ import { z } from 'zod';
3
+ const jsonValueSchema = z.lazy(() => z.union([
4
+ z.null(),
5
+ z.number(),
6
+ z.string(),
7
+ z.boolean(),
8
+ z.record(z.string(), jsonValueSchema),
9
+ z.array(jsonValueSchema),
10
+ ]));
11
+ export var GetSortOrder;
12
+ (function (GetSortOrder) {
13
+ GetSortOrder["GET_SORT_ORDER_UNSPECIFIED"] = "GET_SORT_ORDER_UNSPECIFIED";
14
+ GetSortOrder["ASCENDING"] = "ASCENDING";
15
+ GetSortOrder["DESCENDING"] = "DESCENDING";
16
+ })(GetSortOrder || (GetSortOrder = {}));
17
+ export var GroupSchema;
18
+ (function (GroupSchema) {
19
+ GroupSchema["GROUP_SCHEMA_UNSPECIFIED"] = "GROUP_SCHEMA_UNSPECIFIED";
20
+ GroupSchema["URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP"] = "URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP";
21
+ })(GroupSchema || (GroupSchema = {}));
22
+ export var ListResponseSchema;
23
+ (function (ListResponseSchema) {
24
+ ListResponseSchema["LIST_RESPONSE_SCHEMA_UNSPECIFIED"] = "LIST_RESPONSE_SCHEMA_UNSPECIFIED";
25
+ ListResponseSchema["URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_LIST_RESPONSE"] = "URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_LIST_RESPONSE";
26
+ })(ListResponseSchema || (ListResponseSchema = {}));
27
+ /** Type of patch operation. */
28
+ export var PatchOp;
29
+ (function (PatchOp) {
30
+ PatchOp["PATCH_OP_UNSPECIFIED"] = "PATCH_OP_UNSPECIFIED";
31
+ PatchOp["ADD"] = "ADD";
32
+ PatchOp["REMOVE"] = "REMOVE";
33
+ PatchOp["REPLACE"] = "REPLACE";
34
+ })(PatchOp || (PatchOp = {}));
35
+ export var PatchSchema;
36
+ (function (PatchSchema) {
37
+ PatchSchema["PATCH_SCHEMA_UNSPECIFIED"] = "PATCH_SCHEMA_UNSPECIFIED";
38
+ PatchSchema["URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP"] = "URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP";
39
+ })(PatchSchema || (PatchSchema = {}));
40
+ export var ServicePrincipalSchema;
41
+ (function (ServicePrincipalSchema) {
42
+ ServicePrincipalSchema["SERVICE_PRINCIPAL_SCHEMA_UNSPECIFIED"] = "SERVICE_PRINCIPAL_SCHEMA_UNSPECIFIED";
43
+ ServicePrincipalSchema["URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_SERVICE_PRINCIPAL"] = "URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_SERVICE_PRINCIPAL";
44
+ })(ServicePrincipalSchema || (ServicePrincipalSchema = {}));
45
+ export var UserSchema;
46
+ (function (UserSchema) {
47
+ UserSchema["USER_SCHEMA_UNSPECIFIED"] = "USER_SCHEMA_UNSPECIFIED";
48
+ UserSchema["URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER"] = "URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER";
49
+ UserSchema["URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER"] = "URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER";
50
+ })(UserSchema || (UserSchema = {}));
51
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
52
+ export var AccountGetSortOrder_GetSortOrder;
53
+ (function (AccountGetSortOrder_GetSortOrder) {
54
+ AccountGetSortOrder_GetSortOrder["GET_SORT_ORDER_UNSPECIFIED"] = "GET_SORT_ORDER_UNSPECIFIED";
55
+ AccountGetSortOrder_GetSortOrder["ASCENDING"] = "ASCENDING";
56
+ AccountGetSortOrder_GetSortOrder["DESCENDING"] = "DESCENDING";
57
+ })(AccountGetSortOrder_GetSortOrder || (AccountGetSortOrder_GetSortOrder = {}));
58
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
59
+ export var AccountListSort_Order;
60
+ (function (AccountListSort_Order) {
61
+ AccountListSort_Order["ORDER_UNSPECIFIED"] = "ORDER_UNSPECIFIED";
62
+ AccountListSort_Order["ASCENDING"] = "ASCENDING";
63
+ AccountListSort_Order["DESCENDING"] = "DESCENDING";
64
+ })(AccountListSort_Order || (AccountListSort_Order = {}));
65
+ /** Type of patch operation. */
66
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
67
+ export var AccountPatchOp_PatchOp;
68
+ (function (AccountPatchOp_PatchOp) {
69
+ AccountPatchOp_PatchOp["PATCH_OP_UNSPECIFIED"] = "PATCH_OP_UNSPECIFIED";
70
+ AccountPatchOp_PatchOp["ADD"] = "ADD";
71
+ AccountPatchOp_PatchOp["REMOVE"] = "REMOVE";
72
+ AccountPatchOp_PatchOp["REPLACE"] = "REPLACE";
73
+ })(AccountPatchOp_PatchOp || (AccountPatchOp_PatchOp = {}));
74
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
75
+ export var AccountPatchSchema_PatchSchema;
76
+ (function (AccountPatchSchema_PatchSchema) {
77
+ AccountPatchSchema_PatchSchema["PATCH_SCHEMA_UNSPECIFIED"] = "PATCH_SCHEMA_UNSPECIFIED";
78
+ AccountPatchSchema_PatchSchema["URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP"] = "URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP";
79
+ })(AccountPatchSchema_PatchSchema || (AccountPatchSchema_PatchSchema = {}));
80
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
81
+ export var ListSort_Order;
82
+ (function (ListSort_Order) {
83
+ ListSort_Order["ORDER_UNSPECIFIED"] = "ORDER_UNSPECIFIED";
84
+ ListSort_Order["ASCENDING"] = "ASCENDING";
85
+ ListSort_Order["DESCENDING"] = "DESCENDING";
86
+ })(ListSort_Order || (ListSort_Order = {}));
87
+ /** Permission level */
88
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
89
+ export var PasswordPermission_Level;
90
+ (function (PasswordPermission_Level) {
91
+ PasswordPermission_Level["LEVEL_UNSPECIFIED"] = "LEVEL_UNSPECIFIED";
92
+ PasswordPermission_Level["CAN_USE"] = "CAN_USE";
93
+ })(PasswordPermission_Level || (PasswordPermission_Level = {}));
94
+ export const unmarshalAccountComplexValueSchema = z
95
+ .object({
96
+ display: z.string().optional(),
97
+ primary: z.boolean().optional(),
98
+ $ref: z.string().optional(),
99
+ type: z.string().optional(),
100
+ value: z.string().optional(),
101
+ })
102
+ .transform(d => ({
103
+ display: d.display,
104
+ primary: d.primary,
105
+ ref: d.$ref,
106
+ type: d.type,
107
+ value: d.value,
108
+ }));
109
+ export const unmarshalAccountGroupSchema = z
110
+ .object({
111
+ displayName: z.string().optional(),
112
+ externalId: z.string().optional(),
113
+ id: z.string().optional(),
114
+ members: z
115
+ .array(z.lazy(() => unmarshalAccountComplexValueSchema))
116
+ .optional(),
117
+ meta: z.lazy(() => unmarshalAccountResourceMetaSchema).optional(),
118
+ roles: z.array(z.lazy(() => unmarshalAccountComplexValueSchema)).optional(),
119
+ account_id: z.string().optional(),
120
+ })
121
+ .transform(d => ({
122
+ displayName: d.displayName,
123
+ externalId: d.externalId,
124
+ id: d.id,
125
+ members: d.members,
126
+ meta: d.meta,
127
+ roles: d.roles,
128
+ accountId: d.account_id,
129
+ }));
130
+ export const unmarshalAccountNameSchema = z
131
+ .object({
132
+ familyName: z.string().optional(),
133
+ givenName: z.string().optional(),
134
+ })
135
+ .transform(d => ({
136
+ familyName: d.familyName,
137
+ givenName: d.givenName,
138
+ }));
139
+ export const unmarshalAccountResourceMetaSchema = z
140
+ .object({
141
+ resourceType: z.string().optional(),
142
+ })
143
+ .transform(d => ({
144
+ resourceType: d.resourceType,
145
+ }));
146
+ export const unmarshalAccountServicePrincipalSchema = z
147
+ .object({
148
+ active: z.boolean().optional(),
149
+ applicationId: z.string().optional(),
150
+ displayName: z.string().optional(),
151
+ externalId: z.string().optional(),
152
+ id: z.string().optional(),
153
+ roles: z
154
+ .array(z.lazy(() => unmarshalAccountComplexValueSchema))
155
+ .optional(),
156
+ account_id: z.string().optional(),
157
+ })
158
+ .transform(d => ({
159
+ active: d.active,
160
+ applicationId: d.applicationId,
161
+ displayName: d.displayName,
162
+ externalId: d.externalId,
163
+ id: d.id,
164
+ roles: d.roles,
165
+ accountId: d.account_id,
166
+ }));
167
+ export const unmarshalAccountUserSchema = z
168
+ .object({
169
+ active: z.boolean().optional(),
170
+ displayName: z.string().optional(),
171
+ emails: z
172
+ .array(z.lazy(() => unmarshalAccountComplexValueSchema))
173
+ .optional(),
174
+ externalId: z.string().optional(),
175
+ id: z.string().optional(),
176
+ name: z.lazy(() => unmarshalAccountNameSchema).optional(),
177
+ roles: z.array(z.lazy(() => unmarshalAccountComplexValueSchema)).optional(),
178
+ userName: z.string().optional(),
179
+ account_id: z.string().optional(),
180
+ })
181
+ .transform(d => ({
182
+ active: d.active,
183
+ displayName: d.displayName,
184
+ emails: d.emails,
185
+ externalId: d.externalId,
186
+ id: d.id,
187
+ name: d.name,
188
+ roles: d.roles,
189
+ userName: d.userName,
190
+ accountId: d.account_id,
191
+ }));
192
+ export const unmarshalComplexValueSchema = z
193
+ .object({
194
+ display: z.string().optional(),
195
+ primary: z.boolean().optional(),
196
+ $ref: z.string().optional(),
197
+ type: z.string().optional(),
198
+ value: z.string().optional(),
199
+ })
200
+ .transform(d => ({
201
+ display: d.display,
202
+ primary: d.primary,
203
+ ref: d.$ref,
204
+ type: d.type,
205
+ value: d.value,
206
+ }));
207
+ export const unmarshalGetPasswordPermissionLevelsResponseSchema = z
208
+ .object({
209
+ permission_levels: z
210
+ .array(z.lazy(() => unmarshalPasswordPermissionsDescriptionSchema))
211
+ .optional(),
212
+ })
213
+ .transform(d => ({
214
+ permissionLevels: d.permission_levels,
215
+ }));
216
+ export const unmarshalGroupSchema = z
217
+ .object({
218
+ displayName: z.string().optional(),
219
+ entitlements: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
220
+ externalId: z.string().optional(),
221
+ groups: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
222
+ id: z.string().optional(),
223
+ members: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
224
+ meta: z.lazy(() => unmarshalResourceMetaSchema).optional(),
225
+ roles: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
226
+ schemas: z.array(z.enum(GroupSchema)).optional(),
227
+ })
228
+ .transform(d => ({
229
+ displayName: d.displayName,
230
+ entitlements: d.entitlements,
231
+ externalId: d.externalId,
232
+ groups: d.groups,
233
+ id: d.id,
234
+ members: d.members,
235
+ meta: d.meta,
236
+ roles: d.roles,
237
+ schemas: d.schemas,
238
+ }));
239
+ export const unmarshalListAccountGroupsResponseSchema = z
240
+ .object({
241
+ itemsPerPage: z.number().optional(),
242
+ Resources: z.array(z.lazy(() => unmarshalAccountGroupSchema)).optional(),
243
+ startIndex: z
244
+ .union([z.number(), z.bigint()])
245
+ .transform(v => BigInt(v))
246
+ .optional(),
247
+ totalResults: z.number().optional(),
248
+ })
249
+ .transform(d => ({
250
+ itemsPerPage: d.itemsPerPage,
251
+ resources: d.Resources,
252
+ startIndex: d.startIndex,
253
+ totalResults: d.totalResults,
254
+ }));
255
+ export const unmarshalListAccountServicePrincipalsResponseSchema = z
256
+ .object({
257
+ itemsPerPage: z.number().optional(),
258
+ Resources: z
259
+ .array(z.lazy(() => unmarshalAccountServicePrincipalSchema))
260
+ .optional(),
261
+ startIndex: z
262
+ .union([z.number(), z.bigint()])
263
+ .transform(v => BigInt(v))
264
+ .optional(),
265
+ totalResults: z.number().optional(),
266
+ })
267
+ .transform(d => ({
268
+ itemsPerPage: d.itemsPerPage,
269
+ resources: d.Resources,
270
+ startIndex: d.startIndex,
271
+ totalResults: d.totalResults,
272
+ }));
273
+ export const unmarshalListAccountUsersResponseSchema = z
274
+ .object({
275
+ itemsPerPage: z.number().optional(),
276
+ Resources: z.array(z.lazy(() => unmarshalAccountUserSchema)).optional(),
277
+ startIndex: z
278
+ .union([z.number(), z.bigint()])
279
+ .transform(v => BigInt(v))
280
+ .optional(),
281
+ totalResults: z.number().optional(),
282
+ })
283
+ .transform(d => ({
284
+ itemsPerPage: d.itemsPerPage,
285
+ resources: d.Resources,
286
+ startIndex: d.startIndex,
287
+ totalResults: d.totalResults,
288
+ }));
289
+ export const unmarshalListGroupsResponseSchema = z
290
+ .object({
291
+ itemsPerPage: z.number().optional(),
292
+ Resources: z.array(z.lazy(() => unmarshalGroupSchema)).optional(),
293
+ schemas: z.array(z.enum(ListResponseSchema)).optional(),
294
+ startIndex: z
295
+ .union([z.number(), z.bigint()])
296
+ .transform(v => BigInt(v))
297
+ .optional(),
298
+ totalResults: z.number().optional(),
299
+ })
300
+ .transform(d => ({
301
+ itemsPerPage: d.itemsPerPage,
302
+ resources: d.Resources,
303
+ schemas: d.schemas,
304
+ startIndex: d.startIndex,
305
+ totalResults: d.totalResults,
306
+ }));
307
+ export const unmarshalListServicePrincipalResponseSchema = z
308
+ .object({
309
+ itemsPerPage: z.number().optional(),
310
+ Resources: z
311
+ .array(z.lazy(() => unmarshalServicePrincipalSchema))
312
+ .optional(),
313
+ schemas: z.array(z.enum(ListResponseSchema)).optional(),
314
+ startIndex: z
315
+ .union([z.number(), z.bigint()])
316
+ .transform(v => BigInt(v))
317
+ .optional(),
318
+ totalResults: z.number().optional(),
319
+ })
320
+ .transform(d => ({
321
+ itemsPerPage: d.itemsPerPage,
322
+ resources: d.Resources,
323
+ schemas: d.schemas,
324
+ startIndex: d.startIndex,
325
+ totalResults: d.totalResults,
326
+ }));
327
+ export const unmarshalListUsersResponseSchema = z
328
+ .object({
329
+ itemsPerPage: z.number().optional(),
330
+ Resources: z.array(z.lazy(() => unmarshalUserSchema)).optional(),
331
+ schemas: z.array(z.enum(ListResponseSchema)).optional(),
332
+ startIndex: z
333
+ .union([z.number(), z.bigint()])
334
+ .transform(v => BigInt(v))
335
+ .optional(),
336
+ totalResults: z.number().optional(),
337
+ })
338
+ .transform(d => ({
339
+ itemsPerPage: d.itemsPerPage,
340
+ resources: d.Resources,
341
+ schemas: d.schemas,
342
+ startIndex: d.startIndex,
343
+ totalResults: d.totalResults,
344
+ }));
345
+ export const unmarshalNameSchema = z
346
+ .object({
347
+ familyName: z.string().optional(),
348
+ givenName: z.string().optional(),
349
+ })
350
+ .transform(d => ({
351
+ familyName: d.familyName,
352
+ givenName: d.givenName,
353
+ }));
354
+ export const unmarshalPasswordAccessControlResponseSchema = z
355
+ .object({
356
+ all_permissions: z
357
+ .array(z.lazy(() => unmarshalPasswordPermissionSchema))
358
+ .optional(),
359
+ display_name: z.string().optional(),
360
+ group_name: z.string().optional(),
361
+ service_principal_name: z.string().optional(),
362
+ user_name: z.string().optional(),
363
+ })
364
+ .transform(d => ({
365
+ allPermissions: d.all_permissions,
366
+ displayName: d.display_name,
367
+ groupName: d.group_name,
368
+ servicePrincipalName: d.service_principal_name,
369
+ userName: d.user_name,
370
+ }));
371
+ export const unmarshalPasswordPermissionSchema = z
372
+ .object({
373
+ inherited: z.boolean().optional(),
374
+ inherited_from_object: z.array(z.string()).optional(),
375
+ permission_level: z.enum(PasswordPermission_Level).optional(),
376
+ })
377
+ .transform(d => ({
378
+ inherited: d.inherited,
379
+ inheritedFromObject: d.inherited_from_object,
380
+ permissionLevel: d.permission_level,
381
+ }));
382
+ export const unmarshalPasswordPermissionsSchema = z
383
+ .object({
384
+ access_control_list: z
385
+ .array(z.lazy(() => unmarshalPasswordAccessControlResponseSchema))
386
+ .optional(),
387
+ object_id: z.string().optional(),
388
+ object_type: z.string().optional(),
389
+ })
390
+ .transform(d => ({
391
+ accessControlList: d.access_control_list,
392
+ objectId: d.object_id,
393
+ objectType: d.object_type,
394
+ }));
395
+ export const unmarshalPasswordPermissionsDescriptionSchema = z
396
+ .object({
397
+ description: z.string().optional(),
398
+ permission_level: z.enum(PasswordPermission_Level).optional(),
399
+ })
400
+ .transform(d => ({
401
+ description: d.description,
402
+ permissionLevel: d.permission_level,
403
+ }));
404
+ export const unmarshalResourceMetaSchema = z
405
+ .object({
406
+ resourceType: z.string().optional(),
407
+ })
408
+ .transform(d => ({
409
+ resourceType: d.resourceType,
410
+ }));
411
+ export const unmarshalServicePrincipalSchema = z
412
+ .object({
413
+ active: z.boolean().optional(),
414
+ applicationId: z.string().optional(),
415
+ displayName: z.string().optional(),
416
+ entitlements: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
417
+ externalId: z.string().optional(),
418
+ groups: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
419
+ id: z.string().optional(),
420
+ roles: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
421
+ schemas: z.array(z.enum(ServicePrincipalSchema)).optional(),
422
+ })
423
+ .transform(d => ({
424
+ active: d.active,
425
+ applicationId: d.applicationId,
426
+ displayName: d.displayName,
427
+ entitlements: d.entitlements,
428
+ externalId: d.externalId,
429
+ groups: d.groups,
430
+ id: d.id,
431
+ roles: d.roles,
432
+ schemas: d.schemas,
433
+ }));
434
+ export const unmarshalUserSchema = z
435
+ .object({
436
+ active: z.boolean().optional(),
437
+ displayName: z.string().optional(),
438
+ emails: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
439
+ entitlements: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
440
+ externalId: z.string().optional(),
441
+ groups: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
442
+ id: z.string().optional(),
443
+ name: z.lazy(() => unmarshalNameSchema).optional(),
444
+ roles: z.array(z.lazy(() => unmarshalComplexValueSchema)).optional(),
445
+ schemas: z.array(z.enum(UserSchema)).optional(),
446
+ userName: z.string().optional(),
447
+ })
448
+ .transform(d => ({
449
+ active: d.active,
450
+ displayName: d.displayName,
451
+ emails: d.emails,
452
+ entitlements: d.entitlements,
453
+ externalId: d.externalId,
454
+ groups: d.groups,
455
+ id: d.id,
456
+ name: d.name,
457
+ roles: d.roles,
458
+ schemas: d.schemas,
459
+ userName: d.userName,
460
+ }));
461
+ export const marshalAccountComplexValueSchema = z
462
+ .object({
463
+ display: z.string().optional(),
464
+ primary: z.boolean().optional(),
465
+ ref: z.string().optional(),
466
+ type: z.string().optional(),
467
+ value: z.string().optional(),
468
+ })
469
+ .transform(d => ({
470
+ display: d.display,
471
+ primary: d.primary,
472
+ $ref: d.ref,
473
+ type: d.type,
474
+ value: d.value,
475
+ }));
476
+ export const marshalAccountNameSchema = z
477
+ .object({
478
+ familyName: z.string().optional(),
479
+ givenName: z.string().optional(),
480
+ })
481
+ .transform(d => ({
482
+ familyName: d.familyName,
483
+ givenName: d.givenName,
484
+ }));
485
+ export const marshalAccountPatchSchema = z
486
+ .object({
487
+ op: z.enum(AccountPatchOp_PatchOp).optional(),
488
+ path: z.string().optional(),
489
+ value: jsonValueSchema.optional(),
490
+ })
491
+ .transform(d => ({
492
+ op: d.op,
493
+ path: d.path,
494
+ value: d.value,
495
+ }));
496
+ export const marshalAccountResourceMetaSchema = z
497
+ .object({
498
+ resourceType: z.string().optional(),
499
+ })
500
+ .transform(d => ({
501
+ resourceType: d.resourceType,
502
+ }));
503
+ export const marshalComplexValueSchema = z
504
+ .object({
505
+ display: z.string().optional(),
506
+ primary: z.boolean().optional(),
507
+ ref: z.string().optional(),
508
+ type: z.string().optional(),
509
+ value: z.string().optional(),
510
+ })
511
+ .transform(d => ({
512
+ display: d.display,
513
+ primary: d.primary,
514
+ $ref: d.ref,
515
+ type: d.type,
516
+ value: d.value,
517
+ }));
518
+ export const marshalCreateAccountGroupRequestSchema = z
519
+ .object({
520
+ displayName: z.string().optional(),
521
+ externalId: z.string().optional(),
522
+ id: z.string().optional(),
523
+ members: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
524
+ meta: z.lazy(() => marshalAccountResourceMetaSchema).optional(),
525
+ roles: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
526
+ accountId: z.string().optional(),
527
+ })
528
+ .transform(d => ({
529
+ displayName: d.displayName,
530
+ externalId: d.externalId,
531
+ id: d.id,
532
+ members: d.members,
533
+ meta: d.meta,
534
+ roles: d.roles,
535
+ account_id: d.accountId,
536
+ }));
537
+ export const marshalCreateAccountServicePrincipalRequestSchema = z
538
+ .object({
539
+ active: z.boolean().optional(),
540
+ applicationId: z.string().optional(),
541
+ displayName: z.string().optional(),
542
+ externalId: z.string().optional(),
543
+ id: z.string().optional(),
544
+ roles: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
545
+ accountId: z.string().optional(),
546
+ })
547
+ .transform(d => ({
548
+ active: d.active,
549
+ applicationId: d.applicationId,
550
+ displayName: d.displayName,
551
+ externalId: d.externalId,
552
+ id: d.id,
553
+ roles: d.roles,
554
+ account_id: d.accountId,
555
+ }));
556
+ export const marshalCreateAccountUserRequestSchema = z
557
+ .object({
558
+ active: z.boolean().optional(),
559
+ displayName: z.string().optional(),
560
+ emails: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
561
+ externalId: z.string().optional(),
562
+ id: z.string().optional(),
563
+ name: z.lazy(() => marshalAccountNameSchema).optional(),
564
+ roles: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
565
+ userName: z.string().optional(),
566
+ accountId: z.string().optional(),
567
+ })
568
+ .transform(d => ({
569
+ active: d.active,
570
+ displayName: d.displayName,
571
+ emails: d.emails,
572
+ externalId: d.externalId,
573
+ id: d.id,
574
+ name: d.name,
575
+ roles: d.roles,
576
+ userName: d.userName,
577
+ account_id: d.accountId,
578
+ }));
579
+ export const marshalCreateGroupRequestSchema = z
580
+ .object({
581
+ displayName: z.string().optional(),
582
+ entitlements: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
583
+ externalId: z.string().optional(),
584
+ groups: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
585
+ id: z.string().optional(),
586
+ members: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
587
+ meta: z.lazy(() => marshalResourceMetaSchema).optional(),
588
+ roles: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
589
+ schemas: z.array(z.enum(GroupSchema)).optional(),
590
+ })
591
+ .transform(d => ({
592
+ displayName: d.displayName,
593
+ entitlements: d.entitlements,
594
+ externalId: d.externalId,
595
+ groups: d.groups,
596
+ id: d.id,
597
+ members: d.members,
598
+ meta: d.meta,
599
+ roles: d.roles,
600
+ schemas: d.schemas,
601
+ }));
602
+ export const marshalCreateServicePrincipalRequestSchema = z
603
+ .object({
604
+ active: z.boolean().optional(),
605
+ applicationId: z.string().optional(),
606
+ displayName: z.string().optional(),
607
+ entitlements: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
608
+ externalId: z.string().optional(),
609
+ groups: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
610
+ id: z.string().optional(),
611
+ roles: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
612
+ schemas: z.array(z.enum(ServicePrincipalSchema)).optional(),
613
+ })
614
+ .transform(d => ({
615
+ active: d.active,
616
+ applicationId: d.applicationId,
617
+ displayName: d.displayName,
618
+ entitlements: d.entitlements,
619
+ externalId: d.externalId,
620
+ groups: d.groups,
621
+ id: d.id,
622
+ roles: d.roles,
623
+ schemas: d.schemas,
624
+ }));
625
+ export const marshalCreateUserRequestSchema = z
626
+ .object({
627
+ active: z.boolean().optional(),
628
+ displayName: z.string().optional(),
629
+ emails: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
630
+ entitlements: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
631
+ externalId: z.string().optional(),
632
+ groups: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
633
+ id: z.string().optional(),
634
+ name: z.lazy(() => marshalNameSchema).optional(),
635
+ roles: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
636
+ schemas: z.array(z.enum(UserSchema)).optional(),
637
+ userName: z.string().optional(),
638
+ })
639
+ .transform(d => ({
640
+ active: d.active,
641
+ displayName: d.displayName,
642
+ emails: d.emails,
643
+ entitlements: d.entitlements,
644
+ externalId: d.externalId,
645
+ groups: d.groups,
646
+ id: d.id,
647
+ name: d.name,
648
+ roles: d.roles,
649
+ schemas: d.schemas,
650
+ userName: d.userName,
651
+ }));
652
+ export const marshalNameSchema = z
653
+ .object({
654
+ familyName: z.string().optional(),
655
+ givenName: z.string().optional(),
656
+ })
657
+ .transform(d => ({
658
+ familyName: d.familyName,
659
+ givenName: d.givenName,
660
+ }));
661
+ export const marshalPasswordAccessControlRequestSchema = z
662
+ .object({
663
+ groupName: z.string().optional(),
664
+ permissionLevel: z.enum(PasswordPermission_Level).optional(),
665
+ servicePrincipalName: z.string().optional(),
666
+ userName: z.string().optional(),
667
+ })
668
+ .transform(d => ({
669
+ group_name: d.groupName,
670
+ permission_level: d.permissionLevel,
671
+ service_principal_name: d.servicePrincipalName,
672
+ user_name: d.userName,
673
+ }));
674
+ export const marshalPasswordPermissionsRequestSchema = z
675
+ .object({
676
+ accessControlList: z
677
+ .array(z.lazy(() => marshalPasswordAccessControlRequestSchema))
678
+ .optional(),
679
+ })
680
+ .transform(d => ({
681
+ access_control_list: d.accessControlList,
682
+ }));
683
+ export const marshalPatchSchema = z
684
+ .object({
685
+ op: z.enum(PatchOp).optional(),
686
+ path: z.string().optional(),
687
+ value: jsonValueSchema.optional(),
688
+ })
689
+ .transform(d => ({
690
+ op: d.op,
691
+ path: d.path,
692
+ value: d.value,
693
+ }));
694
+ export const marshalPatchAccountGroupRequestSchema = z
695
+ .object({
696
+ id: z.string().optional(),
697
+ operations: z.array(z.lazy(() => marshalAccountPatchSchema)).optional(),
698
+ schemas: z.array(z.enum(AccountPatchSchema_PatchSchema)).optional(),
699
+ accountId: z.string().optional(),
700
+ })
701
+ .transform(d => ({
702
+ id: d.id,
703
+ Operations: d.operations,
704
+ schemas: d.schemas,
705
+ account_id: d.accountId,
706
+ }));
707
+ export const marshalPatchAccountServicePrincipalRequestSchema = z
708
+ .object({
709
+ id: z.string().optional(),
710
+ operations: z.array(z.lazy(() => marshalAccountPatchSchema)).optional(),
711
+ schemas: z.array(z.enum(AccountPatchSchema_PatchSchema)).optional(),
712
+ accountId: z.string().optional(),
713
+ })
714
+ .transform(d => ({
715
+ id: d.id,
716
+ Operations: d.operations,
717
+ schemas: d.schemas,
718
+ account_id: d.accountId,
719
+ }));
720
+ export const marshalPatchAccountUserRequestSchema = z
721
+ .object({
722
+ id: z.string().optional(),
723
+ operations: z.array(z.lazy(() => marshalAccountPatchSchema)).optional(),
724
+ schemas: z.array(z.enum(AccountPatchSchema_PatchSchema)).optional(),
725
+ accountId: z.string().optional(),
726
+ })
727
+ .transform(d => ({
728
+ id: d.id,
729
+ Operations: d.operations,
730
+ schemas: d.schemas,
731
+ account_id: d.accountId,
732
+ }));
733
+ export const marshalPatchGroupRequestSchema = z
734
+ .object({
735
+ id: z.string().optional(),
736
+ operations: z.array(z.lazy(() => marshalPatchSchema)).optional(),
737
+ schemas: z.array(z.enum(PatchSchema)).optional(),
738
+ })
739
+ .transform(d => ({
740
+ id: d.id,
741
+ Operations: d.operations,
742
+ schemas: d.schemas,
743
+ }));
744
+ export const marshalPatchServicePrincipalRequestSchema = z
745
+ .object({
746
+ id: z.string().optional(),
747
+ operations: z.array(z.lazy(() => marshalPatchSchema)).optional(),
748
+ schemas: z.array(z.enum(PatchSchema)).optional(),
749
+ })
750
+ .transform(d => ({
751
+ id: d.id,
752
+ Operations: d.operations,
753
+ schemas: d.schemas,
754
+ }));
755
+ export const marshalPatchUserRequestSchema = z
756
+ .object({
757
+ id: z.string().optional(),
758
+ operations: z.array(z.lazy(() => marshalPatchSchema)).optional(),
759
+ schemas: z.array(z.enum(PatchSchema)).optional(),
760
+ })
761
+ .transform(d => ({
762
+ id: d.id,
763
+ Operations: d.operations,
764
+ schemas: d.schemas,
765
+ }));
766
+ export const marshalResourceMetaSchema = z
767
+ .object({
768
+ resourceType: z.string().optional(),
769
+ })
770
+ .transform(d => ({
771
+ resourceType: d.resourceType,
772
+ }));
773
+ export const marshalUpdateAccountGroupRequestSchema = z
774
+ .object({
775
+ displayName: z.string().optional(),
776
+ externalId: z.string().optional(),
777
+ id: z.string().optional(),
778
+ members: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
779
+ meta: z.lazy(() => marshalAccountResourceMetaSchema).optional(),
780
+ roles: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
781
+ accountId: z.string().optional(),
782
+ })
783
+ .transform(d => ({
784
+ displayName: d.displayName,
785
+ externalId: d.externalId,
786
+ id: d.id,
787
+ members: d.members,
788
+ meta: d.meta,
789
+ roles: d.roles,
790
+ account_id: d.accountId,
791
+ }));
792
+ export const marshalUpdateAccountServicePrincipalRequestSchema = z
793
+ .object({
794
+ active: z.boolean().optional(),
795
+ applicationId: z.string().optional(),
796
+ displayName: z.string().optional(),
797
+ externalId: z.string().optional(),
798
+ id: z.string().optional(),
799
+ roles: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
800
+ accountId: z.string().optional(),
801
+ })
802
+ .transform(d => ({
803
+ active: d.active,
804
+ applicationId: d.applicationId,
805
+ displayName: d.displayName,
806
+ externalId: d.externalId,
807
+ id: d.id,
808
+ roles: d.roles,
809
+ account_id: d.accountId,
810
+ }));
811
+ export const marshalUpdateAccountUserRequestSchema = z
812
+ .object({
813
+ active: z.boolean().optional(),
814
+ displayName: z.string().optional(),
815
+ emails: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
816
+ externalId: z.string().optional(),
817
+ id: z.string().optional(),
818
+ name: z.lazy(() => marshalAccountNameSchema).optional(),
819
+ roles: z.array(z.lazy(() => marshalAccountComplexValueSchema)).optional(),
820
+ userName: z.string().optional(),
821
+ accountId: z.string().optional(),
822
+ })
823
+ .transform(d => ({
824
+ active: d.active,
825
+ displayName: d.displayName,
826
+ emails: d.emails,
827
+ externalId: d.externalId,
828
+ id: d.id,
829
+ name: d.name,
830
+ roles: d.roles,
831
+ userName: d.userName,
832
+ account_id: d.accountId,
833
+ }));
834
+ export const marshalUpdateGroupRequestSchema = z
835
+ .object({
836
+ displayName: z.string().optional(),
837
+ entitlements: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
838
+ externalId: z.string().optional(),
839
+ groups: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
840
+ id: z.string().optional(),
841
+ members: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
842
+ meta: z.lazy(() => marshalResourceMetaSchema).optional(),
843
+ roles: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
844
+ schemas: z.array(z.enum(GroupSchema)).optional(),
845
+ })
846
+ .transform(d => ({
847
+ displayName: d.displayName,
848
+ entitlements: d.entitlements,
849
+ externalId: d.externalId,
850
+ groups: d.groups,
851
+ id: d.id,
852
+ members: d.members,
853
+ meta: d.meta,
854
+ roles: d.roles,
855
+ schemas: d.schemas,
856
+ }));
857
+ export const marshalUpdateServicePrincipalRequestSchema = z
858
+ .object({
859
+ active: z.boolean().optional(),
860
+ applicationId: z.string().optional(),
861
+ displayName: z.string().optional(),
862
+ entitlements: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
863
+ externalId: z.string().optional(),
864
+ groups: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
865
+ id: z.string().optional(),
866
+ roles: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
867
+ schemas: z.array(z.enum(ServicePrincipalSchema)).optional(),
868
+ })
869
+ .transform(d => ({
870
+ active: d.active,
871
+ applicationId: d.applicationId,
872
+ displayName: d.displayName,
873
+ entitlements: d.entitlements,
874
+ externalId: d.externalId,
875
+ groups: d.groups,
876
+ id: d.id,
877
+ roles: d.roles,
878
+ schemas: d.schemas,
879
+ }));
880
+ export const marshalUpdateUserRequestSchema = z
881
+ .object({
882
+ active: z.boolean().optional(),
883
+ displayName: z.string().optional(),
884
+ emails: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
885
+ entitlements: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
886
+ externalId: z.string().optional(),
887
+ groups: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
888
+ id: z.string().optional(),
889
+ name: z.lazy(() => marshalNameSchema).optional(),
890
+ roles: z.array(z.lazy(() => marshalComplexValueSchema)).optional(),
891
+ schemas: z.array(z.enum(UserSchema)).optional(),
892
+ userName: z.string().optional(),
893
+ })
894
+ .transform(d => ({
895
+ active: d.active,
896
+ displayName: d.displayName,
897
+ emails: d.emails,
898
+ entitlements: d.entitlements,
899
+ externalId: d.externalId,
900
+ groups: d.groups,
901
+ id: d.id,
902
+ name: d.name,
903
+ roles: d.roles,
904
+ schemas: d.schemas,
905
+ userName: d.userName,
906
+ }));
907
+ //# sourceMappingURL=model.js.map