@databricks/sdk-uc-grants 0.52.1 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.js CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region package.json
2
2
  var name = "@databricks/sdk-uc-grants";
3
- var version = "0.52.1";
3
+ var version = "0.53.0";
4
4
 
5
5
  //#endregion
6
6
  export { name, version };
@@ -1,6 +1,6 @@
1
1
  import { EffectivePrivilegeAssignment, GetEffectivePermissionsRequest, GetEffectivePermissionsResponse, GetPermissionsRequest, GetPermissionsResponse, ListEffectivePrivilegeAssignmentsRequest, ListEffectivePrivilegeAssignmentsResponse, ListPrivilegeAssignmentsRequest, ListPrivilegeAssignmentsResponse, PrivilegeAssignment, UpdatePermissionsRequest, UpdatePermissionsResponse } from "./model.js";
2
- import { CallOptions } from "@databricks/sdk-options/call";
3
2
  import { ClientOptions } from "@databricks/sdk-options/client";
3
+ import { CallOptions } from "@databricks/sdk-options/call";
4
4
 
5
5
  //#region src/v1/client.d.ts
6
6
  declare class GrantsClient {
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","names":[],"sources":["../../src/v1/client.ts"],"mappings":";;;;;cAgDa,YAAA;EAAA,iBACM,OAAA;EAAA,iBACA,MAAA;EAAA,iBAIA,UAAA;EAAA,QAIT,MAAA;cAEI,OAAA,EAAS,aAAA;EAAA,QAQb,aAAA;EAeI;;;;;;;;EAFN,uBAAA,CACJ,GAAA,EAAK,8BAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,+BAAA;EA6FA;;;;;;;;EA9CL,cAAA,CACJ,GAAA,EAAK,qBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,sBAAA;EA6GR;;;;EArEG,iCAAA,CACJ,GAAA,EAAK,wCAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,yCAAA;EAuCJ,qCAAA,CACL,GAAA,EAAK,wCAAA,EACL,O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 @@
1
- import { resolveClientConfig } from "./transport.js";
2
- import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse } from "./utils.js";
1
+ import { checkClientOptions, resolveClientConfig } from "./transport.js";
2
+ import { buildHttpRequest, encodePathVariable, executeCall, executeHttpCall, marshalRequest, parseResponse } from "./utils.js";
3
3
  import { name, version } from "../package.js";
4
4
  import { marshalUpdatePermissionsRequestSchema, unmarshalGetEffectivePermissionsResponseSchema, unmarshalGetPermissionsResponseSchema, unmarshalListEffectivePrivilegeAssignmentsResponseSchema, unmarshalListPrivilegeAssignmentsResponseSchema, unmarshalUpdatePermissionsResponseSchema } from "./model.js";
5
5
  import { VERSION } from "@databricks/sdk-auth";
@@ -17,6 +17,7 @@ var GrantsClient = class {
17
17
  clientInfo;
18
18
  config;
19
19
  constructor(options) {
20
+ checkClientOptions(options);
20
21
  this.options = options;
21
22
  this.logger = options.logger ?? new NoOpLogger();
22
23
  this.clientInfo = createDefault().with(PACKAGE_SEGMENT).with({
@@ -37,12 +38,14 @@ var GrantsClient = class {
37
38
  * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
38
39
  */
39
40
  async getEffectivePermissions(req, options) {
40
- const { host, workspaceId, httpClient } = await this.resolveConfig();
41
- const url = `${host}/api/2.1/unity-catalog/effective-permissions/${req.securableType ?? ""}/${req.securableFullName ?? ""}`;
41
+ if (req.securableType === void 0) throw new Error("path parameter \"securable_type\" is required");
42
+ const { host, workspaceId, httpClient, timeout } = await this.resolveConfig();
43
+ const url = `${host}/api/2.1/unity-catalog/effective-permissions/${encodePathVariable(req.securableType)}/${encodePathVariable(req.securableFullName ?? "")}`;
42
44
  const params = new URLSearchParams();
43
45
  if (req.principal !== void 0) params.append("principal", req.principal);
44
46
  if (req.maxResults !== void 0) params.append("max_results", String(req.maxResults));
45
47
  if (req.pageToken !== void 0) params.append("page_token", req.pageToken);
48
+ params.sort();
46
49
  const query = params.toString();
47
50
  const fullUrl = query !== "" ? `${url}?${query}` : url;
48
51
  let resp;
@@ -55,7 +58,7 @@ var GrantsClient = class {
55
58
  logger: this.logger
56
59
  }), unmarshalGetEffectivePermissionsResponseSchema);
57
60
  };
58
- await executeCall(call, options);
61
+ await executeCall(call, options, timeout);
59
62
  if (resp === void 0) throw new Error("operation completed without a result.");
60
63
  return resp;
61
64
  }
@@ -68,12 +71,14 @@ var GrantsClient = class {
68
71
  * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
69
72
  */
70
73
  async getPermissions(req, options) {
71
- const { host, workspaceId, httpClient } = await this.resolveConfig();
72
- const url = `${host}/api/2.1/unity-catalog/permissions/${req.securableType ?? ""}/${req.securableFullName ?? ""}`;
74
+ if (req.securableType === void 0) throw new Error("path parameter \"securable_type\" is required");
75
+ const { host, workspaceId, httpClient, timeout } = await this.resolveConfig();
76
+ const url = `${host}/api/2.1/unity-catalog/permissions/${encodePathVariable(req.securableType)}/${encodePathVariable(req.securableFullName ?? "")}`;
73
77
  const params = new URLSearchParams();
74
78
  if (req.principal !== void 0) params.append("principal", req.principal);
75
79
  if (req.maxResults !== void 0) params.append("max_results", String(req.maxResults));
76
80
  if (req.pageToken !== void 0) params.append("page_token", req.pageToken);
81
+ params.sort();
77
82
  const query = params.toString();
78
83
  const fullUrl = query !== "" ? `${url}?${query}` : url;
79
84
  let resp;
@@ -86,7 +91,7 @@ var GrantsClient = class {
86
91
  logger: this.logger
87
92
  }), unmarshalGetPermissionsResponseSchema);
88
93
  };
89
- await executeCall(call, options);
94
+ await executeCall(call, options, timeout);
90
95
  if (resp === void 0) throw new Error("operation completed without a result.");
91
96
  return resp;
92
97
  }
