Skip to content

Commit 4b26764

Browse files
authored
Update Generated Clients with latest state of Generator (#98)
## 🥞 Stacked PR Use this [link](https://github.com/databricks/sdk-js/pull/98/files) to review incremental changes. - [**stack/make-it-smarter**](#98) [[Files changed](https://github.com/databricks/sdk-js/pull/98/files)] --------- ## Summary This PR updates the SDK to the latest state of the Generator, adding more APIs and removing unused types. ## Why Because of upstream changes in the code generator. ## How is this tested? Not tested — this is generated code. The generator itself is tested upstream.
1 parent 7bde2d5 commit 4b26764

60 files changed

Lines changed: 335 additions & 8869 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 61 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/abacpolicies/src/v1/model.ts

Lines changed: 0 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -318,26 +318,6 @@ export const unmarshalColumnTagValueExtractionSchema: z.ZodType<ColumnTagValueEx
318318
tagKey: d.tag_key,
319319
}));
320320

321-
export const unmarshalCreatePolicySchema: z.ZodType<CreatePolicy> = z
322-
.object({
323-
policy_info: z.lazy(() => unmarshalPolicyInfoSchema).optional(),
324-
})
325-
.transform(d => ({
326-
policyInfo: d.policy_info,
327-
}));
328-
329-
export const unmarshalDeletePolicySchema: z.ZodType<DeletePolicy> = z
330-
.object({
331-
on_securable_type: z.string().optional(),
332-
on_securable_fullname: z.string().optional(),
333-
name: z.string().optional(),
334-
})
335-
.transform(d => ({
336-
onSecurableType: d.on_securable_type,
337-
onSecurableFullname: d.on_securable_fullname,
338-
name: d.name,
339-
}));
340-
341321
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
342322
export const unmarshalDeletePolicy_ResponseSchema: z.ZodType<DeletePolicy_Response> =
343323
z.object({});
@@ -364,18 +344,6 @@ export const unmarshalFunctionArgumentSchema: z.ZodType<FunctionArgument> = z
364344
metadataExtraction: d.metadata_extraction,
365345
}));
366346

367-
export const unmarshalGetPolicySchema: z.ZodType<GetPolicy> = z
368-
.object({
369-
on_securable_type: z.string().optional(),
370-
on_securable_fullname: z.string().optional(),
371-
name: z.string().optional(),
372-
})
373-
.transform(d => ({
374-
onSecurableType: d.on_securable_type,
375-
onSecurableFullname: d.on_securable_fullname,
376-
name: d.name,
377-
}));
378-
379347
export const unmarshalGrantOptionsSchema: z.ZodType<GrantOptions> = z
380348
.object({
381349
privileges: z.array(z.string()).optional(),
@@ -384,22 +352,6 @@ export const unmarshalGrantOptionsSchema: z.ZodType<GrantOptions> = z
384352
privileges: d.privileges,
385353
}));
386354

387-
export const unmarshalListPoliciesSchema: z.ZodType<ListPolicies> = z
388-
.object({
389-
on_securable_type: z.string().optional(),
390-
on_securable_fullname: z.string().optional(),
391-
include_inherited: z.boolean().optional(),
392-
max_results: z.number().optional(),
393-
page_token: z.string().optional(),
394-
})
395-
.transform(d => ({
396-
onSecurableType: d.on_securable_type,
397-
onSecurableFullname: d.on_securable_fullname,
398-
includeInherited: d.include_inherited,
399-
maxResults: d.max_results,
400-
pageToken: d.page_token,
401-
}));
402-
403355
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
404356
export const unmarshalListPolicies_ResponseSchema: z.ZodType<ListPolicies_Response> =
405357
z
@@ -500,22 +452,6 @@ export const unmarshalTagValueExtractionSchema: z.ZodType<TagValueExtraction> =
500452
tagKey: d.tag_key,
501453
}));
502454

503-
export const unmarshalUpdatePolicySchema: z.ZodType<UpdatePolicy> = z
504-
.object({
505-
on_securable_type: z.string().optional(),
506-
on_securable_fullname: z.string().optional(),
507-
name: z.string().optional(),
508-
policy_info: z.lazy(() => unmarshalPolicyInfoSchema).optional(),
509-
update_mask: z.string().optional(),
510-
})
511-
.transform(d => ({
512-
onSecurableType: d.on_securable_type,
513-
onSecurableFullname: d.on_securable_fullname,
514-
name: d.name,
515-
policyInfo: d.policy_info,
516-
updateMask: d.update_mask,
517-
}));
518-
519455
export const marshalColumnMaskOptionsSchema: z.ZodType = z
520456
.object({
521457
functionName: z.string().optional(),
@@ -538,26 +474,6 @@ export const marshalColumnTagValueExtractionSchema: z.ZodType = z
538474
tag_key: d.tagKey,
539475
}));
540476

