@databricks/sdk-uc-schemas 0.1.0-dev.3 → 0.1.0-dev.5

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.
@@ -1,24 +1,41 @@
1
1
  // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
2
  import { defaultCredentials } from '@databricks/sdk-auth/credentials';
3
3
  import { newFetchHttpClient } from '@databricks/sdk-core/http';
4
- /** Creates a new HTTP client with the given options. */
5
- export function newHttpClient(options) {
6
- const opts = options ?? {};
7
- // If an HTTP client is provided, use it as-is. Throw if other options are
8
- // also set, since they would be silently ignored.
9
- if (opts.httpClient !== undefined) {
10
- if (opts.credentials !== undefined || opts.timeout !== undefined) {
11
- throw new Error('httpClient cannot be combined with credentials or timeout');
12
- }
13
- return opts.httpClient;
4
+ import { resolve } from '@databricks/sdk-core/profiles';
5
+ /**
6
+ * Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.
7
+ *
8
+ * A configuration profile is always resolved from the config file and
9
+ * environment variables (per options.profileOptions); it supplies host,
10
+ * accountId, workspaceId, and credentials wherever the caller did not set them
11
+ * explicitly. Explicit options always take precedence.
12
+ *
13
+ * @throws if host is neither provided nor present in the resolved profile.
14
+ */
15
+ export async function resolveClientConfig(options) {
16
+ const profile = await resolve(options.profileOptions);
17
+ const host = options.host ?? profile.host;
18
+ if (host === undefined) {
19
+ throw new Error('Host is required.');
14
20
  }
15
- const credentials = opts.credentials ?? defaultCredentials();
16
- const base = newFetchHttpClient();
17
- let client = new AuthHttpClient(base, credentials);
18
- if (opts.timeout !== undefined) {
19
- client = new TimeoutHttpClient(client, opts.timeout);
21
+ // The provided httpClient (or the default fetch client) is the base wire;
22
+ // authentication and the optional timeout are layered on top of it. The
23
+ // default credential chain reuses the profile resolved above so that the
24
+ // same profileOptions govern host and authentication alike.
25
+ const base = options.httpClient ?? newFetchHttpClient();
26
+ const credentials = options.credentials ?? defaultCredentials({ profile });
27
+ let httpClient = new AuthHttpClient(base, credentials);
28
+ if (options.timeout !== undefined) {
29
+ httpClient = new TimeoutHttpClient(httpClient, options.timeout);
20
30
  }
21
- return client;
31
+ const accountId = options.accountId ?? profile.accountId;
32
+ const workspaceId = options.workspaceId ?? profile.workspaceId;
33
+ return {
34
+ host: host.replace(/\/$/, ''),
35
+ httpClient,
36
+ ...(accountId !== undefined && { accountId }),
37
+ ...(workspaceId !== undefined && { workspaceId }),
38
+ };
22
39
  }
23
40
  /** Wraps an HttpClient and adds authentication headers to requests. */
24
41
  class AuthHttpClient {
@@ -1 +1 @@
1
- {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/v1/transport.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAG/E,OAAO,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAMpE,OAAO,EAAC,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAG7D,wDAAwD;AACxD,MAAM,UAAU,aAAa,CAAC,OAAuB;IACnD,MAAM,IAAI,GAAG,OAAO,IAAI,EAAE,CAAC;IAE3B,0EAA0E;IAC1E,kDAAkD;IAClD,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QAClC,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACjE,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,kBAAkB,EAAE,CAAC;IAE7D,MAAM,IAAI,GAAG,kBAAkB,EAAE,CAAC;IAClC,IAAI,MAAM,GAAe,IAAI,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAE/D,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,GAAG,IAAI,iBAAiB,CAAC,MAAM,EAAE,IAAI,CA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;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,MAAM,CAEvE;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,eAAe,GACtB,IAAI,CAuBN"}
package/dist/v1/utils.js CHANGED
@@ -79,7 +79,8 @@ export function buildHttpRequest(method, url, headers, signal, body) {
79
79
  }
80
80
  export function parseResponse(body, schema) {
81
81
  const text = new TextDecoder().decode(body);
82
- const parsed = jsonBigint.parse(text);
82
+ // 204 responses return an empty body; treat as `{}`.
83
+ const parsed = text === '' ? {} : jsonBigint.parse(text);
83
84
  return schema.parse(parsed);
84
85
  }
85
86
  export function marshalRequest(data, schema) {
@@ -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,IAA6C,EAC7C,OAAqB;IAErB,MAAM,IAAI,GAAY;QACpB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,SAAS,IAAI,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAC,CAAC;QACjE,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,SAAS,IAAI;YACxC,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC;QACF,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,SAAS,IAAI,EAAC,OAAO,EAAE,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AEvB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO;IACT,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,0CAA0C;QAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;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,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/sdk-uc-schemas",
3
- "version": "0.1.0-dev.3",
3
+ "version": "0.1.0-dev.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -12,7 +12,6 @@
12
12
  },
13
13
  "files": [
14
14
  "dist",
15
- "src",
16
15
  "LICENSE"
17
16
  ],
18
17
  "scripts": {
@@ -28,10 +27,15 @@
28
27
  },
29
28
  "author": "Databricks",
30
29
  "license": "Apache-2.0",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/databricks/sdk-js.git",
33
+ "directory": "packages/uc/schemas"
34
+ },
31
35
  "dependencies": {
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",
36
+ "@databricks/sdk-auth": ">=0.1.0-dev.6 <1.0.0",
37
+ "@databricks/sdk-core": ">=0.1.0-dev.7 <1.0.0",
38
+ "@databricks/sdk-options": ">=0.1.0-dev.6 <1.0.0",
35
39
  "@js-temporal/polyfill": "^0.5.0",
36
40
  "json-bigint": "^1.0.0",
37
41
  "zod": "^4.3.6"
package/src/v1/client.ts DELETED
@@ -1,279 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
4
- import {createDefault} from '@databricks/sdk-core/clientinfo';
5
- import type {Logger} from '@databricks/sdk-core/logger';
6
- import {NoOpLogger} from '@databricks/sdk-core/logger';
7
- import type {CallOptions} from '@databricks/sdk-options/call';
8
- import type {ClientOptions} from '@databricks/sdk-options/client';
9
- import type {HttpClient} from '@databricks/sdk-core/http';
10
- import {newHttpClient} from './transport';
11
- import {
12
- buildHttpRequest,
13
- executeCall,
14
- executeHttpCall,
15
- marshalRequest,
16
- parseResponse,
17
- } from './utils';
18
- import pkgJson from '../../package.json' with {type: 'json'};
19
- import type {
20
- CreateSchemaRequest,
21
- DeleteSchemaRequest,
22
- DeleteSchemaResponse,
23
- GetSchemaRequest,
24
- ListSchemasRequest,
25
- ListSchemasResponse,
26
- SchemaInfo,
27
- UpdateSchemaRequest,
28
- } from './model';
29
- import {
30
- marshalCreateSchemaRequestSchema,
31
- marshalUpdateSchemaRequestSchema,
32
- unmarshalDeleteSchemaResponseSchema,
33
- unmarshalListSchemasResponseSchema,
34
- unmarshalSchemaInfoSchema,
35
- } from './model';
36
-
37
- // Package identity segment for this client to be used in the User-Agent header.
38
- const PACKAGE_SEGMENT = {
39
- key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\/sdk-/, ''),
40
- value: pkgJson.version,
41
- };
42
-
43
- export class SchemasClient {
44
- private readonly host: string;
45
- // Workspace ID used to route workspace-level calls on unified hosts (SPOG).
46
- // When set, workspace-level methods send X-Databricks-Org-Id on every
47
- // request.
48
- private readonly workspaceId: string | undefined;
49
- private readonly httpClient: HttpClient;
50
- private readonly logger: Logger;
51
- // User-Agent header value. Composed once at construction from
52
- // createDefault() merged with this package's identity and the active
53
- // credential's name.
54
- private readonly userAgent: string;
55
-
56
- constructor(options: ClientOptions) {
57
- if (options.host === undefined) {
58
- throw new Error('Host is required.');
59
- }
60
- this.host = options.host.replace(/\/$/, '');
61
- this.workspaceId = options.workspaceId;
62
- this.logger = options.logger ?? new NoOpLogger();
63
- const info = createDefault()
64
- .with(PACKAGE_SEGMENT)
65
- .with({key: 'sdk-js-auth', value: AUTH_VERSION})
66
- .with({key: 'auth', value: options.credentials?.name() ?? 'default'});
67
- this.userAgent = info.toString();
68
- this.httpClient = newHttpClient(options);
69
- }
70
-
71
- /**
72
- * Creates a new schema for catalog in the Metastore.
73
- * The caller must be a metastore admin, or have the **CREATE_SCHEMA** privilege in the parent catalog.
74
- */
75
- async createSchema(
76
- req: CreateSchemaRequest,
77
- options?: CallOptions
78
- ): Promise<SchemaInfo> {
79
- const url = `${this.host}/api/2.1/unity-catalog/schemas`;
80
- const body = marshalRequest(req, marshalCreateSchemaRequestSchema);
81
- let resp: SchemaInfo | undefined;
82
- const call = async (callSignal?: AbortSignal): Promise<void> => {
83
- const headers = new Headers({'Content-Type': 'application/json'});
84
- if (this.workspaceId !== undefined) {
85
- headers.set('X-Databricks-Org-Id', this.workspaceId);
86
- }
87
- headers.set('User-Agent', this.userAgent);
88
- const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
89
- const respBody = await executeHttpCall({
90
- request: httpReq,
91
- httpClient: this.httpClient,
92
- logger: this.logger,
93
- });
94
- resp = parseResponse(respBody, unmarshalSchemaInfoSchema);
95
- };
96
- await executeCall(call, options);
97
- if (resp === undefined) {
98
- throw new Error('operation completed without a result.');
99
- }
100
- return resp;
101
- }
102
-
103
- /**
104
- * Deletes the specified schema from the parent catalog.
105
- * The caller must be the owner of the schema or an owner of the parent catalog.
106
- */
107
- async deleteSchema(
108
- req: DeleteSchemaRequest,
109
- options?: CallOptions
110
- ): Promise<DeleteSchemaResponse> {
111
- const url = `${this.host}/api/2.1/unity-catalog/schemas/${req.fullNameArg ?? ''}`;
112
- const params = new URLSearchParams();
113
- if (req.force !== undefined) {
114
- params.append('force', String(req.force));
115
- }
116
- const query = params.toString();
117
- const fullUrl = query !== '' ? `${url}?${query}` : url;
118
- let resp: DeleteSchemaResponse | undefined;
119
- const call = async (callSignal?: AbortSignal): Promise<void> => {
120
- const headers = new Headers();
121
- if (this.workspaceId !== undefined) {
122
- headers.set('X-Databricks-Org-Id', this.workspaceId);
123
- }
124
- headers.set('User-Agent', this.userAgent);
125
- const httpReq = buildHttpRequest('DELETE', fullUrl, headers, callSignal);
126
- const respBody = await executeHttpCall({
127
- request: httpReq,
128
- httpClient: this.httpClient,
129
- logger: this.logger,
130
- });
131
- resp = parseResponse(respBody, unmarshalDeleteSchemaResponseSchema);
132
- };
133
- await executeCall(call, options);
134
- if (resp === undefined) {
135
- throw new Error('operation completed without a result.');
136
- }
137
- return resp;
138
- }
139
-
140
- /**
141
- * Gets the specified schema within the metastore.
142
- * The caller must be a metastore admin, the owner of the schema, or a user that has the **USE_SCHEMA** privilege on the schema.
143
- */
144
- async getSchema(
145
- req: GetSchemaRequest,
146
- options?: CallOptions
147
- ): Promise<SchemaInfo> {
148
- const url = `${this.host}/api/2.1/unity-catalog/schemas/${req.fullNameArg ?? ''}`;
149
- const params = new URLSearchParams();
150
- if (req.includeBrowse !== undefined) {
151
- params.append('include_browse', String(req.includeBrowse));
152
- }
153
- const query = params.toString();
154
- const fullUrl = query !== '' ? `${url}?${query}` : url;
155
- let resp: SchemaInfo | undefined;
156
- const call = async (callSignal?: AbortSignal): Promise<void> => {
157
- const headers = new Headers();
158
- if (this.workspaceId !== undefined) {
159
- headers.set('X-Databricks-Org-Id', this.workspaceId);
160
- }
161
- headers.set('User-Agent', this.userAgent);
162
- const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
163
- const respBody = await executeHttpCall({
164
- request: httpReq,
165
- httpClient: this.httpClient,
166
- logger: this.logger,
167
- });
168
- resp = parseResponse(respBody, unmarshalSchemaInfoSchema);
169
- };
170
- await executeCall(call, options);
171
- if (resp === undefined) {
172
- throw new Error('operation completed without a result.');
173
- }
174
- return resp;
175
- }
176
-
177
- /**
178
- * Gets an array of schemas for a catalog in the metastore.
179
- * If the caller is the metastore admin or the owner of the parent catalog, all schemas for the catalog will be retrieved.
180
- * Otherwise, only schemas owned by the caller (or for which the caller has the **USE_SCHEMA** privilege) will be retrieved.
181
- * There is no guarantee of a specific ordering of the elements in the array.
182
- *
183
- * NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
184
- *
185
- * PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.
186
- * Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
187
- */
188
- async listSchemas(
189
- req: ListSchemasRequest,
190
- options?: CallOptions
191
- ): Promise<ListSchemasResponse> {
192
- const url = `${this.host}/api/2.1/unity-catalog/schemas`;
193
- const params = new URLSearchParams();
194
- if (req.catalogName !== undefined) {
195
- params.append('catalog_name', req.catalogName);
196
- }
197
- if (req.maxResults !== undefined) {
198
- params.append('max_results', String(req.maxResults));
199
- }
200
- if (req.pageToken !== undefined) {
201
- params.append('page_token', req.pageToken);
202
- }
203
- if (req.includeBrowse !== undefined) {
204
- params.append('include_browse', String(req.includeBrowse));
205
- }
206
- const query = params.toString();
207
- const fullUrl = query !== '' ? `${url}?${query}` : url;
208
- let resp: ListSchemasResponse | undefined;
209
- const call = async (callSignal?: AbortSignal): Promise<void> => {
210
- const headers = new Headers();
211
- if (this.workspaceId !== undefined) {
212
- headers.set('X-Databricks-Org-Id', this.workspaceId);
213
- }
214
- headers.set('User-Agent', this.userAgent);
215
- const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
216
- const respBody = await executeHttpCall({
217
- request: httpReq,
218
- httpClient: this.httpClient,
219
- logger: this.logger,
220
- });
221
- resp = parseResponse(respBody, unmarshalListSchemasResponseSchema);
222
- };
223
- await executeCall(call, options);
224
- if (resp === undefined) {
225
- throw new Error('operation completed without a result.');
226
- }
227
- return resp;
228
- }
229
-
230
- async *listSchemasIter(
231
- req: ListSchemasRequest,
232
- options?: CallOptions
233
- ): AsyncGenerator<SchemaInfo> {
234
- const pageReq: ListSchemasRequest = {...req};
235
- for (;;) {
236
- const resp = await this.listSchemas(pageReq, options);
237
- for (const item of resp.schemas ?? []) {
238
- yield item;
239
- }
240
- if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
241
- return;
242
- }
243
- pageReq.pageToken = resp.nextPageToken;
244
- }
245
- }
246
-
247
- /**
248
- * Updates a schema for a catalog. The caller must be the owner of the schema or a metastore admin.
249
- * If the caller is a metastore admin, only the __owner__ field can be changed in the update.
250
- * If the __name__ field must be updated, the caller must be a metastore admin or have the **CREATE_SCHEMA** privilege on the parent catalog.
251
- */
252
- async updateSchema(
253
- req: UpdateSchemaRequest,
254
- options?: CallOptions
255
- ): Promise<SchemaInfo> {
256
- const url = `${this.host}/api/2.1/unity-catalog/schemas/${req.fullNameArg ?? ''}`;
257
- const body = marshalRequest(req, marshalUpdateSchemaRequestSchema);
258
- let resp: SchemaInfo | undefined;
259
- const call = async (callSignal?: AbortSignal): Promise<void> => {
260
- const headers = new Headers({'Content-Type': 'application/json'});
261
- if (this.workspaceId !== undefined) {
262
- headers.set('X-Databricks-Org-Id', this.workspaceId);
263
- }
264
- headers.set('User-Agent', this.userAgent);
265
- const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
266
- const respBody = await executeHttpCall({
267
- request: httpReq,
268
- httpClient: this.httpClient,
269
- logger: this.logger,
270
- });
271
- resp = parseResponse(respBody, unmarshalSchemaInfoSchema);
272
- };
273
- await executeCall(call, options);
274
- if (resp === undefined) {
275
- throw new Error('operation completed without a result.');
276
- }
277
- return resp;
278
- }
279
- }
package/src/v1/index.ts DELETED
@@ -1,23 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- export {SchemasClient} from './client';
4
-
5
- export {CatalogType} from './model';
6
-
7
- export type {
8
- CreateSchemaRequest,
9
- CreateSchemaRequest_OptionsEntry,
10
- CreateSchemaRequest_PropertiesEntry,
11
- DeleteSchemaRequest,
12
- DeleteSchemaResponse,
13
- EffectivePredictiveOptimizationFlag,
14
- GetSchemaRequest,
15
- ListSchemasRequest,
16
- ListSchemasResponse,
17
- SchemaInfo,
18
- SchemaInfo_OptionsEntry,
19
- SchemaInfo_PropertiesEntry,
20
- UpdateSchemaRequest,
21
- UpdateSchemaRequest_OptionsEntry,
22
- UpdateSchemaRequest_PropertiesEntry,
23
- } from './model';