@@ -95,12 +100,15 @@ var GrantsClient = class {
95
100
  * Paginated version of Get Effective Permissions API.
96
101
  */
97
102
  async listEffectivePrivilegeAssignments(req, options) {
98
- const { host, workspaceId, httpClient } = await this.resolveConfig();
99
- const url = `${host}/api/2.1/unity-catalog/effective-privilege-assignments/${req.securableType ?? ""}/${req.fullName ?? ""}`;
103
+ if (req.securableType === void 0) throw new Error("path parameter \"securable_type\" is required");
104
+ if (req.fullName === void 0) throw new Error("path parameter \"full_name\" is required");
105
+ const { host, workspaceId, httpClient, timeout } = await this.resolveConfig();
106
+ const url = `${host}/api/2.1/unity-catalog/effective-privilege-assignments/${encodePathVariable(req.securableType)}/${encodePathVariable(req.fullName)}`;
100
107
  const params = new URLSearchParams();
101
108
  if (req.principal !== void 0) params.append("principal", req.principal);
102
109
  if (req.pageSize !== void 0) params.append("page_size", String(req.pageSize));
103
110
  if (req.pageToken !== void 0) params.append("page_token", req.pageToken);
111
+ params.sort();
104
112
  const query = params.toString();
105
113
  const fullUrl = query !== "" ? `${url}?${query}` : url;
106
114
  let resp;
@@ -113,7 +121,7 @@ var GrantsClient = class {
113
121
  logger: this.logger
114
122
  }), unmarshalListEffectivePrivilegeAssignmentsResponseSchema);
115
123
  };
116
- await executeCall(call, options);
124
+ await executeCall(call, options, timeout);
117
125
  if (resp === void 0) throw new Error("operation completed without a result.");
118
126
  return resp;
119
127
  }
@@ -131,12 +139,15 @@ var GrantsClient = class {
131
139
  * Paginated version of Get Permissions API.
132
140
  */
133
141
  async listPrivilegeAssignments(req, options) {
134
- const { host, workspaceId, httpClient } = await this.resolveConfig();
135
- const url = `${host}/api/2.1/unity-catalog/privilege-assignments/${req.securableType ?? ""}/${req.fullName ?? ""}`;
142
+ if (req.securableType === void 0) throw new Error("path parameter \"securable_type\" is required");
143
+ if (req.fullName === void 0) throw new Error("path parameter \"full_name\" is required");
144
+ const { host, workspaceId, httpClient, timeout } = await this.resolveConfig();
145
+ const url = `${host}/api/2.1/unity-catalog/privilege-assignments/${encodePathVariable(req.securableType)}/${encodePathVariable(req.fullName)}`;
136
146
  const params = new URLSearchParams();
137
147
  if (req.principal !== void 0) params.append("principal", req.principal);
138
148
  if (req.pageSize !== void 0) params.append("page_size", String(req.pageSize));
139
149
  if (req.pageToken !== void 0) params.append("page_token", req.pageToken);
150
+ params.sort();
140
151
  const query = params.toString();
141
152
  const fullUrl = query !== "" ? `${url}?${query}` : url;
142
153
  let resp;
@@ -149,7 +160,7 @@ var GrantsClient = class {
149
160
  logger: this.logger
150
161
  }), unmarshalListPrivilegeAssignmentsResponseSchema);
151
162
  };
152
- await executeCall(call, options);
163
+ await executeCall(call, options, timeout);
153
164
  if (resp === void 0) throw new Error("operation completed without a result.");
154
165
  return resp;
155
166
  }
@@ -164,8 +175,9 @@ var GrantsClient = class {
164
175
  }
165
176
  /** Updates the permissions for a securable. */
166
177
  async updatePermissions(req, options) {
167
- const { host, workspaceId, httpClient } = await this.resolveConfig();
168
- const url = `${host}/api/2.1/unity-catalog/permissions/${req.securableType ?? ""}/${req.securableFullName ?? ""}`;
178
+ if (req.securableType === void 0) throw new Error("path parameter \"securable_type\" is required");
179
+ const { host, workspaceId, httpClient, timeout } = await this.resolveConfig();
180
+ const url = `${host}/api/2.1/unity-catalog/permissions/${encodePathVariable(req.securableType)}/${encodePathVariable(req.securableFullName ?? "")}`;
169
181
  const body = marshalRequest(req, marshalUpdatePermissionsRequestSchema);
170
182
  let resp;
171
183
  const call = async (callSignal) => {
@@ -177,7 +189,7 @@ var GrantsClient = class {
177
189
  logger: this.logger
178
190
  }), unmarshalUpdatePermissionsResponseSchema);
