@databricks/sdk-uc-workspacebindings 0.27.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ //#region package.json
2
+ var name = "@databricks/sdk-uc-workspacebindings";
3
+ var version = "0.35.0";
4
+
5
+ //#endregion
6
+ export { name, version };
7
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -1,38 +1,42 @@
1
- import type { CallOptions } from '@databricks/sdk-options/call';
2
- import type { ClientOptions } from '@databricks/sdk-options/client';
3
- import type { GetCatalogWorkspaceBindingsRequest, GetCatalogWorkspaceBindingsResponse, GetWorkspaceBindingsRequest, GetWorkspaceBindingsResponse, UpdateCatalogWorkspaceBindingsRequest, UpdateCatalogWorkspaceBindingsResponse, UpdateWorkspaceBindingsRequest, UpdateWorkspaceBindingsResponse, WorkspaceBindingInfo } from './model';
4
- export declare class WorkspaceBindingsClient {
5
- private readonly options;
6
- private readonly logger;
7
- private readonly userAgent;
8
- private config;
9
- constructor(options: ClientOptions);
10
- private resolveConfig;
11
- /**
12
- * Gets workspace bindings of the catalog.
13
- * The caller must be a metastore admin or an owner of the catalog.
14
- */
15
- getCatalogWorkspaceBindings(req: GetCatalogWorkspaceBindingsRequest, options?: CallOptions): Promise<GetCatalogWorkspaceBindingsResponse>;
16
- /**
17
- * Gets workspace bindings of the securable.
18
- * The caller must be a metastore admin or an owner of the securable.
19
- *
20
- * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
21
- *
22
- * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.
23
- * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
24
- */
25
- getWorkspaceBindings(req: GetWorkspaceBindingsRequest, options?: CallOptions): Promise<GetWorkspaceBindingsResponse>;
26
- getWorkspaceBindingsIter(req: GetWorkspaceBindingsRequest, options?: CallOptions): AsyncGenerator<WorkspaceBindingInfo>;
27
- /**
28
- * Updates workspace bindings of the catalog.
29
- * The caller must be a metastore admin or an owner of the catalog.
30
- */
31
- updateCatalogWorkspaceBindings(req: UpdateCatalogWorkspaceBindingsRequest, options?: CallOptions): Promise<UpdateCatalogWorkspaceBindingsResponse>;
32
- /**
33
- * Updates workspace bindings of the securable.
34
- * The caller must be a metastore admin or an owner of the securable.
35
- */
36
- updateWorkspaceBindings(req: UpdateWorkspaceBindingsRequest, options?: CallOptions): Promise<UpdateWorkspaceBindingsResponse>;
1
+ import { GetCatalogWorkspaceBindingsRequest, GetCatalogWorkspaceBindingsResponse, GetWorkspaceBindingsRequest, GetWorkspaceBindingsResponse, UpdateCatalogWorkspaceBindingsRequest, UpdateCatalogWorkspaceBindingsResponse, UpdateWorkspaceBindingsRequest, UpdateWorkspaceBindingsResponse, WorkspaceBindingInfo } from "./model.js";
2
+ import { CallOptions } from "@databricks/sdk-options/call";
3
+ import { ClientOptions } from "@databricks/sdk-options/client";
4
+
5
+ //#region src/v1/client.d.ts
6
+ declare class WorkspaceBindingsClient {
7
+ private readonly options;
8
+ private readonly logger;
9
+ private readonly userAgent;
10
+ private config;
11
+ constructor(options: ClientOptions);
12
+ private resolveConfig;
13
+ /**
14
+ * Gets workspace bindings of the catalog.
15
+ * The caller must be a metastore admin or an owner of the catalog.
16
+ */
17
+ getCatalogWorkspaceBindings(req: GetCatalogWorkspaceBindingsRequest, options?: CallOptions): Promise<GetCatalogWorkspaceBindingsResponse>;
18
+ /**
19
+ * Gets workspace bindings of the securable.
20
+ * The caller must be a metastore admin or an owner of the securable.
21
+ *
22
+ * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
23
+ *
24
+ * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.
25
+ * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
26
+ */
27
+ getWorkspaceBindings(req: GetWorkspaceBindingsRequest, options?: CallOptions): Promise<GetWorkspaceBindingsResponse>;
28
+ getWorkspaceBindingsIter(req: GetWorkspaceBindingsRequest, options?: CallOptions): AsyncGenerator<WorkspaceBindingInfo>;
29
+ /**
30
+ * Updates workspace bindings of the catalog.
31
+ * The caller must be a metastore admin or an owner of the catalog.
32
+ */
33
+ updateCatalogWorkspaceBindings(req: UpdateCatalogWorkspaceBindingsRequest, options?: CallOptions): Promise<UpdateCatalogWorkspaceBindingsResponse>;
34
+ /**
35
+ * Updates workspace bindings of the securable.
36
+ * The caller must be a metastore admin or an owner of the securable.
37
+ */
38
+ updateWorkspaceBindings(req: UpdateWorkspaceBindingsRequest, options?: CallOptions): Promise<UpdateWorkspaceBindingsResponse>;
37
39
  }
40
+ //#endregion
41
+ export { WorkspaceBindingsClient };
38
42
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
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,kCAAkC,EAClC,mCAAmC,EACnC,2BAA2B,EAC3B,4BAA4B,EAC5B,qCAAqC,EACrC,sCAAsC,EACtC,8BAA8B,EAC9B,+BAA+B,EAC/B,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAgBjB,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAIhC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAInC,OAAO,CAAC,MAAM,CAA4C;gBAE9C,OAAO,EAAE,aAAa;IAUlC,OAAO,CAAC,aAAa;IAKrB;;;OAGG;IACG,2BAA2B,CAC/B,GA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,+BAAA;AAAA"}
package/dist/v1/client.js CHANGED
@@ -1,180 +1,147 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- import { VERSION as AUTH_VERSION } from '@databricks/sdk-auth';
3
- import { createDefault } from '@databricks/sdk-core/clientinfo';
4
- import { NoOpLogger } from '@databricks/sdk-core/logger';
5
- import { resolveClientConfig } from './transport';
6
- import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse, } from './utils';
7
- import pkgJson from '../../package.json' with { type: 'json' };
8
- import { marshalUpdateCatalogWorkspaceBindingsRequestSchema, marshalUpdateWorkspaceBindingsRequestSchema, unmarshalGetCatalogWorkspaceBindingsResponseSchema, unmarshalGetWorkspaceBindingsResponseSchema, unmarshalUpdateCatalogWorkspaceBindingsResponseSchema, unmarshalUpdateWorkspaceBindingsResponseSchema, } from './model';
9
- // Package identity segment for this client to be used in the User-Agent header.
1
+ import { resolveClientConfig } from "./transport.js";
2
+ import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse } from "./utils.js";
3
+ import { name, version } from "../package.js";
4
+ import { marshalUpdateCatalogWorkspaceBindingsRequestSchema, marshalUpdateWorkspaceBindingsRequestSchema, unmarshalGetCatalogWorkspaceBindingsResponseSchema, unmarshalGetWorkspaceBindingsResponseSchema, unmarshalUpdateCatalogWorkspaceBindingsResponseSchema, unmarshalUpdateWorkspaceBindingsResponseSchema } from "./model.js";
5
+ import { VERSION } from "@databricks/sdk-auth";
6
+ import { createDefault } from "@databricks/sdk-core/clientinfo";
7
+ import { NoOpLogger } from "@databricks/sdk-core/logger";
8
+
9
+ //#region src/v1/client.ts
10
10
  const PACKAGE_SEGMENT = {
11
- key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\/sdk-/, ''),
12
- value: pkgJson.version,
11
+ key: "sdk-js-" + name.replace(/^@[^/]+\/sdk-/, ""),
12
+ value: version
13
13
  };
