@databricks/sdk-uc-registeredmodels 0.48.0 → 0.52.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.
- package/dist/package.js +1 -1
- package/dist/v1/client.d.ts +2 -2
- package/dist/v1/client.js +2 -2
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/transport.js +11 -3
- package/dist/v1/transport.js.map +1 -1
- package/package.json +4 -4
package/dist/package.js
CHANGED
package/dist/v1/client.d.ts
CHANGED
|
@@ -77,8 +77,8 @@ declare class RegisteredModelsClient {
|
|
|
77
77
|
*/
|
|
78
78
|
getRegisteredModel(req: GetRegisteredModelRequest, options?: CallOptions): Promise<RegisteredModelInfo>;
|
|
79
79
|
/**
|
|
80
|
-
* List model versions
|
|
81
|
-
*
|
|
80
|
+
* List the model versions of the specified registered model, identified by its
|
|
81
|
+
* full three-level name (catalog.schema.model).
|
|
82
82
|
*
|
|
83
83
|
* The returned models are filtered based on the privileges of the calling user.
|
|
84
84
|
* For example, the metastore admin is able to list all the model versions.
|
package/dist/v1/client.js
CHANGED
|
@@ -232,8 +232,8 @@ var RegisteredModelsClient = class {
|
|
|
232
232
|
return resp;
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
* List model versions
|
|
236
|
-
*
|
|
235
|
+
* List the model versions of the specified registered model, identified by its
|
|
236
|
+
* full three-level name (catalog.schema.model).
|
|
237
237
|
*
|
|
238
238
|
* The returned models are filtered based on the privileges of the calling user.
|
|
239
239
|
* For example, the metastore admin is able to list all the model versions.
|
package/dist/v1/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 CreateRegisteredModelRequest,\n DeleteModelVersionRequest,\n DeleteModelVersionResponse,\n DeleteRegisteredModelAliasRequest,\n DeleteRegisteredModelAliasResponse,\n DeleteRegisteredModelRequest,\n DeleteRegisteredModelResponse,\n GetModelVersionByAliasRequest,\n GetModelVersionRequest,\n GetRegisteredModelRequest,\n ListModelVersionsRequest,\n ListModelVersionsResponse,\n ListRegisteredModelsRequest,\n ListRegisteredModelsResponse,\n ModelVersionInfo,\n RegisteredModelAliasInfo,\n RegisteredModelInfo,\n SetRegisteredModelAliasRequest,\n UpdateModelVersionRequest,\n UpdateRegisteredModelRequest,\n} from './model';\nimport {\n marshalCreateRegisteredModelRequestSchema,\n marshalSetRegisteredModelAliasRequestSchema,\n marshalUpdateModelVersionRequestSchema,\n marshalUpdateRegisteredModelRequestSchema,\n unmarshalDeleteModelVersionResponseSchema,\n unmarshalDeleteRegisteredModelAliasResponseSchema,\n unmarshalDeleteRegisteredModelResponseSchema,\n unmarshalListModelVersionsResponseSchema,\n unmarshalListRegisteredModelsResponseSchema,\n unmarshalModelVersionInfoSchema,\n unmarshalRegisteredModelAliasInfoSchema,\n unmarshalRegisteredModelInfoSchema,\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 RegisteredModelsClient {\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 * Creates a new registered model in Unity Catalog.\n *\n * File storage for model versions in the registered model\n * will be located in the default location which is specified by the parent schema,\n * or the parent catalog, or the Metastore.\n *\n * For registered model creation to succeed, the user must satisfy the following conditions:\n * - The caller must be a metastore admin, or be the owner of the parent catalog and schema,\n * or have the **USE_CATALOG** privilege on the parent catalog\n * and the **USE_SCHEMA** privilege on the parent schema.\n * - The caller must have the **CREATE MODEL** or **CREATE FUNCTION** privilege on the parent schema.\n */\n async createRegisteredModel(\n req: CreateRegisteredModelRequest,\n options?: CallOptions\n ): Promise<RegisteredModelInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models`;\n const body = marshalRequest(req, marshalCreateRegisteredModelRequestSchema);\n let resp: RegisteredModelInfo | 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('POST', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalRegisteredModelInfoSchema);\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 * Deletes a model version from the specified registered model. Any aliases assigned to the\n * model version will also be deleted.\n *\n * The caller must be a metastore admin or an owner of the parent registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async deleteModelVersion(\n req: DeleteModelVersionRequest,\n options?: CallOptions\n ): Promise<DeleteModelVersionResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions/${String(req.versionArg ?? '')}`;\n let resp: DeleteModelVersionResponse | 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('DELETE', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalDeleteModelVersionResponseSchema);\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 * Deletes a registered model and all its model versions from the specified parent catalog and schema.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async deleteRegisteredModel(\n req: DeleteRegisteredModelRequest,\n options?: CallOptions\n ): Promise<DeleteRegisteredModelResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}`;\n let resp: DeleteRegisteredModelResponse | 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('DELETE', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalDeleteRegisteredModelResponseSchema\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 * Deletes a registered model alias.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async deleteRegisteredModelAlias(\n req: DeleteRegisteredModelAliasRequest,\n options?: CallOptions\n ): Promise<DeleteRegisteredModelAliasResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/aliases/${req.aliasArg ?? ''}`;\n let resp: DeleteRegisteredModelAliasResponse | 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('DELETE', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalDeleteRegisteredModelAliasResponseSchema\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 * Get a model version.\n *\n * The caller must be a metastore admin or an owner of (or have the **EXECUTE**\n * privilege on) the parent registered model. For the latter case, the caller must also be the owner\n * or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege\n * on the parent schema.\n */\n async getModelVersion(\n req: GetModelVersionRequest,\n options?: CallOptions\n ): Promise<ModelVersionInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions/${String(req.versionArg ?? '')}`;\n const params = new URLSearchParams();\n if (req.includeAliases !== undefined) {\n params.append('include_aliases', String(req.includeAliases));\n }\n if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ModelVersionInfo | 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(respBody, unmarshalModelVersionInfoSchema);\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 * Get a model version by alias.\n *\n * The caller must be a metastore admin or an owner of (or have the **EXECUTE**\n * privilege on) the registered model. For the latter case, the caller must also be the owner\n * or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege\n * on the parent schema.\n */\n async getModelVersionByAlias(\n req: GetModelVersionByAliasRequest,\n options?: CallOptions\n ): Promise<ModelVersionInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/aliases/${req.aliasArg ?? ''}`;\n const params = new URLSearchParams();\n if (req.includeAliases !== undefined) {\n params.append('include_aliases', String(req.includeAliases));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ModelVersionInfo | 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(respBody, unmarshalModelVersionInfoSchema);\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 * Get a registered model.\n *\n * The caller must be a metastore admin or an owner of (or have the **EXECUTE**\n * privilege on) the registered model. For the latter case, the caller must also be the owner\n * or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege\n * on the parent schema.\n */\n async getRegisteredModel(\n req: GetRegisteredModelRequest,\n options?: CallOptions\n ): Promise<RegisteredModelInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}`;\n const params = new URLSearchParams();\n if (req.includeAliases !== undefined) {\n params.append('include_aliases', String(req.includeAliases));\n }\n if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: RegisteredModelInfo | 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(respBody, unmarshalRegisteredModelInfoSchema);\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 * List model versions. You can list model versions under a particular schema,\n * or list all model versions in the current metastore.\n *\n * The returned models are filtered based on the privileges of the calling user.\n * For example, the metastore admin is able to list all the model versions.\n * A regular user needs to be the owner or have the **EXECUTE** privilege\n * on the parent registered model to receive the model versions in the response.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * There is no guarantee of a specific ordering of the elements in the response. The\n * elements in the response will not contain any aliases or tags.\n *\n * PAGINATION BEHAVIOR: The API is by default paginated, 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 listModelVersions(\n req: ListModelVersionsRequest,\n options?: CallOptions\n ): Promise<ListModelVersionsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions`;\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 if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListModelVersionsResponse | 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(respBody, unmarshalListModelVersionsResponseSchema);\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 *listModelVersionsIter(\n req: ListModelVersionsRequest,\n options?: CallOptions\n ): AsyncGenerator<ModelVersionInfo> {\n const pageReq: ListModelVersionsRequest = {...req};\n for (;;) {\n const resp = await this.listModelVersions(pageReq, options);\n for (const item of resp.modelVersions ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * List registered models. You can list registered models under a particular schema,\n * or list all registered models in the current metastore.\n *\n * The returned models are filtered based on the privileges of the calling user.\n * For example, the metastore admin is able to list all the registered models.\n * A regular user needs to be the owner or have the **EXECUTE** privilege\n * on the registered model to receive the registered models in the response.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * There is no guarantee of a specific ordering of the elements in the response.\n *\n * PAGINATION BEHAVIOR: The API is by default paginated, 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 listRegisteredModels(\n req: ListRegisteredModelsRequest,\n options?: CallOptions\n ): Promise<ListRegisteredModelsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models`;\n const params = new URLSearchParams();\n if (req.catalogName !== undefined) {\n params.append('catalog_name', req.catalogName);\n }\n if (req.schemaName !== undefined) {\n params.append('schema_name', req.schemaName);\n }\n if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\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: ListRegisteredModelsResponse | 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 unmarshalListRegisteredModelsResponseSchema\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 *listRegisteredModelsIter(\n req: ListRegisteredModelsRequest,\n options?: CallOptions\n ): AsyncGenerator<RegisteredModelInfo> {\n const pageReq: ListRegisteredModelsRequest = {...req};\n for (;;) {\n const resp = await this.listRegisteredModels(pageReq, options);\n for (const item of resp.registeredModels ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * Set an alias on the specified registered model.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async setRegisteredModelAlias(\n req: SetRegisteredModelAliasRequest,\n options?: CallOptions\n ): Promise<RegisteredModelAliasInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/aliases/${req.aliasArg ?? ''}`;\n const body = marshalRequest(\n req,\n marshalSetRegisteredModelAliasRequestSchema\n );\n let resp: RegisteredModelAliasInfo | 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('PUT', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalRegisteredModelAliasInfoSchema);\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 the specified model version.\n *\n * The caller must be a metastore admin or an owner of the parent registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * Currently only the comment of the model version can be updated.\n */\n async updateModelVersion(\n req: UpdateModelVersionRequest,\n options?: CallOptions\n ): Promise<ModelVersionInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions/${String(req.versionArg ?? '')}`;\n const body = marshalRequest(req, marshalUpdateModelVersionRequestSchema);\n let resp: ModelVersionInfo | 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(respBody, unmarshalModelVersionInfoSchema);\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 the specified registered model.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * Currently only the name, the owner or the comment of the registered model can be updated.\n */\n async updateRegisteredModel(\n req: UpdateRegisteredModelRequest,\n options?: CallOptions\n ): Promise<RegisteredModelInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}`;\n const body = marshalRequest(req, marshalUpdateRegisteredModelRequestSchema);\n let resp: RegisteredModelInfo | 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(respBody, unmarshalRegisteredModelInfoSchema);\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":";;;;;;;;;AAwDA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;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O,cALU,MAAM,gBAAgB;IACrC,SAFc,iBAAiB,SAAS,KAAK,SAAS,YAAY,KAAK;IAGvE;IACA,QAAQ,KAAK;IACd,CAAC,EAC6B,gCAAgC;;AAEjE,QAAM,YAAY,MAAM,QAAQ;AAChC,MAAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO;;;;;;;;;;;CAYT,MAAM,sBACJ,KACA,SAC8B;EAC9B,MAAM,EAAC,MAAM,aAAa,eAAc,MAAM,KAAK,eAAe;EAClE,MAAM,MAAM,GAAG,KAAK,gCAAgC,IAAI,eAAe;EACvE,MAAM,OAAO,eAAe,KAAK,0CAA0C;EAC3E,IAAI;EACJ,MAAM,OAAO,OAAO,eAA4C;GAC9D,MAAM,UAAU,IAAI,QAAQ,EAAC,gBAAgB,oBAAmB,CAAC;AACjE,OAAI,gBAAgB,OAClB,SAAQ,IAAI,6BAA6B,YAAY;AAEvD,WAAQ,IAAI,cAAc,KAAK,UAAU;AAOzC,UAAO,cALU,MAAM,gBAAgB;IACrC,SAFc,iBAAiB,SAAS,KAAK,SAAS,YAAY,KAAK;IAGvE;IACA,QAAQ,KAAK;IACd,CAAC,EAC6B,mCAAmC;;AAEpE,QAAM,YAAY,MAAM,QAAQ;AAChC,MAAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO"}
|
|
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 CreateRegisteredModelRequest,\n DeleteModelVersionRequest,\n DeleteModelVersionResponse,\n DeleteRegisteredModelAliasRequest,\n DeleteRegisteredModelAliasResponse,\n DeleteRegisteredModelRequest,\n DeleteRegisteredModelResponse,\n GetModelVersionByAliasRequest,\n GetModelVersionRequest,\n GetRegisteredModelRequest,\n ListModelVersionsRequest,\n ListModelVersionsResponse,\n ListRegisteredModelsRequest,\n ListRegisteredModelsResponse,\n ModelVersionInfo,\n RegisteredModelAliasInfo,\n RegisteredModelInfo,\n SetRegisteredModelAliasRequest,\n UpdateModelVersionRequest,\n UpdateRegisteredModelRequest,\n} from './model';\nimport {\n marshalCreateRegisteredModelRequestSchema,\n marshalSetRegisteredModelAliasRequestSchema,\n marshalUpdateModelVersionRequestSchema,\n marshalUpdateRegisteredModelRequestSchema,\n unmarshalDeleteModelVersionResponseSchema,\n unmarshalDeleteRegisteredModelAliasResponseSchema,\n unmarshalDeleteRegisteredModelResponseSchema,\n unmarshalListModelVersionsResponseSchema,\n unmarshalListRegisteredModelsResponseSchema,\n unmarshalModelVersionInfoSchema,\n unmarshalRegisteredModelAliasInfoSchema,\n unmarshalRegisteredModelInfoSchema,\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 RegisteredModelsClient {\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 * Creates a new registered model in Unity Catalog.\n *\n * File storage for model versions in the registered model\n * will be located in the default location which is specified by the parent schema,\n * or the parent catalog, or the Metastore.\n *\n * For registered model creation to succeed, the user must satisfy the following conditions:\n * - The caller must be a metastore admin, or be the owner of the parent catalog and schema,\n * or have the **USE_CATALOG** privilege on the parent catalog\n * and the **USE_SCHEMA** privilege on the parent schema.\n * - The caller must have the **CREATE MODEL** or **CREATE FUNCTION** privilege on the parent schema.\n */\n async createRegisteredModel(\n req: CreateRegisteredModelRequest,\n options?: CallOptions\n ): Promise<RegisteredModelInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models`;\n const body = marshalRequest(req, marshalCreateRegisteredModelRequestSchema);\n let resp: RegisteredModelInfo | 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('POST', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalRegisteredModelInfoSchema);\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 * Deletes a model version from the specified registered model. Any aliases assigned to the\n * model version will also be deleted.\n *\n * The caller must be a metastore admin or an owner of the parent registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async deleteModelVersion(\n req: DeleteModelVersionRequest,\n options?: CallOptions\n ): Promise<DeleteModelVersionResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions/${String(req.versionArg ?? '')}`;\n let resp: DeleteModelVersionResponse | 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('DELETE', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalDeleteModelVersionResponseSchema);\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 * Deletes a registered model and all its model versions from the specified parent catalog and schema.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async deleteRegisteredModel(\n req: DeleteRegisteredModelRequest,\n options?: CallOptions\n ): Promise<DeleteRegisteredModelResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}`;\n let resp: DeleteRegisteredModelResponse | 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('DELETE', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalDeleteRegisteredModelResponseSchema\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 * Deletes a registered model alias.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async deleteRegisteredModelAlias(\n req: DeleteRegisteredModelAliasRequest,\n options?: CallOptions\n ): Promise<DeleteRegisteredModelAliasResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/aliases/${req.aliasArg ?? ''}`;\n let resp: DeleteRegisteredModelAliasResponse | 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('DELETE', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalDeleteRegisteredModelAliasResponseSchema\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 * Get a model version.\n *\n * The caller must be a metastore admin or an owner of (or have the **EXECUTE**\n * privilege on) the parent registered model. For the latter case, the caller must also be the owner\n * or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege\n * on the parent schema.\n */\n async getModelVersion(\n req: GetModelVersionRequest,\n options?: CallOptions\n ): Promise<ModelVersionInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions/${String(req.versionArg ?? '')}`;\n const params = new URLSearchParams();\n if (req.includeAliases !== undefined) {\n params.append('include_aliases', String(req.includeAliases));\n }\n if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ModelVersionInfo | 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(respBody, unmarshalModelVersionInfoSchema);\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 * Get a model version by alias.\n *\n * The caller must be a metastore admin or an owner of (or have the **EXECUTE**\n * privilege on) the registered model. For the latter case, the caller must also be the owner\n * or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege\n * on the parent schema.\n */\n async getModelVersionByAlias(\n req: GetModelVersionByAliasRequest,\n options?: CallOptions\n ): Promise<ModelVersionInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/aliases/${req.aliasArg ?? ''}`;\n const params = new URLSearchParams();\n if (req.includeAliases !== undefined) {\n params.append('include_aliases', String(req.includeAliases));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ModelVersionInfo | 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(respBody, unmarshalModelVersionInfoSchema);\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 * Get a registered model.\n *\n * The caller must be a metastore admin or an owner of (or have the **EXECUTE**\n * privilege on) the registered model. For the latter case, the caller must also be the owner\n * or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege\n * on the parent schema.\n */\n async getRegisteredModel(\n req: GetRegisteredModelRequest,\n options?: CallOptions\n ): Promise<RegisteredModelInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}`;\n const params = new URLSearchParams();\n if (req.includeAliases !== undefined) {\n params.append('include_aliases', String(req.includeAliases));\n }\n if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: RegisteredModelInfo | 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(respBody, unmarshalRegisteredModelInfoSchema);\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 * List the model versions of the specified registered model, identified by its\n * full three-level name (catalog.schema.model).\n *\n * The returned models are filtered based on the privileges of the calling user.\n * For example, the metastore admin is able to list all the model versions.\n * A regular user needs to be the owner or have the **EXECUTE** privilege\n * on the parent registered model to receive the model versions in the response.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * There is no guarantee of a specific ordering of the elements in the response. The\n * elements in the response will not contain any aliases or tags.\n *\n * PAGINATION BEHAVIOR: The API is by default paginated, 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 listModelVersions(\n req: ListModelVersionsRequest,\n options?: CallOptions\n ): Promise<ListModelVersionsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions`;\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 if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListModelVersionsResponse | 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(respBody, unmarshalListModelVersionsResponseSchema);\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 *listModelVersionsIter(\n req: ListModelVersionsRequest,\n options?: CallOptions\n ): AsyncGenerator<ModelVersionInfo> {\n const pageReq: ListModelVersionsRequest = {...req};\n for (;;) {\n const resp = await this.listModelVersions(pageReq, options);\n for (const item of resp.modelVersions ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * List registered models. You can list registered models under a particular schema,\n * or list all registered models in the current metastore.\n *\n * The returned models are filtered based on the privileges of the calling user.\n * For example, the metastore admin is able to list all the registered models.\n * A regular user needs to be the owner or have the **EXECUTE** privilege\n * on the registered model to receive the registered models in the response.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * There is no guarantee of a specific ordering of the elements in the response.\n *\n * PAGINATION BEHAVIOR: The API is by default paginated, 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 listRegisteredModels(\n req: ListRegisteredModelsRequest,\n options?: CallOptions\n ): Promise<ListRegisteredModelsResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models`;\n const params = new URLSearchParams();\n if (req.catalogName !== undefined) {\n params.append('catalog_name', req.catalogName);\n }\n if (req.schemaName !== undefined) {\n params.append('schema_name', req.schemaName);\n }\n if (req.includeBrowse !== undefined) {\n params.append('include_browse', String(req.includeBrowse));\n }\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: ListRegisteredModelsResponse | 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 unmarshalListRegisteredModelsResponseSchema\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 *listRegisteredModelsIter(\n req: ListRegisteredModelsRequest,\n options?: CallOptions\n ): AsyncGenerator<RegisteredModelInfo> {\n const pageReq: ListRegisteredModelsRequest = {...req};\n for (;;) {\n const resp = await this.listRegisteredModels(pageReq, options);\n for (const item of resp.registeredModels ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * Set an alias on the specified registered model.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n */\n async setRegisteredModelAlias(\n req: SetRegisteredModelAliasRequest,\n options?: CallOptions\n ): Promise<RegisteredModelAliasInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/aliases/${req.aliasArg ?? ''}`;\n const body = marshalRequest(\n req,\n marshalSetRegisteredModelAliasRequestSchema\n );\n let resp: RegisteredModelAliasInfo | 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('PUT', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalRegisteredModelAliasInfoSchema);\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 the specified model version.\n *\n * The caller must be a metastore admin or an owner of the parent registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * Currently only the comment of the model version can be updated.\n */\n async updateModelVersion(\n req: UpdateModelVersionRequest,\n options?: CallOptions\n ): Promise<ModelVersionInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}/versions/${String(req.versionArg ?? '')}`;\n const body = marshalRequest(req, marshalUpdateModelVersionRequestSchema);\n let resp: ModelVersionInfo | 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(respBody, unmarshalModelVersionInfoSchema);\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 the specified registered model.\n *\n * The caller must be a metastore admin or an owner of the registered model.\n * For the latter case, the caller must also be the owner or have the **USE_CATALOG**\n * privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.\n *\n * Currently only the name, the owner or the comment of the registered model can be updated.\n */\n async updateRegisteredModel(\n req: UpdateRegisteredModelRequest,\n options?: CallOptions\n ): Promise<RegisteredModelInfo> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.1/unity-catalog/models/${req.fullNameArg ?? ''}`;\n const body = marshalRequest(req, marshalUpdateRegisteredModelRequestSchema);\n let resp: RegisteredModelInfo | 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(respBody, unmarshalRegisteredModelInfoSchema);\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":";;;;;;;;;AAwDA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;CAC1D,OAAOA;CACR;AAED,IAAa,yBAAb,MAAoC;CAClC,AAAiB;CACjB,AAAiB;CAIjB,AAAiB;CAIjB,AAAQ;CAER,YAAY,SAAwB;AAClC,OAAK,UAAU;AACf,OAAK,SAAS,QAAQ,UAAU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AAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO;;;;;;;;;;;CAYT,MAAM,sBACJ,KACA,SAC8B;EAC9B,MAAM,EAAC,MAAM,aAAa,eAAc,MAAM,KAAK,eAAe;EAClE,MAAM,MAAM,GAAG,KAAK,gCAAgC,IAAI,eAAe;EACvE,MAAM,OAAO,eAAe,KAAK,0CAA0C;EAC3E,IAAI;EACJ,MAAM,OAAO,OAAO,eAA4C;GAC9D,MAAM,UAAU,IAAI,QAAQ,EAAC,gBAAgB,oBAAmB,CAAC;AACjE,OAAI,gBAAgB,OAClB,SAAQ,IAAI,6BAA6B,YAAY;AAEvD,WAAQ,IAAI,cAAc,KAAK,UAAU;AAOzC,UAAO,cALU,MAAM,gBAAgB;IACrC,SAFc,iBAAiB,SAAS,KAAK,SAAS,YAAY,KAAK;IAGvE;IACA,QAAQ,KAAK;IACd,CAAC,EAC6B,mCAAmC;;AAEpE,QAAM,YAAY,MAAM,QAAQ;AAChC,MAAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO"}
|
package/dist/v1/transport.js
CHANGED
|
@@ -15,19 +15,27 @@ import { resolve } from "@databricks/sdk-core/profiles";
|
|
|
15
15
|
*/
|
|
16
16
|
async function resolveClientConfig(options) {
|
|
17
17
|
const profile = await resolve(options.profileOptions);
|
|
18
|
-
const host = options.host ?? profile.host;
|
|
18
|
+
const host = normalizeHost(options.host ?? profile.host);
|
|
19
19
|
if (host === void 0) throw new Error("Host is required.");
|
|
20
|
-
let httpClient = new AuthHttpClient(options.httpClient ?? newFetchHttpClient(), options.credentials ?? defaultCredentials({ profile
|
|
20
|
+
let httpClient = new AuthHttpClient(options.httpClient ?? newFetchHttpClient(), options.credentials ?? defaultCredentials({ profile: {
|
|
21
|
+
...profile,
|
|
22
|
+
host
|
|
23
|
+
} }));
|
|
21
24
|
if (options.timeout !== void 0) httpClient = new TimeoutHttpClient(httpClient, options.timeout);
|
|
22
25
|
const accountId = options.accountId ?? profile.accountId;
|
|
23
26
|
const workspaceId = options.workspaceId ?? profile.workspaceId;
|
|
24
27
|
return {
|
|
25
|
-
host
|
|
28
|
+
host,
|
|
26
29
|
httpClient,
|
|
27
30
|
...accountId !== void 0 && { accountId },
|
|
28
31
|
...workspaceId !== void 0 && { workspaceId }
|
|
29
32
|
};
|
|
30
33
|
}
|
|
34
|
+
function normalizeHost(host) {
|
|
35
|
+
const trimmed = host?.trim();
|
|
36
|
+
if (trimmed === void 0 || trimmed === "") return;
|
|
37
|
+
return (/^https?:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`).replace(/\/$/, "");
|
|
38
|
+
}
|
|
31
39
|
/** Wraps an HttpClient and adds authentication headers to requests. */
|
|
32
40
|
var AuthHttpClient = class {
|
|
33
41
|
constructor(base, credentials) {
|
package/dist/v1/transport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","names":[],"sources":["../../src/v1/transport.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport type {Credentials} from '@databricks/sdk-auth';\nimport {defaultCredentials} from '@databricks/sdk-auth/credentials';\nimport type {\n HttpClient,\n HttpRequest,\n HttpResponse,\n} from '@databricks/sdk-core/http';\nimport {newFetchHttpClient} from '@databricks/sdk-core/http';\nimport type {Profile} from '@databricks/sdk-core/profiles';\nimport {resolve} from '@databricks/sdk-core/profiles';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\n\n/**\n * The configuration a client needs to issue requests, resolved from\n * {@link ClientOptions} and a configuration profile.\n */\nexport interface ResolvedClientConfig {\n /** Host with any trailing slash removed. */\n host: string;\n\n /**\n * Default account ID for account-level paths that contain an account_id\n * segment. A request's own accountId still wins.\n */\n accountId?: string;\n\n /**\n * Workspace ID used to route workspace-level calls on unified hosts (SPOG).\n */\n workspaceId?: string;\n\n /** HTTP client with authentication, and any configured timeout, applied. */\n httpClient: HttpClient;\n}\n\n/**\n * Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.\n *\n * A configuration profile is always resolved from the config file and\n * environment variables (per options.profileOptions); it supplies host,\n * accountId, workspaceId, and credentials wherever the caller did not set them\n * explicitly. Explicit options always take precedence.\n *\n * @throws if host is neither provided nor present in the resolved profile.\n */\nexport async function resolveClientConfig(\n options: ClientOptions\n): Promise<ResolvedClientConfig> {\n const profile: Profile = await resolve(options.profileOptions);\n\n const host = options.host ?? profile.host;\n if (host === undefined) {\n throw new Error('Host is required.');\n }\n\n // The provided httpClient (or the default fetch client) is the base wire;\n // authentication and the optional timeout are layered on top of it. The\n // default credential chain reuses the profile resolved above so that the\n // same profileOptions govern host and authentication alike.\n const base = options.httpClient ?? newFetchHttpClient();\n const credentials
|
|
1
|
+
{"version":3,"file":"transport.js","names":[],"sources":["../../src/v1/transport.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport type {Credentials} from '@databricks/sdk-auth';\nimport {defaultCredentials} from '@databricks/sdk-auth/credentials';\nimport type {\n HttpClient,\n HttpRequest,\n HttpResponse,\n} from '@databricks/sdk-core/http';\nimport {newFetchHttpClient} from '@databricks/sdk-core/http';\nimport type {Profile} from '@databricks/sdk-core/profiles';\nimport {resolve} from '@databricks/sdk-core/profiles';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\n\n/**\n * The configuration a client needs to issue requests, resolved from\n * {@link ClientOptions} and a configuration profile.\n */\nexport interface ResolvedClientConfig {\n /** Host with any trailing slash removed. */\n host: string;\n\n /**\n * Default account ID for account-level paths that contain an account_id\n * segment. A request's own accountId still wins.\n */\n accountId?: string;\n\n /**\n * Workspace ID used to route workspace-level calls on unified hosts (SPOG).\n */\n workspaceId?: string;\n\n /** HTTP client with authentication, and any configured timeout, applied. */\n httpClient: HttpClient;\n}\n\n/**\n * Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.\n *\n * A configuration profile is always resolved from the config file and\n * environment variables (per options.profileOptions); it supplies host,\n * accountId, workspaceId, and credentials wherever the caller did not set them\n * explicitly. Explicit options always take precedence.\n *\n * @throws if host is neither provided nor present in the resolved profile.\n */\nexport async function resolveClientConfig(\n options: ClientOptions\n): Promise<ResolvedClientConfig> {\n const profile: Profile = await resolve(options.profileOptions);\n\n const host = normalizeHost(options.host ?? profile.host);\n if (host === undefined) {\n throw new Error('Host is required.');\n }\n\n // The provided httpClient (or the default fetch client) is the base wire;\n // authentication and the optional timeout are layered on top of it. The\n // default credential chain reuses the profile resolved above so that the\n // same profileOptions govern host and authentication alike.\n const base = options.httpClient ?? newFetchHttpClient();\n const credentials =\n options.credentials ?? defaultCredentials({profile: {...profile, host}});\n let httpClient: HttpClient = new AuthHttpClient(base, credentials);\n if (options.timeout !== undefined) {\n httpClient = new TimeoutHttpClient(httpClient, options.timeout);\n }\n\n const accountId = options.accountId ?? profile.accountId;\n const workspaceId = options.workspaceId ?? profile.workspaceId;\n\n return {\n host,\n httpClient,\n ...(accountId !== undefined && {accountId}),\n ...(workspaceId !== undefined && {workspaceId}),\n };\n}\n\nfunction normalizeHost(host: string | undefined): string | undefined {\n const trimmed = host?.trim();\n if (trimmed === undefined || trimmed === '') {\n return undefined;\n }\n const absolute = /^https?:\\/\\//i.test(trimmed)\n ? trimmed\n : `https://${trimmed}`;\n return absolute.replace(/\\/$/, '');\n}\n\n/** Wraps an HttpClient and adds authentication headers to requests. */\nclass AuthHttpClient implements HttpClient {\n constructor(\n private readonly base: HttpClient,\n private readonly credentials: Credentials\n ) {}\n\n async send(request: HttpRequest): Promise<HttpResponse> {\n const authHeaders = await this.credentials.authHeaders();\n // Do not modify the original request.\n const headers = new Headers(request.headers);\n for (const h of authHeaders) {\n headers.set(h.key, h.value);\n }\n return this.base.send({...request, headers});\n }\n}\n\n/** Wraps an HttpClient and applies a default timeout to requests. */\nclass TimeoutHttpClient implements HttpClient {\n constructor(\n private readonly base: HttpClient,\n private readonly timeout: number\n ) {}\n\n async send(request: HttpRequest): Promise<HttpResponse> {\n const timeoutSignal = AbortSignal.timeout(this.timeout);\n const signal =\n request.signal !== undefined\n ? AbortSignal.any([request.signal, timeoutSignal])\n : timeoutSignal;\n return this.base.send({...request, signal});\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,eAAsB,oBACpB,SAC+B;CAC/B,MAAM,UAAmB,MAAM,QAAQ,QAAQ,eAAe;CAE9D,MAAM,OAAO,cAAc,QAAQ,QAAQ,QAAQ,KAAK;AACxD,KAAI,SAAS,OACX,OAAM,IAAI,MAAM,oBAAoB;CAUtC,IAAI,aAAyB,IAAI,eAHpB,QAAQ,cAAc,oBAAoB,EAErD,QAAQ,eAAe,mBAAmB,EAAC,SAAS;EAAC,GAAG;EAAS;EAAK,EAAC,CAAC,CACR;AAClE,KAAI,QAAQ,YAAY,OACtB,cAAa,IAAI,kBAAkB,YAAY,QAAQ,QAAQ;CAGjE,MAAM,YAAY,QAAQ,aAAa,QAAQ;CAC/C,MAAM,cAAc,QAAQ,eAAe,QAAQ;AAEnD,QAAO;EACL;EACA;EACA,GAAI,cAAc,UAAa,EAAC,WAAU;EAC1C,GAAI,gBAAgB,UAAa,EAAC,aAAY;EAC/C;;AAGH,SAAS,cAAc,MAA8C;CACnE,MAAM,UAAU,MAAM,MAAM;AAC5B,KAAI,YAAY,UAAa,YAAY,GACvC;AAKF,SAHiB,gBAAgB,KAAK,QAAQ,GAC1C,UACA,WAAW,WACC,QAAQ,OAAO,GAAG;;;AAIpC,IAAM,iBAAN,MAA2C;CACzC,YACE,AAAiB,MACjB,AAAiB,aACjB;EAFiB;EACA;;CAGnB,MAAM,KAAK,SAA6C;EACtD,MAAM,cAAc,MAAM,KAAK,YAAY,aAAa;EAExD,MAAM,UAAU,IAAI,QAAQ,QAAQ,QAAQ;AAC5C,OAAK,MAAM,KAAK,YACd,SAAQ,IAAI,EAAE,KAAK,EAAE,MAAM;AAE7B,SAAO,KAAK,KAAK,KAAK;GAAC,GAAG;GAAS;GAAQ,CAAC;;;;AAKhD,IAAM,oBAAN,MAA8C;CAC5C,YACE,AAAiB,MACjB,AAAiB,SACjB;EAFiB;EACA;;CAGnB,MAAM,KAAK,SAA6C;EACtD,MAAM,gBAAgB,YAAY,QAAQ,KAAK,QAAQ;EACvD,MAAM,SACJ,QAAQ,WAAW,SACf,YAAY,IAAI,CAAC,QAAQ,QAAQ,cAAc,CAAC,GAChD;AACN,SAAO,KAAK,KAAK,KAAK;GAAC,GAAG;GAAS;GAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks/sdk-uc-registeredmodels",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"directory": "packages/uc/registeredmodels"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@databricks/sdk-auth": ">=0.
|
|
37
|
-
"@databricks/sdk-core": ">=0.
|
|
38
|
-
"@databricks/sdk-options": ">=0.
|
|
36
|
+
"@databricks/sdk-auth": ">=0.51.0 <1.0.0",
|
|
37
|
+
"@databricks/sdk-core": ">=0.51.0 <1.0.0",
|
|
38
|
+
"@databricks/sdk-options": ">=0.51.0 <1.0.0",
|
|
39
39
|
"@js-temporal/polyfill": "^0.5.0",
|
|
40
40
|
"json-bigint": "^1.0.0",
|
|
41
41
|
"zod": "^4.3.6"
|