@databricks/sdk-knowledge 0.0.0-beta → 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,203 @@
1
+ Copyright 2026 Databricks, Inc. All rights reserved.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright [yyyy] [name of copyright owner]
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
package/README.md CHANGED
@@ -1 +1,23 @@
1
- This is a placeholder release used to enable OIDC trusted publishing. Real code lands in a later version.
1
+ # @databricks/sdk-knowledge
2
+
3
+ > [!NOTE]
4
+ >
5
+ > ## Beta
6
+ >
7
+ > **This SDK is in Beta and is supported for production use cases.** Interfaces might still change slightly before GA (e.g. name standardization and minor ergonomic tweaks). We are keen to hear feedback from early adopters — please [file issues](https://github.com/databricks/sdk-js/issues), and we will address them.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @databricks/sdk-knowledge
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```typescript
18
+ import {KnowledgeClient} from '@databricks/sdk-knowledge/v1';
19
+
20
+ const client = new KnowledgeClient({});
21
+ ```
22
+
23
+ For a full getting-started guide, see the [root README](../../README.md).
@@ -0,0 +1,7 @@
1
+ //#region package.json
2
+ var name = "@databricks/sdk-knowledge";
3
+ var version = "0.0.1";
4
+
5
+ //#endregion
6
+ export { name, version };
7
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -0,0 +1,81 @@
1
+ import { AssetLink, CreateAssetLinkRequest, CreatePageRequest, DeleteAssetLinkRequest, DeletePageRequest, GetAssetLinkRequest, GetPageRequest, ListPagesRequest, ListPagesResponse, Page, UpdatePageRequest } from "./model.js";
2
+ import { CallOptions } from "@databricks/sdk-options/call";
3
+ import { ClientOptions } from "@databricks/sdk-options/client";
4
+
5
+ //#region src/v1/client.d.ts
6
+ declare class KnowledgeClient {
7
+ private readonly options;
8
+ private readonly logger;
9
+ private readonly userAgent;
10
+ private config;
11
+ constructor(options: ClientOptions);
12
+ private resolveConfig;
13
+ /**
14
+ * Create an asset link on a page. For REST, send AssetLink fields directly
15
+ * as the JSON request body; the parent path supplies the page and category.
16
+ * An existing target with the same asset type, scope, and resolved asset ID
17
+ * in that page/category returns the original link and creation time.
18
+ */
19
+ createAssetLink(req: CreateAssetLinkRequest, options?: CallOptions): Promise<AssetLink>;
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.
23
+ * When page permissions are enforced, creating a published page or assigning
24
+ * another owner requires Page Manager or Domain Admin permissions on the domain,
25
+ * including inherited grants. Creating your own draft requires neither grant.
26
+ *
27
+ * Errors: `INVALID_PARAMETER_VALUE` (missing `page`/`domain` or field validation),
28
+ * `NOT_FOUND` (the referenced `domain` does not exist), `ALREADY_EXISTS` (a
29
+ * published page with the same `domain` and `display_name` already exists),
30
+ * `PERMISSION_DENIED` (insufficient permissions), `RESOURCE_EXHAUSTED`
31
+ * (rate limited), `INTERNAL_ERROR` (unexpected failure).
32
+ */
33
+ createPage(req: CreatePageRequest, options?: CallOptions): Promise<Page>;
34
+ /**
35
+ * Delete an asset link by its full resource name. Returns NOT_FOUND if the
36
+ * link does not exist, including when it has already been deleted.
37
+ */
38
+ deleteAssetLink(req: DeleteAssetLinkRequest, options?: CallOptions): Promise<void>;
39
+ /**
40
+ * Delete a knowledge page by resource name.
41
+ *
42
+ * Returns `NOT_FOUND` if no page with the given `name` exists.
43
+ */
44
+ deletePage(req: DeletePageRequest, options?: CallOptions): Promise<void>;
45
+ /**
46
+ * Get an asset link by its full resource name. Table links return the table's
47
+ * current FQN and require access to that table. Query and Genie
48
+ * links return native UUIDs and require access in the caller's workspace.
49
+ * Returns NOT_FOUND if the link is missing or its target identifier cannot be
50
+ * resolved.
51
+ */
52
+ getAssetLink(req: GetAssetLinkRequest, options?: CallOptions): Promise<AssetLink>;
53
+ /**
54
+ * Get a knowledge page by resource name.
55
+ *
56
+ * Returns `NOT_FOUND` if no page with the given `name` exists.
57
+ */
58
+ getPage(req: GetPageRequest, options?: CallOptions): Promise<Page>;
59
+ /**
60
+ * List visible knowledge pages in the account, optionally narrowed by
61
+ * `domain` and `state`. With a domain filter, the caller must administer that
62
+ * domain, including through inherited grants. Without a domain filter,
63
+ * including when filtering only by state, account-wide Manage Discover or
64
+ * Account Admin permission is required. List returns page metadata.
65
+ */
66
+ listPages(req: ListPagesRequest, options?: CallOptions): Promise<ListPagesResponse>;
67
+ listPagesIter(req: ListPagesRequest, options?: CallOptions): AsyncGenerator<Page>;
68
+ /**
69
+ * Update an existing knowledge page. For REST, send Page fields directly as
70
+ * the JSON body and supply `update_mask` as a query parameter. The resource
71
+ * `name` identifies the page; omitted mask fields retain their stored values.
72
+ *
73
+ * Errors: `INVALID_PARAMETER_VALUE` (field validation), `NOT_FOUND` (the page does
74
+ * not exist), `ALREADY_EXISTS` (a rename would collide with another published
75
+ * page), `RESOURCE_EXHAUSTED`, `ABORTED`, `INTERNAL_ERROR`.
76
+ */
77
+ updatePage(req: UpdatePageRequest, options?: CallOptions): Promise<Page>;
78
+ }
79
+ //#endregion
80
+ export { KnowledgeClient };
81
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +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;EAgKA;;;;;;;EAtIG,YAAA,CACJ,GAAA,EAAK,mBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,SAAA;EAvKU;;;;;EAqMf,OAAA,CAAQ,GAAA,EAAK,cAAA,EAAgB,OAAA,GAAU,WAAA,GAAc,OAAA,CAAQ,IAAA;EA9KvD;;;;;;;EA8MN,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;EA9Mf;;;;;;;;;EAqOG,UAAA,CACJ,GAAA,EAAK,iBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,IAAA;AAAA"}
@@ -0,0 +1,258 @@
1
+ import { resolveClientConfig } from "./transport.js";
2
+ import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse } from "./utils.js";
3
+ import { name, version } from "../package.js";
4
+ import { marshalAssetLinkSchema, marshalPageSchema, unmarshalAssetLinkSchema, unmarshalListPagesResponseSchema, unmarshalPageSchema } from "./model.js";
5
+ import { VERSION } from "@databricks/sdk-auth";
6
+ import { createDefault } from "@databricks/sdk-core/clientinfo";
7
+ import { NoOpLogger } from "@databricks/sdk-core/logger";
8
+
9
+ //#region src/v1/client.ts
10
+ const PACKAGE_SEGMENT = {
11
+ key: "sdk-js-" + name.replace(/^@[^/]+\/sdk-/, ""),
12
+ value: version
13
+ };
14
+ var KnowledgeClient = class {
15
+ options;
16
+ logger;
17
+ userAgent;
18
+ config;
19
+ constructor(options) {
20
+ this.options = options;
21
+ this.logger = options.logger ?? new NoOpLogger();
22
+ this.userAgent = createDefault().with(PACKAGE_SEGMENT).with({
23
+ key: "sdk-js-auth",
24
+ value: VERSION
25
+ }).with({
26
+ key: "auth",
27
+ value: options.credentials?.name() ?? "default"
28
+ }).toString();
29
+ }
30
+ resolveConfig() {
31
+ this.config ??= resolveClientConfig(this.options);
32
+ return this.config;
33
+ }
34
+ /**
35
+ * Create an asset link on a page. For REST, send AssetLink fields directly
36
+ * as the JSON request body; the parent path supplies the page and category.
37
+ * An existing target with the same asset type, scope, and resolved asset ID
38
+ * in that page/category returns the original link and creation time.
39
+ */
40
+ async createAssetLink(req, options) {
41
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
42
+ const url = `${host}/api/2.0/knowledge/${req.parent ?? ""}/asset-links`;
43
+ const body = marshalRequest(req.assetLink, marshalAssetLinkSchema);
44
+ let resp;
45
+ const call = async (callSignal) => {
46
+ const headers = new Headers({ "Content-Type": "application/json" });
47
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
48
+ headers.set("User-Agent", this.userAgent);
49
+ resp = parseResponse(await executeHttpCall({
50
+ request: buildHttpRequest("POST", url, headers, callSignal, body),
51
+ httpClient,
52
+ logger: this.logger
53
+ }), unmarshalAssetLinkSchema);
54
+ };
55
+ await executeCall(call, options);
56
+ if (resp === void 0) throw new Error("operation completed without a result.");
57
+ return resp;
58
+ }
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.
62
+ * When page permissions are enforced, creating a published page or assigning
63
+ * another owner requires Page Manager or Domain Admin permissions on the domain,
64
+ * including inherited grants. Creating your own draft requires neither grant.
65
+ *
66
+ * Errors: `INVALID_PARAMETER_VALUE` (missing `page`/`domain` or field validation),
67
+ * `NOT_FOUND` (the referenced `domain` does not exist), `ALREADY_EXISTS` (a
68
+ * published page with the same `domain` and `display_name` already exists),
69
+ * `PERMISSION_DENIED` (insufficient permissions), `RESOURCE_EXHAUSTED`
70
+ * (rate limited), `INTERNAL_ERROR` (unexpected failure).
71
+ */
72
+ async createPage(req, options) {
73
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
74
+ const url = `${host}/api/2.0/knowledge/pages`;
75
+ const params = new URLSearchParams();
76
+ if (req.requestId !== void 0) params.append("request_id", req.requestId);
77
+ const query = params.toString();
78
+ const fullUrl = query !== "" ? `${url}?${query}` : url;
79
+ const body = marshalRequest(req.page, marshalPageSchema);
80
+ let resp;
81
+ const call = async (callSignal) => {
82
+ const headers = new Headers({ "Content-Type": "application/json" });
83
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
84
+ headers.set("User-Agent", this.userAgent);
85
+ resp = parseResponse(await executeHttpCall({
86
+ request: buildHttpRequest("POST", fullUrl, headers, callSignal, body),
87
+ httpClient,
88
+ logger: this.logger
89
+ }), unmarshalPageSchema);
90
+ };
91
+ await executeCall(call, options);
92
+ if (resp === void 0) throw new Error("operation completed without a result.");
93
+ return resp;
94
+ }
95
+ /**
96
+ * Delete an asset link by its full resource name. Returns NOT_FOUND if the
97
+ * link does not exist, including when it has already been deleted.
98
+ */
99
+ async deleteAssetLink(req, options) {
100
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
101
+ const url = `${host}/api/2.0/knowledge/${req.name ?? ""}`;
102
+ const call = async (callSignal) => {
103
+ const headers = new Headers();
104
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
105
+ headers.set("User-Agent", this.userAgent);
106
+ await executeHttpCall({
107
+ request: buildHttpRequest("DELETE", url, headers, callSignal),
108
+ httpClient,
109
+ logger: this.logger
110
+ });
111
+ };
112
+ await executeCall(call, options);
113
+ }
114
+ /**
115
+ * Delete a knowledge page by resource name.
116
+ *
117
+ * Returns `NOT_FOUND` if no page with the given `name` exists.
118
+ */
119
+ async deletePage(req, options) {
120
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
121
+ const url = `${host}/api/2.0/knowledge/${req.name ?? ""}`;
122
+ const call = async (callSignal) => {
123
+ const headers = new Headers();
124
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
125
+ headers.set("User-Agent", this.userAgent);
126
+ await executeHttpCall({
127
+ request: buildHttpRequest("DELETE", url, headers, callSignal),
128
+ httpClient,
129
+ logger: this.logger
130
+ });
131
+ };
132
+ await executeCall(call, options);
133
+ }
134
+ /**
135
+ * Get an asset link by its full resource name. Table links return the table's
136
+ * current FQN and require access to that table. Query and Genie
137
+ * links return native UUIDs and require access in the caller's workspace.
138
+ * Returns NOT_FOUND if the link is missing or its target identifier cannot be
139
+ * resolved.
140
+ */
141
+ async getAssetLink(req, options) {
142
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
143
+ const url = `${host}/api/2.0/knowledge/${req.name ?? ""}`;
144
+ let resp;
145
+ const call = async (callSignal) => {
146
+ const headers = new Headers();
147
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
148
+ headers.set("User-Agent", this.userAgent);
149
+ resp = parseResponse(await executeHttpCall({
150
+ request: buildHttpRequest("GET", url, headers, callSignal),
151
+ httpClient,
152
+ logger: this.logger
153
+ }), unmarshalAssetLinkSchema);
154
+ };
155
+ await executeCall(call, options);
156
+ if (resp === void 0) throw new Error("operation completed without a result.");
157
+ return resp;
158
+ }
159
+ /**
160
+ * Get a knowledge page by resource name.
161
+ *
162
+ * Returns `NOT_FOUND` if no page with the given `name` exists.
163
+ */
164
+ async getPage(req, options) {
165
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
166
+ const url = `${host}/api/2.0/knowledge/${req.name ?? ""}`;
167
+ let resp;
168
+ const call = async (callSignal) => {
169
+ const headers = new Headers();
170
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
171
+ headers.set("User-Agent", this.userAgent);
172
+ resp = parseResponse(await executeHttpCall({
173
+ request: buildHttpRequest("GET", url, headers, callSignal),
174
+ httpClient,
175
+ logger: this.logger
176
+ }), unmarshalPageSchema);
177
+ };
178
+ await executeCall(call, options);
179
+ if (resp === void 0) throw new Error("operation completed without a result.");
180
+ return resp;
181
+ }
182
+ /**
183
+ * List visible knowledge pages in the account, optionally narrowed by
184
+ * `domain` and `state`. With a domain filter, the caller must administer that
185
+ * domain, including through inherited grants. Without a domain filter,
186
+ * including when filtering only by state, account-wide Manage Discover or
187
+ * Account Admin permission is required. List returns page metadata.
188
+ */
189
+ async listPages(req, options) {
190
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
191
+ const url = `${host}/api/2.0/knowledge/pages`;
192
+ const params = new URLSearchParams();
193
+ if (req.pageSize !== void 0) params.append("page_size", String(req.pageSize));
194
+ if (req.pageToken !== void 0) params.append("page_token", req.pageToken);
195
+ if (req.filter !== void 0) params.append("filter", req.filter);
196
+ const query = params.toString();
197
+ const fullUrl = query !== "" ? `${url}?${query}` : url;
198
+ let resp;
199
+ const call = async (callSignal) => {
200
+ const headers = new Headers();
201
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
202
+ headers.set("User-Agent", this.userAgent);
203
+ resp = parseResponse(await executeHttpCall({
204
+ request: buildHttpRequest("GET", fullUrl, headers, callSignal),
205
+ httpClient,
206
+ logger: this.logger
207
+ }), unmarshalListPagesResponseSchema);
208
+ };
209
+ await executeCall(call, options);
210
+ if (resp === void 0) throw new Error("operation completed without a result.");
211
+ return resp;
212
+ }
213
+ async *listPagesIter(req, options) {
214
+ const pageReq = { ...req };
215
+ for (;;) {
216
+ const resp = await this.listPages(pageReq, options);
217
+ for (const item of resp.pages ?? []) yield item;
218
+ if (resp.nextPageToken === void 0 || resp.nextPageToken === "") return;
219
+ pageReq.pageToken = resp.nextPageToken;
220
+ }
221
+ }
222
+ /**
223
+ * Update an existing knowledge page. For REST, send Page fields directly as
224
+ * the JSON body and supply `update_mask` as a query parameter. The resource
225
+ * `name` identifies the page; omitted mask fields retain their stored values.
226
+ *
227
+ * Errors: `INVALID_PARAMETER_VALUE` (field validation), `NOT_FOUND` (the page does
228
+ * not exist), `ALREADY_EXISTS` (a rename would collide with another published
229
+ * page), `RESOURCE_EXHAUSTED`, `ABORTED`, `INTERNAL_ERROR`.
230
+ */
231
+ async updatePage(req, options) {
232
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
233
+ const url = `${host}/api/2.0/knowledge/${req.page?.name ?? ""}`;
234
+ const params = new URLSearchParams();
235
+ if (req.updateMask !== void 0) params.append("update_mask", req.updateMask.toString());
236
+ const query = params.toString();
237
+ const fullUrl = query !== "" ? `${url}?${query}` : url;
238
+ const body = marshalRequest(req.page, marshalPageSchema);
239
+ let resp;
240
+ const call = async (callSignal) => {
241
+ const headers = new Headers({ "Content-Type": "application/json" });
242
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
243
+ headers.set("User-Agent", this.userAgent);
244
+ resp = parseResponse(await executeHttpCall({
245
+ request: buildHttpRequest("PATCH", fullUrl, headers, callSignal, body),
246
+ httpClient,
247
+ logger: this.logger
248
+ }), unmarshalPageSchema);
249
+ };
250
+ await executeCall(call, options);
251
+ if (resp === void 0) throw new Error("operation completed without a result.");
252
+ return resp;
253
+ }
254
+ };
255
+
256
+ //#endregion
257
+ export { KnowledgeClient };
258
+ //# sourceMappingURL=client.js.map
@@ -0,0 +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,6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, AssetType, CreateAssetLinkRequest, CreatePageRequest, DeleteAssetLinkRequest, DeletePageRequest, GetAssetLinkRequest, GetPageRequest, ListPagesRequest, ListPagesResponse, Page, State, UpdatePageRequest, pageFieldMask } from "./model.js";
2
+ import { KnowledgeClient } from "./client.js";
3
+ export { type AssetLink, AssetType, type CreateAssetLinkRequest, type CreatePageRequest, type DeleteAssetLinkRequest, type DeletePageRequest, type GetAssetLinkRequest, type GetPageRequest, KnowledgeClient, type ListPagesRequest, type ListPagesResponse, type Page, State, type UpdatePageRequest, pageFieldMask };
@@ -0,0 +1,4 @@
1
+ import { AssetType, State, pageFieldMask } from "./model.js";
2
+ import { KnowledgeClient } from "./client.js";
3
+
4
+ export { AssetType, KnowledgeClient, State, pageFieldMask };