@databricks/sdk-secrets 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 +11 -11
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +22 -22
- 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 +20 -20
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +10 -20
- 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 +72 -85
- package/src/v1/index.ts +10 -10
- package/src/v1/model.ts +43 -59
- package/src/v1/utils.ts +3 -3
package/dist/v1/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/v1/utils.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAG/E,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAQvD,OAAO,OAAO,MAAM,aAAa,CAAC;AAGlC,0EAA0E;AAC1E,6EAA6E;AAC7E,gEAAgE;AAChE,MAAM,UAAU,GAAG,OAAO,CAAC,EAAC,eAAe,EAAE,IAAI,EAAC,CAAC,CAAC;AAQpD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/v1/utils.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAG/E,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,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AAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;YAC1E,kBAAkB,CAAC,GAAG,MAAM,IAAI,GAAG,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;SAAM,IACL,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,SAAS;QAC1B,OAAO,KAAK,KAAK,QAAQ,EACzB,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACvC,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,qCAAqC,OAAO,KAAK,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks/sdk-secrets",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./v1": {
|
|
8
8
|
"types": "./dist/v1/index.d.ts",
|
|
9
|
-
"import": "./dist/v1/index.js"
|
|
9
|
+
"import": "./dist/v1/index.js",
|
|
10
|
+
"default": "./dist/v1/index.js"
|
|
10
11
|
}
|
|
11
12
|
},
|
|
12
13
|
"files": [
|
|
@@ -28,9 +29,9 @@
|
|
|
28
29
|
"author": "Databricks",
|
|
29
30
|
"license": "Apache-2.0",
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@databricks/sdk-auth": ">=0.1.0-dev.
|
|
32
|
-
"@databricks/sdk-core": ">=0.1.0-dev.
|
|
33
|
-
"@databricks/sdk-options": ">=0.1.0-dev.
|
|
32
|
+
"@databricks/sdk-auth": ">=0.1.0-dev.4 <1.0.0",
|
|
33
|
+
"@databricks/sdk-core": ">=0.1.0-dev.5 <1.0.0",
|
|
34
|
+
"@databricks/sdk-options": ">=0.1.0-dev.4 <1.0.0",
|
|
34
35
|
"@js-temporal/polyfill": "^0.5.0",
|
|
35
36
|
"json-bigint": "^1.0.0",
|
|
36
37
|
"zod": "^4.3.6"
|
package/src/v1/client.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
|
|
4
|
-
import type {Call} from '@databricks/sdk-core/api';
|
|
5
4
|
import {createDefault} from '@databricks/sdk-core/clientinfo';
|
|
6
5
|
import type {Logger} from '@databricks/sdk-core/logger';
|
|
7
6
|
import {NoOpLogger} from '@databricks/sdk-core/logger';
|
|
@@ -20,26 +19,26 @@ import pkgJson from '../../package.json' with {type: 'json'};
|
|
|
20
19
|
import type {
|
|
21
20
|
AclItem,
|
|
22
21
|
CreateScopeRequest,
|
|
23
|
-
|
|
22
|
+
CreateScopeResponse,
|
|
24
23
|
DeleteAclRequest,
|
|
25
|
-
|
|
24
|
+
DeleteAclResponse,
|
|
26
25
|
DeleteScopeRequest,
|
|
27
|
-
|
|
26
|
+
DeleteScopeResponse,
|
|
28
27
|
DeleteSecretRequest,
|
|
29
|
-
|
|
28
|
+
DeleteSecretResponse,
|
|
30
29
|
GetAclRequest,
|
|
31
30
|
GetSecretRequest,
|
|
32
|
-
|
|
31
|
+
GetSecretResponse,
|
|
33
32
|
ListAclsRequest,
|
|
34
|
-
|
|
33
|
+
ListAclsResponse,
|
|
35
34
|
ListScopesRequest,
|
|
36
|
-
|
|
35
|
+
ListScopesResponse,
|
|
37
36
|
ListSecretsRequest,
|
|
38
|
-
|
|
37
|
+
ListSecretsResponse,
|
|
39
38
|
PutAclRequest,
|
|
40
|
-
|
|
39
|
+
PutAclResponse,
|
|
41
40
|
PutSecretRequest,
|
|
42
|
-
|
|
41
|
+
PutSecretResponse,
|
|
43
42
|
} from './model';
|
|
44
43
|
import {
|
|
45
44
|
marshalCreateScopeRequestSchema,
|
|
@@ -49,16 +48,16 @@ import {
|
|
|
49
48
|
marshalPutAclRequestSchema,
|
|
50
49
|
marshalPutSecretRequestSchema,
|
|
51
50
|
unmarshalAclItemSchema,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
unmarshalCreateScopeResponseSchema,
|
|
52
|
+
unmarshalDeleteAclResponseSchema,
|
|
53
|
+
unmarshalDeleteScopeResponseSchema,
|
|
54
|
+
unmarshalDeleteSecretResponseSchema,
|
|
55
|
+
unmarshalGetSecretResponseSchema,
|
|
56
|
+
unmarshalListAclsResponseSchema,
|
|
57
|
+
unmarshalListScopesResponseSchema,
|
|
58
|
+
unmarshalListSecretsResponseSchema,
|
|
59
|
+
unmarshalPutAclResponseSchema,
|
|
60
|
+
unmarshalPutSecretResponseSchema,
|
|
62
61
|
} from './model';
|
|
63
62
|
|
|
64
63
|
// Package identity segment for this client to be used in the User-Agent header.
|
|
@@ -140,11 +139,11 @@ export class SecretsClient {
|
|
|
140
139
|
async createScope(
|
|
141
140
|
req: CreateScopeRequest,
|
|
142
141
|
options?: CallOptions
|
|
143
|
-
): Promise<
|
|
142
|
+
): Promise<CreateScopeResponse> {
|
|
144
143
|
const url = `${this.host}/api/2.0/secrets/scopes/create`;
|
|
145
144
|
const body = marshalRequest(req, marshalCreateScopeRequestSchema);
|
|
146
|
-
let resp:
|
|
147
|
-
const call
|
|
145
|
+
let resp: CreateScopeResponse | undefined;
|
|
146
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
148
147
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
149
148
|
if (this.workspaceId !== undefined) {
|
|
150
149
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -156,14 +155,11 @@ export class SecretsClient {
|
|
|
156
155
|
httpClient: this.httpClient,
|
|
157
156
|
logger: this.logger,
|
|
158
157
|
});
|
|
159
|
-
resp = parseResponse(
|
|
160
|
-
respBody,
|
|
161
|
-
unmarshalCreateScopeRequest_ResponseSchema
|
|
162
|
-
);
|
|
158
|
+
resp = parseResponse(respBody, unmarshalCreateScopeResponseSchema);
|
|
163
159
|
};
|
|
164
160
|
await executeCall(call, options);
|
|
165
161
|
if (resp === undefined) {
|
|
166
|
-
throw new Error('
|
|
162
|
+
throw new Error('operation completed without a result.');
|
|
167
163
|
}
|
|
168
164
|
return resp;
|
|
169
165
|
}
|
|
@@ -189,11 +185,11 @@ export class SecretsClient {
|
|
|
189
185
|
async deleteAcl(
|
|
190
186
|
req: DeleteAclRequest,
|
|
191
187
|
options?: CallOptions
|
|
192
|
-
): Promise<
|
|
188
|
+
): Promise<DeleteAclResponse> {
|
|
193
189
|
const url = `${this.host}/api/2.0/secrets/acls/delete`;
|
|
194
190
|
const body = marshalRequest(req, marshalDeleteAclRequestSchema);
|
|
195
|
-
let resp:
|
|
196
|
-
const call
|
|
191
|
+
let resp: DeleteAclResponse | undefined;
|
|
192
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
197
193
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
198
194
|
if (this.workspaceId !== undefined) {
|
|
199
195
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -205,11 +201,11 @@ export class SecretsClient {
|
|
|
205
201
|
httpClient: this.httpClient,
|
|
206
202
|
logger: this.logger,
|
|
207
203
|
});
|
|
208
|
-
resp = parseResponse(respBody,
|
|
204
|
+
resp = parseResponse(respBody, unmarshalDeleteAclResponseSchema);
|
|
209
205
|
};
|
|
210
206
|
await executeCall(call, options);
|
|
211
207
|
if (resp === undefined) {
|
|
212
|
-
throw new Error('
|
|
208
|
+
throw new Error('operation completed without a result.');
|
|
213
209
|
}
|
|
214
210
|
return resp;
|
|
215
211
|
}
|
|
@@ -232,11 +228,11 @@ export class SecretsClient {
|
|
|
232
228
|
async deleteScope(
|
|
233
229
|
req: DeleteScopeRequest,
|
|
234
230
|
options?: CallOptions
|
|
235
|
-
): Promise<
|
|
231
|
+
): Promise<DeleteScopeResponse> {
|
|
236
232
|
const url = `${this.host}/api/2.0/secrets/scopes/delete`;
|
|
237
233
|
const body = marshalRequest(req, marshalDeleteScopeRequestSchema);
|
|
238
|
-
let resp:
|
|
239
|
-
const call
|
|
234
|
+
let resp: DeleteScopeResponse | undefined;
|
|
235
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
240
236
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
241
237
|
if (this.workspaceId !== undefined) {
|
|
242
238
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -248,14 +244,11 @@ export class SecretsClient {
|
|
|
248
244
|
httpClient: this.httpClient,
|
|
249
245
|
logger: this.logger,
|
|
250
246
|
});
|
|
251
|
-
resp = parseResponse(
|
|
252
|
-
respBody,
|
|
253
|
-
unmarshalDeleteScopeRequest_ResponseSchema
|
|
254
|
-
);
|
|
247
|
+
resp = parseResponse(respBody, unmarshalDeleteScopeResponseSchema);
|
|
255
248
|
};
|
|
256
249
|
await executeCall(call, options);
|
|
257
250
|
if (resp === undefined) {
|
|
258
|
-
throw new Error('
|
|
251
|
+
throw new Error('operation completed without a result.');
|
|
259
252
|
}
|
|
260
253
|
return resp;
|
|
261
254
|
}
|
|
@@ -280,11 +273,11 @@ export class SecretsClient {
|
|
|
280
273
|
async deleteSecret(
|
|
281
274
|
req: DeleteSecretRequest,
|
|
282
275
|
options?: CallOptions
|
|
283
|
-
): Promise<
|
|
276
|
+
): Promise<DeleteSecretResponse> {
|
|
284
277
|
const url = `${this.host}/api/2.0/secrets/delete`;
|
|
285
278
|
const body = marshalRequest(req, marshalDeleteSecretRequestSchema);
|
|
286
|
-
let resp:
|
|
287
|
-
const call
|
|
279
|
+
let resp: DeleteSecretResponse | undefined;
|
|
280
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
288
281
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
289
282
|
if (this.workspaceId !== undefined) {
|
|
290
283
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -296,14 +289,11 @@ export class SecretsClient {
|
|
|
296
289
|
httpClient: this.httpClient,
|
|
297
290
|
logger: this.logger,
|
|
298
291
|
});
|
|
299
|
-
resp = parseResponse(
|
|
300
|
-
respBody,
|
|
301
|
-
unmarshalDeleteSecretRequest_ResponseSchema
|
|
302
|
-
);
|
|
292
|
+
resp = parseResponse(respBody, unmarshalDeleteSecretResponseSchema);
|
|
303
293
|
};
|
|
304
294
|
await executeCall(call, options);
|
|
305
295
|
if (resp === undefined) {
|
|
306
|
-
throw new Error('
|
|
296
|
+
throw new Error('operation completed without a result.');
|
|
307
297
|
}
|
|
308
298
|
return resp;
|
|
309
299
|
}
|
|
@@ -338,7 +328,7 @@ export class SecretsClient {
|
|
|
338
328
|
const query = params.toString();
|
|
339
329
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
340
330
|
let resp: AclItem | undefined;
|
|
341
|
-
const call
|
|
331
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
342
332
|
const headers = new Headers();
|
|
343
333
|
if (this.workspaceId !== undefined) {
|
|
344
334
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -354,7 +344,7 @@ export class SecretsClient {
|
|
|
354
344
|
};
|
|
355
345
|
await executeCall(call, options);
|
|
356
346
|
if (resp === undefined) {
|
|
357
|
-
throw new Error('
|
|
347
|
+
throw new Error('operation completed without a result.');
|
|
358
348
|
}
|
|
359
349
|
return resp;
|
|
360
350
|
}
|
|
@@ -392,7 +382,7 @@ export class SecretsClient {
|
|
|
392
382
|
async getSecret(
|
|
393
383
|
req: GetSecretRequest,
|
|
394
384
|
options?: CallOptions
|
|
395
|
-
): Promise<
|
|
385
|
+
): Promise<GetSecretResponse> {
|
|
396
386
|
const url = `${this.host}/api/2.0/secrets/get`;
|
|
397
387
|
const params = new URLSearchParams();
|
|
398
388
|
if (req.scope !== undefined) {
|
|
@@ -403,8 +393,8 @@ export class SecretsClient {
|
|
|
403
393
|
}
|
|
404
394
|
const query = params.toString();
|
|
405
395
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
406
|
-
let resp:
|
|
407
|
-
const call
|
|
396
|
+
let resp: GetSecretResponse | undefined;
|
|
397
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
408
398
|
const headers = new Headers();
|
|
409
399
|
if (this.workspaceId !== undefined) {
|
|
410
400
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -416,11 +406,11 @@ export class SecretsClient {
|
|
|
416
406
|
httpClient: this.httpClient,
|
|
417
407
|
logger: this.logger,
|
|
418
408
|
});
|
|
419
|
-
resp = parseResponse(respBody,
|
|
409
|
+
resp = parseResponse(respBody, unmarshalGetSecretResponseSchema);
|
|
420
410
|
};
|
|
421
411
|
await executeCall(call, options);
|
|
422
412
|
if (resp === undefined) {
|
|
423
|
-
throw new Error('
|
|
413
|
+
throw new Error('operation completed without a result.');
|
|
424
414
|
}
|
|
425
415
|
return resp;
|
|
426
416
|
}
|
|
@@ -450,7 +440,7 @@ export class SecretsClient {
|
|
|
450
440
|
async listAcls(
|
|
451
441
|
req: ListAclsRequest,
|
|
452
442
|
options?: CallOptions
|
|
453
|
-
): Promise<
|
|
443
|
+
): Promise<ListAclsResponse> {
|
|
454
444
|
const url = `${this.host}/api/2.0/secrets/acls/list`;
|
|
455
445
|
const params = new URLSearchParams();
|
|
456
446
|
if (req.scope !== undefined) {
|
|
@@ -458,8 +448,8 @@ export class SecretsClient {
|
|
|
458
448
|
}
|
|
459
449
|
const query = params.toString();
|
|
460
450
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
461
|
-
let resp:
|
|
462
|
-
const call
|
|
451
|
+
let resp: ListAclsResponse | undefined;
|
|
452
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
463
453
|
const headers = new Headers();
|
|
464
454
|
if (this.workspaceId !== undefined) {
|
|
465
455
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -471,11 +461,11 @@ export class SecretsClient {
|
|
|
471
461
|
httpClient: this.httpClient,
|
|
472
462
|
logger: this.logger,
|
|
473
463
|
});
|
|
474
|
-
resp = parseResponse(respBody,
|
|
464
|
+
resp = parseResponse(respBody, unmarshalListAclsResponseSchema);
|
|
475
465
|
};
|
|
476
466
|
await executeCall(call, options);
|
|
477
467
|
if (resp === undefined) {
|
|
478
|
-
throw new Error('
|
|
468
|
+
throw new Error('operation completed without a result.');
|
|
479
469
|
}
|
|
480
470
|
return resp;
|
|
481
471
|
}
|
|
@@ -502,10 +492,10 @@ export class SecretsClient {
|
|
|
502
492
|
async listScopes(
|
|
503
493
|
_req: ListScopesRequest,
|
|
504
494
|
options?: CallOptions
|
|
505
|
-
): Promise<
|
|
495
|
+
): Promise<ListScopesResponse> {
|
|
506
496
|
const url = `${this.host}/api/2.0/secrets/scopes/list`;
|
|
507
|
-
let resp:
|
|
508
|
-
const call
|
|
497
|
+
let resp: ListScopesResponse | undefined;
|
|
498
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
509
499
|
const headers = new Headers();
|
|
510
500
|
if (this.workspaceId !== undefined) {
|
|
511
501
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -517,11 +507,11 @@ export class SecretsClient {
|
|
|
517
507
|
httpClient: this.httpClient,
|
|
518
508
|
logger: this.logger,
|
|
519
509
|
});
|
|
520
|
-
resp = parseResponse(respBody,
|
|
510
|
+
resp = parseResponse(respBody, unmarshalListScopesResponseSchema);
|
|
521
511
|
};
|
|
522
512
|
await executeCall(call, options);
|
|
523
513
|
if (resp === undefined) {
|
|
524
|
-
throw new Error('
|
|
514
|
+
throw new Error('operation completed without a result.');
|
|
525
515
|
}
|
|
526
516
|
return resp;
|
|
527
517
|
}
|
|
@@ -556,7 +546,7 @@ export class SecretsClient {
|
|
|
556
546
|
async listSecrets(
|
|
557
547
|
req: ListSecretsRequest,
|
|
558
548
|
options?: CallOptions
|
|
559
|
-
): Promise<
|
|
549
|
+
): Promise<ListSecretsResponse> {
|
|
560
550
|
const url = `${this.host}/api/2.0/secrets/list`;
|
|
561
551
|
const params = new URLSearchParams();
|
|
562
552
|
if (req.scope !== undefined) {
|
|
@@ -564,8 +554,8 @@ export class SecretsClient {
|
|
|
564
554
|
}
|
|
565
555
|
const query = params.toString();
|
|
566
556
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
567
|
-
let resp:
|
|
568
|
-
const call
|
|
557
|
+
let resp: ListSecretsResponse | undefined;
|
|
558
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
569
559
|
const headers = new Headers();
|
|
570
560
|
if (this.workspaceId !== undefined) {
|
|
571
561
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -577,14 +567,11 @@ export class SecretsClient {
|
|
|
577
567
|
httpClient: this.httpClient,
|
|
578
568
|
logger: this.logger,
|
|
579
569
|
});
|
|
580
|
-
resp = parseResponse(
|
|
581
|
-
respBody,
|
|
582
|
-
unmarshalListSecretsRequest_ResponseSchema
|
|
583
|
-
);
|
|
570
|
+
resp = parseResponse(respBody, unmarshalListSecretsResponseSchema);
|
|
584
571
|
};
|
|
585
572
|
await executeCall(call, options);
|
|
586
573
|
if (resp === undefined) {
|
|
587
|
-
throw new Error('
|
|
574
|
+
throw new Error('operation completed without a result.');
|
|
588
575
|
}
|
|
589
576
|
return resp;
|
|
590
577
|
}
|
|
@@ -626,11 +613,11 @@ export class SecretsClient {
|
|
|
626
613
|
async putAcl(
|
|
627
614
|
req: PutAclRequest,
|
|
628
615
|
options?: CallOptions
|
|
629
|
-
): Promise<
|
|
616
|
+
): Promise<PutAclResponse> {
|
|
630
617
|
const url = `${this.host}/api/2.0/secrets/acls/put`;
|
|
631
618
|
const body = marshalRequest(req, marshalPutAclRequestSchema);
|
|
632
|
-
let resp:
|
|
633
|
-
const call
|
|
619
|
+
let resp: PutAclResponse | undefined;
|
|
620
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
634
621
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
635
622
|
if (this.workspaceId !== undefined) {
|
|
636
623
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -642,11 +629,11 @@ export class SecretsClient {
|
|
|
642
629
|
httpClient: this.httpClient,
|
|
643
630
|
logger: this.logger,
|
|
644
631
|
});
|
|
645
|
-
resp = parseResponse(respBody,
|
|
632
|
+
resp = parseResponse(respBody, unmarshalPutAclResponseSchema);
|
|
646
633
|
};
|
|
647
634
|
await executeCall(call, options);
|
|
648
635
|
if (resp === undefined) {
|
|
649
|
-
throw new Error('
|
|
636
|
+
throw new Error('operation completed without a result.');
|
|
650
637
|
}
|
|
651
638
|
return resp;
|
|
652
639
|
}
|
|
@@ -686,11 +673,11 @@ export class SecretsClient {
|
|
|
686
673
|
async putSecret(
|
|
687
674
|
req: PutSecretRequest,
|
|
688
675
|
options?: CallOptions
|
|
689
|
-
): Promise<
|
|
676
|
+
): Promise<PutSecretResponse> {
|
|
690
677
|
const url = `${this.host}/api/2.0/secrets/put`;
|
|
691
678
|
const body = marshalRequest(req, marshalPutSecretRequestSchema);
|
|
692
|
-
let resp:
|
|
693
|
-
const call
|
|
679
|
+
let resp: PutSecretResponse | undefined;
|
|
680
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
694
681
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
695
682
|
if (this.workspaceId !== undefined) {
|
|
696
683
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -702,11 +689,11 @@ export class SecretsClient {
|
|
|
702
689
|
httpClient: this.httpClient,
|
|
703
690
|
logger: this.logger,
|
|
704
691
|
});
|
|
705
|
-
resp = parseResponse(respBody,
|
|
692
|
+
resp = parseResponse(respBody, unmarshalPutSecretResponseSchema);
|
|
706
693
|
};
|
|
707
694
|
await executeCall(call, options);
|
|
708
695
|
if (resp === undefined) {
|
|
709
|
-
throw new Error('
|
|
696
|
+
throw new Error('operation completed without a result.');
|
|
710
697
|
}
|
|
711
698
|
return resp;
|
|
712
699
|
}
|
package/src/v1/index.ts
CHANGED
|
@@ -8,26 +8,26 @@ export type {
|
|
|
8
8
|
AclItem,
|
|
9
9
|
AzureKeyVaultSecretScopeMetadata,
|
|
10
10
|
CreateScopeRequest,
|
|
11
|
-
|
|
11
|
+
CreateScopeResponse,
|
|
12
12
|
DeleteAclRequest,
|
|
13
|
-
|
|
13
|
+
DeleteAclResponse,
|
|
14
14
|
DeleteScopeRequest,
|
|
15
|
-
|
|
15
|
+
DeleteScopeResponse,
|
|
16
16
|
DeleteSecretRequest,
|
|
17
|
-
|
|
17
|
+
DeleteSecretResponse,
|
|
18
18
|
GetAclRequest,
|
|
19
19
|
GetSecretRequest,
|
|
20
|
-
|
|
20
|
+
GetSecretResponse,
|
|
21
21
|
ListAclsRequest,
|
|
22
|
-
|
|
22
|
+
ListAclsResponse,
|
|
23
23
|
ListScopesRequest,
|
|
24
|
-
|
|
24
|
+
ListScopesResponse,
|
|
25
25
|
ListSecretsRequest,
|
|
26
|
-
|
|
26
|
+
ListSecretsResponse,
|
|
27
27
|
PutAclRequest,
|
|
28
|
-
|
|
28
|
+
PutAclResponse,
|
|
29
29
|
PutSecretRequest,
|
|
30
|
-
|
|
30
|
+
PutSecretResponse,
|
|
31
31
|
SecretMetadata,
|
|
32
32
|
SecretScope,
|
|
33
33
|
} from './model';
|