@databricks/sdk-sharing 0.1.0-dev.2 → 0.1.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/v1/client.ts CHANGED
@@ -23,45 +23,45 @@ import type {
23
23
  CreateShareRequest,
24
24
  DeleteFederationPolicyRequest,
25
25
  DeleteProviderRequest,
26
- DeleteProviderRequest_Response,
26
+ DeleteProviderResponse,
27
27
  DeleteRecipientRequest,
28
- DeleteRecipientRequest_Response,
28
+ DeleteRecipientResponse,
29
29
  DeleteShareRequest,
30
- DeleteShareRequest_Response,
30
+ DeleteShareResponse,
31
31
  FederationPolicy,
32
32
  GetActivationUrlInfoRequest,
33
- GetActivationUrlInfoRequest_Response,
33
+ GetActivationUrlInfoResponse,
34
34
  GetFederationPolicyRequest,
35
35
  GetProviderRequest,
36
36
  GetRecipientRequest,
37
+ GetRecipientSharePermissionsResponse,
38
+ GetSharePermissionsResponse,
37
39
  GetShareRequest,
38
40
  ListFederationPoliciesRequest,
39
41
  ListFederationPoliciesResponse,
40
42
  ListProviderShareAssetsRequest,
41
43
  ListProviderShareAssetsResponse,
42
44
  ListProviderSharesRequest,
43
- ListProviderSharesRequest_Response,
45
+ ListProviderSharesResponse,
44
46
  ListProvidersRequest,
45
- ListProvidersRequest_Response,
47
+ ListProvidersResponse,
46
48
  ListRecipientSharePermissionsRequest,
47
- ListRecipientSharePermissionsRequest_Response,
48
49
  ListRecipientsRequest,
49
- ListRecipientsRequest_Response,
50
+ ListRecipientsResponse,
50
51
  ListSharePermissionsRequest,
51
- ListSharePermissionsRequest_Response,
52
52
  ListSharesRequest,
53
- ListSharesRequest_Response,
53
+ ListSharesResponse,
54
54
  ProviderInfo,
55
55
  ProviderShare,
56
56
  RecipientInfo,
57
57
  RetrieveToken,
58
- RetrieveToken_Response,
58
+ RetrieveTokenResponse,
59
59
  RotateRecipientTokenRequest,
60
60
  ShareInfo,
61
61
  UpdateProviderRequest,
62
62
  UpdateRecipientRequest,
63
63
  UpdateSharePermissionsRequest,
64
- UpdateSharePermissionsRequest_Response,
64
+ UpdateSharePermissionsResponse,
65
65
  UpdateShareRequest,
66
66
  } from './model';