179
191
  };
180
- await executeCall(call, options);
192
+ await executeCall(call, options, timeout);
181
193
  if (resp === void 0) throw new Error("operation completed without a result.");
182
194
  return resp;
183
195
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["pkgJson.version","AUTH_VERSION"],"sources":["../../src/v1/client.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';\nimport type {ClientInfo} from '@databricks/sdk-core/clientinfo';\nimport {createDefault} from '@databricks/sdk-core/clientinfo';\nimport type {Logger} from '@databricks/sdk-core/logger';\nimport {NoOpLogger} from '@databricks/sdk-core/logger';\nimport type {CallOptions} from '@databricks/sdk-options/call';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\nimport type {ResolvedClientConfig} from './transport';\nimport {resolveClientConfig} from './transport';\nimport {\n buildHttpRequest,\n executeCall,\n executeHttpCall,\n marshalRequest,\n parseResponse,\n} from './utils';\nimport pkgJson from '../../package.json' with {type: 'json'};\nimport type {\n EffectivePrivilegeAssignment,\n GetEffectivePermissionsRequest,\n GetEffectivePermissionsResponse,\n GetPermissionsRequest,\n GetPermissionsResponse,\n ListEffectivePrivilegeAssignmentsRequest,\n ListEffectivePrivilegeAssignmentsResponse,\n ListPrivilegeAssignmentsRequest,\n ListPrivilegeAssignmentsResponse,\n PrivilegeAssignment,\n UpdatePermissionsRequest,\n UpdatePermissionsResponse,\n} from './model';\nimport {\n marshalUpdatePermissionsRequestSchema,\n unmarshalGetEffectivePermissionsResponseSchema,\n unmarshalGetPermissionsResponseSchema,\n unmarshalListEffectivePrivilegeAssignmentsResponseSchema,\n unmarshalListPrivilegeAssignmentsResponseSchema,\n unmarshalUpdatePermissionsResponseSchema,\n} from './model';\n\n// Package identity segment for this client to be used in the User-Agent header.\nconst PACKAGE_SEGMENT = {\n key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\\/sdk-/, ''),\n value: pkgJson.version,\n};\n\nexport class GrantsClient {\n private readonly options: ClientOptions;\n private readonly logger: Logger;\n // User-Agent segments, composed once at construction from createDefault()\n // merged with this package's identity. Each request adds the auth method,\n // which default credentials choose only when they first sign a request.\n private readonly clientInfo: ClientInfo;\n // Memoized configuration. The profile is resolved once, lazily, on the first\n // request, then reused; host, workspaceId/accountId, and credentials are\n // filled from it when not set explicitly on the options.\n private config: Promise<ResolvedClientConfig> | undefined;\n\n constructor(options: ClientOptions) {\n this.options = options;\n this.logger = options.logger ?? new NoOpLogger();\n this.clientInfo = createDefault()\n .with(PACKAGE_SEGMENT)\n .with({key: 'sdk-js-auth', value: AUTH_VERSION});\n }\n\n private resolveConfig(): Promise<ResolvedClientConfig> {\n this.config ??= resolveClientConfig(this.options, this.clientInfo);\n return this.config;\n }\n\n /**\n * Gets the effective permissions for a securable. Includes inherited permissions from any parent securables.\n *\n * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.\n *\n * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.\n * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.\n */\n async getEffectivePermissions(\n req: GetEffectivePermissionsRequest,\n options?: CallOptions\n ): Promise<GetEffectivePermissionsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/effective-permissions/${req.securableType ?? ''}/${req.securableFullName ?? ''}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.maxResults !== undefined) {\n params.append('max_results', String(req.maxResults));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: GetEffectivePermissionsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalGetEffectivePermissionsResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /**\n * Gets the permissions for a securable. Does not include inherited permissions.\n *\n * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.\n *\n * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.\n * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.\n */\n async getPermissions(\n req: GetPermissionsRequest,\n options?: CallOptions\n ): Promise<GetPermissionsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/permissions/${req.securableType ?? ''}/${req.securableFullName ?? ''}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.maxResults !== undefined) {\n params.append('max_results', String(req.maxResults));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: GetPermissionsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalGetPermissionsResponseSchema);\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /**\n * Lists the effective privilege assignments for a securable. Includes inherited privileges.\n * Paginated version of Get Effective Permissions API.\n */\n async listEffectivePrivilegeAssignments(\n req: ListEffectivePrivilegeAssignmentsRequest,\n options?: CallOptions\n ): Promise<ListEffectivePrivilegeAssignmentsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/effective-privilege-assignments/${req.securableType ?? ''}/${req.fullName ?? ''}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.pageSize !== undefined) {\n params.append('page_size', String(req.pageSize));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListEffectivePrivilegeAssignmentsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalListEffectivePrivilegeAssignmentsResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n async *listEffectivePrivilegeAssignmentsIter(\n req: ListEffectivePrivilegeAssignmentsRequest,\n options?: CallOptions\n ): AsyncGenerator<EffectivePrivilegeAssignment> {\n const pageReq: ListEffectivePrivilegeAssignmentsRequest = {...req};\n for (;;) {\n const resp = await this.listEffectivePrivilegeAssignments(\n pageReq,\n options\n );\n for (const item of resp.effectivePrivilegeAssignments ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * Lists the privilege assignments for a securable. Does not include inherited privileges.\n * Paginated version of Get Permissions API.\n */\n async listPrivilegeAssignments(\n req: ListPrivilegeAssignmentsRequest,\n options?: CallOptions\n ): Promise<ListPrivilegeAssignmentsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/privilege-assignments/${req.securableType ?? ''}/${req.fullName ?? ''}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.pageSize !== undefined) {\n params.append('page_size', String(req.pageSize));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListPrivilegeAssignmentsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalListPrivilegeAssignmentsResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n async *listPrivilegeAssignmentsIter(\n req: ListPrivilegeAssignmentsRequest,\n options?: CallOptions\n ): AsyncGenerator<PrivilegeAssignment> {\n const pageReq: ListPrivilegeAssignmentsRequest = {...req};\n for (;;) {\n const resp = await this.listPrivilegeAssignments(pageReq, options);\n for (const item of resp.privilegeAssignments ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /** Updates the permissions for a securable. */\n async updatePermissions(\n req: UpdatePermissionsRequest,\n options?: CallOptions\n ): Promise<UpdatePermissionsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/permissions/${req.securableType ?? ''}/${req.securableFullName ?? ''}`;\n const body = marshalRequest(req, marshalUpdatePermissionsRequestSchema);\n let resp: UpdatePermissionsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers({'Content-Type': 'application/json'});\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalUpdatePermissionsResponseSchema);\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n}\n"],"mappings":";;;;;;;;;AA2CA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;CAC1D,OAAOA;CACR;AAED,IAAa,eAAb,MAA0B;CACxB,AAAiB;CACjB,AAAi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"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';\nimport type {ClientInfo} from '@databricks/sdk-core/clientinfo';\nimport {createDefault} from '@databricks/sdk-core/clientinfo';\nimport type {Logger} from '@databricks/sdk-core/logger';\nimport {NoOpLogger} from '@databricks/sdk-core/logger';\nimport type {CallOptions} from '@databricks/sdk-options/call';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\nimport type {ResolvedClientConfig} from './transport';\nimport {checkClientOptions, resolveClientConfig} from './transport';\nimport {\n buildHttpRequest,\n encodePathVariable,\n executeCall,\n executeHttpCall,\n marshalRequest,\n parseResponse,\n} from './utils';\nimport pkgJson from '../../package.json' with {type: 'json'};\nimport type {\n EffectivePrivilegeAssignment,\n GetEffectivePermissionsRequest,\n GetEffectivePermissionsResponse,\n GetPermissionsRequest,\n GetPermissionsResponse,\n ListEffectivePrivilegeAssignmentsRequest,\n ListEffectivePrivilegeAssignmentsResponse,\n ListPrivilegeAssignmentsRequest,\n ListPrivilegeAssignmentsResponse,\n PrivilegeAssignment,\n UpdatePermissionsRequest,\n UpdatePermissionsResponse,\n} from './model';\nimport {\n marshalUpdatePermissionsRequestSchema,\n unmarshalGetEffectivePermissionsResponseSchema,\n unmarshalGetPermissionsResponseSchema,\n unmarshalListEffectivePrivilegeAssignmentsResponseSchema,\n unmarshalListPrivilegeAssignmentsResponseSchema,\n unmarshalUpdatePermissionsResponseSchema,\n} from './model';\n\n// Package identity segment for this client to be used in the User-Agent header.\nconst PACKAGE_SEGMENT = {\n key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\\/sdk-/, ''),\n value: pkgJson.version,\n};\n\nexport class GrantsClient {\n private readonly options: ClientOptions;\n private readonly logger: Logger;\n // User-Agent segments, composed once at construction from createDefault()\n // merged with this package's identity. Each request adds the auth method,\n // which default credentials choose only when they first sign a request.\n private readonly clientInfo: ClientInfo;\n // Memoized configuration. The profile is resolved once, lazily, on the first\n // request, then reused; host, workspaceId/accountId, and credentials are\n // filled from it when not set explicitly on the options.\n private config: Promise<ResolvedClientConfig> | undefined;\n\n constructor(options: ClientOptions) {\n checkClientOptions(options);\n this.options = options;\n this.logger = options.logger ?? new NoOpLogger();\n this.clientInfo = createDefault()\n .with(PACKAGE_SEGMENT)\n .with({key: 'sdk-js-auth', value: AUTH_VERSION});\n }\n\n private resolveConfig(): Promise<ResolvedClientConfig> {\n this.config ??= resolveClientConfig(this.options, this.clientInfo);\n return this.config;\n }\n\n /**\n * Gets the effective permissions for a securable. Includes inherited permissions from any parent securables.\n *\n * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.\n *\n * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.\n * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.\n */\n async getEffectivePermissions(\n req: GetEffectivePermissionsRequest,\n options?: CallOptions\n ): Promise<GetEffectivePermissionsResponse> {\n if (req.securableType === undefined) {\n throw new Error('path parameter \"securable_type\" is required');\n }\n const {host, workspaceId, httpClient, timeout} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/effective-permissions/${encodePathVariable(req.securableType)}/${encodePathVariable(req.securableFullName ?? '')}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.maxResults !== undefined) {\n params.append('max_results', String(req.maxResults));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n params.sort();\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: GetEffectivePermissionsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalGetEffectivePermissionsResponseSchema\n );\n };\n await executeCall(call, options, timeout);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /**\n * Gets the permissions for a securable. Does not include inherited permissions.\n *\n * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.\n *\n * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.\n * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.\n */\n async getPermissions(\n req: GetPermissionsRequest,\n options?: CallOptions\n ): Promise<GetPermissionsResponse> {\n if (req.securableType === undefined) {\n throw new Error('path parameter \"securable_type\" is required');\n }\n const {host, workspaceId, httpClient, timeout} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/permissions/${encodePathVariable(req.securableType)}/${encodePathVariable(req.securableFullName ?? '')}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.maxResults !== undefined) {\n params.append('max_results', String(req.maxResults));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n params.sort();\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: GetPermissionsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalGetPermissionsResponseSchema);\n };\n await executeCall(call, options, timeout);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /**\n * Lists the effective privilege assignments for a securable. Includes inherited privileges.\n * Paginated version of Get Effective Permissions API.\n */\n async listEffectivePrivilegeAssignments(\n req: ListEffectivePrivilegeAssignmentsRequest,\n options?: CallOptions\n ): Promise<ListEffectivePrivilegeAssignmentsResponse> {\n if (req.securableType === undefined) {\n throw new Error('path parameter \"securable_type\" is required');\n }\n if (req.fullName === undefined) {\n throw new Error('path parameter \"full_name\" is required');\n }\n const {host, workspaceId, httpClient, timeout} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/effective-privilege-assignments/${encodePathVariable(req.securableType)}/${encodePathVariable(req.fullName)}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.pageSize !== undefined) {\n params.append('page_size', String(req.pageSize));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n params.sort();\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListEffectivePrivilegeAssignmentsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalListEffectivePrivilegeAssignmentsResponseSchema\n );\n };\n await executeCall(call, options, timeout);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n async *listEffectivePrivilegeAssignmentsIter(\n req: ListEffectivePrivilegeAssignmentsRequest,\n options?: CallOptions\n ): AsyncGenerator<EffectivePrivilegeAssignment> {\n const pageReq: ListEffectivePrivilegeAssignmentsRequest = {...req};\n for (;;) {\n const resp = await this.listEffectivePrivilegeAssignments(\n pageReq,\n options\n );\n for (const item of resp.effectivePrivilegeAssignments ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * Lists the privilege assignments for a securable. Does not include inherited privileges.\n * Paginated version of Get Permissions API.\n */\n async listPrivilegeAssignments(\n req: ListPrivilegeAssignmentsRequest,\n options?: CallOptions\n ): Promise<ListPrivilegeAssignmentsResponse> {\n if (req.securableType === undefined) {\n throw new Error('path parameter \"securable_type\" is required');\n }\n if (req.fullName === undefined) {\n throw new Error('path parameter \"full_name\" is required');\n }\n const {host, workspaceId, httpClient, timeout} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/privilege-assignments/${encodePathVariable(req.securableType)}/${encodePathVariable(req.fullName)}`;\n const params = new URLSearchParams();\n if (req.principal !== undefined) {\n params.append('principal', req.principal);\n }\n if (req.pageSize !== undefined) {\n params.append('page_size', String(req.pageSize));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n params.sort();\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListPrivilegeAssignmentsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalListPrivilegeAssignmentsResponseSchema\n );\n };\n await executeCall(call, options, timeout);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n async *listPrivilegeAssignmentsIter(\n req: ListPrivilegeAssignmentsRequest,\n options?: CallOptions\n ): AsyncGenerator<PrivilegeAssignment> {\n const pageReq: ListPrivilegeAssignmentsRequest = {...req};\n for (;;) {\n const resp = await this.listPrivilegeAssignments(pageReq, options);\n for (const item of resp.privilegeAssignments ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /** Updates the permissions for a securable. */\n async updatePermissions(\n req: UpdatePermissionsRequest,\n options?: CallOptions\n ): Promise<UpdatePermissionsResponse> {\n if (req.securableType === undefined) {\n throw new Error('path parameter \"securable_type\" is required');\n }\n const {host, workspaceId, httpClient, timeout} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/permissions/${encodePathVariable(req.securableType)}/${encodePathVariable(req.securableFullName ?? '')}`;\n const body = marshalRequest(req, marshalUpdatePermissionsRequestSchema);\n let resp: UpdatePermissionsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers({'Content-Type': 'application/json'});\n if (workspaceId !== undefined && workspaceId !== '') {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalUpdatePermissionsResponseSchema);\n };\n await executeCall(call, options, timeout);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n}\n"],"mappings":";;;;;;;;;AA4CA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;CAC1D,OAAOA;CACR;AAED,IAAa,eAAb,MAA0B;CACxB,AAAiB;CACjB,AAAiB;CAIjB,AAAiB;CAIjB,AAAQ;CAER,YAAY,SAAwB;AAClC,qBAAmB,QAAQ;AAC3B,OAAK,UAAU;AACf,OAAK,SAAS,QAAQ,UAAU,IAAI,YAAY;AAChD,OAAK,aAAa,eAAe,CAC9B,KAAK,gBAAgB,CACrB,KAAK;GAAC,KAAK;GAAe,OAAOC;GAAa,CAAC;;CAGpD,AAAQ,gBAA+C;AACrD,OAAK,WAAW,oBAAoB,KAAK,SAAS,KAAK,WAAW;AAClE,SAAO,KAAK;;;;;;;;;;CAWd,MAAM,wBACJ,KACA,SAC0C;AAC1C,MAAI,IAAI,kBAAkB,OACxB,OAAM,IAAI,MAAM,gDAA8C;EAE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AS,YAAY,KAAK;IAGvE;IACA,QAAQ,KAAK;IACd,CAAC,EAC6B,yCAAyC;;AAE1E,QAAM,YAAY,MAAM,SAAS,QAAQ;AACzC,MAAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO"}
@@ -1,3 +1,3 @@
1
1
  import { EffectivePrivilege, EffectivePrivilegeAssignment, GetEffectivePermissionsRequest, GetEffectivePermissionsResponse, GetPermissionsRequest, GetPermissionsResponse, ListEffectivePrivilegeAssignmentsRequest, ListEffectivePrivilegeAssignmentsResponse, ListPrivilegeAssignmentsRequest, ListPrivilegeAssignmentsResponse, PermissionsChange, PrivilegeAssignment, UpdatePermissionsRequest, UpdatePermissionsResponse } from "./model.js";
