@athenaintel/sdk 4.3.1937 → 4.3.1939
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +40 -0
- package/dist/cjs/api/resources/workspaces/client/Client.js +171 -0
- package/dist/cjs/api/resources/workspaces/client/requests/GetToolRegistryWorkspacesRequest.d.ts +9 -0
- package/dist/cjs/api/resources/workspaces/client/requests/GetToolRegistryWorkspacesRequest.js +3 -0
- package/dist/cjs/api/resources/workspaces/client/requests/UpdateWorkspaceToolRegistryRequestIn.d.ts +18 -0
- package/dist/cjs/api/resources/workspaces/client/requests/UpdateWorkspaceToolRegistryRequestIn.js +3 -0
- package/dist/cjs/api/resources/workspaces/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/ApprovalMode.d.ts +7 -0
- package/dist/cjs/api/types/ApprovalMode.js +10 -0
- package/dist/cjs/api/types/DefaultVisibility.d.ts +6 -0
- package/dist/cjs/api/types/DefaultVisibility.js +9 -0
- package/dist/cjs/api/types/UpdateWorkspaceToolRegistryToolIn.d.ts +12 -0
- package/dist/cjs/api/types/UpdateWorkspaceToolRegistryToolIn.js +3 -0
- package/dist/cjs/api/types/WorkspaceToolRegistryResponseOut.d.ts +12 -0
- package/dist/cjs/api/types/WorkspaceToolRegistryResponseOut.js +3 -0
- package/dist/cjs/api/types/WorkspaceToolRegistryToolOut.d.ts +12 -0
- package/dist/cjs/api/types/WorkspaceToolRegistryToolOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +40 -0
- package/dist/esm/api/resources/workspaces/client/Client.mjs +171 -0
- package/dist/esm/api/resources/workspaces/client/requests/GetToolRegistryWorkspacesRequest.d.mts +9 -0
- package/dist/esm/api/resources/workspaces/client/requests/GetToolRegistryWorkspacesRequest.mjs +2 -0
- package/dist/esm/api/resources/workspaces/client/requests/UpdateWorkspaceToolRegistryRequestIn.d.mts +18 -0
- package/dist/esm/api/resources/workspaces/client/requests/UpdateWorkspaceToolRegistryRequestIn.mjs +2 -0
- package/dist/esm/api/resources/workspaces/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/ApprovalMode.d.mts +7 -0
- package/dist/esm/api/types/ApprovalMode.mjs +7 -0
- package/dist/esm/api/types/DefaultVisibility.d.mts +6 -0
- package/dist/esm/api/types/DefaultVisibility.mjs +6 -0
- package/dist/esm/api/types/UpdateWorkspaceToolRegistryToolIn.d.mts +12 -0
- package/dist/esm/api/types/UpdateWorkspaceToolRegistryToolIn.mjs +2 -0
- package/dist/esm/api/types/WorkspaceToolRegistryResponseOut.d.mts +12 -0
- package/dist/esm/api/types/WorkspaceToolRegistryResponseOut.mjs +2 -0
- package/dist/esm/api/types/WorkspaceToolRegistryToolOut.d.mts +12 -0
- package/dist/esm/api/types/WorkspaceToolRegistryToolOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +134 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "4.3.
|
|
47
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
46
|
+
"X-Fern-SDK-Version": "4.3.1939",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.1939",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -45,4 +45,44 @@ export declare class WorkspacesClient {
|
|
|
45
45
|
*/
|
|
46
46
|
updateConfiguration(request: AthenaIntelligence.UpdateWorkspaceConfigurationRequestIn, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceConfigurationResponseOut>;
|
|
47
47
|
private __updateConfiguration;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve the persisted per-workspace Tool Registry policy. The response contains explicit tool overrides; environment feature flags, billing restrictions, and disabled tags may further restrict effective availability. Requires workspace owner or admin permissions.
|
|
50
|
+
*
|
|
51
|
+
* @param {AthenaIntelligence.GetToolRegistryWorkspacesRequest} request
|
|
52
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
55
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
56
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
57
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.workspaces.getToolRegistry({
|
|
61
|
+
* workspace_id: "workspace_id"
|
|
62
|
+
* })
|
|
63
|
+
*/
|
|
64
|
+
getToolRegistry(request: AthenaIntelligence.GetToolRegistryWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceToolRegistryResponseOut>;
|
|
65
|
+
private __getToolRegistry;
|
|
66
|
+
/**
|
|
67
|
+
* Update the default visibility or one per-tool override for a workspace. Requests are partial and idempotent, making this endpoint suitable for configuration automation across many workspaces. Base tools cannot be disabled. Requires workspace owner or admin permissions.
|
|
68
|
+
*
|
|
69
|
+
* @param {AthenaIntelligence.UpdateWorkspaceToolRegistryRequestIn} request
|
|
70
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
73
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
74
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
75
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.workspaces.updateToolRegistry({
|
|
79
|
+
* workspace_id: "workspace_id",
|
|
80
|
+
* tool: {
|
|
81
|
+
* enabled: false,
|
|
82
|
+
* tool_id: "search"
|
|
83
|
+
* }
|
|
84
|
+
* })
|
|
85
|
+
*/
|
|
86
|
+
updateToolRegistry(request: AthenaIntelligence.UpdateWorkspaceToolRegistryRequestIn, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceToolRegistryResponseOut>;
|
|
87
|
+
private __updateToolRegistry;
|
|
48
88
|
}
|
|
@@ -226,5 +226,176 @@ class WorkspacesClient {
|
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Retrieve the persisted per-workspace Tool Registry policy. The response contains explicit tool overrides; environment feature flags, billing restrictions, and disabled tags may further restrict effective availability. Requires workspace owner or admin permissions.
|
|
231
|
+
*
|
|
232
|
+
* @param {AthenaIntelligence.GetToolRegistryWorkspacesRequest} request
|
|
233
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
234
|
+
*
|
|
235
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
236
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
237
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
238
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* await client.workspaces.getToolRegistry({
|
|
242
|
+
* workspace_id: "workspace_id"
|
|
243
|
+
* })
|
|
244
|
+
*/
|
|
245
|
+
getToolRegistry(request, requestOptions) {
|
|
246
|
+
return core.HttpResponsePromise.fromPromise(this.__getToolRegistry(request, requestOptions));
|
|
247
|
+
}
|
|
248
|
+
__getToolRegistry(request, requestOptions) {
|
|
249
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
251
|
+
const { workspace_id: workspaceId } = request;
|
|
252
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
253
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
254
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
255
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/workspaces/${core.url.encodePathParam(workspaceId)}/tool-registry`),
|
|
256
|
+
method: "GET",
|
|
257
|
+
headers: _headers,
|
|
258
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
259
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
260
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
261
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
262
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
263
|
+
logging: this._options.logging,
|
|
264
|
+
});
|
|
265
|
+
if (_response.ok) {
|
|
266
|
+
return {
|
|
267
|
+
data: _response.body,
|
|
268
|
+
rawResponse: _response.rawResponse,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
if (_response.error.reason === "status-code") {
|
|
272
|
+
switch (_response.error.statusCode) {
|
|
273
|
+
case 400:
|
|
274
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
275
|
+
case 403:
|
|
276
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
277
|
+
case 404:
|
|
278
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
279
|
+
case 422:
|
|
280
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
281
|
+
default:
|
|
282
|
+
throw new errors.AthenaIntelligenceError({
|
|
283
|
+
statusCode: _response.error.statusCode,
|
|
284
|
+
body: _response.error.body,
|
|
285
|
+
rawResponse: _response.rawResponse,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
switch (_response.error.reason) {
|
|
290
|
+
case "non-json":
|
|
291
|
+
throw new errors.AthenaIntelligenceError({
|
|
292
|
+
statusCode: _response.error.statusCode,
|
|
293
|
+
body: _response.error.rawBody,
|
|
294
|
+
rawResponse: _response.rawResponse,
|
|
295
|
+
});
|
|
296
|
+
case "body-is-null":
|
|
297
|
+
throw new errors.AthenaIntelligenceError({
|
|
298
|
+
statusCode: _response.error.statusCode,
|
|
299
|
+
rawResponse: _response.rawResponse,
|
|
300
|
+
});
|
|
301
|
+
case "timeout":
|
|
302
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/tool-registry.");
|
|
303
|
+
case "unknown":
|
|
304
|
+
throw new errors.AthenaIntelligenceError({
|
|
305
|
+
message: _response.error.errorMessage,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Update the default visibility or one per-tool override for a workspace. Requests are partial and idempotent, making this endpoint suitable for configuration automation across many workspaces. Base tools cannot be disabled. Requires workspace owner or admin permissions.
|
|
313
|
+
*
|
|
314
|
+
* @param {AthenaIntelligence.UpdateWorkspaceToolRegistryRequestIn} request
|
|
315
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
316
|
+
*
|
|
317
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
318
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
319
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
320
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* await client.workspaces.updateToolRegistry({
|
|
324
|
+
* workspace_id: "workspace_id",
|
|
325
|
+
* tool: {
|
|
326
|
+
* enabled: false,
|
|
327
|
+
* tool_id: "search"
|
|
328
|
+
* }
|
|
329
|
+
* })
|
|
330
|
+
*/
|
|
331
|
+
updateToolRegistry(request, requestOptions) {
|
|
332
|
+
return core.HttpResponsePromise.fromPromise(this.__updateToolRegistry(request, requestOptions));
|
|
333
|
+
}
|
|
334
|
+
__updateToolRegistry(request, requestOptions) {
|
|
335
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
337
|
+
const { workspace_id: workspaceId } = request, _body = __rest(request, ["workspace_id"]);
|
|
338
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
339
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
340
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
341
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/workspaces/${core.url.encodePathParam(workspaceId)}/tool-registry`),
|
|
342
|
+
method: "PATCH",
|
|
343
|
+
headers: _headers,
|
|
344
|
+
contentType: "application/json",
|
|
345
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
346
|
+
requestType: "json",
|
|
347
|
+
body: _body,
|
|
348
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
349
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
350
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
351
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
352
|
+
logging: this._options.logging,
|
|
353
|
+
});
|
|
354
|
+
if (_response.ok) {
|
|
355
|
+
return {
|
|
356
|
+
data: _response.body,
|
|
357
|
+
rawResponse: _response.rawResponse,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
if (_response.error.reason === "status-code") {
|
|
361
|
+
switch (_response.error.statusCode) {
|
|
362
|
+
case 400:
|
|
363
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
364
|
+
case 403:
|
|
365
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
366
|
+
case 404:
|
|
367
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
368
|
+
case 422:
|
|
369
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
370
|
+
default:
|
|
371
|
+
throw new errors.AthenaIntelligenceError({
|
|
372
|
+
statusCode: _response.error.statusCode,
|
|
373
|
+
body: _response.error.body,
|
|
374
|
+
rawResponse: _response.rawResponse,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
switch (_response.error.reason) {
|
|
379
|
+
case "non-json":
|
|
380
|
+
throw new errors.AthenaIntelligenceError({
|
|
381
|
+
statusCode: _response.error.statusCode,
|
|
382
|
+
body: _response.error.rawBody,
|
|
383
|
+
rawResponse: _response.rawResponse,
|
|
384
|
+
});
|
|
385
|
+
case "body-is-null":
|
|
386
|
+
throw new errors.AthenaIntelligenceError({
|
|
387
|
+
statusCode: _response.error.statusCode,
|
|
388
|
+
rawResponse: _response.rawResponse,
|
|
389
|
+
});
|
|
390
|
+
case "timeout":
|
|
391
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling PATCH /api/v0/workspaces/{workspace_id}/tool-registry.");
|
|
392
|
+
case "unknown":
|
|
393
|
+
throw new errors.AthenaIntelligenceError({
|
|
394
|
+
message: _response.error.errorMessage,
|
|
395
|
+
rawResponse: _response.rawResponse,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
229
400
|
}
|
|
230
401
|
exports.WorkspacesClient = WorkspacesClient;
|
package/dist/cjs/api/resources/workspaces/client/requests/UpdateWorkspaceToolRegistryRequestIn.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* workspace_id: "workspace_id",
|
|
6
|
+
* tool: {
|
|
7
|
+
* enabled: false,
|
|
8
|
+
* tool_id: "search"
|
|
9
|
+
* }
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface UpdateWorkspaceToolRegistryRequestIn {
|
|
13
|
+
workspace_id: string;
|
|
14
|
+
/** Default visibility for tools without an explicit override */
|
|
15
|
+
default_visibility?: AthenaIntelligence.DefaultVisibility | null;
|
|
16
|
+
/** An optional update to one tool override */
|
|
17
|
+
tool?: AthenaIntelligence.UpdateWorkspaceToolRegistryToolIn | null;
|
|
18
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export type { GetConfigurationWorkspacesRequest } from "./GetConfigurationWorkspacesRequest.js";
|
|
2
|
+
export type { GetToolRegistryWorkspacesRequest } from "./GetToolRegistryWorkspacesRequest.js";
|
|
2
3
|
export type { UpdateWorkspaceConfigurationRequestIn } from "./UpdateWorkspaceConfigurationRequestIn.js";
|
|
4
|
+
export type { UpdateWorkspaceToolRegistryRequestIn } from "./UpdateWorkspaceToolRegistryRequestIn.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Approval requirement modes for tools. */
|
|
2
|
+
export declare const ApprovalMode: {
|
|
3
|
+
readonly NoApproval: "no_approval";
|
|
4
|
+
readonly RequiredWithOverride: "required_with_override";
|
|
5
|
+
readonly RequiredNoOverride: "required_no_override";
|
|
6
|
+
};
|
|
7
|
+
export type ApprovalMode = (typeof ApprovalMode)[keyof typeof ApprovalMode];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ApprovalMode = void 0;
|
|
5
|
+
/** Approval requirement modes for tools. */
|
|
6
|
+
exports.ApprovalMode = {
|
|
7
|
+
NoApproval: "no_approval",
|
|
8
|
+
RequiredWithOverride: "required_with_override",
|
|
9
|
+
RequiredNoOverride: "required_no_override",
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DefaultVisibility = void 0;
|
|
5
|
+
/** Default visibility for new tools. */
|
|
6
|
+
exports.DefaultVisibility = {
|
|
7
|
+
Visible: "visible",
|
|
8
|
+
Hidden: "hidden",
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A partial update to one workspace tool override.
|
|
4
|
+
*/
|
|
5
|
+
export interface UpdateWorkspaceToolRegistryToolIn {
|
|
6
|
+
/** Approval policy for the tool */
|
|
7
|
+
approval_mode?: AthenaIntelligence.ApprovalMode | null;
|
|
8
|
+
/** Whether to enable the tool */
|
|
9
|
+
enabled?: boolean | null;
|
|
10
|
+
/** The canonical tool identifier */
|
|
11
|
+
tool_id: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Persisted Tool Registry policy for a workspace.
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkspaceToolRegistryResponseOut {
|
|
6
|
+
/** Default visibility for tools without an explicit override */
|
|
7
|
+
default_visibility: AthenaIntelligence.DefaultVisibility;
|
|
8
|
+
/** Persisted per-tool overrides, sorted by tool ID */
|
|
9
|
+
tools: AthenaIntelligence.WorkspaceToolRegistryToolOut[];
|
|
10
|
+
/** The workspace ID */
|
|
11
|
+
workspace_id: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A persisted per-tool override in a workspace Tool Registry.
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkspaceToolRegistryToolOut {
|
|
6
|
+
/** The approval policy applied to the tool */
|
|
7
|
+
approval_mode: AthenaIntelligence.ApprovalMode;
|
|
8
|
+
/** Whether the tool is enabled */
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/** The canonical tool identifier */
|
|
11
|
+
tool_id: string;
|
|
12
|
+
}
|
|
@@ -5,6 +5,7 @@ export * from "./AopConfigUpdateResponseOut.js";
|
|
|
5
5
|
export * from "./AopCreateResponseOut.js";
|
|
6
6
|
export * from "./AopExecuteRequestIn.js";
|
|
7
7
|
export * from "./AopExecuteResponseOut.js";
|
|
8
|
+
export * from "./ApprovalMode.js";
|
|
8
9
|
export * from "./ArchiveAssetResponseOut.js";
|
|
9
10
|
export * from "./AssetCapabilitiesResponseOut.js";
|
|
10
11
|
export * from "./AssetComment.js";
|
|
@@ -39,6 +40,7 @@ export * from "./DatabaseTableSchemaResponse.js";
|
|
|
39
40
|
export * from "./DatabaseTablesResponse.js";
|
|
40
41
|
export * from "./DataFrameRequestOut.js";
|
|
41
42
|
export * from "./DataFrameUnknownFormatError.js";
|
|
43
|
+
export * from "./DefaultVisibility.js";
|
|
42
44
|
export * from "./DeleteDataRequest.js";
|
|
43
45
|
export * from "./DeployComputerResponseOut.js";
|
|
44
46
|
export * from "./DimensionProperties.js";
|
|
@@ -99,10 +101,13 @@ export * from "./ThreadStopResponseOut.js";
|
|
|
99
101
|
export * from "./ToolResultContent.js";
|
|
100
102
|
export * from "./ToolUseContent.js";
|
|
101
103
|
export * from "./UpdateWorkspaceDisclaimerIn.js";
|
|
104
|
+
export * from "./UpdateWorkspaceToolRegistryToolIn.js";
|
|
102
105
|
export * from "./UserInfoOut.js";
|
|
103
106
|
export * from "./WorkspaceAccessResponseOut.js";
|
|
104
107
|
export * from "./WorkspaceConfigurationResponseOut.js";
|
|
105
108
|
export * from "./WorkspaceDisclaimerOut.js";
|
|
106
109
|
export * from "./WorkspaceInfoOut.js";
|
|
107
110
|
export * from "./WorkspaceShareAccess.js";
|
|
111
|
+
export * from "./WorkspaceToolRegistryResponseOut.js";
|
|
112
|
+
export * from "./WorkspaceToolRegistryToolOut.js";
|
|
108
113
|
export * from "./WrapStrategy.js";
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./AopConfigUpdateResponseOut.js"), exports);
|
|
|
21
21
|
__exportStar(require("./AopCreateResponseOut.js"), exports);
|
|
22
22
|
__exportStar(require("./AopExecuteRequestIn.js"), exports);
|
|
23
23
|
__exportStar(require("./AopExecuteResponseOut.js"), exports);
|
|
24
|
+
__exportStar(require("./ApprovalMode.js"), exports);
|
|
24
25
|
__exportStar(require("./ArchiveAssetResponseOut.js"), exports);
|
|
25
26
|
__exportStar(require("./AssetCapabilitiesResponseOut.js"), exports);
|
|
26
27
|
__exportStar(require("./AssetComment.js"), exports);
|
|
@@ -55,6 +56,7 @@ __exportStar(require("./DatabaseTableSchemaResponse.js"), exports);
|
|
|
55
56
|
__exportStar(require("./DatabaseTablesResponse.js"), exports);
|
|
56
57
|
__exportStar(require("./DataFrameRequestOut.js"), exports);
|
|
57
58
|
__exportStar(require("./DataFrameUnknownFormatError.js"), exports);
|
|
59
|
+
__exportStar(require("./DefaultVisibility.js"), exports);
|
|
58
60
|
__exportStar(require("./DeleteDataRequest.js"), exports);
|
|
59
61
|
__exportStar(require("./DeployComputerResponseOut.js"), exports);
|
|
60
62
|
__exportStar(require("./DimensionProperties.js"), exports);
|
|
@@ -115,10 +117,13 @@ __exportStar(require("./ThreadStopResponseOut.js"), exports);
|
|
|
115
117
|
__exportStar(require("./ToolResultContent.js"), exports);
|
|
116
118
|
__exportStar(require("./ToolUseContent.js"), exports);
|
|
117
119
|
__exportStar(require("./UpdateWorkspaceDisclaimerIn.js"), exports);
|
|
120
|
+
__exportStar(require("./UpdateWorkspaceToolRegistryToolIn.js"), exports);
|
|
118
121
|
__exportStar(require("./UserInfoOut.js"), exports);
|
|
119
122
|
__exportStar(require("./WorkspaceAccessResponseOut.js"), exports);
|
|
120
123
|
__exportStar(require("./WorkspaceConfigurationResponseOut.js"), exports);
|
|
121
124
|
__exportStar(require("./WorkspaceDisclaimerOut.js"), exports);
|
|
122
125
|
__exportStar(require("./WorkspaceInfoOut.js"), exports);
|
|
123
126
|
__exportStar(require("./WorkspaceShareAccess.js"), exports);
|
|
127
|
+
__exportStar(require("./WorkspaceToolRegistryResponseOut.js"), exports);
|
|
128
|
+
__exportStar(require("./WorkspaceToolRegistryToolOut.js"), exports);
|
|
124
129
|
__exportStar(require("./WrapStrategy.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.1939";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "4.3.
|
|
10
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
9
|
+
"X-Fern-SDK-Version": "4.3.1939",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.1939",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -45,4 +45,44 @@ export declare class WorkspacesClient {
|
|
|
45
45
|
*/
|
|
46
46
|
updateConfiguration(request: AthenaIntelligence.UpdateWorkspaceConfigurationRequestIn, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceConfigurationResponseOut>;
|
|
47
47
|
private __updateConfiguration;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve the persisted per-workspace Tool Registry policy. The response contains explicit tool overrides; environment feature flags, billing restrictions, and disabled tags may further restrict effective availability. Requires workspace owner or admin permissions.
|
|
50
|
+
*
|
|
51
|
+
* @param {AthenaIntelligence.GetToolRegistryWorkspacesRequest} request
|
|
52
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
55
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
56
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
57
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.workspaces.getToolRegistry({
|
|
61
|
+
* workspace_id: "workspace_id"
|
|
62
|
+
* })
|
|
63
|
+
*/
|
|
64
|
+
getToolRegistry(request: AthenaIntelligence.GetToolRegistryWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceToolRegistryResponseOut>;
|
|
65
|
+
private __getToolRegistry;
|
|
66
|
+
/**
|
|
67
|
+
* Update the default visibility or one per-tool override for a workspace. Requests are partial and idempotent, making this endpoint suitable for configuration automation across many workspaces. Base tools cannot be disabled. Requires workspace owner or admin permissions.
|
|
68
|
+
*
|
|
69
|
+
* @param {AthenaIntelligence.UpdateWorkspaceToolRegistryRequestIn} request
|
|
70
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
73
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
74
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
75
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.workspaces.updateToolRegistry({
|
|
79
|
+
* workspace_id: "workspace_id",
|
|
80
|
+
* tool: {
|
|
81
|
+
* enabled: false,
|
|
82
|
+
* tool_id: "search"
|
|
83
|
+
* }
|
|
84
|
+
* })
|
|
85
|
+
*/
|
|
86
|
+
updateToolRegistry(request: AthenaIntelligence.UpdateWorkspaceToolRegistryRequestIn, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceToolRegistryResponseOut>;
|
|
87
|
+
private __updateToolRegistry;
|
|
48
88
|
}
|
|
@@ -190,4 +190,175 @@ export class WorkspacesClient {
|
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Retrieve the persisted per-workspace Tool Registry policy. The response contains explicit tool overrides; environment feature flags, billing restrictions, and disabled tags may further restrict effective availability. Requires workspace owner or admin permissions.
|
|
195
|
+
*
|
|
196
|
+
* @param {AthenaIntelligence.GetToolRegistryWorkspacesRequest} request
|
|
197
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
198
|
+
*
|
|
199
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
200
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
201
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
202
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* await client.workspaces.getToolRegistry({
|
|
206
|
+
* workspace_id: "workspace_id"
|
|
207
|
+
* })
|
|
208
|
+
*/
|
|
209
|
+
getToolRegistry(request, requestOptions) {
|
|
210
|
+
return core.HttpResponsePromise.fromPromise(this.__getToolRegistry(request, requestOptions));
|
|
211
|
+
}
|
|
212
|
+
__getToolRegistry(request, requestOptions) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
215
|
+
const { workspace_id: workspaceId } = request;
|
|
216
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
217
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
218
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
219
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/workspaces/${core.url.encodePathParam(workspaceId)}/tool-registry`),
|
|
220
|
+
method: "GET",
|
|
221
|
+
headers: _headers,
|
|
222
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
223
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
224
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
225
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
226
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
227
|
+
logging: this._options.logging,
|
|
228
|
+
});
|
|
229
|
+
if (_response.ok) {
|
|
230
|
+
return {
|
|
231
|
+
data: _response.body,
|
|
232
|
+
rawResponse: _response.rawResponse,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
if (_response.error.reason === "status-code") {
|
|
236
|
+
switch (_response.error.statusCode) {
|
|
237
|
+
case 400:
|
|
238
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
239
|
+
case 403:
|
|
240
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
241
|
+
case 404:
|
|
242
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
243
|
+
case 422:
|
|
244
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
245
|
+
default:
|
|
246
|
+
throw new errors.AthenaIntelligenceError({
|
|
247
|
+
statusCode: _response.error.statusCode,
|
|
248
|
+
body: _response.error.body,
|
|
249
|
+
rawResponse: _response.rawResponse,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
switch (_response.error.reason) {
|
|
254
|
+
case "non-json":
|
|
255
|
+
throw new errors.AthenaIntelligenceError({
|
|
256
|
+
statusCode: _response.error.statusCode,
|
|
257
|
+
body: _response.error.rawBody,
|
|
258
|
+
rawResponse: _response.rawResponse,
|
|
259
|
+
});
|
|
260
|
+
case "body-is-null":
|
|
261
|
+
throw new errors.AthenaIntelligenceError({
|
|
262
|
+
statusCode: _response.error.statusCode,
|
|
263
|
+
rawResponse: _response.rawResponse,
|
|
264
|
+
});
|
|
265
|
+
case "timeout":
|
|
266
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/tool-registry.");
|
|
267
|
+
case "unknown":
|
|
268
|
+
throw new errors.AthenaIntelligenceError({
|
|
269
|
+
message: _response.error.errorMessage,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Update the default visibility or one per-tool override for a workspace. Requests are partial and idempotent, making this endpoint suitable for configuration automation across many workspaces. Base tools cannot be disabled. Requires workspace owner or admin permissions.
|
|
277
|
+
*
|
|
278
|
+
* @param {AthenaIntelligence.UpdateWorkspaceToolRegistryRequestIn} request
|
|
279
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
280
|
+
*
|
|
281
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
282
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
283
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
284
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* await client.workspaces.updateToolRegistry({
|
|
288
|
+
* workspace_id: "workspace_id",
|
|
289
|
+
* tool: {
|
|
290
|
+
* enabled: false,
|
|
291
|
+
* tool_id: "search"
|
|
292
|
+
* }
|
|
293
|
+
* })
|
|
294
|
+
*/
|
|
295
|
+
updateToolRegistry(request, requestOptions) {
|
|
296
|
+
return core.HttpResponsePromise.fromPromise(this.__updateToolRegistry(request, requestOptions));
|
|
297
|
+
}
|
|
298
|
+
__updateToolRegistry(request, requestOptions) {
|
|
299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
301
|
+
const { workspace_id: workspaceId } = request, _body = __rest(request, ["workspace_id"]);
|
|
302
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
303
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
304
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
305
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/workspaces/${core.url.encodePathParam(workspaceId)}/tool-registry`),
|
|
306
|
+
method: "PATCH",
|
|
307
|
+
headers: _headers,
|
|
308
|
+
contentType: "application/json",
|
|
309
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
310
|
+
requestType: "json",
|
|
311
|
+
body: _body,
|
|
312
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
313
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
314
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
315
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
316
|
+
logging: this._options.logging,
|
|
317
|
+
});
|
|
318
|
+
if (_response.ok) {
|
|
319
|
+
return {
|
|
320
|
+
data: _response.body,
|
|
321
|
+
rawResponse: _response.rawResponse,
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
if (_response.error.reason === "status-code") {
|
|
325
|
+
switch (_response.error.statusCode) {
|
|
326
|
+
case 400:
|
|
327
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
328
|
+
case 403:
|
|
329
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
330
|
+
case 404:
|
|
331
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
332
|
+
case 422:
|
|
333
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
334
|
+
default:
|
|
335
|
+
throw new errors.AthenaIntelligenceError({
|
|
336
|
+
statusCode: _response.error.statusCode,
|
|
337
|
+
body: _response.error.body,
|
|
338
|
+
rawResponse: _response.rawResponse,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
switch (_response.error.reason) {
|
|
343
|
+
case "non-json":
|
|
344
|
+
throw new errors.AthenaIntelligenceError({
|
|
345
|
+
statusCode: _response.error.statusCode,
|
|
346
|
+
body: _response.error.rawBody,
|
|
347
|
+
rawResponse: _response.rawResponse,
|
|
348
|
+
});
|
|
349
|
+
case "body-is-null":
|
|
350
|
+
throw new errors.AthenaIntelligenceError({
|
|
351
|
+
statusCode: _response.error.statusCode,
|
|
352
|
+
rawResponse: _response.rawResponse,
|
|
353
|
+
});
|
|
354
|
+
case "timeout":
|
|
355
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling PATCH /api/v0/workspaces/{workspace_id}/tool-registry.");
|
|
356
|
+
case "unknown":
|
|
357
|
+
throw new errors.AthenaIntelligenceError({
|
|
358
|
+
message: _response.error.errorMessage,
|
|
359
|
+
rawResponse: _response.rawResponse,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
}
|
|
193
364
|
}
|
package/dist/esm/api/resources/workspaces/client/requests/UpdateWorkspaceToolRegistryRequestIn.d.mts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* workspace_id: "workspace_id",
|
|
6
|
+
* tool: {
|
|
7
|
+
* enabled: false,
|
|
8
|
+
* tool_id: "search"
|
|
9
|
+
* }
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface UpdateWorkspaceToolRegistryRequestIn {
|
|
13
|
+
workspace_id: string;
|
|
14
|
+
/** Default visibility for tools without an explicit override */
|
|
15
|
+
default_visibility?: AthenaIntelligence.DefaultVisibility | null;
|
|
16
|
+
/** An optional update to one tool override */
|
|
17
|
+
tool?: AthenaIntelligence.UpdateWorkspaceToolRegistryToolIn | null;
|
|
18
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export type { GetConfigurationWorkspacesRequest } from "./GetConfigurationWorkspacesRequest.mjs";
|
|
2
|
+
export type { GetToolRegistryWorkspacesRequest } from "./GetToolRegistryWorkspacesRequest.mjs";
|
|
2
3
|
export type { UpdateWorkspaceConfigurationRequestIn } from "./UpdateWorkspaceConfigurationRequestIn.mjs";
|
|
4
|
+
export type { UpdateWorkspaceToolRegistryRequestIn } from "./UpdateWorkspaceToolRegistryRequestIn.mjs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Approval requirement modes for tools. */
|
|
2
|
+
export declare const ApprovalMode: {
|
|
3
|
+
readonly NoApproval: "no_approval";
|
|
4
|
+
readonly RequiredWithOverride: "required_with_override";
|
|
5
|
+
readonly RequiredNoOverride: "required_no_override";
|
|
6
|
+
};
|
|
7
|
+
export type ApprovalMode = (typeof ApprovalMode)[keyof typeof ApprovalMode];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
/** Approval requirement modes for tools. */
|
|
3
|
+
export const ApprovalMode = {
|
|
4
|
+
NoApproval: "no_approval",
|
|
5
|
+
RequiredWithOverride: "required_with_override",
|
|
6
|
+
RequiredNoOverride: "required_no_override",
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A partial update to one workspace tool override.
|
|
4
|
+
*/
|
|
5
|
+
export interface UpdateWorkspaceToolRegistryToolIn {
|
|
6
|
+
/** Approval policy for the tool */
|
|
7
|
+
approval_mode?: AthenaIntelligence.ApprovalMode | null;
|
|
8
|
+
/** Whether to enable the tool */
|
|
9
|
+
enabled?: boolean | null;
|
|
10
|
+
/** The canonical tool identifier */
|
|
11
|
+
tool_id: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Persisted Tool Registry policy for a workspace.
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkspaceToolRegistryResponseOut {
|
|
6
|
+
/** Default visibility for tools without an explicit override */
|
|
7
|
+
default_visibility: AthenaIntelligence.DefaultVisibility;
|
|
8
|
+
/** Persisted per-tool overrides, sorted by tool ID */
|
|
9
|
+
tools: AthenaIntelligence.WorkspaceToolRegistryToolOut[];
|
|
10
|
+
/** The workspace ID */
|
|
11
|
+
workspace_id: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A persisted per-tool override in a workspace Tool Registry.
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkspaceToolRegistryToolOut {
|
|
6
|
+
/** The approval policy applied to the tool */
|
|
7
|
+
approval_mode: AthenaIntelligence.ApprovalMode;
|
|
8
|
+
/** Whether the tool is enabled */
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/** The canonical tool identifier */
|
|
11
|
+
tool_id: string;
|
|
12
|
+
}
|
|
@@ -5,6 +5,7 @@ export * from "./AopConfigUpdateResponseOut.mjs";
|
|
|
5
5
|
export * from "./AopCreateResponseOut.mjs";
|
|
6
6
|
export * from "./AopExecuteRequestIn.mjs";
|
|
7
7
|
export * from "./AopExecuteResponseOut.mjs";
|
|
8
|
+
export * from "./ApprovalMode.mjs";
|
|
8
9
|
export * from "./ArchiveAssetResponseOut.mjs";
|
|
9
10
|
export * from "./AssetCapabilitiesResponseOut.mjs";
|
|
10
11
|
export * from "./AssetComment.mjs";
|
|
@@ -39,6 +40,7 @@ export * from "./DatabaseTableSchemaResponse.mjs";
|
|
|
39
40
|
export * from "./DatabaseTablesResponse.mjs";
|
|
40
41
|
export * from "./DataFrameRequestOut.mjs";
|
|
41
42
|
export * from "./DataFrameUnknownFormatError.mjs";
|
|
43
|
+
export * from "./DefaultVisibility.mjs";
|
|
42
44
|
export * from "./DeleteDataRequest.mjs";
|
|
43
45
|
export * from "./DeployComputerResponseOut.mjs";
|
|
44
46
|
export * from "./DimensionProperties.mjs";
|
|
@@ -99,10 +101,13 @@ export * from "./ThreadStopResponseOut.mjs";
|
|
|
99
101
|
export * from "./ToolResultContent.mjs";
|
|
100
102
|
export * from "./ToolUseContent.mjs";
|
|
101
103
|
export * from "./UpdateWorkspaceDisclaimerIn.mjs";
|
|
104
|
+
export * from "./UpdateWorkspaceToolRegistryToolIn.mjs";
|
|
102
105
|
export * from "./UserInfoOut.mjs";
|
|
103
106
|
export * from "./WorkspaceAccessResponseOut.mjs";
|
|
104
107
|
export * from "./WorkspaceConfigurationResponseOut.mjs";
|
|
105
108
|
export * from "./WorkspaceDisclaimerOut.mjs";
|
|
106
109
|
export * from "./WorkspaceInfoOut.mjs";
|
|
107
110
|
export * from "./WorkspaceShareAccess.mjs";
|
|
111
|
+
export * from "./WorkspaceToolRegistryResponseOut.mjs";
|
|
112
|
+
export * from "./WorkspaceToolRegistryToolOut.mjs";
|
|
108
113
|
export * from "./WrapStrategy.mjs";
|
|
@@ -5,6 +5,7 @@ export * from "./AopConfigUpdateResponseOut.mjs";
|
|
|
5
5
|
export * from "./AopCreateResponseOut.mjs";
|
|
6
6
|
export * from "./AopExecuteRequestIn.mjs";
|
|
7
7
|
export * from "./AopExecuteResponseOut.mjs";
|
|
8
|
+
export * from "./ApprovalMode.mjs";
|
|
8
9
|
export * from "./ArchiveAssetResponseOut.mjs";
|
|
9
10
|
export * from "./AssetCapabilitiesResponseOut.mjs";
|
|
10
11
|
export * from "./AssetComment.mjs";
|
|
@@ -39,6 +40,7 @@ export * from "./DatabaseTableSchemaResponse.mjs";
|
|
|
39
40
|
export * from "./DatabaseTablesResponse.mjs";
|
|
40
41
|
export * from "./DataFrameRequestOut.mjs";
|
|
41
42
|
export * from "./DataFrameUnknownFormatError.mjs";
|
|
43
|
+
export * from "./DefaultVisibility.mjs";
|
|
42
44
|
export * from "./DeleteDataRequest.mjs";
|
|
43
45
|
export * from "./DeployComputerResponseOut.mjs";
|
|
44
46
|
export * from "./DimensionProperties.mjs";
|
|
@@ -99,10 +101,13 @@ export * from "./ThreadStopResponseOut.mjs";
|
|
|
99
101
|
export * from "./ToolResultContent.mjs";
|
|
100
102
|
export * from "./ToolUseContent.mjs";
|
|
101
103
|
export * from "./UpdateWorkspaceDisclaimerIn.mjs";
|
|
104
|
+
export * from "./UpdateWorkspaceToolRegistryToolIn.mjs";
|
|
102
105
|
export * from "./UserInfoOut.mjs";
|
|
103
106
|
export * from "./WorkspaceAccessResponseOut.mjs";
|
|
104
107
|
export * from "./WorkspaceConfigurationResponseOut.mjs";
|
|
105
108
|
export * from "./WorkspaceDisclaimerOut.mjs";
|
|
106
109
|
export * from "./WorkspaceInfoOut.mjs";
|
|
107
110
|
export * from "./WorkspaceShareAccess.mjs";
|
|
111
|
+
export * from "./WorkspaceToolRegistryResponseOut.mjs";
|
|
112
|
+
export * from "./WorkspaceToolRegistryToolOut.mjs";
|
|
108
113
|
export * from "./WrapStrategy.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.1939";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.1939";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -3563,6 +3563,140 @@ await client.workspaces.updateConfiguration({
|
|
|
3563
3563
|
</dl>
|
|
3564
3564
|
|
|
3565
3565
|
|
|
3566
|
+
</dd>
|
|
3567
|
+
</dl>
|
|
3568
|
+
</details>
|
|
3569
|
+
|
|
3570
|
+
<details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">getToolRegistry</a>({ ...params }) -> AthenaIntelligence.WorkspaceToolRegistryResponseOut</code></summary>
|
|
3571
|
+
<dl>
|
|
3572
|
+
<dd>
|
|
3573
|
+
|
|
3574
|
+
#### 📝 Description
|
|
3575
|
+
|
|
3576
|
+
<dl>
|
|
3577
|
+
<dd>
|
|
3578
|
+
|
|
3579
|
+
<dl>
|
|
3580
|
+
<dd>
|
|
3581
|
+
|
|
3582
|
+
Retrieve the persisted per-workspace Tool Registry policy. The response contains explicit tool overrides; environment feature flags, billing restrictions, and disabled tags may further restrict effective availability. Requires workspace owner or admin permissions.
|
|
3583
|
+
</dd>
|
|
3584
|
+
</dl>
|
|
3585
|
+
</dd>
|
|
3586
|
+
</dl>
|
|
3587
|
+
|
|
3588
|
+
#### 🔌 Usage
|
|
3589
|
+
|
|
3590
|
+
<dl>
|
|
3591
|
+
<dd>
|
|
3592
|
+
|
|
3593
|
+
<dl>
|
|
3594
|
+
<dd>
|
|
3595
|
+
|
|
3596
|
+
```typescript
|
|
3597
|
+
await client.workspaces.getToolRegistry({
|
|
3598
|
+
workspace_id: "workspace_id"
|
|
3599
|
+
});
|
|
3600
|
+
|
|
3601
|
+
```
|
|
3602
|
+
</dd>
|
|
3603
|
+
</dl>
|
|
3604
|
+
</dd>
|
|
3605
|
+
</dl>
|
|
3606
|
+
|
|
3607
|
+
#### ⚙️ Parameters
|
|
3608
|
+
|
|
3609
|
+
<dl>
|
|
3610
|
+
<dd>
|
|
3611
|
+
|
|
3612
|
+
<dl>
|
|
3613
|
+
<dd>
|
|
3614
|
+
|
|
3615
|
+
**request:** `AthenaIntelligence.GetToolRegistryWorkspacesRequest`
|
|
3616
|
+
|
|
3617
|
+
</dd>
|
|
3618
|
+
</dl>
|
|
3619
|
+
|
|
3620
|
+
<dl>
|
|
3621
|
+
<dd>
|
|
3622
|
+
|
|
3623
|
+
**requestOptions:** `WorkspacesClient.RequestOptions`
|
|
3624
|
+
|
|
3625
|
+
</dd>
|
|
3626
|
+
</dl>
|
|
3627
|
+
</dd>
|
|
3628
|
+
</dl>
|
|
3629
|
+
|
|
3630
|
+
|
|
3631
|
+
</dd>
|
|
3632
|
+
</dl>
|
|
3633
|
+
</details>
|
|
3634
|
+
|
|
3635
|
+
<details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">updateToolRegistry</a>({ ...params }) -> AthenaIntelligence.WorkspaceToolRegistryResponseOut</code></summary>
|
|
3636
|
+
<dl>
|
|
3637
|
+
<dd>
|
|
3638
|
+
|
|
3639
|
+
#### 📝 Description
|
|
3640
|
+
|
|
3641
|
+
<dl>
|
|
3642
|
+
<dd>
|
|
3643
|
+
|
|
3644
|
+
<dl>
|
|
3645
|
+
<dd>
|
|
3646
|
+
|
|
3647
|
+
Update the default visibility or one per-tool override for a workspace. Requests are partial and idempotent, making this endpoint suitable for configuration automation across many workspaces. Base tools cannot be disabled. Requires workspace owner or admin permissions.
|
|
3648
|
+
</dd>
|
|
3649
|
+
</dl>
|
|
3650
|
+
</dd>
|
|
3651
|
+
</dl>
|
|
3652
|
+
|
|
3653
|
+
#### 🔌 Usage
|
|
3654
|
+
|
|
3655
|
+
<dl>
|
|
3656
|
+
<dd>
|
|
3657
|
+
|
|
3658
|
+
<dl>
|
|
3659
|
+
<dd>
|
|
3660
|
+
|
|
3661
|
+
```typescript
|
|
3662
|
+
await client.workspaces.updateToolRegistry({
|
|
3663
|
+
workspace_id: "workspace_id",
|
|
3664
|
+
tool: {
|
|
3665
|
+
enabled: false,
|
|
3666
|
+
tool_id: "search"
|
|
3667
|
+
}
|
|
3668
|
+
});
|
|
3669
|
+
|
|
3670
|
+
```
|
|
3671
|
+
</dd>
|
|
3672
|
+
</dl>
|
|
3673
|
+
</dd>
|
|
3674
|
+
</dl>
|
|
3675
|
+
|
|
3676
|
+
#### ⚙️ Parameters
|
|
3677
|
+
|
|
3678
|
+
<dl>
|
|
3679
|
+
<dd>
|
|
3680
|
+
|
|
3681
|
+
<dl>
|
|
3682
|
+
<dd>
|
|
3683
|
+
|
|
3684
|
+
**request:** `AthenaIntelligence.UpdateWorkspaceToolRegistryRequestIn`
|
|
3685
|
+
|
|
3686
|
+
</dd>
|
|
3687
|
+
</dl>
|
|
3688
|
+
|
|
3689
|
+
<dl>
|
|
3690
|
+
<dd>
|
|
3691
|
+
|
|
3692
|
+
**requestOptions:** `WorkspacesClient.RequestOptions`
|
|
3693
|
+
|
|
3694
|
+
</dd>
|
|
3695
|
+
</dl>
|
|
3696
|
+
</dd>
|
|
3697
|
+
</dl>
|
|
3698
|
+
|
|
3699
|
+
|
|
3566
3700
|
</dd>
|
|
3567
3701
|
</dl>
|
|
3568
3702
|
</details>
|