67
67
  import {
@@ -74,24 +74,24 @@ import {
74
74
  marshalUpdateRecipientRequestSchema,
75
75
  marshalUpdateSharePermissionsRequestSchema,
76
76
  marshalUpdateShareRequestSchema,
77
- unmarshalDeleteProviderRequest_ResponseSchema,
78
- unmarshalDeleteRecipientRequest_ResponseSchema,
79
- unmarshalDeleteShareRequest_ResponseSchema,
77
+ unmarshalDeleteProviderResponseSchema,
78
+ unmarshalDeleteRecipientResponseSchema,
79
+ unmarshalDeleteShareResponseSchema,
80
80
  unmarshalFederationPolicySchema,
81
- unmarshalGetActivationUrlInfoRequest_ResponseSchema,
81
+ unmarshalGetActivationUrlInfoResponseSchema,
82
+ unmarshalGetRecipientSharePermissionsResponseSchema,
83
+ unmarshalGetSharePermissionsResponseSchema,
82
84
  unmarshalListFederationPoliciesResponseSchema,
83
85
  unmarshalListProviderShareAssetsResponseSchema,
84
- unmarshalListProviderSharesRequest_ResponseSchema,
85
- unmarshalListProvidersRequest_ResponseSchema,
86
- unmarshalListRecipientSharePermissionsRequest_ResponseSchema,
87
- unmarshalListRecipientsRequest_ResponseSchema,
88
- unmarshalListSharePermissionsRequest_ResponseSchema,
89
- unmarshalListSharesRequest_ResponseSchema,
86
+ unmarshalListProviderSharesResponseSchema,
87
+ unmarshalListProvidersResponseSchema,
88
+ unmarshalListRecipientsResponseSchema,
89
+ unmarshalListSharesResponseSchema,
90
90
  unmarshalProviderInfoSchema,
91
91
  unmarshalRecipientInfoSchema,
92
- unmarshalRetrieveToken_ResponseSchema,
92
+ unmarshalRetrieveTokenResponseSchema,
93
93
  unmarshalShareInfoSchema,
94
- unmarshalUpdateSharePermissionsRequest_ResponseSchema,
94
+ unmarshalUpdateSharePermissionsResponseSchema,
95
95
  } from './model';
96
96
 
97
97
  // Package identity segment for this client to be used in the User-Agent header.
@@ -302,9 +302,9 @@ export class SharingClient {
302
302
  async deleteProvider(
303
303
  req: DeleteProviderRequest,
304
304
  options?: CallOptions
305
- ): Promise<DeleteProviderRequest_Response> {
305
+ ): Promise<DeleteProviderResponse> {
306
306
  const url = `${this.host}/api/2.1/unity-catalog/providers/${req.nameArg ?? ''}`;
307
- let resp: DeleteProviderRequest_Response | undefined;
307
+ let resp: DeleteProviderResponse | undefined;
308
308
  const call = async (callSignal?: AbortSignal): Promise<void> => {
309
309
  const headers = new Headers();
310
310
  if (this.workspaceId !== undefined) {
@@ -317,10 +317,7 @@ export class SharingClient {
317
317
  httpClient: this.httpClient,
318
318
  logger: this.logger,
319
319
  });
320
- resp = parseResponse(
321
- respBody,
322
- unmarshalDeleteProviderRequest_ResponseSchema
323
- );
320
+ resp = parseResponse(respBody, unmarshalDeleteProviderResponseSchema);
324
321
  };
325
322
  await executeCall(call, options);
326
323
  if (resp === undefined) {
@@ -333,9 +330,9 @@ export class SharingClient {
333
330
  async deleteRecipient(
334
331
  req: DeleteRecipientRequest,
335
332
  options?: CallOptions
336
- ): Promise<DeleteRecipientRequest_Response> {
333
+ ): Promise<DeleteRecipientResponse> {
337
334
  const url = `${this.host}/api/2.1/unity-catalog/recipients/${req.name ?? ''}`;
338
- let resp: DeleteRecipientRequest_Response | undefined;
335
+ let resp: DeleteRecipientResponse | undefined;
339
336
  const call = async (callSignal?: AbortSignal): Promise<void> => {
340
337
  const headers = new Headers();
341
338
  if (this.workspaceId !== undefined) {
@@ -348,10 +345,7 @@ export class SharingClient {
348
345
  httpClient: this.httpClient,
349
346
  logger: this.logger,
350
347
  });
351
- resp = parseResponse(
352
- respBody,
353
- unmarshalDeleteRecipientRequest_ResponseSchema
354
- );
348
+ resp = parseResponse(respBody, unmarshalDeleteRecipientResponseSchema);
355
349
  };
356
350
  await executeCall(call, options);
357
351
  if (resp === undefined) {
@@ -364,9 +358,9 @@ export class SharingClient {
364
358
  async deleteShare(
365
359
  req: DeleteShareRequest,
366
360
  options?: CallOptions
367
- ): Promise<DeleteShareRequest_Response> {
361
+ ): Promise<DeleteShareResponse> {
368
362
  const url = `${this.host}/api/2.1/unity-catalog/shares/${req.name ?? ''}`;
369
- let resp: DeleteShareRequest_Response | undefined;
363
+ let resp: DeleteShareResponse | undefined;
370
364
  const call = async (callSignal?: AbortSignal): Promise<void> => {
371
365
  const headers = new Headers();
372
366
  if (this.workspaceId !== undefined) {
@@ -379,10 +373,7 @@ export class SharingClient {
379
373
  httpClient: this.httpClient,
380
374
  logger: this.logger,
381
375
  });
382
- resp = parseResponse(
383
- respBody,
384
- unmarshalDeleteShareRequest_ResponseSchema
385
- );
376
+ resp = parseResponse(respBody, unmarshalDeleteShareResponseSchema);
386
377
  };
387
378
  await executeCall(call, options);
388
379
  if (resp === undefined) {
@@ -395,9 +386,9 @@ export class SharingClient {
395
386
  async getActivationUrlInfo(
396
387
  req: GetActivationUrlInfoRequest,
397
388
  options?: CallOptions
398
- ): Promise<GetActivationUrlInfoRequest_Response> {
389
+ ): Promise<GetActivationUrlInfoResponse> {
399
390
  const url = `${this.host}/api/2.1/unity-catalog/public/data_sharing_activation_info/${req.activationUrl ?? ''}`;
400
- let resp: GetActivationUrlInfoRequest_Response | undefined;
391
+ let resp: GetActivationUrlInfoResponse | undefined;
401
392
  const call = async (callSignal?: AbortSignal): Promise<void> => {
402
393
  const headers = new Headers();
403
394
  if (this.workspaceId !== undefined) {
@@ -412,7 +403,7 @@ export class SharingClient {
412
403
  });
413
404
  resp = parseResponse(
414
405
  respBody,
415
- unmarshalGetActivationUrlInfoRequest_ResponseSchema
406
+ unmarshalGetActivationUrlInfoResponseSchema
416
407
  );
417
408
  };
418
409
  await executeCall(call, options);
@@ -669,7 +660,7 @@ export class SharingClient {
669
660
  async listProviderShares(
670
661
  req: ListProviderSharesRequest,
671
662
  options?: CallOptions
672
- ): Promise<ListProviderSharesRequest_Response> {
663
+ ): Promise<ListProviderSharesResponse> {
673
664
  const url = `${this.host}/api/2.1/unity-catalog/providers/${req.providerNameArg ?? ''}/shares`;
674
665
  const params = new URLSearchParams();
675
666
  if (req.maxResults !== undefined) {
@@ -680,7 +671,7 @@ export class SharingClient {
680
671
  }
681
672
  const query = params.toString();
682
673
  const fullUrl = query !== '' ? `${url}?${query}` : url;
683
- let resp: ListProviderSharesRequest_Response | undefined;
674
+ let resp: ListProviderSharesResponse | undefined;
684
675
  const call = async (callSignal?: AbortSignal): Promise<void> => {
685
676
  const headers = new Headers();
686
677
  if (this.workspaceId !== undefined) {
@@ -693,10 +684,7 @@ export class SharingClient {
693
684
  httpClient: this.httpClient,
694
685
  logger: this.logger,
695
686
  });
696
- resp = parseResponse(
697
- respBody,
698
- unmarshalListProviderSharesRequest_ResponseSchema
699
- );
687
+ resp = parseResponse(respBody, unmarshalListProviderSharesResponseSchema);
700
688
  };
701
689
  await executeCall(call, options);
702
690
  if (resp === undefined) {
@@ -732,7 +720,7 @@ export class SharingClient {
732
720
  async listProviders(
733
721
  req: ListProvidersRequest,
734
722
  options?: CallOptions
735
- ): Promise<ListProvidersRequest_Response> {
723
+ ): Promise<ListProvidersResponse> {
736
724
  const url = `${this.host}/api/2.1/unity-catalog/providers`;
737
725
  const params = new URLSearchParams();
738
726
  if (req.dataProviderGlobalMetastoreId !== undefined) {
@@ -749,7 +737,7 @@ export class SharingClient {
749
737
  }
750
738
  const query = params.toString();
751
739
  const fullUrl = query !== '' ? `${url}?${query}` : url;
752
- let resp: ListProvidersRequest_Response | undefined;
740
+ let resp: ListProvidersResponse | undefined;
753
741
  const call = async (callSignal?: AbortSignal): Promise<void> => {
754
742
  const headers = new Headers();
755
743
  if (this.workspaceId !== undefined) {
@@ -762,10 +750,7 @@ export class SharingClient {
762
750
  httpClient: this.httpClient,
763
751
  logger: this.logger,
764
752
  });
765
- resp = parseResponse(
766
- respBody,
767
- unmarshalListProvidersRequest_ResponseSchema
768
- );
753
+ resp = parseResponse(respBody, unmarshalListProvidersResponseSchema);
769
754
  };
770
755
  await executeCall(call, options);
771
756
  if (resp === undefined) {
@@ -795,7 +780,7 @@ export class SharingClient {
795
780
  async listRecipientSharePermissions(
796
781
  req: ListRecipientSharePermissionsRequest,
797
782
  options?: CallOptions
798
- ): Promise<ListRecipientSharePermissionsRequest_Response> {
783
+ ): Promise<GetRecipientSharePermissionsResponse> {
799
784
  const url = `${this.host}/api/2.1/unity-catalog/recipients/${req.name ?? ''}/share-permissions`;
800
785
  const params = new URLSearchParams();
801
786
  if (req.maxResults !== undefined) {
@@ -806,7 +791,7 @@ export class SharingClient {
806
791
  }
807
792
  const query = params.toString();
808
793
  const fullUrl = query !== '' ? `${url}?${query}` : url;
809
- let resp: ListRecipientSharePermissionsRequest_Response | undefined;
794
+ let resp: GetRecipientSharePermissionsResponse | undefined;
810
795
  const call = async (callSignal?: AbortSignal): Promise<void> => {
811
796
  const headers = new Headers();
812
797
  if (this.workspaceId !== undefined) {
@@ -821,7 +806,7 @@ export class SharingClient {
821
806
  });
822
807
  resp = parseResponse(
823
808
  respBody,
824
- unmarshalListRecipientSharePermissionsRequest_ResponseSchema
809
+ unmarshalGetRecipientSharePermissionsResponseSchema
825
810
  );
826
811
  };
827
812
  await executeCall(call, options);
@@ -841,7 +826,7 @@ export class SharingClient {
841
826
  async listRecipients(
842
827
  req: ListRecipientsRequest,
843
828
  options?: CallOptions
844
- ): Promise<ListRecipientsRequest_Response> {
829
+ ): Promise<ListRecipientsResponse> {
845
830
  const url = `${this.host}/api/2.1/unity-catalog/recipients`;
846
831
  const params = new URLSearchParams();
847
832
  if (req.dataRecipientGlobalMetastoreId !== undefined) {
@@ -858,7 +843,7 @@ export class SharingClient {
858
843
  }
859
844
  const query = params.toString();
860
845
  const fullUrl = query !== '' ? `${url}?${query}` : url;
861
- let resp: ListRecipientsRequest_Response | undefined;
846
+ let resp: ListRecipientsResponse | undefined;
862
847
  const call = async (callSignal?: AbortSignal): Promise<void> => {
863
848
  const headers = new Headers();
864
849
  if (this.workspaceId !== undefined) {
@@ -871,10 +856,7 @@ export class SharingClient {
871
856
  httpClient: this.httpClient,
872
857
  logger: this.logger,
873
858
  });
874
- resp = parseResponse(
875
- respBody,
876
- unmarshalListRecipientsRequest_ResponseSchema
877
- );
859
+ resp = parseResponse(respBody, unmarshalListRecipientsResponseSchema);
878
860
  };
879
861
  await executeCall(call, options);
880
862
  if (resp === undefined) {
@@ -907,7 +889,7 @@ export class SharingClient {
907
889
  async listSharePermissions(
908
890
  req: ListSharePermissionsRequest,
909
891
  options?: CallOptions
910
- ): Promise<ListSharePermissionsRequest_Response> {
892
+ ): Promise<GetSharePermissionsResponse> {
911
893
  const url = `${this.host}/api/2.1/unity-catalog/shares/${req.name ?? ''}/permissions`;
912
894
  const params = new URLSearchParams();
913
895
  if (req.maxResults !== undefined) {
@@ -918,7 +900,7 @@ export class SharingClient {
918
900
  }
919
901
  const query = params.toString();
920
902
  const fullUrl = query !== '' ? `${url}?${query}` : url;
921
- let resp: ListSharePermissionsRequest_Response | undefined;
903
+ let resp: GetSharePermissionsResponse | undefined;
922
904
  const call = async (callSignal?: AbortSignal): Promise<void> => {
923
905
  const headers = new Headers();
924
906
  if (this.workspaceId !== undefined) {
@@ -933,7 +915,7 @@ export class SharingClient {
933
915
  });
934
916
  resp = parseResponse(
935
917
  respBody,
936
- unmarshalListSharePermissionsRequest_ResponseSchema
918
+ unmarshalGetSharePermissionsResponseSchema
937
919
  );
938
920
  };
939
921
  await executeCall(call, options);
@@ -950,7 +932,7 @@ export class SharingClient {
950
932
  async listShares(
951
933
  req: ListSharesRequest,
952
934
  options?: CallOptions
953
- ): Promise<ListSharesRequest_Response> {
935
+ ): Promise<ListSharesResponse> {
954
936
  const url = `${this.host}/api/2.1/unity-catalog/shares`;
955
937
  const params = new URLSearchParams();
956
938
  if (req.maxResults !== undefined) {
@@ -961,7 +943,7 @@ export class SharingClient {
961
943
  }
962
944
  const query = params.toString();
963
945
  const fullUrl = query !== '' ? `${url}?${query}` : url;
964
- let resp: ListSharesRequest_Response | undefined;
946
+ let resp: ListSharesResponse | undefined;
965
947
  const call = async (callSignal?: AbortSignal): Promise<void> => {
966
948
  const headers = new Headers();
967
949
  if (this.workspaceId !== undefined) {
@@ -974,7 +956,7 @@ export class SharingClient {
974
956
  httpClient: this.httpClient,
975
957
  logger: this.logger,
976
958
  });
977
- resp = parseResponse(respBody, unmarshalListSharesRequest_ResponseSchema);
959
+ resp = parseResponse(respBody, unmarshalListSharesResponseSchema);
978
960
  };
979
961
  await executeCall(call, options);
980
962
  if (resp === undefined) {
@@ -1007,9 +989,9 @@ export class SharingClient {
1007
989
  async retrieveAccessToken(
1008
990
  req: RetrieveToken,
1009
991
  options?: CallOptions
1010
- ): Promise<RetrieveToken_Response> {
992
+ ): Promise<RetrieveTokenResponse> {
1011
993
  const url = `${this.host}/api/2.1/unity-catalog/public/data_sharing_activation/${req.activationUrl ?? ''}`;
1012
- let resp: RetrieveToken_Response | undefined;
994
+ let resp: RetrieveTokenResponse | undefined;
1013
995
  const call = async (callSignal?: AbortSignal): Promise<void> => {
1014
996
  const headers = new Headers();
1015
997
  if (this.workspaceId !== undefined) {
@@ -1022,7 +1004,7 @@ export class SharingClient {
1022
1004
  httpClient: this.httpClient,
1023
1005
  logger: this.logger,
1024
1006
  });
1025
- resp = parseResponse(respBody, unmarshalRetrieveToken_ResponseSchema);
1007
+ resp = parseResponse(respBody, unmarshalRetrieveTokenResponseSchema);
1026
1008
  };
1027
1009
  await executeCall(call, options);
1028
1010
  if (resp === undefined) {
@@ -1183,13 +1165,13 @@ export class SharingClient {
1183
1165
  async updateSharePermissions(
1184
1166
  req: UpdateSharePermissionsRequest,
1185
1167
  options?: CallOptions
1186
- ): Promise<UpdateSharePermissionsRequest_Response> {
1168
+ ): Promise<UpdateSharePermissionsResponse> {
1187
1169
  const url = `${this.host}/api/2.1/unity-catalog/shares/${req.name ?? ''}/permissions`;
1188
1170
  const body = marshalRequest(
1189
1171
  req,
1190
1172
  marshalUpdateSharePermissionsRequestSchema
1191
1173
  );
1192
- let resp: UpdateSharePermissionsRequest_Response | undefined;
1174
+ let resp: UpdateSharePermissionsResponse | undefined;
1193
1175
  const call = async (callSignal?: AbortSignal): Promise<void> => {
1194
1176
  const headers = new Headers({'Content-Type': 'application/json'});
1195
1177
  if (this.workspaceId !== undefined) {
@@ -1204,7 +1186,7 @@ export class SharingClient {
1204
1186
  });
1205
1187
  resp = parseResponse(
1206
1188
  respBody,
1207
- unmarshalUpdateSharePermissionsRequest_ResponseSchema
1189
+ unmarshalUpdateSharePermissionsResponseSchema
1208
1190
  );
1209
1191
  };
1210
1192
  await executeCall(call, options);
package/src/v1/index.ts CHANGED
@@ -21,11 +21,11 @@ export type {
21
21
  CreateShareRequest,
22
22
  DeleteFederationPolicyRequest,
23
23
  DeleteProviderRequest,
24
- DeleteProviderRequest_Response,
24
+ DeleteProviderResponse,
25
25
  DeleteRecipientRequest,
26
- DeleteRecipientRequest_Response,
26
+ DeleteRecipientResponse,
27
27
  DeleteShareRequest,
28
- DeleteShareRequest_Response,
28
+ DeleteShareResponse,
29
29
  Dependency,
30
30
  DependencyList,
31
31
  FederationPolicy,
@@ -34,10 +34,12 @@ export type {
34
34
  FunctionParameterInfo,
35
35
  FunctionParameterInfos,
36
36
  GetActivationUrlInfoRequest,
37
- GetActivationUrlInfoRequest_Response,
37
+ GetActivationUrlInfoResponse,
38
38
  GetFederationPolicyRequest,
39
39
  GetProviderRequest,
40
40
  GetRecipientRequest,
41
+ GetRecipientSharePermissionsResponse,
42
+ GetSharePermissionsResponse,
41
43
  GetShareRequest,
42
44
  IpAccessList,
43
45
  ListFederationPoliciesRequest,
@@ -45,17 +47,15 @@ export type {
45
47
  ListProviderShareAssetsRequest,
46
48
  ListProviderShareAssetsResponse,
47
49
  ListProviderSharesRequest,
48
- ListProviderSharesRequest_Response,
50
+ ListProviderSharesResponse,
49
51
  ListProvidersRequest,
50
- ListProvidersRequest_Response,
52
+ ListProvidersResponse,
51
53
  ListRecipientSharePermissionsRequest,
52
- ListRecipientSharePermissionsRequest_Response,
53
54
  ListRecipientsRequest,
54
- ListRecipientsRequest_Response,
55
+ ListRecipientsResponse,
55
56
  ListSharePermissionsRequest,
56
- ListSharePermissionsRequest_Response,
57
57
  ListSharesRequest,
58
- ListSharesRequest_Response,
58
+ ListSharesResponse,
59
59
  NotebookFile,
60
60
  OidcFederationPolicy,
61
61
  PartitionSpecification,
@@ -72,7 +72,7 @@ export type {
72
72
  RecipientTokenInfo,
73
73
  RegisteredModelAlias,
74
74
  RetrieveToken,
75
- RetrieveToken_Response,
75
+ RetrieveTokenResponse,
76
76
  RotateRecipientTokenRequest,
77
77
  Share,
78
78
  ShareInfo,
@@ -86,7 +86,7 @@ export type {
86
86
  UpdateProviderRequest,
87
87
  UpdateRecipientRequest,
88
88
  UpdateSharePermissionsRequest,
89
- UpdateSharePermissionsRequest_Response,
89
+ UpdateSharePermissionsResponse,
90
90
  UpdateShareRequest,
91
91
  UpdateShareRequest_SharedDataObjectUpdate,
92
92
  Volume,