2
2
  import { GrantsClient } from "./client.js";
3
- export { type EffectivePrivilege, type EffectivePrivilegeAssignment, type GetEffectivePermissionsRequest, type GetEffectivePermissionsResponse, type GetPermissionsRequest, type GetPermissionsResponse, GrantsClient, type ListEffectivePrivilegeAssignmentsRequest, type ListEffectivePrivilegeAssignmentsResponse, type ListPrivilegeAssignmentsRequest, type ListPrivilegeAssignmentsResponse, type PermissionsChange, type PrivilegeAssignment, type UpdatePermissionsRequest, type UpdatePermissionsResponse };
3
+ export { EffectivePrivilege, EffectivePrivilegeAssignment, GetEffectivePermissionsRequest, GetEffectivePermissionsResponse, GetPermissionsRequest, GetPermissionsResponse, GrantsClient, ListEffectivePrivilegeAssignmentsRequest, ListEffectivePrivilegeAssignmentsResponse, ListPrivilegeAssignmentsRequest, ListPrivilegeAssignmentsResponse, PermissionsChange, PrivilegeAssignment, UpdatePermissionsRequest, UpdatePermissionsResponse };
package/dist/v1/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { EffectivePrivilege, EffectivePrivilegeAssignment, GetEffectivePermissionsRequest, GetEffectivePermissionsResponse, GetPermissionsRequest, GetPermissionsResponse, ListEffectivePrivilegeAssignmentsRequest, ListEffectivePrivilegeAssignmentsResponse, ListPrivilegeAssignmentsRequest, ListPrivilegeAssignmentsResponse, PermissionsChange, PrivilegeAssignment, UpdatePermissionsRequest, UpdatePermissionsResponse } from "./model.js";
1
2
  import { GrantsClient } from "./client.js";
