@databricks/sdk-sharing 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/dist/v1/client.d.ts +18 -18
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +104 -104
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +1 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/model.d.ts +56 -56
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +12 -24
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/utils.d.ts +1 -2
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +1 -1
- package/dist/v1/utils.js.map +1 -1
- package/package.json +6 -5
- package/src/v1/client.ts +188 -207
- package/src/v1/index.ts +14 -14
- package/src/v1/model.ts +62 -82
- package/src/v1/utils.ts +3 -3
package/dist/v1/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CallOptions } from '@databricks/sdk-options/call';
|
|
2
2
|
import type { ClientOptions } from '@databricks/sdk-options/client';
|
|
3
|
-
import type { CreateFederationPolicyRequest, CreateProviderRequest, CreateRecipientRequest, CreateShareRequest, DeleteFederationPolicyRequest, DeleteProviderRequest,
|
|
3
|
+
import type { CreateFederationPolicyRequest, CreateProviderRequest, CreateRecipientRequest, CreateShareRequest, DeleteFederationPolicyRequest, DeleteProviderRequest, DeleteProviderResponse, DeleteRecipientRequest, DeleteRecipientResponse, DeleteShareRequest, DeleteShareResponse, FederationPolicy, GetActivationUrlInfoRequest, GetActivationUrlInfoResponse, GetFederationPolicyRequest, GetProviderRequest, GetRecipientRequest, GetRecipientSharePermissionsResponse, GetSharePermissionsResponse, GetShareRequest, ListFederationPoliciesRequest, ListFederationPoliciesResponse, ListProviderShareAssetsRequest, ListProviderShareAssetsResponse, ListProviderSharesRequest, ListProviderSharesResponse, ListProvidersRequest, ListProvidersResponse, ListRecipientSharePermissionsRequest, ListRecipientsRequest, ListRecipientsResponse, ListSharePermissionsRequest, ListSharesRequest, ListSharesResponse, ProviderInfo, ProviderShare, RecipientInfo, RetrieveToken, RetrieveTokenResponse, RotateRecipientTokenRequest, ShareInfo, UpdateProviderRequest, UpdateRecipientRequest, UpdateSharePermissionsRequest, UpdateSharePermissionsResponse, UpdateShareRequest } from './model';
|
|
4
4
|
export declare class SharingClient {
|
|
5
5
|
private readonly host;
|
|
6
6
|
private readonly workspaceId;
|
|
@@ -51,13 +51,13 @@ export declare class SharingClient {
|
|
|
51
51
|
*/
|
|
52
52
|
deleteFederationPolicy(req: DeleteFederationPolicyRequest, options?: CallOptions): Promise<void>;
|
|
53
53
|
/** Deletes an authentication provider, if the caller is a metastore admin or is the owner of the provider. */
|
|
54
|
-
deleteProvider(req: DeleteProviderRequest, options?: CallOptions): Promise<
|
|
54
|
+
deleteProvider(req: DeleteProviderRequest, options?: CallOptions): Promise<DeleteProviderResponse>;
|
|
55
55
|
/** Deletes the specified recipient from the metastore. The caller must be the owner of the recipient. */
|
|
56
|
-
deleteRecipient(req: DeleteRecipientRequest, options?: CallOptions): Promise<
|
|
56
|
+
deleteRecipient(req: DeleteRecipientRequest, options?: CallOptions): Promise<DeleteRecipientResponse>;
|
|
57
57
|
/** Deletes a data object share from the metastore. The caller must be an owner of the share. */
|
|
58
|
-
deleteShare(req: DeleteShareRequest, options?: CallOptions): Promise<
|
|
58
|
+
deleteShare(req: DeleteShareRequest, options?: CallOptions): Promise<DeleteShareResponse>;
|
|
59
59
|
/** Gets an activation URL for a share. */
|
|
60
|
-
getActivationUrlInfo(req: GetActivationUrlInfoRequest, options?: CallOptions): Promise<
|
|
60
|
+
getActivationUrlInfo(req: GetActivationUrlInfoRequest, options?: CallOptions): Promise<GetActivationUrlInfoResponse>;
|
|
61
61
|
/**
|
|
62
62
|
* Reads an existing federation policy for an OIDC_FEDERATION recipient for sharing data from <Databricks> to non-<Databricks> recipients.
|
|
63
63
|
* The caller must have read access to the recipient.
|
|
@@ -75,15 +75,8 @@ export declare class SharingClient {
|
|
|
75
75
|
* * A metastore admin
|
|
76
76
|
*/
|
|
77
77
|
getRecipient(req: GetRecipientRequest, options?: CallOptions): Promise<RecipientInfo>;
|
|
78
|
-
/** Gets the share permissions for the specified Recipient. The caller must have the **USE_RECIPIENT** privilege on the metastore or be the owner of the Recipient. */
|
|
79
|
-
getRecipientSharePermissions(req: GetRecipientSharePermissionsRequest, options?: CallOptions): Promise<GetRecipientSharePermissionsRequest_Response>;
|
|
80
78
|
/** Gets a data object share from the metastore. The caller must have the USE_SHARE privilege on the metastore or be the owner of the share. */
|
|
81
79
|
getShare(req: GetShareRequest, options?: CallOptions): Promise<ShareInfo>;
|
|
82
|
-
/**
|
|
83
|
-
* Gets the permissions for a data share from the metastore.
|
|
84
|
-
* The caller must have the USE_SHARE privilege on the metastore or be the owner of the share.
|
|
85
|
-
*/
|
|
86
|
-
getSharePermissions(req: GetSharePermissionsRequest, options?: CallOptions): Promise<GetSharePermissionsRequest_Response>;
|
|
87
80
|
/**
|
|
88
81
|
* Lists federation policies for an OIDC_FEDERATION recipient for sharing data from <Databricks> to non-<Databricks> recipients.
|
|
89
82
|
* The caller must have read access to the recipient.
|
|
@@ -101,7 +94,7 @@ export declare class SharingClient {
|
|
|
101
94
|
* * the caller is a metastore admin, or
|
|
102
95
|
* * the caller is the owner.
|
|
103
96
|
*/
|
|
104
|
-
listProviderShares(req: ListProviderSharesRequest, options?: CallOptions): Promise<
|
|
97
|
+
listProviderShares(req: ListProviderSharesRequest, options?: CallOptions): Promise<ListProviderSharesResponse>;
|
|
105
98
|
listProviderSharesIter(req: ListProviderSharesRequest, options?: CallOptions): AsyncGenerator<ProviderShare>;
|
|
106
99
|
/**
|
|
107
100
|
* Gets an array of available authentication providers.
|
|
@@ -110,8 +103,10 @@ export declare class SharingClient {
|
|
|
110
103
|
* not have the **USE_PROVIDER** privilege are not included in the response.
|
|
111
104
|
* There is no guarantee of a specific ordering of the elements in the array.
|
|
112
105
|
*/
|
|
113
|
-
listProviders(req: ListProvidersRequest, options?: CallOptions): Promise<
|
|
106
|
+
listProviders(req: ListProvidersRequest, options?: CallOptions): Promise<ListProvidersResponse>;
|
|
114
107
|
listProvidersIter(req: ListProvidersRequest, options?: CallOptions): AsyncGenerator<ProviderInfo>;
|
|
108
|
+
/** Gets the share permissions for the specified Recipient. The caller must have the **USE_RECIPIENT** privilege on the metastore or be the owner of the Recipient. */
|
|
109
|
+
listRecipientSharePermissions(req: ListRecipientSharePermissionsRequest, options?: CallOptions): Promise<GetRecipientSharePermissionsResponse>;
|
|
115
110
|
/**
|
|
116
111
|
* Gets an array of all share recipients within the current metastore where:
|
|
117
112
|
*
|
|
@@ -119,19 +114,24 @@ export declare class SharingClient {
|
|
|
119
114
|
* * the caller is the owner.
|
|
120
115
|
* There is no guarantee of a specific ordering of the elements in the array.
|
|
121
116
|
*/
|
|
122
|
-
listRecipients(req: ListRecipientsRequest, options?: CallOptions): Promise<
|
|
117
|
+
listRecipients(req: ListRecipientsRequest, options?: CallOptions): Promise<ListRecipientsResponse>;
|
|
123
118
|
listRecipientsIter(req: ListRecipientsRequest, options?: CallOptions): AsyncGenerator<RecipientInfo>;
|
|
119
|
+
/**
|
|
120
|
+
* Gets the permissions for a data share from the metastore.
|
|
121
|
+
* The caller must have the USE_SHARE privilege on the metastore or be the owner of the share.
|
|
122
|
+
*/
|
|
123
|
+
listSharePermissions(req: ListSharePermissionsRequest, options?: CallOptions): Promise<GetSharePermissionsResponse>;
|
|
124
124
|
/**
|
|
125
125
|
* Gets an array of data object shares from the metastore. If the caller has the USE_SHARE privilege on the metastore, all shares are returned. Otherwise, only shares owned by the caller are returned.
|
|
126
126
|
* There is no guarantee of a specific ordering of the elements in the array.
|
|
127
127
|
*/
|
|
128
|
-
listShares(req: ListSharesRequest, options?: CallOptions): Promise<
|
|
128
|
+
listShares(req: ListSharesRequest, options?: CallOptions): Promise<ListSharesResponse>;
|
|
129
129
|
listSharesIter(req: ListSharesRequest, options?: CallOptions): AsyncGenerator<ShareInfo>;
|
|
130
130
|
/**
|
|
131
131
|
* Retrieve access token with an activation url.
|
|
132
132
|
* This is a public API without any authentication.
|
|
133
133
|
*/
|
|
134
|
-
retrieveAccessToken(req: RetrieveToken, options?: CallOptions): Promise<
|
|
134
|
+
retrieveAccessToken(req: RetrieveToken, options?: CallOptions): Promise<RetrieveTokenResponse>;
|
|
135
135
|
/**
|
|
136
136
|
* Refreshes the specified recipient's delta sharing authentication token with the provided token info.
|
|
137
137
|
* The caller must be the owner of the recipient.
|
|
@@ -173,6 +173,6 @@ export declare class SharingClient {
|
|
|
173
173
|
* For new recipient grants, the user must also be the owner of the recipients.
|
|
174
174
|
* recipient revocations do not require additional privileges.
|
|
175
175
|
*/
|
|
176
|
-
updateSharePermissions(req: UpdateSharePermissionsRequest, options?: CallOptions): Promise<
|
|
176
|
+
updateSharePermissions(req: UpdateSharePermissionsRequest, options?: CallOptions): Promise<UpdateSharePermissionsResponse>;
|
|
177
177
|
}
|
|
178
178
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/v1/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAWlE,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,EAC5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iB,EACtB,OAAO,CAAC,EAAE,WAAW,GACpB,cAAc,CAAC,SAAS,CAAC;IAc5B;;;OAGG;IACG,mBAAmB,CACvB,GAAG,EAAE,aAAa,EAClB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,qBAAqB,CAAC;IAwBjC;;;OAGG;IACG,oBAAoB,CACxB,GAAG,EAAE,2BAA2B,EAChC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,aAAa,CAAC;IAyBzB;;;OAGG;IACG,cAAc,CAClB,GAAG,EAAE,qBAAqB,EAC1B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,YAAY,CAAC;IAyBxB;;;OAGG;IACG,eAAe,CACnB,GAAG,EAAE,sBAAsB,EAC3B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,aAAa,CAAC;IAyBzB;;;;;;;;;;;;;;;;OAgBG;IACG,WAAW,CACf,GAAG,EAAE,kBAAkB,EACvB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,SAAS,CAAC;IAyBrB;;;;;;;OAOG;IACG,sBAAsB,CAC1B,GAAG,EAAE,6BAA6B,EAClC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,8BAA8B,CAAC;CA8B3C"}
|
package/dist/v1/client.js
CHANGED
|
@@ -5,7 +5,7 @@ import { NoOpLogger } from '@databricks/sdk-core/logger';
|
|
|
5
5
|
import { newHttpClient } from './transport';
|
|
6
6
|
import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse, } from './utils';
|
|
7
7
|
import pkgJson from '../../package.json' with { type: 'json' };
|
|
8
|
-
import { marshalCreateProviderRequestSchema, marshalCreateRecipientRequestSchema, marshalCreateShareRequestSchema, marshalFederationPolicySchema, marshalRotateRecipientTokenRequestSchema, marshalUpdateProviderRequestSchema, marshalUpdateRecipientRequestSchema, marshalUpdateSharePermissionsRequestSchema, marshalUpdateShareRequestSchema,
|
|
8
|
+
import { marshalCreateProviderRequestSchema, marshalCreateRecipientRequestSchema, marshalCreateShareRequestSchema, marshalFederationPolicySchema, marshalRotateRecipientTokenRequestSchema, marshalUpdateProviderRequestSchema, marshalUpdateRecipientRequestSchema, marshalUpdateSharePermissionsRequestSchema, marshalUpdateShareRequestSchema, unmarshalDeleteProviderResponseSchema, unmarshalDeleteRecipientResponseSchema, unmarshalDeleteShareResponseSchema, unmarshalFederationPolicySchema, unmarshalGetActivationUrlInfoResponseSchema, unmarshalGetRecipientSharePermissionsResponseSchema, unmarshalGetSharePermissionsResponseSchema, unmarshalListFederationPoliciesResponseSchema, unmarshalListProviderShareAssetsResponseSchema, unmarshalListProviderSharesResponseSchema, unmarshalListProvidersResponseSchema, unmarshalListRecipientsResponseSchema, unmarshalListSharesResponseSchema, unmarshalProviderInfoSchema, unmarshalRecipientInfoSchema, unmarshalRetrieveTokenResponseSchema, unmarshalShareInfoSchema, unmarshalUpdateSharePermissionsResponseSchema, } from './model';
|
|
9
9
|
// Package identity segment for this client to be used in the User-Agent header.
|
|
10
10
|
const PACKAGE_SEGMENT = {
|
|
11
11
|
key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\/sdk-/, ''),
|
|
@@ -78,7 +78,7 @@ export class SharingClient {
|
|
|
78
78
|
};
|
|
79
79
|
await executeCall(call, options);
|
|
80
80
|
if (resp === undefined) {
|
|
81
|
-
throw new Error('
|
|
81
|
+
throw new Error('operation completed without a result.');
|
|
82
82
|
}
|
|
83
83
|
return resp;
|
|
84
84
|
}
|
|
@@ -106,7 +106,7 @@ export class SharingClient {
|
|
|
106
106
|
};
|
|
107
107
|
await executeCall(call, options);
|
|
108
108
|
if (resp === undefined) {
|
|
109
|
-
throw new Error('
|
|
109
|
+
throw new Error('operation completed without a result.');
|
|
110
110
|
}
|
|
111
111
|
return resp;
|
|
112
112
|
}
|
|
@@ -134,7 +134,7 @@ export class SharingClient {
|
|
|
134
134
|
};
|
|
135
135
|
await executeCall(call, options);
|
|
136
136
|
if (resp === undefined) {
|
|
137
|
-
throw new Error('
|
|
137
|
+
throw new Error('operation completed without a result.');
|
|
138
138
|
}
|
|
139
139
|
return resp;
|
|
140
140
|
}
|
|
@@ -162,7 +162,7 @@ export class SharingClient {
|
|
|
162
162
|
};
|
|
163
163
|
await executeCall(call, options);
|
|
164
164
|
if (resp === undefined) {
|
|
165
|
-
throw new Error('
|
|
165
|
+
throw new Error('operation completed without a result.');
|
|
166
166
|
}
|
|
167
167
|
return resp;
|
|
168
168
|
}
|
|
@@ -203,11 +203,11 @@ export class SharingClient {
|
|
|
203
203
|
httpClient: this.httpClient,
|
|
204
204
|
logger: this.logger,
|
|
205
205
|
});
|
|
206
|
-
resp = parseResponse(respBody,
|
|
206
|
+
resp = parseResponse(respBody, unmarshalDeleteProviderResponseSchema);
|
|
207
207
|
};
|
|
208
208
|
await executeCall(call, options);
|
|
209
209
|
if (resp === undefined) {
|
|
210
|
-
throw new Error('
|
|
210
|
+
throw new Error('operation completed without a result.');
|
|
211
211
|
}
|
|
212
212
|
return resp;
|
|
213
213
|
}
|
|
@@ -227,11 +227,11 @@ export class SharingClient {
|
|
|
227
227
|
httpClient: this.httpClient,
|
|
228
228
|
logger: this.logger,
|
|
229
229
|
});
|
|
230
|
-
resp = parseResponse(respBody,
|
|
230
|
+
resp = parseResponse(respBody, unmarshalDeleteRecipientResponseSchema);
|
|
231
231
|
};
|
|
232
232
|
await executeCall(call, options);
|
|
233
233
|
if (resp === undefined) {
|
|
234
|
-
throw new Error('
|
|
234
|
+
throw new Error('operation completed without a result.');
|
|
235
235
|
}
|
|
236
236
|
return resp;
|
|
237
237
|
}
|
|
@@ -251,11 +251,11 @@ export class SharingClient {
|
|
|
251
251
|
httpClient: this.httpClient,
|
|
252
252
|
logger: this.logger,
|
|
253
253
|
});
|
|
254
|
-
resp = parseResponse(respBody,
|
|
254
|
+
resp = parseResponse(respBody, unmarshalDeleteShareResponseSchema);
|
|
255
255
|
};
|
|
256
256
|
await executeCall(call, options);
|
|
257
257
|
if (resp === undefined) {
|
|
258
|
-
throw new Error('
|
|
258
|
+
throw new Error('operation completed without a result.');
|
|
259
259
|
}
|
|
260
260
|
return resp;
|
|
261
261
|
}
|
|
@@ -275,11 +275,11 @@ export class SharingClient {
|
|
|
275
275
|
httpClient: this.httpClient,
|
|
276
276
|
logger: this.logger,
|
|
277
277
|
});
|
|
278
|
-
resp = parseResponse(respBody,
|
|
278
|
+
resp = parseResponse(respBody, unmarshalGetActivationUrlInfoResponseSchema);
|
|
279
279
|
};
|
|
280
280
|
await executeCall(call, options);
|
|
281
281
|
if (resp === undefined) {
|
|
282
|
-
throw new Error('
|
|
282
|
+
throw new Error('operation completed without a result.');
|
|
283
283
|
}
|
|
284
284
|
return resp;
|
|
285
285
|
}
|
|
@@ -306,7 +306,7 @@ export class SharingClient {
|
|
|
306
306
|
};
|
|
307
307
|
await executeCall(call, options);
|
|
308
308
|
if (resp === undefined) {
|
|
309
|
-
throw new Error('
|
|
309
|
+
throw new Error('operation completed without a result.');
|
|
310
310
|
}
|
|
311
311
|
return resp;
|
|
312
312
|
}
|
|
@@ -333,7 +333,7 @@ export class SharingClient {
|
|
|
333
333
|
};
|
|
334
334
|
await executeCall(call, options);
|
|
335
335
|
if (resp === undefined) {
|
|
336
|
-
throw new Error('
|
|
336
|
+
throw new Error('operation completed without a result.');
|
|
337
337
|
}
|
|
338
338
|
return resp;
|
|
339
339
|
}
|
|
@@ -362,40 +362,7 @@ export class SharingClient {
|
|
|
362
362
|
};
|
|
363
363
|
await executeCall(call, options);
|
|
364
364
|
if (resp === undefined) {
|
|
365
|
-
throw new Error('
|
|
366
|
-
}
|
|
367
|
-
return resp;
|
|
368
|
-
}
|
|
369
|
-
/** Gets the share permissions for the specified Recipient. The caller must have the **USE_RECIPIENT** privilege on the metastore or be the owner of the Recipient. */
|
|
370
|
-
async getRecipientSharePermissions(req, options) {
|
|
371
|
-
const url = `${this.host}/api/2.1/unity-catalog/recipients/${req.name ?? ''}/share-permissions`;
|
|
372
|
-
const params = new URLSearchParams();
|
|
373
|
-
if (req.maxResults !== undefined) {
|
|
374
|
-
params.append('max_results', String(req.maxResults));
|
|
375
|
-
}
|
|
376
|
-
if (req.pageToken !== undefined) {
|
|
377
|
-
params.append('page_token', req.pageToken);
|
|
378
|
-
}
|
|
379
|
-
const query = params.toString();
|
|
380
|
-
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
381
|
-
let resp;
|
|
382
|
-
const call = async (callSignal) => {
|
|
383
|
-
const headers = new Headers();
|
|
384
|
-
if (this.workspaceId !== undefined) {
|
|
385
|
-
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
386
|
-
}
|
|
387
|
-
headers.set('User-Agent', this.userAgent);
|
|
388
|
-
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
389
|
-
const respBody = await executeHttpCall({
|
|
390
|
-
request: httpReq,
|
|
391
|
-
httpClient: this.httpClient,
|
|
392
|
-
logger: this.logger,
|
|
393
|
-
});
|
|
394
|
-
resp = parseResponse(respBody, unmarshalGetRecipientSharePermissionsRequest_ResponseSchema);
|
|
395
|
-
};
|
|
396
|
-
await executeCall(call, options);
|
|
397
|
-
if (resp === undefined) {
|
|
398
|
-
throw new Error('API call completed without a result.');
|
|
365
|
+
throw new Error('operation completed without a result.');
|
|
399
366
|
}
|
|
400
367
|
return resp;
|
|
401
368
|
}
|
|
@@ -425,43 +392,7 @@ export class SharingClient {
|
|
|
425
392
|
};
|
|
426
393
|
await executeCall(call, options);
|
|
427
394
|
if (resp === undefined) {
|
|
428
|
-
throw new Error('
|
|
429
|
-
}
|
|
430
|
-
return resp;
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* Gets the permissions for a data share from the metastore.
|
|
434
|
-
* The caller must have the USE_SHARE privilege on the metastore or be the owner of the share.
|
|
435
|
-
*/
|
|
436
|
-
async getSharePermissions(req, options) {
|
|
437
|
-
const url = `${this.host}/api/2.1/unity-catalog/shares/${req.name ?? ''}/permissions`;
|
|
438
|
-
const params = new URLSearchParams();
|
|
439
|
-
if (req.maxResults !== undefined) {
|
|
440
|
-
params.append('max_results', String(req.maxResults));
|
|
441
|
-
}
|
|
442
|
-
if (req.pageToken !== undefined) {
|
|
443
|
-
params.append('page_token', req.pageToken);
|
|
444
|
-
}
|
|
445
|
-
const query = params.toString();
|
|
446
|
-
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
447
|
-
let resp;
|
|
448
|
-
const call = async (callSignal) => {
|
|
449
|
-
const headers = new Headers();
|
|
450
|
-
if (this.workspaceId !== undefined) {
|
|
451
|
-
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
452
|
-
}
|
|
453
|
-
headers.set('User-Agent', this.userAgent);
|
|
454
|
-
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
455
|
-
const respBody = await executeHttpCall({
|
|
456
|
-
request: httpReq,
|
|
457
|
-
httpClient: this.httpClient,
|
|
458
|
-
logger: this.logger,
|
|
459
|
-
});
|
|
460
|
-
resp = parseResponse(respBody, unmarshalGetSharePermissionsRequest_ResponseSchema);
|
|
461
|
-
};
|
|
462
|
-
await executeCall(call, options);
|
|
463
|
-
if (resp === undefined) {
|
|
464
|
-
throw new Error('API call completed without a result.');
|
|
395
|
+
throw new Error('operation completed without a result.');
|
|
465
396
|
}
|
|
466
397
|
return resp;
|
|
467
398
|
}
|
|
@@ -497,7 +428,7 @@ export class SharingClient {
|
|
|
497
428
|
};
|
|
498
429
|
await executeCall(call, options);
|
|
499
430
|
if (resp === undefined) {
|
|
500
|
-
throw new Error('
|
|
431
|
+
throw new Error('operation completed without a result.');
|
|
501
432
|
}
|
|
502
433
|
return resp;
|
|
503
434
|
}
|
|
@@ -552,7 +483,7 @@ export class SharingClient {
|
|
|
552
483
|
};
|
|
553
484
|
await executeCall(call, options);
|
|
554
485
|
if (resp === undefined) {
|
|
555
|
-
throw new Error('
|
|
486
|
+
throw new Error('operation completed without a result.');
|
|
556
487
|
}
|
|
557
488
|
return resp;
|
|
558
489
|
}
|
|
@@ -586,11 +517,11 @@ export class SharingClient {
|
|
|
586
517
|
httpClient: this.httpClient,
|
|
587
518
|
logger: this.logger,
|
|
588
519
|
});
|
|
589
|
-
resp = parseResponse(respBody,
|
|
520
|
+
resp = parseResponse(respBody, unmarshalListProviderSharesResponseSchema);
|
|
590
521
|
};
|
|
591
522
|
await executeCall(call, options);
|
|
592
523
|
if (resp === undefined) {
|
|
593
|
-
throw new Error('
|
|
524
|
+
throw new Error('operation completed without a result.');
|
|
594
525
|
}
|
|
595
526
|
return resp;
|
|
596
527
|
}
|
|
@@ -641,11 +572,11 @@ export class SharingClient {
|
|
|
641
572
|
httpClient: this.httpClient,
|
|
642
573
|
logger: this.logger,
|
|
643
574
|
});
|
|
644
|
-
resp = parseResponse(respBody,
|
|
575
|
+
resp = parseResponse(respBody, unmarshalListProvidersResponseSchema);
|
|
645
576
|
};
|
|
646
577
|
await executeCall(call, options);
|
|
647
578
|
if (resp === undefined) {
|
|
648
|
-
throw new Error('
|
|
579
|
+
throw new Error('operation completed without a result.');
|
|
649
580
|
}
|
|
650
581
|
return resp;
|
|
651
582
|
}
|
|
@@ -662,6 +593,39 @@ export class SharingClient {
|
|
|
662
593
|
pageReq.pageToken = resp.nextPageToken;
|
|
663
594
|
}
|
|
664
595
|
}
|
|
596
|
+
/** Gets the share permissions for the specified Recipient. The caller must have the **USE_RECIPIENT** privilege on the metastore or be the owner of the Recipient. */
|
|
597
|
+
async listRecipientSharePermissions(req, options) {
|
|
598
|
+
const url = `${this.host}/api/2.1/unity-catalog/recipients/${req.name ?? ''}/share-permissions`;
|
|
599
|
+
const params = new URLSearchParams();
|
|
600
|
+
if (req.maxResults !== undefined) {
|
|
601
|
+
params.append('max_results', String(req.maxResults));
|
|
602
|
+
}
|
|
603
|
+
if (req.pageToken !== undefined) {
|
|
604
|
+
params.append('page_token', req.pageToken);
|
|
605
|
+
}
|
|
606
|
+
const query = params.toString();
|
|
607
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
608
|
+
let resp;
|
|
609
|
+
const call = async (callSignal) => {
|
|
610
|
+
const headers = new Headers();
|
|
611
|
+
if (this.workspaceId !== undefined) {
|
|
612
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
613
|
+
}
|
|
614
|
+
headers.set('User-Agent', this.userAgent);
|
|
615
|
+
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
616
|
+
const respBody = await executeHttpCall({
|
|
617
|
+
request: httpReq,
|
|
618
|
+
httpClient: this.httpClient,
|
|
619
|
+
logger: this.logger,
|
|
620
|
+
});
|
|
621
|
+
resp = parseResponse(respBody, unmarshalGetRecipientSharePermissionsResponseSchema);
|
|
622
|
+
};
|
|
623
|
+
await executeCall(call, options);
|
|
624
|
+
if (resp === undefined) {
|
|
625
|
+
throw new Error('operation completed without a result.');
|
|
626
|
+
}
|
|
627
|
+
return resp;
|
|
628
|
+
}
|
|
665
629
|
/**
|
|
666
630
|
* Gets an array of all share recipients within the current metastore where:
|
|
667
631
|
*
|
|
@@ -696,11 +660,11 @@ export class SharingClient {
|
|
|
696
660
|
httpClient: this.httpClient,
|
|
697
661
|
logger: this.logger,
|
|
698
662
|
});
|
|
699
|
-
resp = parseResponse(respBody,
|
|
663
|
+
resp = parseResponse(respBody, unmarshalListRecipientsResponseSchema);
|
|
700
664
|
};
|
|
701
665
|
await executeCall(call, options);
|
|
702
666
|
if (resp === undefined) {
|
|
703
|
-
throw new Error('
|
|
667
|
+
throw new Error('operation completed without a result.');
|
|
704
668
|
}
|
|
705
669
|
return resp;
|
|
706
670
|
}
|
|
@@ -717,6 +681,42 @@ export class SharingClient {
|
|
|
717
681
|
pageReq.pageToken = resp.nextPageToken;
|
|
718
682
|
}
|
|
719
683
|
}
|
|
684
|
+
/**
|
|
685
|
+
* Gets the permissions for a data share from the metastore.
|
|
686
|
+
* The caller must have the USE_SHARE privilege on the metastore or be the owner of the share.
|
|
687
|
+
*/
|
|
688
|
+
async listSharePermissions(req, options) {
|
|
689
|
+
const url = `${this.host}/api/2.1/unity-catalog/shares/${req.name ?? ''}/permissions`;
|
|
690
|
+
const params = new URLSearchParams();
|
|
691
|
+
if (req.maxResults !== undefined) {
|
|
692
|
+
params.append('max_results', String(req.maxResults));
|
|
693
|
+
}
|
|
694
|
+
if (req.pageToken !== undefined) {
|
|
695
|
+
params.append('page_token', req.pageToken);
|
|
696
|
+
}
|
|
697
|
+
const query = params.toString();
|
|
698
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
699
|
+
let resp;
|
|
700
|
+
const call = async (callSignal) => {
|
|
701
|
+
const headers = new Headers();
|
|
702
|
+
if (this.workspaceId !== undefined) {
|
|
703
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
704
|
+
}
|
|
705
|
+
headers.set('User-Agent', this.userAgent);
|
|
706
|
+
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
707
|
+
const respBody = await executeHttpCall({
|
|
708
|
+
request: httpReq,
|
|
709
|
+
httpClient: this.httpClient,
|
|
710
|
+
logger: this.logger,
|
|
711
|
+
});
|
|
712
|
+
resp = parseResponse(respBody, unmarshalGetSharePermissionsResponseSchema);
|
|
713
|
+
};
|
|
714
|
+
await executeCall(call, options);
|
|
715
|
+
if (resp === undefined) {
|
|
716
|
+
throw new Error('operation completed without a result.');
|
|
717
|
+
}
|
|
718
|
+
return resp;
|
|
719
|
+
}
|
|
720
720
|
/**
|
|
721
721
|
* Gets an array of data object shares from the metastore. If the caller has the USE_SHARE privilege on the metastore, all shares are returned. Otherwise, only shares owned by the caller are returned.
|
|
722
722
|
* There is no guarantee of a specific ordering of the elements in the array.
|
|
@@ -745,11 +745,11 @@ export class SharingClient {
|
|
|
745
745
|
httpClient: this.httpClient,
|
|
746
746
|
logger: this.logger,
|
|
747
747
|
});
|
|
748
|
-
resp = parseResponse(respBody,
|
|
748
|
+
resp = parseResponse(respBody, unmarshalListSharesResponseSchema);
|
|
749
749
|
};
|
|
750
750
|
await executeCall(call, options);
|
|
751
751
|
if (resp === undefined) {
|
|
752
|
-
throw new Error('
|
|
752
|
+
throw new Error('operation completed without a result.');
|
|
753
753
|
}
|
|
754
754
|
return resp;
|
|
755
755
|
}
|
|
@@ -785,11 +785,11 @@ export class SharingClient {
|
|
|
785
785
|
httpClient: this.httpClient,
|
|
786
786
|
logger: this.logger,
|
|
787
787
|
});
|
|
788
|
-
resp = parseResponse(respBody,
|
|
788
|
+
resp = parseResponse(respBody, unmarshalRetrieveTokenResponseSchema);
|
|
789
789
|
};
|
|
790
790
|
await executeCall(call, options);
|
|
791
791
|
if (resp === undefined) {
|
|
792
|
-
throw new Error('
|
|
792
|
+
throw new Error('operation completed without a result.');
|
|
793
793
|
}
|
|
794
794
|
return resp;
|
|
795
795
|
}
|
|
@@ -817,7 +817,7 @@ export class SharingClient {
|
|
|
817
817
|
};
|
|
818
818
|
await executeCall(call, options);
|
|
819
819
|
if (resp === undefined) {
|
|
820
|
-
throw new Error('
|
|
820
|
+
throw new Error('operation completed without a result.');
|
|
821
821
|
}
|
|
822
822
|
return resp;
|
|
823
823
|
}
|
|
@@ -845,7 +845,7 @@ export class SharingClient {
|
|
|
845
845
|
};
|
|
846
846
|
await executeCall(call, options);
|
|
847
847
|
if (resp === undefined) {
|
|
848
|
-
throw new Error('
|
|
848
|
+
throw new Error('operation completed without a result.');
|
|
849
849
|
}
|
|
850
850
|
return resp;
|
|
851
851
|
}
|
|
@@ -873,7 +873,7 @@ export class SharingClient {
|
|
|
873
873
|
};
|
|
874
874
|
await executeCall(call, options);
|
|
875
875
|
if (resp === undefined) {
|
|
876
|
-
throw new Error('
|
|
876
|
+
throw new Error('operation completed without a result.');
|
|
877
877
|
}
|
|
878
878
|
return resp;
|
|
879
879
|
}
|
|
@@ -914,7 +914,7 @@ export class SharingClient {
|
|
|
914
914
|
};
|
|
915
915
|
await executeCall(call, options);
|
|
916
916
|
if (resp === undefined) {
|
|
917
|
-
throw new Error('
|
|
917
|
+
throw new Error('operation completed without a result.');
|
|
918
918
|
}
|
|
919
919
|
return resp;
|
|
920
920
|
}
|
|
@@ -942,11 +942,11 @@ export class SharingClient {
|
|
|
942
942
|
httpClient: this.httpClient,
|
|
943
943
|
logger: this.logger,
|
|
944
944
|
});
|
|
945
|
-
resp = parseResponse(respBody,
|
|
945
|
+
resp = parseResponse(respBody, unmarshalUpdateSharePermissionsResponseSchema);
|
|
946
946
|
};
|
|
947
947
|
await executeCall(call, options);
|
|
948
948
|
if (resp === undefined) {
|
|
949
|
-
throw new Error('
|
|
949
|
+
throw new Error('operation completed without a result.');
|
|
950
950
|
}
|
|
951
951
|
return resp;
|
|
952
952
|
}
|