541-
export const marshalCreatePolicySchema: z.ZodType = z
542-
.object({
543-
policyInfo: z.lazy(() => marshalPolicyInfoSchema).optional(),
544-
})
545-
.transform(d => ({
546-
policy_info: d.policyInfo,
547-
}));
548-
549-
export const marshalDeletePolicySchema: z.ZodType = z
550-
.object({
551-
onSecurableType: z.string().optional(),
552-
onSecurableFullname: z.string().optional(),
553-
name: z.string().optional(),
554-
})
555-
.transform(d => ({
556-
on_securable_type: d.onSecurableType,
557-
on_securable_fullname: d.onSecurableFullname,
558-
name: d.name,
559-
}));
560-
561477
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
562478
export const marshalDeletePolicy_ResponseSchema: z.ZodType = z.object({});
563479

@@ -583,18 +499,6 @@ export const marshalFunctionArgumentSchema: z.ZodType = z
583499
metadata_extraction: d.metadataExtraction,
584500
}));
585501

586-
export const marshalGetPolicySchema: z.ZodType = z
587-
.object({
588-
onSecurableType: z.string().optional(),
589-
onSecurableFullname: z.string().optional(),
590-
name: z.string().optional(),
591-
})
592-
.transform(d => ({
593-
on_securable_type: d.onSecurableType,
594-
on_securable_fullname: d.onSecurableFullname,
595-
name: d.name,
596-
}));
597-
598502
export const marshalGrantOptionsSchema: z.ZodType = z
599503
.object({
600504
privileges: z.array(z.string()).optional(),
@@ -603,22 +507,6 @@ export const marshalGrantOptionsSchema: z.ZodType = z
603507
privileges: d.privileges,
604508
}));
605509

606-
export const marshalListPoliciesSchema: z.ZodType = z
607-
.object({
608-
onSecurableType: z.string().optional(),
609-
onSecurableFullname: z.string().optional(),
610-
includeInherited: z.boolean().optional(),
611-
maxResults: z.number().optional(),
612-
pageToken: z.string().optional(),
613-
})
614-
.transform(d => ({
615-
on_securable_type: d.onSecurableType,
616-
on_securable_fullname: d.onSecurableFullname,
617-
include_inherited: d.includeInherited,
618-
max_results: d.maxResults,
619-
page_token: d.pageToken,
620-
}));
621-
622510
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
623511
export const marshalListPolicies_ResponseSchema: z.ZodType = z
624512
.object({
@@ -715,19 +603,3 @@ export const marshalTagValueExtractionSchema: z.ZodType = z
715603
.transform(d => ({
716604
tag_key: d.tagKey,
717605
}));
718-
719-
export const marshalUpdatePolicySchema: z.ZodType = z
720-
.object({
721-
onSecurableType: z.string().optional(),
722-
onSecurableFullname: z.string().optional(),
723-
name: z.string().optional(),
724-
policyInfo: z.lazy(() => marshalPolicyInfoSchema).optional(),
725-
updateMask: z.string().optional(),
726-
})
727-
.transform(d => ({
728-
on_securable_type: d.onSecurableType,
729-
on_securable_fullname: d.onSecurableFullname,
730-
name: d.name,
731-
policy_info: d.policyInfo,
732-
update_mask: d.updateMask,
733-
}));

packages/accountaccesscontrol/src/v1/model.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,6 @@ export interface UpdateRuleSetRequest {
110110
ruleSet?: RuleSetUpdateRequest | undefined;
111111
}
112112

113-
export const unmarshalGetAssignableRolesForResourceRequestSchema: z.ZodType<GetAssignableRolesForResourceRequest> =
114-
z
115-
.object({
116-
account_id: z.string().optional(),
117-
resource: z.string().optional(),
118-
})
119-
.transform(d => ({
120-
accountId: d.account_id,
121-
resource: d.resource,
122-
}));
123-
124113
export const unmarshalGetAssignableRolesForResourceResponseSchema: z.ZodType<GetAssignableRolesForResourceResponse> =
125114
z
126115
.object({
@@ -130,18 +119,6 @@ export const unmarshalGetAssignableRolesForResourceResponseSchema: z.ZodType<Get
130119
roles: d.roles,
131120
}));
132121

133-
export const unmarshalGetRuleSetRequestSchema: z.ZodType<GetRuleSetRequest> = z
134-
.object({
135-
account_id: z.string().optional(),
136-
name: z.string().optional(),
137-
etag: z.string().optional(),
138-
})
139-
.transform(d => ({
140-
accountId: d.account_id,
141-
name: d.name,
142-
etag: d.etag,
143-
}));
144-
145122
export const unmarshalGrantRuleSchema: z.ZodType<GrantRule> = z
146123
.object({
147124
principals: z.array(z.string()).optional(),
@@ -198,16 +175,6 @@ export const unmarshalUpdateRuleSetRequestSchema: z.ZodType<UpdateRuleSetRequest
198175
ruleSet: d.rule_set,
199176
}));
200177