2
3
 
3
- export { GrantsClient };
4
+ export { EffectivePrivilege, EffectivePrivilegeAssignment, GetEffectivePermissionsRequest, GetEffectivePermissionsResponse, GetPermissionsRequest, GetPermissionsResponse, GrantsClient, ListEffectivePrivilegeAssignmentsRequest, ListEffectivePrivilegeAssignmentsResponse, ListPrivilegeAssignmentsRequest, ListPrivilegeAssignmentsResponse, PermissionsChange, PrivilegeAssignment, UpdatePermissionsRequest, UpdatePermissionsResponse };
@@ -191,14 +191,102 @@ interface UpdatePermissionsResponse {
191
191
  }
192
192
  declare const unmarshalEffectivePrivilegeSchema: z.ZodType<EffectivePrivilege>;
193
193
  declare const unmarshalEffectivePrivilegeAssignmentSchema: z.ZodType<EffectivePrivilegeAssignment>;
194
+ declare const unmarshalGetEffectivePermissionsRequestSchema: z.ZodType<GetEffectivePermissionsRequest>;
194
195
  declare const unmarshalGetEffectivePermissionsResponseSchema: z.ZodType<GetEffectivePermissionsResponse>;
196
+ declare const unmarshalGetPermissionsRequestSchema: z.ZodType<GetPermissionsRequest>;
195
197
  declare const unmarshalGetPermissionsResponseSchema: z.ZodType<GetPermissionsResponse>;
