@databricks/sdk-knowledge 0.0.1 → 0.0.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region package.json
2
2
  var name = "@databricks/sdk-knowledge";
3
- var version = "0.0.1";
3
+ var version = "0.0.2";
4
4
 
5
5
  //#endregion
6
6
  export { name, version };
@@ -18,8 +18,9 @@ declare class KnowledgeClient {
18
18
  */
19
19
  createAssetLink(req: CreateAssetLinkRequest, options?: CallOptions): Promise<AssetLink>;
20
20
  /**
21
- * Create a knowledge page. For REST, send Page fields directly as the JSON
22
- * request body. Retrying a draft create can create another page.
21
+ * Create a knowledge page. Optional `request_id` makes retries idempotent while
22
+ * the page exists; without it, retries can create duplicate drafts.
23
+ * For REST, send Page fields as the JSON body and `request_id` as a query parameter.
23
24
  * When page permissions are enforced, creating a published page or assigning
24
25
  * another owner requires Page Manager or Domain Admin permissions on the domain,
25
26
  * including inherited grants. Creating your own draft requires neither grant.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","names":[],"sources":["../../src/v1/client.ts"],"mappings":";;;;;cA6Ca,eAAA;EAAA,iBACM,OAAA;EAAA,iBACA,MAAA;EAAA,iBAIA,SAAA;EAAA,QAIT,MAAA;cAEI,OAAA,EAAS,aAAA;EAAA,QAUb,aAAA;EAaI;;;;;;EAFN,eAAA,CACJ,GAAA,EAAK,sBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,SAAA;EAqFJ;;;;;;;;;;;;;EA9CD,UAAA,CACJ,GAAA,EAAK,iBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,IAAA;EAoKJ;;;;EA1HD,eAAA,CACJ,GAAA,EAAK,sBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA;EAgKS;;;;;EAxIN,UAAA,CACJ,GAAA,EAAK,iBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA;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GAAU,WAAA,GAAc,OAAA,CAAQ,IAAA;EA/KjE;;;;;;;EA+MI,SAAA,CACJ,GAAA,EAAK,gBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,iBAAA;EAqCJ,aAAA,CACL,GAAA,EAAK,gBAAA,EACL,OAAA,GAAU,WAAA,GACT,cAAA,CAAe,IAAA;EA9MP;;;;;;;;;EAqOL,UAAA,CACJ,GAAA,EAAK,iBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,IAAA;AAAA"}
package/dist/v1/client.js CHANGED
@@ -57,8 +57,9 @@ var KnowledgeClient = class {
57
57
  return resp;
58
58
  }
59
59
  /**
60
- * Create a knowledge page. For REST, send Page fields directly as the JSON
61
- * request body. Retrying a draft create can create another page.
60
+ * Create a knowledge page. Optional `request_id` makes retries idempotent while
61
+ * the page exists; without it, retries can create duplicate drafts.
62
+ * For REST, send Page fields as the JSON body and `request_id` as a query parameter.
62
63
  * When page permissions are enforced, creating a published page or assigning
63
64
  * another owner requires Page Manager or Domain Admin permissions on the domain,
64
65
  * including inherited grants. Creating your own draft requires neither grant.
@@ -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 AssetLink,\n CreateAssetLinkRequest,\n CreatePageRequest,\n DeleteAssetLinkRequest,\n DeletePageRequest,\n GetAssetLinkRequest,\n GetPageRequest,\n ListPagesRequest,\n ListPagesResponse,\n Page,\n UpdatePageRequest,\n} from './model';\nimport {\n marshalAssetLinkSchema,\n marshalPageSchema,\n unmarshalAssetLinkSchema,\n unmarshalListPagesResponseSchema,\n unmarshalPageSchema,\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 KnowledgeClient {\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 * Create an asset link on a page. For REST, send AssetLink fields directly\n * as the JSON request body; the parent path supplies the page and category.\n * An existing target with the same asset type, scope, and resolved asset ID\n * in that page/category returns the original link and creation time.\n */\n async createAssetLink(\n req: CreateAssetLinkRequest,\n options?: CallOptions\n ): Promise<AssetLink> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.parent ?? ''}/asset-links`;\n const body = marshalRequest(req.assetLink, marshalAssetLinkSchema);\n let resp: AssetLink | 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, unmarshalAssetLinkSchema);\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 * Create a knowledge page. For REST, send Page fields directly as the JSON\n * request body. Retrying a draft create can create another page.\n * When page permissions are enforced, creating a published page or assigning\n * another owner requires Page Manager or Domain Admin permissions on the domain,\n * including inherited grants. Creating your own draft requires neither grant.\n *\n * Errors: `INVALID_PARAMETER_VALUE` (missing `page`/`domain` or field validation),\n * `NOT_FOUND` (the referenced `domain` does not exist), `ALREADY_EXISTS` (a\n * published page with the same `domain` and `display_name` already exists),\n * `PERMISSION_DENIED` (insufficient permissions), `RESOURCE_EXHAUSTED`\n * (rate limited), `INTERNAL_ERROR` (unexpected failure).\n */\n async createPage(\n req: CreatePageRequest,\n options?: CallOptions\n ): Promise<Page> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/pages`;\n const params = new URLSearchParams();\n if (req.requestId !== undefined) {\n params.append('request_id', req.requestId);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n const body = marshalRequest(req.page, marshalPageSchema);\n let resp: Page | 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(\n 'POST',\n fullUrl,\n headers,\n callSignal,\n body\n );\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalPageSchema);\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 * Delete an asset link by its full resource name. Returns NOT_FOUND if the\n * link does not exist, including when it has already been deleted.\n */\n async deleteAssetLink(\n req: DeleteAssetLinkRequest,\n options?: CallOptions\n ): Promise<void> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\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 await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n };\n await executeCall(call, options);\n }\n\n /**\n * Delete a knowledge page by resource name.\n *\n * Returns `NOT_FOUND` if no page with the given `name` exists.\n */\n async deletePage(\n req: DeletePageRequest,\n options?: CallOptions\n ): Promise<void> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\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 await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n };\n await executeCall(call, options);\n }\n\n /**\n * Get an asset link by its full resource name. Table links return the table's\n * current FQN and require access to that table. Query and Genie\n * links return native UUIDs and require access in the caller's workspace.\n * Returns NOT_FOUND if the link is missing or its target identifier cannot be\n * resolved.\n */\n async getAssetLink(\n req: GetAssetLinkRequest,\n options?: CallOptions\n ): Promise<AssetLink> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\n let resp: AssetLink | 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(respBody, unmarshalAssetLinkSchema);\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 knowledge page by resource name.\n *\n * Returns `NOT_FOUND` if no page with the given `name` exists.\n */\n async getPage(req: GetPageRequest, options?: CallOptions): Promise<Page> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\n let resp: Page | 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(respBody, unmarshalPageSchema);\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 visible knowledge pages in the account, optionally narrowed by\n * `domain` and `state`. With a domain filter, the caller must administer that\n * domain, including through inherited grants. Without a domain filter,\n * including when filtering only by state, account-wide Manage Discover or\n * Account Admin permission is required. List returns page metadata.\n */\n async listPages(\n req: ListPagesRequest,\n options?: CallOptions\n ): Promise<ListPagesResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/pages`;\n const params = new URLSearchParams();\n if (req.pageSize !== undefined) {\n params.append('page_size', String(req.pageSize));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n if (req.filter !== undefined) {\n params.append('filter', req.filter);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListPagesResponse | 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, unmarshalListPagesResponseSchema);\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 *listPagesIter(\n req: ListPagesRequest,\n options?: CallOptions\n ): AsyncGenerator<Page> {\n const pageReq: ListPagesRequest = {...req};\n for (;;) {\n const resp = await this.listPages(pageReq, options);\n for (const item of resp.pages ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * Update an existing knowledge page. For REST, send Page fields directly as\n * the JSON body and supply `update_mask` as a query parameter. The resource\n * `name` identifies the page; omitted mask fields retain their stored values.\n *\n * Errors: `INVALID_PARAMETER_VALUE` (field validation), `NOT_FOUND` (the page does\n * not exist), `ALREADY_EXISTS` (a rename would collide with another published\n * page), `RESOURCE_EXHAUSTED`, `ABORTED`, `INTERNAL_ERROR`.\n */\n async updatePage(\n req: UpdatePageRequest,\n options?: CallOptions\n ): Promise<Page> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.page?.name ?? ''}`;\n const params = new URLSearchParams();\n if (req.updateMask !== undefined) {\n params.append('update_mask', req.updateMask.toString());\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n const body = marshalRequest(req.page, marshalPageSchema);\n let resp: Page | 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(\n 'PATCH',\n fullUrl,\n headers,\n callSignal,\n body\n );\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalPageSchema);\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":";;;;;;;;;AAwCA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;CAC1D,OAAOA;CACR;AAED,IAAa,kBAAb,MAA6B;CAC3B,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;;;;;;;;CASd,MAAM,gBACJ,KACA,SACoB;EACpB,MAAM,EAAC,MAAM,aAAa,eAAc,MAAM,KAAK,eAAe;EAClE,MAAM,MAAM,GAAG,KAAK,qBAAqB,IAAI,UAAU,GAAG;EAC1D,MAAM,OAAO,eAAe,IAAI,WAAW,uBAAuB;EAClE,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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AChC,MAAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO;;CAGT,OAAO,cACL,KACA,SACsB;EACtB,MAAM,UAA4B,EAAC,GAAG,KAAI;AAC1C,WAAS;GACP,MAAM,OAAO,MAAM,KAAK,UAAU,SAAS,QAAQ;AACnD,QAAK,MAAM,QAAQ,KAAK,SAAS,EAAE,CACjC,OAAM;AAER,OAAI,KAAK,kBAAkB,UAAa,KAAK,kBAAkB,GAC7D;AAEF,WAAQ,YAAY,KAAK;;;;;;;;;;;;CAa7B,MAAM,WACJ,KACA,SACe;EACf,MAAM,EAAC,MAAM,aAAa,eAAc,MAAM,KAAK,eAAe;EAClE,MAAM,MAAM,GAAG,KAAK,qBAAqB,IAAI,MAAM,QAAQ;EAC3D,MAAM,SAAS,IAAI,iBAAiB;AACpC,MAAI,IAAI,eAAe,OACrB,QAAO,OAAO,eAAe,IAAI,WAAW,UAAU,CAAC;EAEzD,MAAM,QAAQ,OAAO,UAAU;EAC/B,MAAM,UAAU,UAAU,KAAK,GAAG,IAAI,GAAG,UAAU;EACnD,MAAM,OAAO,eAAe,IAAI,MAAM,kBAAkB;EACxD,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;AAazC,UAAO,cALU,MAAM,gBAAgB;IACrC,SARc,iBACd,SACA,SACA,SACA,YACA,KACD;IAGC;IACA,QAAQ,KAAK;IACd,CAAC,EAC6B,oBAAoB;;AAErD,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 AssetLink,\n CreateAssetLinkRequest,\n CreatePageRequest,\n DeleteAssetLinkRequest,\n DeletePageRequest,\n GetAssetLinkRequest,\n GetPageRequest,\n ListPagesRequest,\n ListPagesResponse,\n Page,\n UpdatePageRequest,\n} from './model';\nimport {\n marshalAssetLinkSchema,\n marshalPageSchema,\n unmarshalAssetLinkSchema,\n unmarshalListPagesResponseSchema,\n unmarshalPageSchema,\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 KnowledgeClient {\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 * Create an asset link on a page. For REST, send AssetLink fields directly\n * as the JSON request body; the parent path supplies the page and category.\n * An existing target with the same asset type, scope, and resolved asset ID\n * in that page/category returns the original link and creation time.\n */\n async createAssetLink(\n req: CreateAssetLinkRequest,\n options?: CallOptions\n ): Promise<AssetLink> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.parent ?? ''}/asset-links`;\n const body = marshalRequest(req.assetLink, marshalAssetLinkSchema);\n let resp: AssetLink | 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, unmarshalAssetLinkSchema);\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 * Create a knowledge page. Optional `request_id` makes retries idempotent while\n * the page exists; without it, retries can create duplicate drafts.\n * For REST, send Page fields as the JSON body and `request_id` as a query parameter.\n * When page permissions are enforced, creating a published page or assigning\n * another owner requires Page Manager or Domain Admin permissions on the domain,\n * including inherited grants. Creating your own draft requires neither grant.\n *\n * Errors: `INVALID_PARAMETER_VALUE` (missing `page`/`domain` or field validation),\n * `NOT_FOUND` (the referenced `domain` does not exist), `ALREADY_EXISTS` (a\n * published page with the same `domain` and `display_name` already exists),\n * `PERMISSION_DENIED` (insufficient permissions), `RESOURCE_EXHAUSTED`\n * (rate limited), `INTERNAL_ERROR` (unexpected failure).\n */\n async createPage(\n req: CreatePageRequest,\n options?: CallOptions\n ): Promise<Page> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/pages`;\n const params = new URLSearchParams();\n if (req.requestId !== undefined) {\n params.append('request_id', req.requestId);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n const body = marshalRequest(req.page, marshalPageSchema);\n let resp: Page | 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(\n 'POST',\n fullUrl,\n headers,\n callSignal,\n body\n );\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalPageSchema);\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 * Delete an asset link by its full resource name. Returns NOT_FOUND if the\n * link does not exist, including when it has already been deleted.\n */\n async deleteAssetLink(\n req: DeleteAssetLinkRequest,\n options?: CallOptions\n ): Promise<void> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\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 await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n };\n await executeCall(call, options);\n }\n\n /**\n * Delete a knowledge page by resource name.\n *\n * Returns `NOT_FOUND` if no page with the given `name` exists.\n */\n async deletePage(\n req: DeletePageRequest,\n options?: CallOptions\n ): Promise<void> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\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 await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n };\n await executeCall(call, options);\n }\n\n /**\n * Get an asset link by its full resource name. Table links return the table's\n * current FQN and require access to that table. Query and Genie\n * links return native UUIDs and require access in the caller's workspace.\n * Returns NOT_FOUND if the link is missing or its target identifier cannot be\n * resolved.\n */\n async getAssetLink(\n req: GetAssetLinkRequest,\n options?: CallOptions\n ): Promise<AssetLink> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\n let resp: AssetLink | 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(respBody, unmarshalAssetLinkSchema);\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 knowledge page by resource name.\n *\n * Returns `NOT_FOUND` if no page with the given `name` exists.\n */\n async getPage(req: GetPageRequest, options?: CallOptions): Promise<Page> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.name ?? ''}`;\n let resp: Page | 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(respBody, unmarshalPageSchema);\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 visible knowledge pages in the account, optionally narrowed by\n * `domain` and `state`. With a domain filter, the caller must administer that\n * domain, including through inherited grants. Without a domain filter,\n * including when filtering only by state, account-wide Manage Discover or\n * Account Admin permission is required. List returns page metadata.\n */\n async listPages(\n req: ListPagesRequest,\n options?: CallOptions\n ): Promise<ListPagesResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/pages`;\n const params = new URLSearchParams();\n if (req.pageSize !== undefined) {\n params.append('page_size', String(req.pageSize));\n }\n if (req.pageToken !== undefined) {\n params.append('page_token', req.pageToken);\n }\n if (req.filter !== undefined) {\n params.append('filter', req.filter);\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n let resp: ListPagesResponse | 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, unmarshalListPagesResponseSchema);\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 *listPagesIter(\n req: ListPagesRequest,\n options?: CallOptions\n ): AsyncGenerator<Page> {\n const pageReq: ListPagesRequest = {...req};\n for (;;) {\n const resp = await this.listPages(pageReq, options);\n for (const item of resp.pages ?? []) {\n yield item;\n }\n if (resp.nextPageToken === undefined || resp.nextPageToken === '') {\n return;\n }\n pageReq.pageToken = resp.nextPageToken;\n }\n }\n\n /**\n * Update an existing knowledge page. For REST, send Page fields directly as\n * the JSON body and supply `update_mask` as a query parameter. The resource\n * `name` identifies the page; omitted mask fields retain their stored values.\n *\n * Errors: `INVALID_PARAMETER_VALUE` (field validation), `NOT_FOUND` (the page does\n * not exist), `ALREADY_EXISTS` (a rename would collide with another published\n * page), `RESOURCE_EXHAUSTED`, `ABORTED`, `INTERNAL_ERROR`.\n */\n async updatePage(\n req: UpdatePageRequest,\n options?: CallOptions\n ): Promise<Page> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/knowledge/${req.page?.name ?? ''}`;\n const params = new URLSearchParams();\n if (req.updateMask !== undefined) {\n params.append('update_mask', req.updateMask.toString());\n }\n const query = params.toString();\n const fullUrl = query !== '' ? `${url}?${query}` : url;\n const body = marshalRequest(req.page, marshalPageSchema);\n let resp: Page | 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(\n 'PATCH',\n fullUrl,\n headers,\n callSignal,\n body\n );\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalPageSchema);\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":";;;;;;;;;AAwCA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;CAC1D,OAAOA;CACR;AAED,IAAa,kBAAb,MAA6B;CAC3B,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;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AAM,UAAU,IAAI,QAAQ,EAAC,gBAAgB,oBAAmB,CAAC;AACjE,OAAI,gBAAgB,OAClB,SAAQ,IAAI,6BAA6B,YAAY;AAEvD,WAAQ,IAAI,cAAc,KAAK,UAAU;AAazC,UAAO,cALU,MAAM,gBAAgB;IACrC,SARc,iBACd,SACA,SACA,SACA,YACA,KACD;IAGC;IACA,QAAQ,KAAK;IACd,CAAC,EAC6B,oBAAoB;;AAErD,QAAM,YAAY,MAAM,QAAQ;AAChC,MAAI,SAAS,OACX,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO"}
@@ -13,8 +13,9 @@ declare const AssetType: {
13
13
  */
14
14
  readonly ASSET_TYPE_UC_TABLE: "ASSET_TYPE_UC_TABLE";
15
15
  /**
16
- * Lakeview dashboard. Create accepts its UUID as 32 hexadecimal characters
17
- * or in hyphenated form. `asset_scope_id` is the decimal workspace ID string.
16
+ * Workspace dashboard. Create accepts a numeric tree ID or a Lakeview UUID
17
+ * (32 hex digits or hyphenated). Create and Get return the tree ID.
18
+ * `asset_scope_id` is the decimal workspace ID string.
18
19
  */
19
20
  readonly ASSET_TYPE_WORKSPACE_DASHBOARD: "ASSET_TYPE_WORKSPACE_DASHBOARD";
20
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","names":[],"sources":["../../src/v1/model.ts"],"mappings":";;;;;;cASa,SAAA;EAAA;;;;;;;;;;;;;;;AAiDb;;;EACY;;AAKZ;;EALY;EAYF;;;;;EAAA;EACE;;;;EAAA;EAMK;;;;EAAA,6DAYf;EAAA;EAUA;;;;EAAA;;KA1CU,SAAA,WACA,SAAA,eAAwB,SAAA;AAwDpC;AAAA,cAnDa,KAAA;+HAyDX;EAAA,yBAOY;EAAA;;KAxDF,KAAA,WAAgB,KAAA,eAAoB,KAAA;;;;;UAM/B,SAAA;EAmEf;;;AAIF;;;EAhEE,IAAA;EAsEI;AAIN;;;EArEE,SAAA,GAAY,SAAA;EA0ER;AAIN;;;;;AAUA;;;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Mf,IAAA;;;;;;EAMA,MAAA;;;;;;EAMA,WAAA;;;;;EAKA,IAAA;;;;;;;EAOA,QAAA;;;;;EAKA,WAAA;;;;;;EAMA,KAAA,GAAQ,KAAA;;EAER,UAAA,GAAa,QAAA,CAAS,OAAA;;EAEtB,UAAA,GAAa,QAAA,CAAS,OAAA;;;;;;;;EAQtB,QAAA;AAAA;;UAIe,iBAAA;;;;;EAKf,IAAA,GAAO,IAAA;;;;;;;;EAQP,UAAA,GAAa,SAAA,CAAU,IAAA;AAAA;AAAA,cAGZ,wBAAA,EAA0B,CAAA,CAAE,OAAA,CAAQ,SAAA;AAAA,cAmBpC,gCAAA,EAAkC,CAAA,CAAE,OAAA,CAAQ,iBAAA;AAAA,cAU5C,mBAAA,EAAqB,CAAA,CAAE,OAAA,CAAQ,IAAA;AAAA,cAgC/B,sBAAA,EAAwB,CAAA,CAAE,OAAA;AAAA,cAmB1B,iBAAA,EAAmB,CAAA,CAAE,OAAA;AAAA,iBA6ClB,aAAA,CAAA,GAAiB,KAAA,aAAkB,SAAA,CAAU,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","names":[],"sources":["../../src/v1/model.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {Temporal} from '@js-temporal/polyfill';\nimport {FieldMask} from '@databricks/sdk-core/wkt';\nimport type {FieldMaskSchema} from '@databricks/sdk-core/wkt';\nimport {z} from 'zod';\n\n/** Kind of asset an AssetLink points to. */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const AssetType = {\n /** Default value. Returned when the asset type is unset or unknown. */\n ASSET_TYPE_UNSPECIFIED: 'ASSET_TYPE_UNSPECIFIED',\n /**\n * UC table, metric view, or materialized view. Create accepts a table UUID\n * or fully qualified name (FQN, `catalog.schema.table`). Create and Get return\n * the table's current FQN. `asset_scope_id` is the metastore UUID.\n */\n ASSET_TYPE_UC_TABLE: 'ASSET_TYPE_UC_TABLE',\n /**\n * Lakeview dashboard. Create accepts its UUID as 32 hexadecimal characters\n * or in hyphenated form. `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_DASHBOARD: 'ASSET_TYPE_WORKSPACE_DASHBOARD',\n /**\n * Genie agent (space). `asset_id` is the native space ID: 32 lowercase\n * hexadecimal characters without hyphens. `asset_scope_id` is the decimal\n * workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_GENIE_AGENT: 'ASSET_TYPE_WORKSPACE_GENIE_AGENT',\n /**\n * Workspace notebook. `asset_id` is its numeric workspace tree ID.\n * `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_NOTEBOOK: 'ASSET_TYPE_WORKSPACE_NOTEBOOK',\n /**\n * Databricks app. Create accepts its UUID or app name; Create and Get return\n * the stable app UUID, including when Create receives a name.\n * `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_APP: 'ASSET_TYPE_WORKSPACE_APP',\n /**\n * Saved DBSQL query. `asset_id` is the saved-query UUID in hyphenated form.\n * `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_DBSQL_QUERY: 'ASSET_TYPE_WORKSPACE_DBSQL_QUERY',\n /**\n * Another knowledge page in the same account. `asset_id` is the bare page\n * UUID, without the `pages/` prefix. `asset_scope_id` is the calling account UUID.\n */\n ASSET_TYPE_ACCOUNT_PAGE: 'ASSET_TYPE_ACCOUNT_PAGE',\n /** Deprecated. Account-user links are not supported by the public API. */\n ASSET_TYPE_ACCOUNT_USER: 'ASSET_TYPE_ACCOUNT_USER',\n /**\n * External resource. `asset_id` is an absolute HTTP or HTTPS URL with a host,\n * up to 2,048 characters. `asset_scope_id` is the calling account UUID.\n */\n ASSET_TYPE_EXTERNAL_URL: 'ASSET_TYPE_EXTERNAL_URL',\n} as const;\nexport type AssetType =\n | (typeof AssetType)[keyof typeof AssetType]\n | (string & {});\n\n/** Lifecycle state of a Page. */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const State = {\n /** Default value. Returned when the lifecycle state is unset or unknown. */\n STATE_UNSPECIFIED: 'STATE_UNSPECIFIED',\n /** The page is a work-in-progress draft. */\n DRAFT: 'DRAFT',\n /** The page is published and discoverable. */\n PUBLISHED: 'PUBLISHED',\n} as const;\nexport type State = (typeof State)[keyof typeof State] | (string & {});\n\n/**\n * A reference or provenance link from a page to an asset.\n * Links are immutable; to change the target, delete and re-create the link.\n */\nexport interface AssetLink {\n /**\n * Resource name of the link. Server-assigned on create, immutable thereafter.\n * Format: `pages/{page_id}/asset-link-categories/{category}/asset-links/{link_id}`,\n * where `category` is `SOURCE` or `RELATED_ASSETS` and `link_id` is a\n * server-generated UUID. Omit on create; use the returned name for Get/Delete.\n */\n name?: string | undefined;\n /**\n * Kind of asset this link points to. Required on create;\n * `ASSET_TYPE_UNSPECIFIED` is not a valid target type.\n */\n assetType?: AssetType | undefined;\n /**\n * Containing scope of the asset. Required on create for every asset type:\n * - UC table: metastore UUID.\n * - Workspace asset: decimal workspace ID string.\n * - Account page or external URL: the calling account UUID.\n * Pass the bare ID, without a resource-name prefix. Query and Genie links,\n * dashboard UUID inputs, and app-name inputs require this scope to match the\n * caller's workspace.\n */\n assetScopeId?: string | undefined;\n /**\n * Target identifier within `asset_scope_id`. Required on create. The accepted\n * format depends on `asset_type`; see the identifier rules on each AssetType.\n * For Databricks assets, pass the bare identifier rather than a resource name\n * such as `pages/{page_id}` or `queries/{query_id}`. External assets use the\n * full URL. Create and Get return table FQNs, app UUIDs,\n * query UUIDs, and native Genie space IDs.\n */\n assetId?: string | undefined;\n /** Server-assigned creation time, formatted as an RFC 3339 timestamp in JSON. */\n createTime?: Temporal.Instant | undefined;\n}\n\n/** Request for CreateAssetLink. */\nexport interface CreateAssetLinkRequest {\n /**\n * Category collection on the page in which to create the link.\n * Format: `pages/{page_id}/asset-link-categories/{category}`, where\n * `{category}` is a `LinkCategory` value (`SOURCE` or `RELATED_ASSETS`).\n */\n parent?: string | undefined;\n /**\n * The link to create. `asset_type`, `asset_scope_id`, and `asset_id` are\n * required. The server assigns `name` and `create_time`; the path supplies\n * the page and category. A duplicate target in that category returns the\n * existing link.\n */\n assetLink?: AssetLink | undefined;\n}\n\n/** Request for CreatePage. */\nexport interface CreatePageRequest {\n /**\n * The page to create. `domain` and `display_name` are required; the server\n * assigns `name`, `create_time`, and `update_time`. Other fields follow the\n * defaults and format requirements documented on Page.\n */\n page?: Page | undefined;\n /**\n * Optional UUIDv4 scoped to the account and caller. Retries return the current\n * page without applying retry payload changes. Every retry must pass request\n * validation and current create permissions, plus view permission on the returned\n * page. Deletion releases the token; later retries may create a new page.\n */\n requestId?: string | undefined;\n}\n\n/** Request for DeleteAssetLink. */\nexport interface DeleteAssetLinkRequest {\n /**\n * Resource name of the link to delete.\n * Format:\n * `pages/{page_id}/asset-link-categories/{category}/asset-links/{link_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for DeletePage. */\nexport interface DeletePageRequest {\n /**\n * Resource name of the page to delete.\n * Format: `pages/{page_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for GetAssetLink. */\nexport interface GetAssetLinkRequest {\n /**\n * Resource name of the link to retrieve.\n * Format:\n * `pages/{page_id}/asset-link-categories/{category}/asset-links/{link_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for GetPage. */\nexport interface GetPageRequest {\n /**\n * Resource name of the page to retrieve.\n * Format: `pages/{page_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for ListPages. */\nexport interface ListPagesRequest {\n /**\n * Maximum number of pages to return, from 1 to 100. Defaults to 50 when omitted.\n * The server may return fewer.\n */\n pageSize?: number | undefined;\n /**\n * Opaque `next_page_token` from a previous ListPages response. Omit on the\n * first request; pass it unchanged and keep the same filter when continuing.\n */\n pageToken?: string | undefined;\n /**\n * Filter clauses with double-quoted values, joined by uppercase `AND`.\n * Each field may appear once:\n * - `domain = \"domains/{domain_id}\"` includes that domain and its subdomains.\n * - `state = \"DRAFT\"` or `state = \"PUBLISHED\"` matches that state exactly.\n * For example: `domain = \"domains/{domain_id}\" AND state = \"PUBLISHED\"`.\n * Other fields and operators are not supported. An omitted or blank filter\n * lists visible pages across the account, subject to ListPages permissions.\n */\n filter?: string | undefined;\n}\n\n/** Response for ListPages. */\nexport interface ListPagesResponse {\n /**\n * The requested pages. Each page includes only `name`, `display_name`,\n * `domain`, `state`, and `update_time`. Use GetPage for the full resource.\n * The list can be empty even when `next_page_token` is present.\n */\n pages?: Page[] | undefined;\n /**\n * Opaque continuation token. Pass as `page_token` to continue, even if this\n * response contains fewer than `page_size` pages or no pages. An absent or\n * empty token means there are no more results.\n */\n nextPageToken?: string | undefined;\n}\n\n/**\n * A knowledge page: a domain-scoped governance document describing a concept\n * or term in the account.\n */\nexport interface Page {\n /**\n * Resource name in the form `pages/{page_id}`, where `page_id` is a\n * server-generated UUID. Omit on create; required to identify the page on\n * update. Get and Delete also address pages by this full resource name.\n */\n name?: string | undefined;\n /**\n * Resource name of the domain this page belongs to; format `domains/{domain_id}`.\n * Required on create. Use the full resource name rather than a bare domain ID.\n * The domain is fixed after creation; updating it is not supported.\n */\n domain?: string | undefined;\n /**\n * Human-readable title, 1 to 200 characters.\n * Required on create and when selected by `update_mask`.\n * Published titles must be unique within the domain.\n */\n displayName?: string | undefined;\n /**\n * Page body as Markdown text. An update replaces the entire body when\n * `body` is selected by `update_mask`.\n */\n body?: string | undefined;\n /**\n * Alternate names or abbreviations. Accepts at most 50 entries, each 1 to\n * 200 characters. Values are trimmed, deduplicated, and sorted.\n * An update replaces the entire list when `synonyms` is selected by\n * `update_mask`; an empty list clears it.\n */\n synonyms?: string[] | undefined;\n /**\n * Short description of the page. An update replaces the description when\n * `description` is selected by `update_mask`.\n */\n description?: string | undefined;\n /**\n * Lifecycle state. Omitting it on create defaults to `DRAFT`. Set `PUBLISHED`\n * to publish or `DRAFT` to unpublish. An update selecting `state` in\n * `update_mask` must explicitly supply `DRAFT` or `PUBLISHED`.\n */\n state?: State | undefined;\n /** Server-assigned creation time, formatted as an RFC 3339 timestamp in JSON. */\n createTime?: Temporal.Instant | undefined;\n /** Server-assigned last-update time, formatted as an RFC 3339 timestamp in JSON. */\n updateTime?: Temporal.Instant | undefined;\n /**\n * Decimal principal ID strings for the page's single owner: a user, group,\n * or service principal. Use principal IDs rather than email addresses or\n * service-principal application UUIDs. On create, an omitted or empty list\n * defaults to the caller; at most one ID may be supplied. An update selecting\n * `owner_ids` in `update_mask` must supply exactly one ID to replace the owner.\n */\n ownerIds?: string[] | undefined;\n}\n\n/** Request for UpdatePage. */\nexport interface UpdatePageRequest {\n /**\n * The page to update. `name` is required in the form `pages/{page_id}`.\n * Only fields selected by `update_mask` are written.\n */\n page?: Page | undefined;\n /**\n * Nonempty set of Page fields to update. Supported paths are `display_name`,\n * `body`, `synonyms`, `description`, `state`, and `owner_ids`, without a `page.`\n * prefix. Wildcards, `domain`, and server-assigned fields are not supported.\n * In REST requests, pass a comma-separated query parameter, for example\n * `update_mask=display_name,body`. There is no implicit update of all fields.\n */\n updateMask?: FieldMask<Page> | undefined;\n}\n\nexport const unmarshalAssetLinkSchema: z.ZodType<AssetLink> = z\n .object({\n name: z.string().optional(),\n asset_type: z.string().optional(),\n asset_scope_id: z.string().optional(),\n asset_id: z.string().optional(),\n create_time: z\n .string()\n .transform(s => Temporal.Instant.from(s))\n .optional(),\n })\n .transform(d => ({\n name: d.name,\n assetType: d.asset_type,\n assetScopeId: d.asset_scope_id,\n assetId: d.asset_id,\n createTime: d.create_time,\n }));\n\nexport const unmarshalListPagesResponseSchema: z.ZodType<ListPagesResponse> = z\n .object({\n pages: z.array(z.lazy(() => unmarshalPageSchema)).optional(),\n next_page_token: z.string().optional(),\n })\n .transform(d => ({\n pages: d.pages,\n nextPageToken: d.next_page_token,\n }));\n\nexport const unmarshalPageSchema: z.ZodType<Page> = z\n .object({\n name: z.string().optional(),\n domain: z.string().optional(),\n display_name: z.string().optional(),\n body: z.string().optional(),\n synonyms: z.array(z.string()).optional(),\n description: z.string().optional(),\n state: z.string().optional(),\n create_time: z\n .string()\n .transform(s => Temporal.Instant.from(s))\n .optional(),\n update_time: z\n .string()\n .transform(s => Temporal.Instant.from(s))\n .optional(),\n owner_ids: z.array(z.string()).optional(),\n })\n .transform(d => ({\n name: d.name,\n domain: d.domain,\n displayName: d.display_name,\n body: d.body,\n synonyms: d.synonyms,\n description: d.description,\n state: d.state,\n createTime: d.create_time,\n updateTime: d.update_time,\n ownerIds: d.owner_ids,\n }));\n\nexport const marshalAssetLinkSchema: z.ZodType = z\n .object({\n name: z.string().optional(),\n assetType: z.string().optional(),\n assetScopeId: z.string().optional(),\n assetId: z.string().optional(),\n createTime: z\n .any()\n .transform((d: Temporal.Instant) => d.toString())\n .optional(),\n })\n .transform(d => ({\n name: d.name,\n asset_type: d.assetType,\n asset_scope_id: d.assetScopeId,\n asset_id: d.assetId,\n create_time: d.createTime,\n }));\n\nexport const marshalPageSchema: z.ZodType = z\n .object({\n name: z.string().optional(),\n domain: z.string().optional(),\n displayName: z.string().optional(),\n body: z.string().optional(),\n synonyms: z.array(z.string()).optional(),\n description: z.string().optional(),\n state: z.string().optional(),\n createTime: z\n .any()\n .transform((d: Temporal.Instant) => d.toString())\n .optional(),\n updateTime: z\n .any()\n .transform((d: Temporal.Instant) => d.toString())\n .optional(),\n ownerIds: z.array(z.string()).optional(),\n })\n .transform(d => ({\n name: d.name,\n domain: d.domain,\n display_name: d.displayName,\n body: d.body,\n synonyms: d.synonyms,\n description: d.description,\n state: d.state,\n create_time: d.createTime,\n update_time: d.updateTime,\n owner_ids: d.ownerIds,\n }));\n\nconst pageFieldMaskSchema: FieldMaskSchema = {\n body: {wire: 'body'},\n createTime: {wire: 'create_time'},\n description: {wire: 'description'},\n displayName: {wire: 'display_name'},\n domain: {wire: 'domain'},\n name: {wire: 'name'},\n ownerIds: {wire: 'owner_ids'},\n state: {wire: 'state'},\n synonyms: {wire: 'synonyms'},\n updateTime: {wire: 'update_time'},\n};\n\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AAU;CACb,YAAY,EACT,KAAK,CACL,WAAW,MAAwB,EAAE,UAAU,CAAC,CAChD,UAAU;CACb,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;CACzC,CAAC,CACD,WAAU,OAAM;CACf,MAAM,EAAE;CACR,QAAQ,EAAE;CACV,cAAc,EAAE;CAChB,MAAM,EAAE;CACR,UAAU,EAAE;CACZ,aAAa,EAAE;CACf,OAAO,EAAE;CACT,aAAa,EAAE;CACf,aAAa,EAAE;CACf,WAAW,EAAE;CACd,EAAE;AAEL,MAAM,sBAAuC;CAC3C,MAAM,EAAC,MAAM,QAAO;CACpB,YAAY,EAAC,MAAM,eAAc;CACjC,aAAa,EAAC,MAAM,eAAc;CAClC,aAAa,EAAC,MAAM,gBAAe;CACnC,QAAQ,EAAC,MAAM,UAAS;CACxB,MAAM,EAAC,MAAM,QAAO;CACpB,UAAU,EAAC,MAAM,aAAY;CAC7B,OAAO,EAAC,MAAM,SAAQ;CACtB,UAAU,EAAC,MAAM,YAAW;CAC5B,YAAY,EAAC,MAAM,eAAc;CAClC;AAED,SAAgB,cAAc,GAAG,OAAkC;AACjE,QAAO,UAAU,MAAY,OAAO,oBAAoB"}
1
+ {"version":3,"file":"model.js","names":[],"sources":["../../src/v1/model.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {Temporal} from '@js-temporal/polyfill';\nimport {FieldMask} from '@databricks/sdk-core/wkt';\nimport type {FieldMaskSchema} from '@databricks/sdk-core/wkt';\nimport {z} from 'zod';\n\n/** Kind of asset an AssetLink points to. */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const AssetType = {\n /** Default value. Returned when the asset type is unset or unknown. */\n ASSET_TYPE_UNSPECIFIED: 'ASSET_TYPE_UNSPECIFIED',\n /**\n * UC table, metric view, or materialized view. Create accepts a table UUID\n * or fully qualified name (FQN, `catalog.schema.table`). Create and Get return\n * the table's current FQN. `asset_scope_id` is the metastore UUID.\n */\n ASSET_TYPE_UC_TABLE: 'ASSET_TYPE_UC_TABLE',\n /**\n * Workspace dashboard. Create accepts a numeric tree ID or a Lakeview UUID\n * (32 hex digits or hyphenated). Create and Get return the tree ID.\n * `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_DASHBOARD: 'ASSET_TYPE_WORKSPACE_DASHBOARD',\n /**\n * Genie agent (space). `asset_id` is the native space ID: 32 lowercase\n * hexadecimal characters without hyphens. `asset_scope_id` is the decimal\n * workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_GENIE_AGENT: 'ASSET_TYPE_WORKSPACE_GENIE_AGENT',\n /**\n * Workspace notebook. `asset_id` is its numeric workspace tree ID.\n * `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_NOTEBOOK: 'ASSET_TYPE_WORKSPACE_NOTEBOOK',\n /**\n * Databricks app. Create accepts its UUID or app name; Create and Get return\n * the stable app UUID, including when Create receives a name.\n * `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_APP: 'ASSET_TYPE_WORKSPACE_APP',\n /**\n * Saved DBSQL query. `asset_id` is the saved-query UUID in hyphenated form.\n * `asset_scope_id` is the decimal workspace ID string.\n */\n ASSET_TYPE_WORKSPACE_DBSQL_QUERY: 'ASSET_TYPE_WORKSPACE_DBSQL_QUERY',\n /**\n * Another knowledge page in the same account. `asset_id` is the bare page\n * UUID, without the `pages/` prefix. `asset_scope_id` is the calling account UUID.\n */\n ASSET_TYPE_ACCOUNT_PAGE: 'ASSET_TYPE_ACCOUNT_PAGE',\n /** Deprecated. Account-user links are not supported by the public API. */\n ASSET_TYPE_ACCOUNT_USER: 'ASSET_TYPE_ACCOUNT_USER',\n /**\n * External resource. `asset_id` is an absolute HTTP or HTTPS URL with a host,\n * up to 2,048 characters. `asset_scope_id` is the calling account UUID.\n */\n ASSET_TYPE_EXTERNAL_URL: 'ASSET_TYPE_EXTERNAL_URL',\n} as const;\nexport type AssetType =\n | (typeof AssetType)[keyof typeof AssetType]\n | (string & {});\n\n/** Lifecycle state of a Page. */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const State = {\n /** Default value. Returned when the lifecycle state is unset or unknown. */\n STATE_UNSPECIFIED: 'STATE_UNSPECIFIED',\n /** The page is a work-in-progress draft. */\n DRAFT: 'DRAFT',\n /** The page is published and discoverable. */\n PUBLISHED: 'PUBLISHED',\n} as const;\nexport type State = (typeof State)[keyof typeof State] | (string & {});\n\n/**\n * A reference or provenance link from a page to an asset.\n * Links are immutable; to change the target, delete and re-create the link.\n */\nexport interface AssetLink {\n /**\n * Resource name of the link. Server-assigned on create, immutable thereafter.\n * Format: `pages/{page_id}/asset-link-categories/{category}/asset-links/{link_id}`,\n * where `category` is `SOURCE` or `RELATED_ASSETS` and `link_id` is a\n * server-generated UUID. Omit on create; use the returned name for Get/Delete.\n */\n name?: string | undefined;\n /**\n * Kind of asset this link points to. Required on create;\n * `ASSET_TYPE_UNSPECIFIED` is not a valid target type.\n */\n assetType?: AssetType | undefined;\n /**\n * Containing scope of the asset. Required on create for every asset type:\n * - UC table: metastore UUID.\n * - Workspace asset: decimal workspace ID string.\n * - Account page or external URL: the calling account UUID.\n * Pass the bare ID, without a resource-name prefix. Query and Genie links,\n * dashboard UUID inputs, and app-name inputs require this scope to match the\n * caller's workspace.\n */\n assetScopeId?: string | undefined;\n /**\n * Target identifier within `asset_scope_id`. Required on create. The accepted\n * format depends on `asset_type`; see the identifier rules on each AssetType.\n * For Databricks assets, pass the bare identifier rather than a resource name\n * such as `pages/{page_id}` or `queries/{query_id}`. External assets use the\n * full URL. Create and Get return table FQNs, app UUIDs,\n * query UUIDs, and native Genie space IDs.\n */\n assetId?: string | undefined;\n /** Server-assigned creation time, formatted as an RFC 3339 timestamp in JSON. */\n createTime?: Temporal.Instant | undefined;\n}\n\n/** Request for CreateAssetLink. */\nexport interface CreateAssetLinkRequest {\n /**\n * Category collection on the page in which to create the link.\n * Format: `pages/{page_id}/asset-link-categories/{category}`, where\n * `{category}` is a `LinkCategory` value (`SOURCE` or `RELATED_ASSETS`).\n */\n parent?: string | undefined;\n /**\n * The link to create. `asset_type`, `asset_scope_id`, and `asset_id` are\n * required. The server assigns `name` and `create_time`; the path supplies\n * the page and category. A duplicate target in that category returns the\n * existing link.\n */\n assetLink?: AssetLink | undefined;\n}\n\n/** Request for CreatePage. */\nexport interface CreatePageRequest {\n /**\n * The page to create. `domain` and `display_name` are required; the server\n * assigns `name`, `create_time`, and `update_time`. Other fields follow the\n * defaults and format requirements documented on Page.\n */\n page?: Page | undefined;\n /**\n * Optional UUIDv4 scoped to the account and caller. Retries return the current\n * page without applying retry payload changes. Every retry must pass request\n * validation and current create permissions, plus view permission on the returned\n * page. Deletion releases the token; later retries may create a new page.\n */\n requestId?: string | undefined;\n}\n\n/** Request for DeleteAssetLink. */\nexport interface DeleteAssetLinkRequest {\n /**\n * Resource name of the link to delete.\n * Format:\n * `pages/{page_id}/asset-link-categories/{category}/asset-links/{link_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for DeletePage. */\nexport interface DeletePageRequest {\n /**\n * Resource name of the page to delete.\n * Format: `pages/{page_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for GetAssetLink. */\nexport interface GetAssetLinkRequest {\n /**\n * Resource name of the link to retrieve.\n * Format:\n * `pages/{page_id}/asset-link-categories/{category}/asset-links/{link_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for GetPage. */\nexport interface GetPageRequest {\n /**\n * Resource name of the page to retrieve.\n * Format: `pages/{page_id}`\n */\n name?: string | undefined;\n}\n\n/** Request for ListPages. */\nexport interface ListPagesRequest {\n /**\n * Maximum number of pages to return, from 1 to 100. Defaults to 50 when omitted.\n * The server may return fewer.\n */\n pageSize?: number | undefined;\n /**\n * Opaque `next_page_token` from a previous ListPages response. Omit on the\n * first request; pass it unchanged and keep the same filter when continuing.\n */\n pageToken?: string | undefined;\n /**\n * Filter clauses with double-quoted values, joined by uppercase `AND`.\n * Each field may appear once:\n * - `domain = \"domains/{domain_id}\"` includes that domain and its subdomains.\n * - `state = \"DRAFT\"` or `state = \"PUBLISHED\"` matches that state exactly.\n * For example: `domain = \"domains/{domain_id}\" AND state = \"PUBLISHED\"`.\n * Other fields and operators are not supported. An omitted or blank filter\n * lists visible pages across the account, subject to ListPages permissions.\n */\n filter?: string | undefined;\n}\n\n/** Response for ListPages. */\nexport interface ListPagesResponse {\n /**\n * The requested pages. Each page includes only `name`, `display_name`,\n * `domain`, `state`, and `update_time`. Use GetPage for the full resource.\n * The list can be empty even when `next_page_token` is present.\n */\n pages?: Page[] | undefined;\n /**\n * Opaque continuation token. Pass as `page_token` to continue, even if this\n * response contains fewer than `page_size` pages or no pages. An absent or\n * empty token means there are no more results.\n */\n nextPageToken?: string | undefined;\n}\n\n/**\n * A knowledge page: a domain-scoped governance document describing a concept\n * or term in the account.\n */\nexport interface Page {\n /**\n * Resource name in the form `pages/{page_id}`, where `page_id` is a\n * server-generated UUID. Omit on create; required to identify the page on\n * update. Get and Delete also address pages by this full resource name.\n */\n name?: string | undefined;\n /**\n * Resource name of the domain this page belongs to; format `domains/{domain_id}`.\n * Required on create. Use the full resource name rather than a bare domain ID.\n * The domain is fixed after creation; updating it is not supported.\n */\n domain?: string | undefined;\n /**\n * Human-readable title, 1 to 200 characters.\n * Required on create and when selected by `update_mask`.\n * Published titles must be unique within the domain.\n */\n displayName?: string | undefined;\n /**\n * Page body as Markdown text. An update replaces the entire body when\n * `body` is selected by `update_mask`.\n */\n body?: string | undefined;\n /**\n * Alternate names or abbreviations. Accepts at most 50 entries, each 1 to\n * 200 characters. Values are trimmed, deduplicated, and sorted.\n * An update replaces the entire list when `synonyms` is selected by\n * `update_mask`; an empty list clears it.\n */\n synonyms?: string[] | undefined;\n /**\n * Short description of the page. An update replaces the description when\n * `description` is selected by `update_mask`.\n */\n description?: string | undefined;\n /**\n * Lifecycle state. Omitting it on create defaults to `DRAFT`. Set `PUBLISHED`\n * to publish or `DRAFT` to unpublish. An update selecting `state` in\n * `update_mask` must explicitly supply `DRAFT` or `PUBLISHED`.\n */\n state?: State | undefined;\n /** Server-assigned creation time, formatted as an RFC 3339 timestamp in JSON. */\n createTime?: Temporal.Instant | undefined;\n /** Server-assigned last-update time, formatted as an RFC 3339 timestamp in JSON. */\n updateTime?: Temporal.Instant | undefined;\n /**\n * Decimal principal ID strings for the page's single owner: a user, group,\n * or service principal. Use principal IDs rather than email addresses or\n * service-principal application UUIDs. On create, an omitted or empty list\n * defaults to the caller; at most one ID may be supplied. An update selecting\n * `owner_ids` in `update_mask` must supply exactly one ID to replace the owner.\n */\n ownerIds?: string[] | undefined;\n}\n\n/** Request for UpdatePage. */\nexport interface UpdatePageRequest {\n /**\n * The page to update. `name` is required in the form `pages/{page_id}`.\n * Only fields selected by `update_mask` are written.\n */\n page?: Page | undefined;\n /**\n * Nonempty set of Page fields to update. Supported paths are `display_name`,\n * `body`, `synonyms`, `description`, `state`, and `owner_ids`, without a `page.`\n * prefix. Wildcards, `domain`, and server-assigned fields are not supported.\n * In REST requests, pass a comma-separated query parameter, for example\n * `update_mask=display_name,body`. There is no implicit update of all fields.\n */\n updateMask?: FieldMask<Page> | undefined;\n}\n\nexport const unmarshalAssetLinkSchema: z.ZodType<AssetLink> = z\n .object({\n name: z.string().optional(),\n asset_type: z.string().optional(),\n asset_scope_id: z.string().optional(),\n asset_id: z.string().optional(),\n create_time: z\n .string()\n .transform(s => Temporal.Instant.from(s))\n .optional(),\n })\n .transform(d => ({\n name: d.name,\n assetType: d.asset_type,\n assetScopeId: d.asset_scope_id,\n assetId: d.asset_id,\n createTime: d.create_time,\n }));\n\nexport const unmarshalListPagesResponseSchema: z.ZodType<ListPagesResponse> = z\n .object({\n pages: z.array(z.lazy(() => unmarshalPageSchema)).optional(),\n next_page_token: z.string().optional(),\n })\n .transform(d => ({\n pages: d.pages,\n nextPageToken: d.next_page_token,\n }));\n\nexport const unmarshalPageSchema: z.ZodType<Page> = z\n .object({\n name: z.string().optional(),\n domain: z.string().optional(),\n display_name: z.string().optional(),\n body: z.string().optional(),\n synonyms: z.array(z.string()).optional(),\n description: z.string().optional(),\n state: z.string().optional(),\n create_time: z\n .string()\n .transform(s => Temporal.Instant.from(s))\n .optional(),\n update_time: z\n .string()\n .transform(s => Temporal.Instant.from(s))\n .optional(),\n owner_ids: z.array(z.string()).optional(),\n })\n .transform(d => ({\n name: d.name,\n domain: d.domain,\n displayName: d.display_name,\n body: d.body,\n synonyms: d.synonyms,\n description: d.description,\n state: d.state,\n createTime: d.create_time,\n updateTime: d.update_time,\n ownerIds: d.owner_ids,\n }));\n\nexport const marshalAssetLinkSchema: z.ZodType = z\n .object({\n name: z.string().optional(),\n assetType: z.string().optional(),\n assetScopeId: z.string().optional(),\n assetId: z.string().optional(),\n createTime: z\n .any()\n .transform((d: Temporal.Instant) => d.toString())\n .optional(),\n })\n .transform(d => ({\n name: d.name,\n asset_type: d.assetType,\n asset_scope_id: d.assetScopeId,\n asset_id: d.assetId,\n create_time: d.createTime,\n }));\n\nexport const marshalPageSchema: z.ZodType = z\n .object({\n name: z.string().optional(),\n domain: z.string().optional(),\n displayName: z.string().optional(),\n body: z.string().optional(),\n synonyms: z.array(z.string()).optional(),\n description: z.string().optional(),\n state: z.string().optional(),\n createTime: z\n .any()\n .transform((d: Temporal.Instant) => d.toString())\n .optional(),\n updateTime: z\n .any()\n .transform((d: Temporal.Instant) => d.toString())\n .optional(),\n ownerIds: z.array(z.string()).optional(),\n })\n .transform(d => ({\n name: d.name,\n domain: d.domain,\n display_name: d.displayName,\n body: d.body,\n synonyms: d.synonyms,\n description: d.description,\n state: d.state,\n create_time: d.createTime,\n update_time: d.updateTime,\n owner_ids: d.ownerIds,\n }));\n\nconst pageFieldMaskSchema: FieldMaskSchema = {\n body: {wire: 'body'},\n createTime: {wire: 'create_time'},\n description: {wire: 'description'},\n displayName: {wire: 'display_name'},\n domain: {wire: 'domain'},\n name: {wire: 'name'},\n ownerIds: {wire: 'owner_ids'},\n state: {wire: 'state'},\n synonyms: {wire: 'synonyms'},\n updateTime: {wire: 'update_time'},\n};\n\nexport function pageFieldMask(...paths: string[]): FieldMask<Page> {\n return FieldMask.build<Page>(paths, pageFieldMaskSchema);\n}\n"],"mappings":";;;;;;AASA,MAAa,YAAY;CAEvB,wBAAwB;CAMxB,qBAAqB;CAMrB,gCAAgC;CAMhC,kCAAkC;CAKlC,+BAA+B;CAM/B,0BAA0B;CAK1B,kCAAkC;CAKlC,yBAAyB;CAEzB,yBAAyB;CAKzB,yBAAyB;CAC1B;;AAOD,MAAa,QAAQ;CAEnB,mBAAmB;CAEnB,OAAO;CAEP,WAAW;CACZ;AAwOD,MAAa,2BAAiD,EAC3D,OAAO;CACN,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,gBAAgB,EAAE,QAAQ,CAAC,UAAU;CACrC,UAAU,EAAE,QAAQ,CAAC,UAAU;CAC/B,aAAa,EACV,QAAQ,CACR,WAAU,MAAK,SAAS,QAAQ,KAAK,EAAE,CAAC,CACxC,UAAU;CACd,CAAC,CACD,WAAU,OAAM;CACf,MAAM,EAAE;CACR,WAAW,EAAE;CACb,cAAc,EAAE;CAChB,SAAS,EAAE;CACX,YAAY,EAAE;CACf,EAAE;AAEL,MAAa,mCAAiE,EAC3E,OAAO;CACN,OAAO,EAAE,MAAM,EAAE,WAAW,oBAAoB,CAAC,CAAC,UAAU;CAC5D,iBAAiB,EAAE,QAAQ,CAAC,UAAU;CACvC,CAAC,CACD,WAAU,OAAM;CACf,OAAO,EAAE;CACT,eAAe,EAAE;CAClB,EAAE;AAEL,MAAa,sBAAuC,EACjD,OAAO;CACN,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,QAAQ,EAAE,QAAQ,CAAC,UAAU;CAC7B,cAAc,EAAE,QAAQ,CAAC,UAAU;CACnC,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,U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AAE,QAAQ,CAAC,UAAU;CAC5B,YAAY,EACT,KAAK,CACL,WAAW,MAAwB,EAAE,UAAU,CAAC,CAChD,UAAU;CACb,YAAY,EACT,KAAK,CACL,WAAW,MAAwB,EAAE,UAAU,CAAC,CAChD,UAAU;CACb,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;CACzC,CAAC,CACD,WAAU,OAAM;CACf,MAAM,EAAE;CACR,QAAQ,EAAE;CACV,cAAc,EAAE;CAChB,MAAM,EAAE;CACR,UAAU,EAAE;CACZ,aAAa,EAAE;CACf,OAAO,EAAE;CACT,aAAa,EAAE;CACf,aAAa,EAAE;CACf,WAAW,EAAE;CACd,EAAE;AAEL,MAAM,sBAAuC;CAC3C,MAAM,EAAC,MAAM,QAAO;CACpB,YAAY,EAAC,MAAM,eAAc;CACjC,aAAa,EAAC,MAAM,eAAc;CAClC,aAAa,EAAC,MAAM,gBAAe;CACnC,QAAQ,EAAC,MAAM,UAAS;CACxB,MAAM,EAAC,MAAM,QAAO;CACpB,UAAU,EAAC,MAAM,aAAY;CAC7B,OAAO,EAAC,MAAM,SAAQ;CACtB,UAAU,EAAC,MAAM,YAAW;CAC5B,YAAY,EAAC,MAAM,eAAc;CAClC;AAED,SAAgB,cAAc,GAAG,OAAkC;AACjE,QAAO,UAAU,MAAY,OAAO,oBAAoB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/sdk-knowledge",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {