@databricks/sdk-accessmanagement 0.1.0-dev.1 → 0.1.0-dev.3

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/src/v1/model.ts CHANGED
@@ -128,28 +128,8 @@ export interface DeleteWorkspacePermissionAssignmentRequest {
128
128
  principalId?: bigint | undefined;
129
129
  }
130
130
 
131
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
132
- export interface DeleteWorkspacePermissionAssignmentRequest_Response {}
133
-
134
- export interface GetAssignableRolesForResourceRequest {
135
- /** <Databricks> account ID. */
136
- accountId?: string | undefined;
137
- /**
138
- * The resource name for which assignable roles will be listed.
139
- *
140
- * Examples | Summary
141
- * :--- | :---
142
- * `resource=accounts/<ACCOUNT_ID>` | A resource name for the account.
143
- * `resource=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>` | A resource name for the group.
144
- * `resource=accounts/<ACCOUNT_ID>/servicePrincipals/<SP_ID>` | A resource name for the service principal.
145
- * `resource=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>` | A resource name for the tag policy.
146
- */
147
- resource?: string | undefined;
148
- }
149
-
150
- export interface GetAssignableRolesForResourceResponse {
151
- roles?: Role[] | undefined;
152
- }
131
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
132
+ export interface DeleteWorkspacePermissionAssignmentResponse {}
153
133
 
154
134
  export interface GetObjectPermissionsRequest {
155
135
  /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
@@ -158,14 +138,7 @@ export interface GetObjectPermissionsRequest {
158
138
  requestObjectId?: string | undefined;
159
139
  }
160
140
 
161
- export interface GetPermissionLevelsRequest {
162
- /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
163
- requestObjectType?: string | undefined;
164
- requestObjectId?: string | undefined;
165
- }
166
-
167
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
168
- export interface GetPermissionLevelsRequest_Response {
141
+ export interface GetPermissionLevelsResponse {
169
142
  /** Specific permission levels */
170
143
  permissionLevels?: PermissionsDescription[] | undefined;
171
144
  }
@@ -199,16 +172,7 @@ export interface GetRuleSetRequest {
199
172
  etag?: string | undefined;
200
173
  }
201
174
 
202
- /** Gets all the permission assignments for a workspace, given an account and a workspace. */
203
- export interface GetWorkspacePermissionAssignmentsRequest {
204
- /** The account ID. */
205
- accountId?: string | undefined;
206
- /** The workspace ID for the account. */
207
- workspaceId?: bigint | undefined;
208
- }
209
-
210
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
211
- export interface GetWorkspacePermissionAssignmentsRequest_Response {
175
+ export interface GetWorkspacePermissionAssignmentsResponse {
212
176
  /** Array of permissions assignments defined for a workspace. */
213
177
  permissionAssignments?: WorkspacePermissionAssignmentOutput[] | undefined;
214
178
  }
@@ -227,6 +191,40 @@ export interface GrantRule {
227
191
  role?: string | undefined;
228
192
  }
229
193
 
194
+ export interface ListAssignableRolesForResourceRequest {
195
+ /** <Databricks> account ID. */
196
+ accountId?: string | undefined;
197
+ /**
198
+ * The resource name for which assignable roles will be listed.
199
+ *
200
+ * Examples | Summary
201
+ * :--- | :---
202
+ * `resource=accounts/<ACCOUNT_ID>` | A resource name for the account.
203
+ * `resource=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>` | A resource name for the group.
204
+ * `resource=accounts/<ACCOUNT_ID>/servicePrincipals/<SP_ID>` | A resource name for the service principal.
205
+ * `resource=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>` | A resource name for the tag policy.
206
+ */
207
+ resource?: string | undefined;
208
+ }
209
+
210
+ export interface ListAssignableRolesForResourceResponse {
211
+ roles?: Role[] | undefined;
212
+ }
213
+
214
+ export interface ListPermissionLevelsRequest {
215
+ /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
216
+ requestObjectType?: string | undefined;
217
+ requestObjectId?: string | undefined;
218
+ }
219
+
220
+ /** Gets all the permission assignments for a workspace, given an account and a workspace. */
221
+ export interface ListWorkspacePermissionAssignmentsRequest {
222
+ /** The account ID. */
223
+ accountId?: string | undefined;
224
+ /** The workspace ID for the account. */
225
+ workspaceId?: bigint | undefined;
226
+ }
227
+
230
228
  /** List permissions for a workspace, given an account and a workspace. */
231
229
  export interface ListWorkspacePermissionsRequest {
232
230
  /** The account ID. */
@@ -235,8 +233,7 @@ export interface ListWorkspacePermissionsRequest {
235
233
  workspaceId?: bigint | undefined;
236
234
  }
237
235
 
238
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
239
- export interface ListWorkspacePermissionsRequest_Response {
236
+ export interface ListWorkspacePermissionsResponse {
240
237
  /** Array of permissions defined for a workspace. */
241
238
  permissions?: PermissionOutput[] | undefined;
242
239
  }
@@ -437,21 +434,10 @@ export const unmarshalConsistencyTokenSchema: z.ZodType<ConsistencyToken> = z
437
434
  value: d.value,
438
435
  }));
439
436
 
440
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
441
- export const unmarshalDeleteWorkspacePermissionAssignmentRequest_ResponseSchema: z.ZodType<DeleteWorkspacePermissionAssignmentRequest_Response> =
437
+ export const unmarshalDeleteWorkspacePermissionAssignmentResponseSchema: z.ZodType<DeleteWorkspacePermissionAssignmentResponse> =
442
438
  z.object({});
443
439
 
444
- export const unmarshalGetAssignableRolesForResourceResponseSchema: z.ZodType<GetAssignableRolesForResourceResponse> =
445
- z
446
- .object({
447
- roles: z.array(z.lazy(() => unmarshalRoleSchema)).optional(),
448
- })
449
- .transform(d => ({
450
- roles: d.roles,
451
- }));
452
-
453
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
454
- export const unmarshalGetPermissionLevelsRequest_ResponseSchema: z.ZodType<GetPermissionLevelsRequest_Response> =
440
+ export const unmarshalGetPermissionLevelsResponseSchema: z.ZodType<GetPermissionLevelsResponse> =
455
441
  z
456
442
  .object({
457
443
  permission_levels: z
@@ -462,8 +448,7 @@ export const unmarshalGetPermissionLevelsRequest_ResponseSchema: z.ZodType<GetPe
462
448
  permissionLevels: d.permission_levels,
463
449
  }));
464
450
 
465
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
466
- export const unmarshalGetWorkspacePermissionAssignmentsRequest_ResponseSchema: z.ZodType<GetWorkspacePermissionAssignmentsRequest_Response> =
451
+ export const unmarshalGetWorkspacePermissionAssignmentsResponseSchema: z.ZodType<GetWorkspacePermissionAssignmentsResponse> =
467
452
  z
468
453
  .object({
469
454
  permission_assignments: z
@@ -484,8 +469,16 @@ export const unmarshalGrantRuleSchema: z.ZodType<GrantRule> = z
484
469
  role: d.role,
485
470
  }));
486
471
 
487
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
488
- export const unmarshalListWorkspacePermissionsRequest_ResponseSchema: z.ZodType<ListWorkspacePermissionsRequest_Response> =
472
+ export const unmarshalListAssignableRolesForResourceResponseSchema: z.ZodType<ListAssignableRolesForResourceResponse> =
473
+ z
474
+ .object({
475
+ roles: z.array(z.lazy(() => unmarshalRoleSchema)).optional(),
476
+ })
477
+ .transform(d => ({
478
+ roles: d.roles,
479
+ }));
480
+
481
+ export const unmarshalListWorkspacePermissionsResponseSchema: z.ZodType<ListWorkspacePermissionsResponse> =
489
482
  z
490
483
  .object({
491
484
  permissions: z
package/src/v1/utils.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
2
 
3
- import type {Call, Options} from '@databricks/sdk-core/api';
4
- import {execute} from '@databricks/sdk-core/api';
3
+ import type {Options} from '@databricks/sdk-core/ops';
4
+ import {execute} from '@databricks/sdk-core/ops';
5
5
  import {ApiError} from '@databricks/sdk-core/apierror';
6
6
  import type {
7
7
  HttpClient,
@@ -30,7 +30,7 @@ export interface HttpCallOptions {
30
30
  * API from the executor's internal type so they can diverge.
31
31
  */
32
32
  export async function executeCall(
33
- call: Call,
33
+ call: (signal?: AbortSignal) => Promise<void>,
34
34
  options?: CallOptions
35
35
  ): Promise<void> {
36
36
  const opts: Options = {