198
+ declare const unmarshalListEffectivePrivilegeAssignmentsRequestSchema: z.ZodType<ListEffectivePrivilegeAssignmentsRequest>;
196
199
  declare const unmarshalListEffectivePrivilegeAssignmentsResponseSchema: z.ZodType<ListEffectivePrivilegeAssignmentsResponse>;
200
+ declare const unmarshalListPrivilegeAssignmentsRequestSchema: z.ZodType<ListPrivilegeAssignmentsRequest>;
197
201
  declare const unmarshalListPrivilegeAssignmentsResponseSchema: z.ZodType<ListPrivilegeAssignmentsResponse>;
202
+ declare const unmarshalPermissionsChangeSchema: z.ZodType<PermissionsChange>;
198
203
  declare const unmarshalPrivilegeAssignmentSchema: z.ZodType<PrivilegeAssignment>;
204
+ declare const unmarshalUpdatePermissionsRequestSchema: z.ZodType<UpdatePermissionsRequest>;
199
205
  declare const unmarshalUpdatePermissionsResponseSchema: z.ZodType<UpdatePermissionsResponse>;
206
+ declare const marshalEffectivePrivilegeSchema: z.ZodType;
207
+ declare const marshalEffectivePrivilegeAssignmentSchema: z.ZodType;
208
+ declare const marshalGetEffectivePermissionsRequestSchema: z.ZodType;
209
+ declare const marshalGetEffectivePermissionsResponseSchema: z.ZodType;
210
+ declare const marshalGetPermissionsRequestSchema: z.ZodType;
211
+ declare const marshalGetPermissionsResponseSchema: z.ZodType;
212
+ declare const marshalListEffectivePrivilegeAssignmentsRequestSchema: z.ZodType;
213
+ declare const marshalListEffectivePrivilegeAssignmentsResponseSchema: z.ZodType;
214
+ declare const marshalListPrivilegeAssignmentsRequestSchema: z.ZodType;
215
+ declare const marshalListPrivilegeAssignmentsResponseSchema: z.ZodType;
200
216
  declare const marshalPermissionsChangeSchema: z.ZodType;