14
- export class WorkspaceBindingsClient {
15
- options;
16
- logger;
17
- // User-Agent header value. Composed once at construction from
18
- // createDefault() merged with this package's identity and the active
19
- // credential's name.
20
- userAgent;
21
- // Memoized configuration. The profile is resolved once, lazily, on the first
22
- // request, then reused; host, workspaceId/accountId, and credentials are
23
- // filled from it when not set explicitly on the options.
24
- config;
25
- constructor(options) {
26
- this.options = options;
27
- this.logger = options.logger ?? new NoOpLogger();
28
- const info = createDefault()
29
- .with(PACKAGE_SEGMENT)
30
- .with({ key: 'sdk-js-auth', value: AUTH_VERSION })
31
- .with({ key: 'auth', value: options.credentials?.name() ?? 'default' });
32
- this.userAgent = info.toString();
33
- }
34
- resolveConfig() {
35
- this.config ??= resolveClientConfig(this.options);
36
- return this.config;
37
- }
38
- /**
39
- * Gets workspace bindings of the catalog.
40
- * The caller must be a metastore admin or an owner of the catalog.
41
- */
42
- async getCatalogWorkspaceBindings(req, options) {
43
- const { host, workspaceId, httpClient } = await this.resolveConfig();
44
- const url = `${host}/api/2.1/unity-catalog/workspace-bindings/catalogs/${req.catalogName ?? ''}`;
45
- let resp;
46
- const call = async (callSignal) => {
47
- const headers = new Headers();
48
- if (workspaceId !== undefined) {
49
- headers.set('X-Databricks-Workspace-Id', workspaceId);
50
- }
51
- headers.set('User-Agent', this.userAgent);
52
- const httpReq = buildHttpRequest('GET', url, headers, callSignal);
53
- const respBody = await executeHttpCall({
54
- request: httpReq,
55
- httpClient,
56
- logger: this.logger,
57
- });
58
- resp = parseResponse(respBody, unmarshalGetCatalogWorkspaceBindingsResponseSchema);
59
- };
60
- await executeCall(call, options);
61
- if (resp === undefined) {
62
- throw new Error('operation completed without a result.');
63
- }
64
- return resp;
65
- }
66
- /**
67
- * Gets workspace bindings of the securable.
68
- * The caller must be a metastore admin or an owner of the securable.
69
- *
70
- * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
71
- *
72
- * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.
73
- * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
74
- */
75
- async getWorkspaceBindings(req, options) {
76
- const { host, workspaceId, httpClient } = await this.resolveConfig();
77
- const url = `${host}/api/2.1/unity-catalog/bindings/${req.securableType ?? ''}/${req.securableFullName ?? ''}`;
78
- const params = new URLSearchParams();
79
- if (req.maxResults !== undefined) {
80
- params.append('max_results', String(req.maxResults));
81
- }
82
- if (req.pageToken !== undefined) {
83
- params.append('page_token', req.pageToken);
84
- }
85
- const query = params.toString();
86
- const fullUrl = query !== '' ? `${url}?${query}` : url;
87
- let resp;
88
- const call = async (callSignal) => {
89
- const headers = new Headers();
90
- if (workspaceId !== undefined) {
91
- headers.set('X-Databricks-Workspace-Id', workspaceId);
92
- }
93
- headers.set('User-Agent', this.userAgent);
94
- const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
95
- const respBody = await executeHttpCall({
96
- request: httpReq,
97
- httpClient,
98
- logger: this.logger,
99
- });
100
- resp = parseResponse(respBody, unmarshalGetWorkspaceBindingsResponseSchema);
101
- };
102
- await executeCall(call, options);
103
- if (resp === undefined) {
104
- throw new Error('operation completed without a result.');
105
- }
106
- return resp;
107
- }
108
- async *getWorkspaceBindingsIter(req, options) {
109
- const pageReq = { ...req };
110
- for (;;) {
111
- const resp = await this.getWorkspaceBindings(pageReq, options);
112
- for (const item of resp.bindings ?? []) {
113
- yield item;
114
- }
115
- if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
116
- return;
117
- }
118
- pageReq.pageToken = resp.nextPageToken;
119
- }
120
- }
121
- /**
122
- * Updates workspace bindings of the catalog.
123
- * The caller must be a metastore admin or an owner of the catalog.
124
- */
125
- async updateCatalogWorkspaceBindings(req, options) {
126
- const { host, workspaceId, httpClient } = await this.resolveConfig();
127
- const url = `${host}/api/2.1/unity-catalog/workspace-bindings/catalogs/${req.catalogName ?? ''}`;
128
- const body = marshalRequest(req, marshalUpdateCatalogWorkspaceBindingsRequestSchema);
129
- let resp;
130
- const call = async (callSignal) => {
131
- const headers = new Headers({ 'Content-Type': 'application/json' });
132
- if (workspaceId !== undefined) {
133
- headers.set('X-Databricks-Workspace-Id', workspaceId);
134
- }
135
- headers.set('User-Agent', this.userAgent);
136
- const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
137
- const respBody = await executeHttpCall({
138
- request: httpReq,
139
- httpClient,
140
- logger: this.logger,
141
- });
142
- resp = parseResponse(respBody, unmarshalUpdateCatalogWorkspaceBindingsResponseSchema);
143
- };
144
- await executeCall(call, options);
145
- if (resp === undefined) {
146
- throw new Error('operation completed without a result.');
147
- }
148
- return resp;
149
- }
150
- /**
151
- * Updates workspace bindings of the securable.
152
- * The caller must be a metastore admin or an owner of the securable.
153
- */
154
- async updateWorkspaceBindings(req, options) {
155
- const { host, workspaceId, httpClient } = await this.resolveConfig();
156
- const url = `${host}/api/2.1/unity-catalog/bindings/${req.securableType ?? ''}/${req.securableFullName ?? ''}`;
157
- const body = marshalRequest(req, marshalUpdateWorkspaceBindingsRequestSchema);
158
- let resp;
159
- const call = async (callSignal) => {
160
- const headers = new Headers({ 'Content-Type': 'application/json' });
161
- if (workspaceId !== undefined) {
162
- headers.set('X-Databricks-Workspace-Id', workspaceId);
163
- }
164
- headers.set('User-Agent', this.userAgent);
165
- const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
166
- const respBody = await executeHttpCall({
167
- request: httpReq,
168
- httpClient,
169
- logger: this.logger,
170
- });
171
- resp = parseResponse(respBody, unmarshalUpdateWorkspaceBindingsResponseSchema);
172
- };
173
- await executeCall(call, options);
174
- if (resp === undefined) {
175
- throw new Error('operation completed without a result.');
176
- }
177
- return resp;
178
- }
179
- }
14
+ var WorkspaceBindingsClient = class {
15
+ options;
16
+ logger;
17
+ userAgent;
18
+ config;
19
+ constructor(options) {
20
+ this.options = options;
21
+ this.logger = options.logger ?? new NoOpLogger();
22
+ this.userAgent = createDefault().with(PACKAGE_SEGMENT).with({
23
+ key: "sdk-js-auth",
24
+ value: VERSION
25
+ }).with({
26
+ key: "auth",
27
+ value: options.credentials?.name() ?? "default"
28
+ }).toString();
29
+ }
30
+ resolveConfig() {
31
+ this.config ??= resolveClientConfig(this.options);
32
+ return this.config;
33
+ }
34
+ /**
35
+ * Gets workspace bindings of the catalog.
36
+ * The caller must be a metastore admin or an owner of the catalog.
37
+ */
38
+ async getCatalogWorkspaceBindings(req, options) {
39
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
40
+ const url = `${host}/api/2.1/unity-catalog/workspace-bindings/catalogs/${req.catalogName ?? ""}`;
41
+ let resp;
42
+ const call = async (callSignal) => {
43
+ const headers = new Headers();
44
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
45
+ headers.set("User-Agent", this.userAgent);
46
+ resp = parseResponse(await executeHttpCall({
47
+ request: buildHttpRequest("GET", url, headers, callSignal),
48
+ httpClient,
49
+ logger: this.logger
50
+ }), unmarshalGetCatalogWorkspaceBindingsResponseSchema);
51
+ };
52
+ await executeCall(call, options);
53
+ if (resp === void 0) throw new Error("operation completed without a result.");
54
+ return resp;
55
+ }
56
+ /**
57
+ * Gets workspace bindings of the securable.
58
+ * The caller must be a metastore admin or an owner of the securable.
59
+ *
60
+ * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
61
+ *
62
+ * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.
63
+ * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
64
+ */
65
+ async getWorkspaceBindings(req, options) {
66
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
67
+ const url = `${host}/api/2.1/unity-catalog/bindings/${req.securableType ?? ""}/${req.securableFullName ?? ""}`;
68
+ const params = new URLSearchParams();
69
+ if (req.maxResults !== void 0) params.append("max_results", String(req.maxResults));
70
+ if (req.pageToken !== void 0) params.append("page_token", req.pageToken);
71
+ const query = params.toString();
72
+ const fullUrl = query !== "" ? `${url}?${query}` : url;
73
+ let resp;
74
+ const call = async (callSignal) => {
75
+ const headers = new Headers();
76
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
77
+ headers.set("User-Agent", this.userAgent);
78
+ resp = parseResponse(await executeHttpCall({
79
+ request: buildHttpRequest("GET", fullUrl, headers, callSignal),
80
+ httpClient,
81
+ logger: this.logger
82
+ }), unmarshalGetWorkspaceBindingsResponseSchema);
83
+ };
84
+ await executeCall(call, options);
85
+ if (resp === void 0) throw new Error("operation completed without a result.");
86
+ return resp;
87
+ }
88
+ async *getWorkspaceBindingsIter(req, options) {
89
+ const pageReq = { ...req };
90
+ for (;;) {
91
+ const resp = await this.getWorkspaceBindings(pageReq, options);
92
+ for (const item of resp.bindings ?? []) yield item;
93
+ if (resp.nextPageToken === void 0 || resp.nextPageToken === "") return;
94
+ pageReq.pageToken = resp.nextPageToken;
95
+ }
96
+ }
97
+ /**
98
+ * Updates workspace bindings of the catalog.
99
+ * The caller must be a metastore admin or an owner of the catalog.
100
+ */
101
+ async updateCatalogWorkspaceBindings(req, options) {
102
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
103
+ const url = `${host}/api/2.1/unity-catalog/workspace-bindings/catalogs/${req.catalogName ?? ""}`;
104
+ const body = marshalRequest(req, marshalUpdateCatalogWorkspaceBindingsRequestSchema);
105
+ let resp;
106
+ const call = async (callSignal) => {
107
+ const headers = new Headers({ "Content-Type": "application/json" });
108
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
109
+ headers.set("User-Agent", this.userAgent);
110
+ resp = parseResponse(await executeHttpCall({
111
+ request: buildHttpRequest("PATCH", url, headers, callSignal, body),
112
+ httpClient,
113
+ logger: this.logger
114
+ }), unmarshalUpdateCatalogWorkspaceBindingsResponseSchema);
115
+ };
116
+ await executeCall(call, options);
117
+ if (resp === void 0) throw new Error("operation completed without a result.");
118
+ return resp;
119
+ }
120
+ /**
121
+ * Updates workspace bindings of the securable.
122
+ * The caller must be a metastore admin or an owner of the securable.
123
+ */
124
+ async updateWorkspaceBindings(req, options) {
125
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
126
+ const url = `${host}/api/2.1/unity-catalog/bindings/${req.securableType ?? ""}/${req.securableFullName ?? ""}`;
127
+ const body = marshalRequest(req, marshalUpdateWorkspaceBindingsRequestSchema);
128
+ let resp;
129
+ const call = async (callSignal) => {
130
+ const headers = new Headers({ "Content-Type": "application/json" });
131
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
132
+ headers.set("User-Agent", this.userAgent);
133
+ resp = parseResponse(await executeHttpCall({
134
+ request: buildHttpRequest("PATCH", url, headers, callSignal, body),
135
+ httpClient,
136
+ logger: this.logger
137
+ }), unmarshalUpdateWorkspaceBindingsResponseSchema);
138
+ };
139
+ await executeCall(call, options);
140
+ if (resp === void 0) throw new Error("operation completed without a result.");
141
+ return resp;
142
+ }
143
+ };
144
+
145
+ //#endregion
146
+ export { WorkspaceBindingsClient };
180
147
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAIvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,OAAO,MAAM,oBAAoB,CAAC,OAAM,IAAI,EAAE,MAAM,EAAC,CAAC;AAY7D,OAAO,EACL,kDAAkD,EAClD,2CAA2C,EAC3C,kDAAkD,EAClD,2CAA2C,EAC3C,qDAAqD,EACrD,8CAA8C,GAC/C,MAAM,SAAS,CAAC;AAEjB,gFAAgF;AA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AAG,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;YAC1E,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC;gBACrC,OAAO,EAAE,OAAO;gBAChB,UAAU;gBACV,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YACH,IAAI,GAAG,aAAa,CAClB,QAAQ,EACR,8CAA8C,CAC/C,CAAC;QACJ,CAAC,CAAC;QACF,MAAM,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
1
+ {"version":3,"file":"client.js","names":["pkgJson.version","AUTH_VERSION"],"sources":["../../src/v1/client.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';\nimport {createDefault} from '@databricks/sdk-core/clientinfo';\nimport type {Logger} from '@databricks/sdk-core/logger';\nimport {NoOpLogger} from '@databricks/sdk-core/logger';\nimport type {CallOptions} from '@databricks/sdk-options/call';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\nimport type {ResolvedClientConfig} from './transport';\nimport {resolveClientConfig} from './transport';\nimport {\n buildHttpRequest,\n executeCall,\n executeHttpCall,\n marshalRequest,\n parseResponse,\n} from './utils';\nimport pkgJson from '../../package.json' with {type: 'json'};\nimport type {\n GetCatalogWorkspaceBindingsRequest,\n GetCatalogWorkspaceBindingsResponse,\n GetWorkspaceBindingsRequest,\n GetWorkspaceBindingsResponse,\n UpdateCatalogWorkspaceBindingsRequest,\n UpdateCatalogWorkspaceBindingsResponse,\n UpdateWorkspaceBindingsRequest,\n UpdateWorkspaceBindingsResponse,\n WorkspaceBindingInfo,\n} from './model';\nimport {\n marshalUpdateCatalogWorkspaceBindingsRequestSchema,\n marshalUpdateWorkspaceBindingsRequestSchema,\n unmarshalGetCatalogWorkspaceBindingsResponseSchema,\n unmarshalGetWorkspaceBindingsResponseSchema,\n unmarshalUpdateCatalogWorkspaceBindingsResponseSchema,\n unmarshalUpdateWorkspaceBindingsResponseSchema,\n} from './model';\n\n// Package identity segment for this client to be used in the User-Agent header.\nconst PACKAGE_SEGMENT = {\n key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\\/sdk-/, ''),\n value: pkgJson.version,\n};\n\nexport class WorkspaceBindingsClient {\n private readonly options: ClientOptions;\n private readonly logger: Logger;\n // User-Agent header value. Composed once at construction from\n // createDefault() merged with this package's identity and the active\n // credential's name.\n private readonly userAgent: string;\n // Memoized configuration. The profile is resolved once, lazily, on the first\n // request, then reused; host, workspaceId/accountId, and credentials are\n // filled from it when not set explicitly on the options.\n private config: Promise<ResolvedClientConfig> | undefined;\n\n constructor(options: ClientOptions) {\n this.options = options;\n this.logger = options.logger ?? new NoOpLogger();\n const info = createDefault()\n .with(PACKAGE_SEGMENT)\n .with({key: 'sdk-js-auth', value: AUTH_VERSION})\n .with({key: 'auth', value: options.credentials?.name() ?? 'default'});\n this.userAgent = info.toString();\n }\n\n private resolveConfig(): Promise<ResolvedClientConfig> {\n this.config ??= resolveClientConfig(this.options);\n return this.config;\n }\n\n /**\n * Gets workspace bindings of the catalog.\n * The caller must be a metastore admin or an owner of the catalog.\n */\n async getCatalogWorkspaceBindings(\n req: GetCatalogWorkspaceBindingsRequest,\n options?: CallOptions\n ): Promise<GetCatalogWorkspaceBindingsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/workspace-bindings/catalogs/${req.catalogName ?? ''}`;\n let resp: GetCatalogWorkspaceBindingsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('GET', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalGetCatalogWorkspaceBindingsResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /**\n * Gets workspace bindings of the securable.\n * The caller must be a metastore admin or an owner of the securable.\n *\n * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.\n *\n * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.\n * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.\n */\n async getWorkspaceBindings(\n req: GetWorkspaceBindingsRequest,\n options?: CallOptions\n ): Promise<GetWorkspaceBindingsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/bindings/${req.securableType ?? ''}/${req.securableFullName ?? ''}`;\n const params = new URLSearchParams();\n if (req.maxResults !== undefined) {\n params.append('max_results', String(req.maxResults));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: GetWorkspaceBindingsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalGetWorkspaceBindingsResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n async *getWorkspaceBindingsIter(\n req: GetWorkspaceBindingsRequest,\n options?: CallOptions\n ): AsyncGenerator<WorkspaceBindingInfo> {\n const pageReq: GetWorkspaceBindingsRequest = {...req};\n for (;;) {\n const resp = await this.getWorkspaceBindings(pageReq, options);\n for (const item of resp.bindings ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * Updates workspace bindings of the catalog.\n * The caller must be a metastore admin or an owner of the catalog.\n */\n async updateCatalogWorkspaceBindings(\n req: UpdateCatalogWorkspaceBindingsRequest,\n options?: CallOptions\n ): Promise<UpdateCatalogWorkspaceBindingsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/workspace-bindings/catalogs/${req.catalogName ?? ''}`;\n const body = marshalRequest(\n req,\n marshalUpdateCatalogWorkspaceBindingsRequestSchema\n );\n let resp: UpdateCatalogWorkspaceBindingsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers({'Content-Type': 'application/json'});\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalUpdateCatalogWorkspaceBindingsResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /**\n * Updates workspace bindings of the securable.\n * The caller must be a metastore admin or an owner of the securable.\n */\n async updateWorkspaceBindings(\n req: UpdateWorkspaceBindingsRequest,\n options?: CallOptions\n ): Promise<UpdateWorkspaceBindingsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/bindings/${req.securableType ?? ''}/${req.securableFullName ?? ''}`;\n const body = marshalRequest(\n req,\n marshalUpdateWorkspaceBindingsRequestSchema\n );\n let resp: UpdateWorkspaceBindingsResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers({'Content-Type': 'application/json'});\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalUpdateWorkspaceBindingsResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n}\n"],"mappings":";;;;;;;;;AAuCA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;CAC1D,OAAOA;CACR;AAED,IAAa,0BAAb,MAAqC;CACnC,AAAiB;CACjB,AAAiB;CAIjB,AAAiB;CAIjB,AAAQ;CAER,YAAY,SAAwB;AAClC,OAAK,UAAU;AACf,OAAK,SAAS,QAAQ,UAAU,IAAI,YAAY;AAKhD,OAAK,YAJQ,eAAe,CACzB,KAAK,gBAAgB,CACrB,KAAK;GAAC,KAAK;GAAe,OAAOC;GAAa,CAAC,CAC/C,KAAK;GAAC,KAAK;GAAQ,OAAO,QAAQ,aAAa,MAAM,IAAI;GAAU,CAAC,CACjD,UAAU;;CAGlC,AAAQ,gBAA+C;AACrD,OAAK,WAAW,oBAAoB,KAAK,QAAQ;AACjD,SAAO,KAAK;;;;;;CAOd,MAAM,4BACJ,KACA,SAC8C;EAC9C,MAAM,EAAC,MAAM,aAAa,eAAc,MAAM,KAAK,eAAe;EAClE,MAAM,MAAM,GAAG,KAAK,qDAAqD,IAAI,eAAe;EAC5F,IAAI;EACJ,MAAM,OAAO,OAAO,eAA4C;GAC9D,MAAM,UAAU,IAAI,SAAS;AAC7B,OAAI,gBAAgB,OAClB,SAAQ,IAAI,6BAA6B,YAAY;AAEvD,WAAQ,IAAI,cAAc,KAAK,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,MAAM,QAAQ;AAChC,MAAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO"}
@@ -1,7 +1,3 @@
1
- /**
2
- * @module v1
3
- */
4
- export { WorkspaceBindingsClient } from './client';
5
- export { BindingType } from './model';
6
- export type { GetCatalogWorkspaceBindingsRequest, GetCatalogWorkspaceBindingsResponse, GetWorkspaceBindingsRequest, GetWorkspaceBindingsResponse, UpdateCatalogWorkspaceBindingsRequest, UpdateCatalogWorkspaceBindingsResponse, UpdateWorkspaceBindingsRequest, UpdateWorkspaceBindingsResponse, WorkspaceBindingInfo, } from './model';
7
- //# sourceMappingURL=index.d.ts.map
1
+ import { BindingType, GetCatalogWorkspaceBindingsRequest, GetCatalogWorkspaceBindingsResponse, GetWorkspaceBindingsRequest, GetWorkspaceBindingsResponse, UpdateCatalogWorkspaceBindingsRequest, UpdateCatalogWorkspaceBindingsResponse, UpdateWorkspaceBindingsRequest, UpdateWorkspaceBindingsResponse, WorkspaceBindingInfo } from "./model.js";
2
+ import { WorkspaceBindingsClient } from "./client.js";
3
+ export { BindingType, type GetCatalogWorkspaceBindingsRequest, type GetCatalogWorkspaceBindingsResponse, type GetWorkspaceBindingsRequest, type GetWorkspaceBindingsResponse, type UpdateCatalogWorkspaceBindingsRequest, type UpdateCatalogWorkspaceBindingsResponse, type UpdateWorkspaceBindingsRequest, type UpdateWorkspaceBindingsResponse, type WorkspaceBindingInfo, WorkspaceBindingsClient };
package/dist/v1/index.js CHANGED
@@ -1,7 +1,4 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- /**
3
- * @module v1
4
- */
5
- export { WorkspaceBindingsClient } from './client';
6
- export { BindingType } from './model';
7
- //# sourceMappingURL=index.js.map
1
+ import { BindingType } from "./model.js";
2
+ import { WorkspaceBindingsClient } from "./client.js";
3
+
4
+ export { BindingType, WorkspaceBindingsClient };