@databricks/sdk-scim 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.map +1 -1
- package/dist/v1/client.js +23 -23
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/model.d.ts +21 -21
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +21 -21
- 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 +64 -65
- package/src/v1/model.ts +21 -21
- package/src/v1/utils.ts +3 -3
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';
|
|
@@ -155,7 +154,7 @@ export class ScimClient {
|
|
|
155
154
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Groups`;
|
|
156
155
|
const body = marshalRequest(req, marshalCreateAccountGroupRequestSchema);
|
|
157
156
|
let resp: AccountGroup | undefined;
|
|
158
|
-
const call
|
|
157
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
159
158
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
160
159
|
headers.set('User-Agent', this.userAgent);
|
|
161
160
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
@@ -168,7 +167,7 @@ export class ScimClient {
|
|
|
168
167
|
};
|
|
169
168
|
await executeCall(call, options);
|
|
170
169
|
if (resp === undefined) {
|
|
171
|
-
throw new Error('
|
|
170
|
+
throw new Error('operation completed without a result.');
|
|
172
171
|
}
|
|
173
172
|
return resp;
|
|
174
173
|
}
|
|
@@ -179,7 +178,7 @@ export class ScimClient {
|
|
|
179
178
|
options?: CallOptions
|
|
180
179
|
): Promise<void> {
|
|
181
180
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Groups/${req.id ?? ''}`;
|
|
182
|
-
const call
|
|
181
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
183
182
|
const headers = new Headers();
|
|
184
183
|
headers.set('User-Agent', this.userAgent);
|
|
185
184
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
@@ -199,7 +198,7 @@ export class ScimClient {
|
|
|
199
198
|
): Promise<AccountGroup> {
|
|
200
199
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Groups/${req.id ?? ''}`;
|
|
201
200
|
let resp: AccountGroup | undefined;
|
|
202
|
-
const call
|
|
201
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
203
202
|
const headers = new Headers();
|
|
204
203
|
headers.set('User-Agent', this.userAgent);
|
|
205
204
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
@@ -212,7 +211,7 @@ export class ScimClient {
|
|
|
212
211
|
};
|
|
213
212
|
await executeCall(call, options);
|
|
214
213
|
if (resp === undefined) {
|
|
215
|
-
throw new Error('
|
|
214
|
+
throw new Error('operation completed without a result.');
|
|
216
215
|
}
|
|
217
216
|
return resp;
|
|
218
217
|
}
|
|
@@ -253,7 +252,7 @@ export class ScimClient {
|
|
|
253
252
|
const query = params.toString();
|
|
254
253
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
255
254
|
let resp: ListAccountGroupsResponse | undefined;
|
|
256
|
-
const call
|
|
255
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
257
256
|
const headers = new Headers();
|
|
258
257
|
headers.set('User-Agent', this.userAgent);
|
|
259
258
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
@@ -266,7 +265,7 @@ export class ScimClient {
|
|
|
266
265
|
};
|
|
267
266
|
await executeCall(call, options);
|
|
268
267
|
if (resp === undefined) {
|
|
269
|
-
throw new Error('
|
|
268
|
+
throw new Error('operation completed without a result.');
|
|
270
269
|
}
|
|
271
270
|
return resp;
|
|
272
271
|
}
|
|
@@ -296,7 +295,7 @@ export class ScimClient {
|
|
|
296
295
|
): Promise<void> {
|
|
297
296
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Groups/${req.id ?? ''}`;
|
|
298
297
|
const body = marshalRequest(req, marshalPatchAccountGroupRequestSchema);
|
|
299
|
-
const call
|
|
298
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
300
299
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
301
300
|
headers.set('User-Agent', this.userAgent);
|
|
302
301
|
const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
|
|
@@ -316,7 +315,7 @@ export class ScimClient {
|
|
|
316
315
|
): Promise<void> {
|
|
317
316
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Groups/${req.id ?? ''}`;
|
|
318
317
|
const body = marshalRequest(req, marshalUpdateAccountGroupRequestSchema);
|
|
319
|
-
const call
|
|
318
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
320
319
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
321
320
|
headers.set('User-Agent', this.userAgent);
|
|
322
321
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
@@ -340,7 +339,7 @@ export class ScimClient {
|
|
|
340
339
|
marshalCreateAccountServicePrincipalRequestSchema
|
|
341
340
|
);
|
|
342
341
|
let resp: AccountServicePrincipal | undefined;
|
|
343
|
-
const call
|
|
342
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
344
343
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
345
344
|
headers.set('User-Agent', this.userAgent);
|
|
346
345
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
@@ -353,7 +352,7 @@ export class ScimClient {
|
|
|
353
352
|
};
|
|
354
353
|
await executeCall(call, options);
|
|
355
354
|
if (resp === undefined) {
|
|
356
|
-
throw new Error('
|
|
355
|
+
throw new Error('operation completed without a result.');
|
|
357
356
|
}
|
|
358
357
|
return resp;
|
|
359
358
|
}
|
|
@@ -364,7 +363,7 @@ export class ScimClient {
|
|
|
364
363
|
options?: CallOptions
|
|
365
364
|
): Promise<void> {
|
|
366
365
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/ServicePrincipals/${req.id ?? ''}`;
|
|
367
|
-
const call
|
|
366
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
368
367
|
const headers = new Headers();
|
|
369
368
|
headers.set('User-Agent', this.userAgent);
|
|
370
369
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
@@ -384,7 +383,7 @@ export class ScimClient {
|
|
|
384
383
|
): Promise<AccountServicePrincipal> {
|
|
385
384
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/ServicePrincipals/${req.id ?? ''}`;
|
|
386
385
|
let resp: AccountServicePrincipal | undefined;
|
|
387
|
-
const call
|
|
386
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
388
387
|
const headers = new Headers();
|
|
389
388
|
headers.set('User-Agent', this.userAgent);
|
|
390
389
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
@@ -397,7 +396,7 @@ export class ScimClient {
|
|
|
397
396
|
};
|
|
398
397
|
await executeCall(call, options);
|
|
399
398
|
if (resp === undefined) {
|
|
400
|
-
throw new Error('
|
|
399
|
+
throw new Error('operation completed without a result.');
|
|
401
400
|
}
|
|
402
401
|
return resp;
|
|
403
402
|
}
|
|
@@ -433,7 +432,7 @@ export class ScimClient {
|
|
|
433
432
|
const query = params.toString();
|
|
434
433
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
435
434
|
let resp: ListAccountServicePrincipalsResponse | undefined;
|
|
436
|
-
const call
|
|
435
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
437
436
|
const headers = new Headers();
|
|
438
437
|
headers.set('User-Agent', this.userAgent);
|
|
439
438
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
@@ -449,7 +448,7 @@ export class ScimClient {
|
|
|
449
448
|
};
|
|
450
449
|
await executeCall(call, options);
|
|
451
450
|
if (resp === undefined) {
|
|
452
|
-
throw new Error('
|
|
451
|
+
throw new Error('operation completed without a result.');
|
|
453
452
|
}
|
|
454
453
|
return resp;
|
|
455
454
|
}
|
|
@@ -482,7 +481,7 @@ export class ScimClient {
|
|
|
482
481
|
req,
|
|
483
482
|
marshalPatchAccountServicePrincipalRequestSchema
|
|
484
483
|
);
|
|
485
|
-
const call
|
|
484
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
486
485
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
487
486
|
headers.set('User-Agent', this.userAgent);
|
|
488
487
|
const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
|
|
@@ -509,7 +508,7 @@ export class ScimClient {
|
|
|
509
508
|
req,
|
|
510
509
|
marshalUpdateAccountServicePrincipalRequestSchema
|
|
511
510
|
);
|
|
512
|
-
const call
|
|
511
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
513
512
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
514
513
|
headers.set('User-Agent', this.userAgent);
|
|
515
514
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
@@ -530,7 +529,7 @@ export class ScimClient {
|
|
|
530
529
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Users`;
|
|
531
530
|
const body = marshalRequest(req, marshalCreateAccountUserRequestSchema);
|
|
532
531
|
let resp: AccountUser | undefined;
|
|
533
|
-
const call
|
|
532
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
534
533
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
535
534
|
headers.set('User-Agent', this.userAgent);
|
|
536
535
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
@@ -543,7 +542,7 @@ export class ScimClient {
|
|
|
543
542
|
};
|
|
544
543
|
await executeCall(call, options);
|
|
545
544
|
if (resp === undefined) {
|
|
546
|
-
throw new Error('
|
|
545
|
+
throw new Error('operation completed without a result.');
|
|
547
546
|
}
|
|
548
547
|
return resp;
|
|
549
548
|
}
|
|
@@ -554,7 +553,7 @@ export class ScimClient {
|
|
|
554
553
|
options?: CallOptions
|
|
555
554
|
): Promise<void> {
|
|
556
555
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Users/${req.id ?? ''}`;
|
|
557
|
-
const call
|
|
556
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
558
557
|
const headers = new Headers();
|
|
559
558
|
headers.set('User-Agent', this.userAgent);
|
|
560
559
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
@@ -598,7 +597,7 @@ export class ScimClient {
|
|
|
598
597
|
const query = params.toString();
|
|
599
598
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
600
599
|
let resp: AccountUser | undefined;
|
|
601
|
-
const call
|
|
600
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
602
601
|
const headers = new Headers();
|
|
603
602
|
headers.set('User-Agent', this.userAgent);
|
|
604
603
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
@@ -611,7 +610,7 @@ export class ScimClient {
|
|
|
611
610
|
};
|
|
612
611
|
await executeCall(call, options);
|
|
613
612
|
if (resp === undefined) {
|
|
614
|
-
throw new Error('
|
|
613
|
+
throw new Error('operation completed without a result.');
|
|
615
614
|
}
|
|
616
615
|
return resp;
|
|
617
616
|
}
|
|
@@ -647,7 +646,7 @@ export class ScimClient {
|
|
|
647
646
|
const query = params.toString();
|
|
648
647
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
649
648
|
let resp: ListAccountUsersResponse | undefined;
|
|
650
|
-
const call
|
|
649
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
651
650
|
const headers = new Headers();
|
|
652
651
|
headers.set('User-Agent', this.userAgent);
|
|
653
652
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
@@ -660,7 +659,7 @@ export class ScimClient {
|
|
|
660
659
|
};
|
|
661
660
|
await executeCall(call, options);
|
|
662
661
|
if (resp === undefined) {
|
|
663
|
-
throw new Error('
|
|
662
|
+
throw new Error('operation completed without a result.');
|
|
664
663
|
}
|
|
665
664
|
return resp;
|
|
666
665
|
}
|
|
@@ -690,7 +689,7 @@ export class ScimClient {
|
|
|
690
689
|
): Promise<void> {
|
|
691
690
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Users/${req.id ?? ''}`;
|
|
692
691
|
const body = marshalRequest(req, marshalPatchAccountUserRequestSchema);
|
|
693
|
-
const call
|
|
692
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
694
693
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
695
694
|
headers.set('User-Agent', this.userAgent);
|
|
696
695
|
const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
|
|
@@ -710,7 +709,7 @@ export class ScimClient {
|
|
|
710
709
|
): Promise<void> {
|
|
711
710
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/scim/v2/Users/${req.id ?? ''}`;
|
|
712
711
|
const body = marshalRequest(req, marshalUpdateAccountUserRequestSchema);
|
|
713
|
-
const call
|
|
712
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
714
713
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
715
714
|
headers.set('User-Agent', this.userAgent);
|
|
716
715
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
@@ -736,7 +735,7 @@ export class ScimClient {
|
|
|
736
735
|
const query = params.toString();
|
|
737
736
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
738
737
|
let resp: User | undefined;
|
|
739
|
-
const call
|
|
738
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
740
739
|
const headers = new Headers();
|
|
741
740
|
if (this.workspaceId !== undefined) {
|
|
742
741
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -752,7 +751,7 @@ export class ScimClient {
|
|
|
752
751
|
};
|
|
753
752
|
await executeCall(call, options);
|
|
754
753
|
if (resp === undefined) {
|
|
755
|
-
throw new Error('
|
|
754
|
+
throw new Error('operation completed without a result.');
|
|
756
755
|
}
|
|
757
756
|
return resp;
|
|
758
757
|
}
|
|
@@ -765,7 +764,7 @@ export class ScimClient {
|
|
|
765
764
|
const url = `${this.host}/api/2.0/preview/scim/v2/Groups`;
|
|
766
765
|
const body = marshalRequest(req, marshalCreateGroupRequestSchema);
|
|
767
766
|
let resp: Group | undefined;
|
|
768
|
-
const call
|
|
767
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
769
768
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
770
769
|
if (this.workspaceId !== undefined) {
|
|
771
770
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -781,7 +780,7 @@ export class ScimClient {
|
|
|
781
780
|
};
|
|
782
781
|
await executeCall(call, options);
|
|
783
782
|
if (resp === undefined) {
|
|
784
|
-
throw new Error('
|
|
783
|
+
throw new Error('operation completed without a result.');
|
|
785
784
|
}
|
|
786
785
|
return resp;
|
|
787
786
|
}
|
|
@@ -792,7 +791,7 @@ export class ScimClient {
|
|
|
792
791
|
options?: CallOptions
|
|
793
792
|
): Promise<void> {
|
|
794
793
|
const url = `${this.host}/api/2.0/preview/scim/v2/Groups/${req.id ?? ''}`;
|
|
795
|
-
const call
|
|
794
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
796
795
|
const headers = new Headers();
|
|
797
796
|
if (this.workspaceId !== undefined) {
|
|
798
797
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -812,7 +811,7 @@ export class ScimClient {
|
|
|
812
811
|
async getGroup(req: GetGroupRequest, options?: CallOptions): Promise<Group> {
|
|
813
812
|
const url = `${this.host}/api/2.0/preview/scim/v2/Groups/${req.id ?? ''}`;
|
|
814
813
|
let resp: Group | undefined;
|
|
815
|
-
const call
|
|
814
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
816
815
|
const headers = new Headers();
|
|
817
816
|
if (this.workspaceId !== undefined) {
|
|
818
817
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -828,7 +827,7 @@ export class ScimClient {
|
|
|
828
827
|
};
|
|
829
828
|
await executeCall(call, options);
|
|
830
829
|
if (resp === undefined) {
|
|
831
|
-
throw new Error('
|
|
830
|
+
throw new Error('operation completed without a result.');
|
|
832
831
|
}
|
|
833
832
|
return resp;
|
|
834
833
|
}
|
|
@@ -864,7 +863,7 @@ export class ScimClient {
|
|
|
864
863
|
const query = params.toString();
|
|
865
864
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
866
865
|
let resp: ListGroupsResponse | undefined;
|
|
867
|
-
const call
|
|
866
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
868
867
|
const headers = new Headers();
|
|
869
868
|
if (this.workspaceId !== undefined) {
|
|
870
869
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -880,7 +879,7 @@ export class ScimClient {
|
|
|
880
879
|
};
|
|
881
880
|
await executeCall(call, options);
|
|
882
881
|
if (resp === undefined) {
|
|
883
|
-
throw new Error('
|
|
882
|
+
throw new Error('operation completed without a result.');
|
|
884
883
|
}
|
|
885
884
|
return resp;
|
|
886
885
|
}
|
|
@@ -910,7 +909,7 @@ export class ScimClient {
|
|
|
910
909
|
): Promise<void> {
|
|
911
910
|
const url = `${this.host}/api/2.0/preview/scim/v2/Groups/${req.id ?? ''}`;
|
|
912
911
|
const body = marshalRequest(req, marshalPatchGroupRequestSchema);
|
|
913
|
-
const call
|
|
912
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
914
913
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
915
914
|
if (this.workspaceId !== undefined) {
|
|
916
915
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -933,7 +932,7 @@ export class ScimClient {
|
|
|
933
932
|
): Promise<void> {
|
|
934
933
|
const url = `${this.host}/api/2.0/preview/scim/v2/Groups/${req.id ?? ''}`;
|
|
935
934
|
const body = marshalRequest(req, marshalUpdateGroupRequestSchema);
|
|
936
|
-
const call
|
|
935
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
937
936
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
938
937
|
if (this.workspaceId !== undefined) {
|
|
939
938
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -960,7 +959,7 @@ export class ScimClient {
|
|
|
960
959
|
marshalCreateServicePrincipalRequestSchema
|
|
961
960
|
);
|
|
962
961
|
let resp: ServicePrincipal | undefined;
|
|
963
|
-
const call
|
|
962
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
964
963
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
965
964
|
if (this.workspaceId !== undefined) {
|
|
966
965
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -976,7 +975,7 @@ export class ScimClient {
|
|
|
976
975
|
};
|
|
977
976
|
await executeCall(call, options);
|
|
978
977
|
if (resp === undefined) {
|
|
979
|
-
throw new Error('
|
|
978
|
+
throw new Error('operation completed without a result.');
|
|
980
979
|
}
|
|
981
980
|
return resp;
|
|
982
981
|
}
|
|
@@ -987,7 +986,7 @@ export class ScimClient {
|
|
|
987
986
|
options?: CallOptions
|
|
988
987
|
): Promise<void> {
|
|
989
988
|
const url = `${this.host}/api/2.0/preview/scim/v2/ServicePrincipals/${req.id ?? ''}`;
|
|
990
|
-
const call
|
|
989
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
991
990
|
const headers = new Headers();
|
|
992
991
|
if (this.workspaceId !== undefined) {
|
|
993
992
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1010,7 +1009,7 @@ export class ScimClient {
|
|
|
1010
1009
|
): Promise<ServicePrincipal> {
|
|
1011
1010
|
const url = `${this.host}/api/2.0/preview/scim/v2/ServicePrincipals/${req.id ?? ''}`;
|
|
1012
1011
|
let resp: ServicePrincipal | undefined;
|
|
1013
|
-
const call
|
|
1012
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1014
1013
|
const headers = new Headers();
|
|
1015
1014
|
if (this.workspaceId !== undefined) {
|
|
1016
1015
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1026,7 +1025,7 @@ export class ScimClient {
|
|
|
1026
1025
|
};
|
|
1027
1026
|
await executeCall(call, options);
|
|
1028
1027
|
if (resp === undefined) {
|
|
1029
|
-
throw new Error('
|
|
1028
|
+
throw new Error('operation completed without a result.');
|
|
1030
1029
|
}
|
|
1031
1030
|
return resp;
|
|
1032
1031
|
}
|
|
@@ -1062,7 +1061,7 @@ export class ScimClient {
|
|
|
1062
1061
|
const query = params.toString();
|
|
1063
1062
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1064
1063
|
let resp: ListServicePrincipalResponse | undefined;
|
|
1065
|
-
const call
|
|
1064
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1066
1065
|
const headers = new Headers();
|
|
1067
1066
|
if (this.workspaceId !== undefined) {
|
|
1068
1067
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1081,7 +1080,7 @@ export class ScimClient {
|
|
|
1081
1080
|
};
|
|
1082
1081
|
await executeCall(call, options);
|
|
1083
1082
|
if (resp === undefined) {
|
|
1084
|
-
throw new Error('
|
|
1083
|
+
throw new Error('operation completed without a result.');
|
|
1085
1084
|
}
|
|
1086
1085
|
return resp;
|
|
1087
1086
|
}
|
|
@@ -1111,7 +1110,7 @@ export class ScimClient {
|
|
|
1111
1110
|
): Promise<void> {
|
|
1112
1111
|
const url = `${this.host}/api/2.0/preview/scim/v2/ServicePrincipals/${req.id ?? ''}`;
|
|
1113
1112
|
const body = marshalRequest(req, marshalPatchServicePrincipalRequestSchema);
|
|
1114
|
-
const call
|
|
1113
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1115
1114
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1116
1115
|
if (this.workspaceId !== undefined) {
|
|
1117
1116
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1141,7 +1140,7 @@ export class ScimClient {
|
|
|
1141
1140
|
req,
|
|
1142
1141
|
marshalUpdateServicePrincipalRequestSchema
|
|
1143
1142
|
);
|
|
1144
|
-
const call
|
|
1143
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1145
1144
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1146
1145
|
if (this.workspaceId !== undefined) {
|
|
1147
1146
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1165,7 +1164,7 @@ export class ScimClient {
|
|
|
1165
1164
|
const url = `${this.host}/api/2.0/preview/scim/v2/Users`;
|
|
1166
1165
|
const body = marshalRequest(req, marshalCreateUserRequestSchema);
|
|
1167
1166
|
let resp: User | undefined;
|
|
1168
|
-
const call
|
|
1167
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1169
1168
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1170
1169
|
if (this.workspaceId !== undefined) {
|
|
1171
1170
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1181,7 +1180,7 @@ export class ScimClient {
|
|
|
1181
1180
|
};
|
|
1182
1181
|
await executeCall(call, options);
|
|
1183
1182
|
if (resp === undefined) {
|
|
1184
|
-
throw new Error('
|
|
1183
|
+
throw new Error('operation completed without a result.');
|
|
1185
1184
|
}
|
|
1186
1185
|
return resp;
|
|
1187
1186
|
}
|
|
@@ -1192,7 +1191,7 @@ export class ScimClient {
|
|
|
1192
1191
|
options?: CallOptions
|
|
1193
1192
|
): Promise<void> {
|
|
1194
1193
|
const url = `${this.host}/api/2.0/preview/scim/v2/Users/${req.id ?? ''}`;
|
|
1195
|
-
const call
|
|
1194
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1196
1195
|
const headers = new Headers();
|
|
1197
1196
|
if (this.workspaceId !== undefined) {
|
|
1198
1197
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1215,7 +1214,7 @@ export class ScimClient {
|
|
|
1215
1214
|
): Promise<GetPasswordPermissionLevelsResponse> {
|
|
1216
1215
|
const url = `${this.host}/api/2.0/permissions/authorization/passwords/permissionLevels`;
|
|
1217
1216
|
let resp: GetPasswordPermissionLevelsResponse | undefined;
|
|
1218
|
-
const call
|
|
1217
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1219
1218
|
const headers = new Headers();
|
|
1220
1219
|
if (this.workspaceId !== undefined) {
|
|
1221
1220
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1234,7 +1233,7 @@ export class ScimClient {
|
|
|
1234
1233
|
};
|
|
1235
1234
|
await executeCall(call, options);
|
|
1236
1235
|
if (resp === undefined) {
|
|
1237
|
-
throw new Error('
|
|
1236
|
+
throw new Error('operation completed without a result.');
|
|
1238
1237
|
}
|
|
1239
1238
|
return resp;
|
|
1240
1239
|
}
|
|
@@ -1246,7 +1245,7 @@ export class ScimClient {
|
|
|
1246
1245
|
): Promise<PasswordPermissions> {
|
|
1247
1246
|
const url = `${this.host}/api/2.0/permissions/authorization/passwords`;
|
|
1248
1247
|
let resp: PasswordPermissions | undefined;
|
|
1249
|
-
const call
|
|
1248
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1250
1249
|
const headers = new Headers();
|
|
1251
1250
|
if (this.workspaceId !== undefined) {
|
|
1252
1251
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1262,7 +1261,7 @@ export class ScimClient {
|
|
|
1262
1261
|
};
|
|
1263
1262
|
await executeCall(call, options);
|
|
1264
1263
|
if (resp === undefined) {
|
|
1265
|
-
throw new Error('
|
|
1264
|
+
throw new Error('operation completed without a result.');
|
|
1266
1265
|
}
|
|
1267
1266
|
return resp;
|
|
1268
1267
|
}
|
|
@@ -1295,7 +1294,7 @@ export class ScimClient {
|
|
|
1295
1294
|
const query = params.toString();
|
|
1296
1295
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1297
1296
|
let resp: User | undefined;
|
|
1298
|
-
const call
|
|
1297
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1299
1298
|
const headers = new Headers();
|
|
1300
1299
|
if (this.workspaceId !== undefined) {
|
|
1301
1300
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1311,7 +1310,7 @@ export class ScimClient {
|
|
|
1311
1310
|
};
|
|
1312
1311
|
await executeCall(call, options);
|
|
1313
1312
|
if (resp === undefined) {
|
|
1314
|
-
throw new Error('
|
|
1313
|
+
throw new Error('operation completed without a result.');
|
|
1315
1314
|
}
|
|
1316
1315
|
return resp;
|
|
1317
1316
|
}
|
|
@@ -1347,7 +1346,7 @@ export class ScimClient {
|
|
|
1347
1346
|
const query = params.toString();
|
|
1348
1347
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1349
1348
|
let resp: ListUsersResponse | undefined;
|
|
1350
|
-
const call
|
|
1349
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1351
1350
|
const headers = new Headers();
|
|
1352
1351
|
if (this.workspaceId !== undefined) {
|
|
1353
1352
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1363,7 +1362,7 @@ export class ScimClient {
|
|
|
1363
1362
|
};
|
|
1364
1363
|
await executeCall(call, options);
|
|
1365
1364
|
if (resp === undefined) {
|
|
1366
|
-
throw new Error('
|
|
1365
|
+
throw new Error('operation completed without a result.');
|
|
1367
1366
|
}
|
|
1368
1367
|
return resp;
|
|
1369
1368
|
}
|
|
@@ -1390,7 +1389,7 @@ export class ScimClient {
|
|
|
1390
1389
|
async patchUser(req: PatchUserRequest, options?: CallOptions): Promise<void> {
|
|
1391
1390
|
const url = `${this.host}/api/2.0/preview/scim/v2/Users/${req.id ?? ''}`;
|
|
1392
1391
|
const body = marshalRequest(req, marshalPatchUserRequestSchema);
|
|
1393
|
-
const call
|
|
1392
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1394
1393
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1395
1394
|
if (this.workspaceId !== undefined) {
|
|
1396
1395
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1414,7 +1413,7 @@ export class ScimClient {
|
|
|
1414
1413
|
const url = `${this.host}/api/2.0/permissions/authorization/passwords`;
|
|
1415
1414
|
const body = marshalRequest(req, marshalPasswordPermissionsRequestSchema);
|
|
1416
1415
|
let resp: PasswordPermissions | undefined;
|
|
1417
|
-
const call
|
|
1416
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1418
1417
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1419
1418
|
if (this.workspaceId !== undefined) {
|
|
1420
1419
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1430,7 +1429,7 @@ export class ScimClient {
|
|
|
1430
1429
|
};
|
|
1431
1430
|
await executeCall(call, options);
|
|
1432
1431
|
if (resp === undefined) {
|
|
1433
|
-
throw new Error('
|
|
1432
|
+
throw new Error('operation completed without a result.');
|
|
1434
1433
|
}
|
|
1435
1434
|
return resp;
|
|
1436
1435
|
}
|
|
@@ -1443,7 +1442,7 @@ export class ScimClient {
|
|
|
1443
1442
|
const url = `${this.host}/api/2.0/permissions/authorization/passwords`;
|
|
1444
1443
|
const body = marshalRequest(req, marshalPasswordPermissionsRequestSchema);
|
|
1445
1444
|
let resp: PasswordPermissions | undefined;
|
|
1446
|
-
const call
|
|
1445
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1447
1446
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1448
1447
|
if (this.workspaceId !== undefined) {
|
|
1449
1448
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1459,7 +1458,7 @@ export class ScimClient {
|
|
|
1459
1458
|
};
|
|
1460
1459
|
await executeCall(call, options);
|
|
1461
1460
|
if (resp === undefined) {
|
|
1462
|
-
throw new Error('
|
|
1461
|
+
throw new Error('operation completed without a result.');
|
|
1463
1462
|
}
|
|
1464
1463
|
return resp;
|
|
1465
1464
|
}
|
|
@@ -1471,7 +1470,7 @@ export class ScimClient {
|
|
|
1471
1470
|
): Promise<void> {
|
|
1472
1471
|
const url = `${this.host}/api/2.0/preview/scim/v2/Users/${req.id ?? ''}`;
|
|
1473
1472
|
const body = marshalRequest(req, marshalUpdateUserRequestSchema);
|
|
1474
|
-
const call
|
|
1473
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1475
1474
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1476
1475
|
if (this.workspaceId !== undefined) {
|
|
1477
1476
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
package/src/v1/model.ts
CHANGED
|
@@ -16,78 +16,78 @@ const jsonValueSchema: z.ZodType<JsonValue> = z.lazy(() =>
|
|
|
16
16
|
|
|
17
17
|
export enum GetSortOrder {
|
|
18
18
|
GET_SORT_ORDER_UNSPECIFIED = 'GET_SORT_ORDER_UNSPECIFIED',
|
|
19
|
-
ASCENDING = '
|
|
20
|
-
DESCENDING = '
|
|
19
|
+
ASCENDING = 'ascending',
|
|
20
|
+
DESCENDING = 'descending',
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export enum GroupSchema {
|
|
24
24
|
GROUP_SCHEMA_UNSPECIFIED = 'GROUP_SCHEMA_UNSPECIFIED',
|
|
25
|
-
URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP = '
|
|
25
|
+
URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP = 'urn:ietf:params:scim:schemas:core:2.0:Group',
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export enum ListResponseSchema {
|
|
29
29
|
LIST_RESPONSE_SCHEMA_UNSPECIFIED = 'LIST_RESPONSE_SCHEMA_UNSPECIFIED',
|
|
30
|
-
URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_LIST_RESPONSE = '
|
|
30
|
+
URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_LIST_RESPONSE = 'urn:ietf:params:scim:api:messages:2.0:ListResponse',
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/** Type of patch operation. */
|
|
34
34
|
export enum PatchOp {
|
|
35
35
|
PATCH_OP_UNSPECIFIED = 'PATCH_OP_UNSPECIFIED',
|
|
36
|
-
ADD = '
|
|
37
|
-
REMOVE = '
|
|
38
|
-
REPLACE = '
|
|
36
|
+
ADD = 'add',
|
|
37
|
+
REMOVE = 'remove',
|
|
38
|
+
REPLACE = 'replace',
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export enum PatchSchema {
|
|
42
42
|
PATCH_SCHEMA_UNSPECIFIED = 'PATCH_SCHEMA_UNSPECIFIED',
|
|
43
|
-
URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP = '
|
|
43
|
+
URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP = 'urn:ietf:params:scim:api:messages:2.0:PatchOp',
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export enum ServicePrincipalSchema {
|
|
47
47
|
SERVICE_PRINCIPAL_SCHEMA_UNSPECIFIED = 'SERVICE_PRINCIPAL_SCHEMA_UNSPECIFIED',
|
|
48
|
-
URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_SERVICE_PRINCIPAL = '
|
|
48
|
+
URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_SERVICE_PRINCIPAL = 'urn:ietf:params:scim:schemas:core:2.0:ServicePrincipal',
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export enum UserSchema {
|
|
52
52
|
USER_SCHEMA_UNSPECIFIED = 'USER_SCHEMA_UNSPECIFIED',
|
|
53
|
-
URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER = '
|
|
54
|
-
URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER = '
|
|
53
|
+
URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER = 'urn:ietf:params:scim:schemas:core:2.0:User',
|
|
54
|
+
URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER = 'urn:ietf:params:scim:schemas:extension:workspace:2.0:User',
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
58
58
|
export enum AccountGetSortOrder_GetSortOrder {
|
|
59
59
|
GET_SORT_ORDER_UNSPECIFIED = 'GET_SORT_ORDER_UNSPECIFIED',
|
|
60
|
-
ASCENDING = '
|
|
61
|
-
DESCENDING = '
|
|
60
|
+
ASCENDING = 'ascending',
|
|
61
|
+
DESCENDING = 'descending',
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
65
65
|
export enum AccountListSort_Order {
|
|
66
66
|
ORDER_UNSPECIFIED = 'ORDER_UNSPECIFIED',
|
|
67
|
-
ASCENDING = '
|
|
68
|
-
DESCENDING = '
|
|
67
|
+
ASCENDING = 'ascending',
|
|
68
|
+
DESCENDING = 'descending',
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/** Type of patch operation. */
|
|
72
72
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
73
73
|
export enum AccountPatchOp_PatchOp {
|
|
74
74
|
PATCH_OP_UNSPECIFIED = 'PATCH_OP_UNSPECIFIED',
|
|
75
|
-
ADD = '
|
|
76
|
-
REMOVE = '
|
|
77
|
-
REPLACE = '
|
|
75
|
+
ADD = 'add',
|
|
76
|
+
REMOVE = 'remove',
|
|
77
|
+
REPLACE = 'replace',
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
81
81
|
export enum AccountPatchSchema_PatchSchema {
|
|
82
82
|
PATCH_SCHEMA_UNSPECIFIED = 'PATCH_SCHEMA_UNSPECIFIED',
|
|
83
|
-
URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP = '
|
|
83
|
+
URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP = 'urn:ietf:params:scim:api:messages:2.0:PatchOp',
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
87
87
|
export enum ListSort_Order {
|
|
88
88
|
ORDER_UNSPECIFIED = 'ORDER_UNSPECIFIED',
|
|
89
|
-
ASCENDING = '
|
|
90
|
-
DESCENDING = '
|
|
89
|
+
ASCENDING = 'ascending',
|
|
90
|
+
DESCENDING = 'descending',
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/** Permission level */
|