217
+ declare const marshalPrivilegeAssignmentSchema: z.ZodType;
201
218
  declare const marshalUpdatePermissionsRequestSchema: z.ZodType;
219
+ declare const marshalUpdatePermissionsResponseSchema: z.ZodType;
220
+ /** Converts EffectivePrivilege messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
221
+ declare const EffectivePrivilege: {
222
+ /** Returns the JSON of the message. */toJson: (message: EffectivePrivilege) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
223
+ fromJson: (json: string) => EffectivePrivilege;
224
+ };
225
+ /** Converts EffectivePrivilegeAssignment messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
226
+ declare const EffectivePrivilegeAssignment: {
227
+ /** Returns the JSON of the message. */toJson: (message: EffectivePrivilegeAssignment) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
228
+ fromJson: (json: string) => EffectivePrivilegeAssignment;
229
+ };
230
+ /** Converts GetEffectivePermissionsRequest messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
231
+ declare const GetEffectivePermissionsRequest: {
232
+ /** Returns the JSON of the message. */toJson: (message: GetEffectivePermissionsRequest) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
233
+ fromJson: (json: string) => GetEffectivePermissionsRequest;
234
+ };
235
+ /** Converts GetEffectivePermissionsResponse messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
236
+ declare const GetEffectivePermissionsResponse: {
237
+ /** Returns the JSON of the message. */toJson: (message: GetEffectivePermissionsResponse) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
238
+ fromJson: (json: string) => GetEffectivePermissionsResponse;
239
+ };
240
+ /** Converts GetPermissionsRequest messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
241
+ declare const GetPermissionsRequest: {
242
+ /** Returns the JSON of the message. */toJson: (message: GetPermissionsRequest) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
243
+ fromJson: (json: string) => GetPermissionsRequest;
244
+ };
245
+ /** Converts GetPermissionsResponse messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
246
+ declare const GetPermissionsResponse: {
247
+ /** Returns the JSON of the message. */toJson: (message: GetPermissionsResponse) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
248
+ fromJson: (json: string) => GetPermissionsResponse;
249
+ };
250
+ /** Converts ListEffectivePrivilegeAssignmentsRequest messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
251
+ declare const ListEffectivePrivilegeAssignmentsRequest: {
252
+ /** Returns the JSON of the message. */toJson: (message: ListEffectivePrivilegeAssignmentsRequest) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
253
+ fromJson: (json: string) => ListEffectivePrivilegeAssignmentsRequest;
254
+ };
255
+ /** Converts ListEffectivePrivilegeAssignmentsResponse messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
256
+ declare const ListEffectivePrivilegeAssignmentsResponse: {
257
+ /** Returns the JSON of the message. */toJson: (message: ListEffectivePrivilegeAssignmentsResponse) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
258
+ fromJson: (json: string) => ListEffectivePrivilegeAssignmentsResponse;
259
+ };
260
+ /** Converts ListPrivilegeAssignmentsRequest messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
261
+ declare const ListPrivilegeAssignmentsRequest: {
262
+ /** Returns the JSON of the message. */toJson: (message: ListPrivilegeAssignmentsRequest) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
263
+ fromJson: (json: string) => ListPrivilegeAssignmentsRequest;
264
+ };
265
+ /** Converts ListPrivilegeAssignmentsResponse messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
266
+ declare const ListPrivilegeAssignmentsResponse: {
267
+ /** Returns the JSON of the message. */toJson: (message: ListPrivilegeAssignmentsResponse) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
268
+ fromJson: (json: string) => ListPrivilegeAssignmentsResponse;
269
+ };
270
+ /** Converts PermissionsChange messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
271
+ declare const PermissionsChange: {
272
+ /** Returns the JSON of the message. */toJson: (message: PermissionsChange) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
273
+ fromJson: (json: string) => PermissionsChange;
274
+ };
275
+ /** Converts PrivilegeAssignment messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
276
+ declare const PrivilegeAssignment: {
277
+ /** Returns the JSON of the message. */toJson: (message: PrivilegeAssignment) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
278
+ fromJson: (json: string) => PrivilegeAssignment;
279
+ };
280
+ /** Converts UpdatePermissionsRequest messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
281
+ declare const UpdatePermissionsRequest: {
282
+ /** Returns the JSON of the message. */toJson: (message: UpdatePermissionsRequest) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
283
+ fromJson: (json: string) => UpdatePermissionsRequest;
284
+ };
285
+ /** Converts UpdatePermissionsResponse messages to and from the JSON that the API uses, with the fields that a request sends in its URL path or query as regular fields. */
286
+ declare const UpdatePermissionsResponse: {
287
+ /** Returns the JSON of the message. */toJson: (message: UpdatePermissionsResponse) => string; /** Reads the message from its JSON. Throws when the JSON sets two members of one oneof, or a field mask in it names a missing field. */
288
+ fromJson: (json: string) => UpdatePermissionsResponse;
289
+ };
202
290
  //#endregion