201-
export const marshalGetAssignableRolesForResourceRequestSchema: z.ZodType = z
202-
.object({
203-
accountId: z.string().optional(),
204-
resource: z.string().optional(),
205-
})
206-
.transform(d => ({
207-
account_id: d.accountId,
208-
resource: d.resource,
209-
}));
210-
211178
export const marshalGetAssignableRolesForResourceResponseSchema: z.ZodType = z
212179
.object({
213180
roles: z.array(z.lazy(() => marshalRoleSchema)).optional(),
@@ -216,18 +183,6 @@ export const marshalGetAssignableRolesForResourceResponseSchema: z.ZodType = z
216183
roles: d.roles,
217184
}));
218185

219-
export const marshalGetRuleSetRequestSchema: z.ZodType = z
220-
.object({
221-
accountId: z.string().optional(),
222-
name: z.string().optional(),
223-
etag: z.string().optional(),
224-
})
225-
.transform(d => ({
226-
account_id: d.accountId,
227-
name: d.name,
228-
etag: d.etag,
229-
}));
230-
231186
export const marshalGrantRuleSchema: z.ZodType = z
232187
.object({
233188
principals: z.array(z.string()).optional(),

packages/accountaccesscontrolproxy/src/v1/model.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,6 @@ export interface UpdateRuleSetRequest {
110110
ruleSet?: RuleSetUpdateRequest | undefined;
111111
}
112112

113-
export const unmarshalGetAssignableRolesForResourceRequestSchema: z.ZodType<GetAssignableRolesForResourceRequest> =
114-
z
115-
.object({
116-
account_id: z.string().optional(),
117-
resource: z.string().optional(),
118-
})
119-
.transform(d => ({
120-
accountId: d.account_id,
121-
resource: d.resource,
122-
}));
123-
124113
export const unmarshalGetAssignableRolesForResourceResponseSchema: z.ZodType<GetAssignableRolesForResourceResponse> =
125114
z
126115
.object({
@@ -130,18 +119,6 @@ export const unmarshalGetAssignableRolesForResourceResponseSchema: z.ZodType<Get
130119
roles: d.roles,
131120
}));
132121

133-
export const unmarshalGetRuleSetRequestSchema: z.ZodType<GetRuleSetRequest> = z
134-
.object({
135-
account_id: z.string().optional(),
136-
name: z.string().optional(),
137-
etag: z.string().optional(),
138-
})
139-
.transform(d => ({
140-
accountId: d.account_id,
141-
name: d.name,
142-
etag: d.etag,
143-
}));
144-
145122
export const unmarshalGrantRuleSchema: z.ZodType<GrantRule> = z
146123
.object({
147124
principals: z.array(z.string()).optional(),
@@ -198,16 +175,6 @@ export const unmarshalUpdateRuleSetRequestSchema: z.ZodType<UpdateRuleSetRequest
198175
ruleSet: d.rule_set,
199176
}));
200177

201-
export const marshalGetAssignableRolesForResourceRequestSchema: z.ZodType = z
202-
.object({
203-
accountId: z.string().optional(),
204-
resource: z.string().optional(),
205-
})
206-
.transform(d => ({
207-
account_id: d.accountId,
208-
resource: d.resource,
209-
}));
210-
211178
export const marshalGetAssignableRolesForResourceResponseSchema: z.ZodType = z
212179
.object({
213180
roles: z.array(z.lazy(() => marshalRoleSchema)).optional(),
@@ -216,18 +183,6 @@ export const marshalGetAssignableRolesForResourceResponseSchema: z.ZodType = z
216183
roles: d.roles,
217184
}));
218185

219-
export const marshalGetRuleSetRequestSchema: z.ZodType = z
220-
.object({
221-
accountId: z.string().optional(),
222-
name: z.string().optional(),
223-
etag: z.string().optional(),
224-
})
225-
.transform(d => ({
226-
account_id: d.accountId,
227-
name: d.name,
228-
etag: d.etag,
229-
}));
230-
231186
export const marshalGrantRuleSchema: z.ZodType = z
232187
.object({
233188
principals: z.array(z.string()).optional(),

0 commit comments

Comments
 (0)