203
- export { EffectivePrivilege, EffectivePrivilegeAssignment, GetEffectivePermissionsRequest, GetEffectivePermissionsResponse, GetPermissionsRequest, GetPermissionsResponse, ListEffectivePrivilegeAssignmentsRequest, ListEffectivePrivilegeAssignmentsResponse, ListPrivilegeAssignmentsRequest, ListPrivilegeAssignmentsResponse, PermissionsChange, PrivilegeAssignment, UpdatePermissionsRequest, UpdatePermissionsResponse, marshalPermissionsChangeSchema, marshalUpdatePermissionsRequestSchema, unmarshalEffectivePrivilegeAssignmentSchema, unmarshalEffectivePrivilegeSchema, unmarshalGetEffectivePermissionsResponseSchema, unmarshalGetPermissionsResponseSchema, unmarshalListEffectivePrivilegeAssignmentsResponseSchema, unmarshalListPrivilegeAssignmentsResponseSchema, unmarshalPrivilegeAssignmentSchema, unmarshalUpdatePermissionsResponseSchema };
291
+ export { EffectivePrivilege, EffectivePrivilegeAssignment, GetEffectivePermissionsRequest, GetEffectivePermissionsResponse, GetPermissionsRequest, GetPermissionsResponse, ListEffectivePrivilegeAssignmentsRequest, ListEffectivePrivilegeAssignmentsResponse, ListPrivilegeAssignmentsRequest, ListPrivilegeAssignmentsResponse, PermissionsChange, PrivilegeAssignment, UpdatePermissionsRequest, UpdatePermissionsResponse, marshalEffectivePrivilegeAssignmentSchema, marshalEffectivePrivilegeSchema, marshalGetEffectivePermissionsRequestSchema, marshalGetEffectivePermissionsResponseSchema, marshalGetPermissionsRequestSchema, marshalGetPermissionsResponseSchema, marshalListEffectivePrivilegeAssignmentsRequestSchema, marshalListEffectivePrivilegeAssignmentsResponseSchema, marshalListPrivilegeAssignmentsRequestSchema, marshalListPrivilegeAssignmentsResponseSchema, marshalPermissionsChangeSchema, marshalPrivilegeAssignmentSchema, marshalUpdatePermissionsRequestSchema, marshalUpdatePermissionsResponseSchema, unmarshalEffectivePrivilegeAssignmentSchema, unmarshalEffectivePrivilegeSchema, unmarshalGetEffectivePermissionsRequestSchema, unmarshalGetEffectivePermissionsResponseSchema, unmarshalGetPermissionsRequestSchema, unmarshalGetPermissionsResponseSchema, unmarshalListEffectivePrivilegeAssignmentsRequestSchema, unmarshalListEffectivePrivilegeAssignmentsResponseSchema, unmarshalListPrivilegeAssignmentsRequestSchema, unmarshalListPrivilegeAssignmentsResponseSchema, unmarshalPermissionsChangeSchema, unmarshalPrivilegeAssignmentSchema, unmarshalUpdatePermissionsRequestSchema, unmarshalUpdatePermissionsResponseSchema };
204
292
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","names":[],"sources":["../../src/v1/model.ts"],"mappings":";;;UAIiB,kBAAA;;EAEf,SAAA;EAFiC;;;;EAOjC,iBAAA;EAKA;;;AAGF;EAHE,iBAAA;AAAA;AAAA,UAGe,4BAAA;EAEf;EAAA,SAAA;EAEa;EAAb,UAAA,GAAa,kBAAA;AAAA;AAAA,UAGE,8BAAA;EAA8B;EAE7C,aAAA;EAF6C;EAI7C,iBAAA;EAAA;EAEA,SAAA;EAcA;;;;AAKF;;;;;;;;;EALE,UAAA;EAeoC;EAbpC,SAAA;AAAA;AAAA,UAGe,+BAAA;E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