@athenaintel/sdk 4.3.2294 → 4.3.2296
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/assets/client/Client.d.ts +12 -1
- package/dist/cjs/api/resources/assets/client/Client.js +71 -2
- package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +2 -0
- package/dist/cjs/api/resources/assets/client/requests/UpdateAgentConfigRequestIn.d.ts +2 -0
- package/dist/cjs/api/types/CreateCapabilitiesResponseOut.d.ts +7 -0
- package/dist/cjs/api/types/CreateCapabilitiesResponseOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -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/assets/client/Client.d.mts +12 -1
- package/dist/esm/api/resources/assets/client/Client.mjs +71 -2
- package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +2 -0
- package/dist/esm/api/resources/assets/client/requests/UpdateAgentConfigRequestIn.d.mts +2 -0
- package/dist/esm/api/types/CreateCapabilitiesResponseOut.d.mts +7 -0
- package/dist/esm/api/types/CreateCapabilitiesResponseOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +56 -1
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.2296",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.2296",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
"X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
|
|
@@ -50,13 +50,14 @@ export declare class AssetsClient {
|
|
|
50
50
|
convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
|
|
51
51
|
private __convertExcelToSheet;
|
|
52
52
|
/**
|
|
53
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
|
|
53
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace. Send an `Idempotency-Key` header to make the create safe to retry: if the response is lost, repeating the identical request with the same key answers with the asset the first request created (with an `Idempotency-Replayed: true` header and its original status) instead of creating another. A key is private to you, the workspace the asset is created in and the asset type: another user, another workspace or another type with the same key creates its own asset. A retry that arrives while the first request is still creating gets 409 (`idempotency_key_in_progress`, with Retry-After); reusing a key with different parameters is rejected with 422; a key whose asset you can no longer open, or that is archived, gets 409 (`idempotency_key_reused`). Keys are kept for 24 hours. GET /api/v0/assets/create/capabilities names `create-idempotency-keys` once every server of this Athena honours them.
|
|
54
54
|
*
|
|
55
55
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
56
56
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
57
|
*
|
|
58
58
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
59
59
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
60
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
60
61
|
* @throws {@link AthenaIntelligence.GoneError}
|
|
61
62
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
62
63
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
@@ -93,6 +94,16 @@ export declare class AssetsClient {
|
|
|
93
94
|
*/
|
|
94
95
|
createFromFile(request: AthenaIntelligence.BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateAssetResponseOut>;
|
|
95
96
|
private __createFromFile;
|
|
97
|
+
/**
|
|
98
|
+
* What POST /api/v0/assets/create takes beyond its documented body, by capability name. `create-idempotency-keys`: every server of this Athena honours the create's Idempotency-Key, so a create whose answer was lost (a timeout, a dropped connection, a gateway's 502, 503 or 504) may be sent again with the same key and is answered with the asset the first request made. A server names nothing for 30 minutes after it starts, longer than a rollout takes, so a client never sends a create again while a server that would create a second asset can still receive it. The answer says what this Athena's code does, never anything about you or your data, and is never cached.
|
|
99
|
+
*
|
|
100
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* await client.assets.getCreateCapabilities()
|
|
104
|
+
*/
|
|
105
|
+
getCreateCapabilities(requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateCapabilitiesResponseOut>;
|
|
106
|
+
private __getCreateCapabilities;
|
|
96
107
|
/**
|
|
97
108
|
* Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
98
109
|
*
|
|
@@ -255,13 +255,14 @@ class AssetsClient {
|
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
257
|
/**
|
|
258
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
|
|
258
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace. Send an `Idempotency-Key` header to make the create safe to retry: if the response is lost, repeating the identical request with the same key answers with the asset the first request created (with an `Idempotency-Replayed: true` header and its original status) instead of creating another. A key is private to you, the workspace the asset is created in and the asset type: another user, another workspace or another type with the same key creates its own asset. A retry that arrives while the first request is still creating gets 409 (`idempotency_key_in_progress`, with Retry-After); reusing a key with different parameters is rejected with 422; a key whose asset you can no longer open, or that is archived, gets 409 (`idempotency_key_reused`). Keys are kept for 24 hours. GET /api/v0/assets/create/capabilities names `create-idempotency-keys` once every server of this Athena honours them.
|
|
259
259
|
*
|
|
260
260
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
261
261
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
262
262
|
*
|
|
263
263
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
264
264
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
265
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
265
266
|
* @throws {@link AthenaIntelligence.GoneError}
|
|
266
267
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
267
268
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
@@ -281,8 +282,10 @@ class AssetsClient {
|
|
|
281
282
|
__create(request, requestOptions) {
|
|
282
283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
283
284
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
285
|
+
const { "Idempotency-Key": idempotencyKey } = request, _body = __rest(request, ["Idempotency-Key"]);
|
|
284
286
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
285
287
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
288
|
+
"Idempotency-Key": idempotencyKey !== undefined ? idempotencyKey : undefined,
|
|
286
289
|
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
287
290
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
288
291
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
@@ -292,7 +295,7 @@ class AssetsClient {
|
|
|
292
295
|
contentType: "application/json",
|
|
293
296
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
294
297
|
requestType: "json",
|
|
295
|
-
body:
|
|
298
|
+
body: _body,
|
|
296
299
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
297
300
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
298
301
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -311,6 +314,8 @@ class AssetsClient {
|
|
|
311
314
|
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
312
315
|
case 403:
|
|
313
316
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
317
|
+
case 409:
|
|
318
|
+
throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
|
|
314
319
|
case 410:
|
|
315
320
|
throw new AthenaIntelligence.GoneError(_response.error.body, _response.rawResponse);
|
|
316
321
|
case 422:
|
|
@@ -458,6 +463,70 @@ class AssetsClient {
|
|
|
458
463
|
}
|
|
459
464
|
});
|
|
460
465
|
}
|
|
466
|
+
/**
|
|
467
|
+
* What POST /api/v0/assets/create takes beyond its documented body, by capability name. `create-idempotency-keys`: every server of this Athena honours the create's Idempotency-Key, so a create whose answer was lost (a timeout, a dropped connection, a gateway's 502, 503 or 504) may be sent again with the same key and is answered with the asset the first request made. A server names nothing for 30 minutes after it starts, longer than a rollout takes, so a client never sends a create again while a server that would create a second asset can still receive it. The answer says what this Athena's code does, never anything about you or your data, and is never cached.
|
|
468
|
+
*
|
|
469
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
470
|
+
*
|
|
471
|
+
* @example
|
|
472
|
+
* await client.assets.getCreateCapabilities()
|
|
473
|
+
*/
|
|
474
|
+
getCreateCapabilities(requestOptions) {
|
|
475
|
+
return core.HttpResponsePromise.fromPromise(this.__getCreateCapabilities(requestOptions));
|
|
476
|
+
}
|
|
477
|
+
__getCreateCapabilities(requestOptions) {
|
|
478
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
479
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
480
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
481
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
482
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
483
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
484
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
485
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/assets/create/capabilities"),
|
|
486
|
+
method: "GET",
|
|
487
|
+
headers: _headers,
|
|
488
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
489
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
490
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
491
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
492
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
493
|
+
logging: this._options.logging,
|
|
494
|
+
});
|
|
495
|
+
if (_response.ok) {
|
|
496
|
+
return {
|
|
497
|
+
data: _response.body,
|
|
498
|
+
rawResponse: _response.rawResponse,
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
if (_response.error.reason === "status-code") {
|
|
502
|
+
throw new errors.AthenaIntelligenceError({
|
|
503
|
+
statusCode: _response.error.statusCode,
|
|
504
|
+
body: _response.error.body,
|
|
505
|
+
rawResponse: _response.rawResponse,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
switch (_response.error.reason) {
|
|
509
|
+
case "non-json":
|
|
510
|
+
throw new errors.AthenaIntelligenceError({
|
|
511
|
+
statusCode: _response.error.statusCode,
|
|
512
|
+
body: _response.error.rawBody,
|
|
513
|
+
rawResponse: _response.rawResponse,
|
|
514
|
+
});
|
|
515
|
+
case "body-is-null":
|
|
516
|
+
throw new errors.AthenaIntelligenceError({
|
|
517
|
+
statusCode: _response.error.statusCode,
|
|
518
|
+
rawResponse: _response.rawResponse,
|
|
519
|
+
});
|
|
520
|
+
case "timeout":
|
|
521
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/assets/create/capabilities.");
|
|
522
|
+
case "unknown":
|
|
523
|
+
throw new errors.AthenaIntelligenceError({
|
|
524
|
+
message: _response.error.errorMessage,
|
|
525
|
+
rawResponse: _response.rawResponse,
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}
|
|
461
530
|
/**
|
|
462
531
|
* Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
463
532
|
*
|
|
@@ -8,6 +8,8 @@ import type * as AthenaIntelligence from "../../../../index.js";
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface CreateAssetRequestIn {
|
|
11
|
+
/** Optional caller-chosen key that makes this create safe to retry. Repeating the identical request with the same key, as the same user in the same workspace, answers with the asset the first request created instead of creating another. */
|
|
12
|
+
"Idempotency-Key"?: string | null;
|
|
11
13
|
/** collab_agent only. Initial agent configuration. Created as a draft; publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
12
14
|
agent_config?: AthenaIntelligence.PublicCollabAgentConfigIn | null;
|
|
13
15
|
/** Type of asset to create. Supported types: 'spreadsheet' (or 'sheet'), 'document' (or 'doc'), 'folder', 'database' (or 'db'), 'computer', 'generic_doc', 'user_interface' (or 'ui'), 'skill', 'collab_agent' (or 'agent'), 'figure', 'word_document' (or 'word'), 'presentation' (or 'deck'). 'document' is Athena's rich-text document; a Word document is 'word_document'. */
|
|
@@ -78,6 +78,8 @@ export interface UpdateAgentConfigRequestIn {
|
|
|
78
78
|
system_prompt?: string | null;
|
|
79
79
|
/** Sampling temperature override */
|
|
80
80
|
temperature?: number | null;
|
|
81
|
+
/** Status lines Slack rotates while the agent works */
|
|
82
|
+
thinking_verbs?: string[] | null;
|
|
81
83
|
/** Toolkit IDs the agent can use; replaces the list */
|
|
82
84
|
toolkits?: string[] | null;
|
|
83
85
|
/** Tool IDs the agent can use; replaces the list */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What ``POST /api/v0/assets/create`` takes beyond its documented body.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateCapabilitiesResponseOut {
|
|
5
|
+
/** Capability names. `create-idempotency-keys`: every server of this Athena honours the create's Idempotency-Key, so a create whose answer was lost may be sent again with its key. A server names nothing for a while after it starts, until a rollout that replaces servers without it has had time to finish. */
|
|
6
|
+
capabilities: string[];
|
|
7
|
+
}
|
|
@@ -52,6 +52,7 @@ export * from "./ConvertExcelToSheetResponseOut.js";
|
|
|
52
52
|
export * from "./ConvertToUserInterfaceResponseOut.js";
|
|
53
53
|
export * from "./CreatableAssetType.js";
|
|
54
54
|
export * from "./CreateAssetResponseOut.js";
|
|
55
|
+
export * from "./CreateCapabilitiesResponseOut.js";
|
|
55
56
|
export * from "./CreateNewSheetTabResponse.js";
|
|
56
57
|
export * from "./CreateProjectResponseOut.js";
|
|
57
58
|
export * from "./DatabaseColumnInfo.js";
|
|
@@ -68,6 +68,7 @@ __exportStar(require("./ConvertExcelToSheetResponseOut.js"), exports);
|
|
|
68
68
|
__exportStar(require("./ConvertToUserInterfaceResponseOut.js"), exports);
|
|
69
69
|
__exportStar(require("./CreatableAssetType.js"), exports);
|
|
70
70
|
__exportStar(require("./CreateAssetResponseOut.js"), exports);
|
|
71
|
+
__exportStar(require("./CreateCapabilitiesResponseOut.js"), exports);
|
|
71
72
|
__exportStar(require("./CreateNewSheetTabResponse.js"), exports);
|
|
72
73
|
__exportStar(require("./CreateProjectResponseOut.js"), exports);
|
|
73
74
|
__exportStar(require("./DatabaseColumnInfo.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.2296";
|
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.2296",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.2296",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
"X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
|
|
@@ -50,13 +50,14 @@ export declare class AssetsClient {
|
|
|
50
50
|
convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
|
|
51
51
|
private __convertExcelToSheet;
|
|
52
52
|
/**
|
|
53
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
|
|
53
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace. Send an `Idempotency-Key` header to make the create safe to retry: if the response is lost, repeating the identical request with the same key answers with the asset the first request created (with an `Idempotency-Replayed: true` header and its original status) instead of creating another. A key is private to you, the workspace the asset is created in and the asset type: another user, another workspace or another type with the same key creates its own asset. A retry that arrives while the first request is still creating gets 409 (`idempotency_key_in_progress`, with Retry-After); reusing a key with different parameters is rejected with 422; a key whose asset you can no longer open, or that is archived, gets 409 (`idempotency_key_reused`). Keys are kept for 24 hours. GET /api/v0/assets/create/capabilities names `create-idempotency-keys` once every server of this Athena honours them.
|
|
54
54
|
*
|
|
55
55
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
56
56
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
57
|
*
|
|
58
58
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
59
59
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
60
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
60
61
|
* @throws {@link AthenaIntelligence.GoneError}
|
|
61
62
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
62
63
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
@@ -93,6 +94,16 @@ export declare class AssetsClient {
|
|
|
93
94
|
*/
|
|
94
95
|
createFromFile(request: AthenaIntelligence.BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateAssetResponseOut>;
|
|
95
96
|
private __createFromFile;
|
|
97
|
+
/**
|
|
98
|
+
* What POST /api/v0/assets/create takes beyond its documented body, by capability name. `create-idempotency-keys`: every server of this Athena honours the create's Idempotency-Key, so a create whose answer was lost (a timeout, a dropped connection, a gateway's 502, 503 or 504) may be sent again with the same key and is answered with the asset the first request made. A server names nothing for 30 minutes after it starts, longer than a rollout takes, so a client never sends a create again while a server that would create a second asset can still receive it. The answer says what this Athena's code does, never anything about you or your data, and is never cached.
|
|
99
|
+
*
|
|
100
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* await client.assets.getCreateCapabilities()
|
|
104
|
+
*/
|
|
105
|
+
getCreateCapabilities(requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateCapabilitiesResponseOut>;
|
|
106
|
+
private __getCreateCapabilities;
|
|
96
107
|
/**
|
|
97
108
|
* Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
98
109
|
*
|
|
@@ -219,13 +219,14 @@ export class AssetsClient {
|
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
|
|
222
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace. Send an `Idempotency-Key` header to make the create safe to retry: if the response is lost, repeating the identical request with the same key answers with the asset the first request created (with an `Idempotency-Replayed: true` header and its original status) instead of creating another. A key is private to you, the workspace the asset is created in and the asset type: another user, another workspace or another type with the same key creates its own asset. A retry that arrives while the first request is still creating gets 409 (`idempotency_key_in_progress`, with Retry-After); reusing a key with different parameters is rejected with 422; a key whose asset you can no longer open, or that is archived, gets 409 (`idempotency_key_reused`). Keys are kept for 24 hours. GET /api/v0/assets/create/capabilities names `create-idempotency-keys` once every server of this Athena honours them.
|
|
223
223
|
*
|
|
224
224
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
225
225
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
226
226
|
*
|
|
227
227
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
228
228
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
229
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
229
230
|
* @throws {@link AthenaIntelligence.GoneError}
|
|
230
231
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
231
232
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
@@ -245,8 +246,10 @@ export class AssetsClient {
|
|
|
245
246
|
__create(request, requestOptions) {
|
|
246
247
|
return __awaiter(this, void 0, void 0, function* () {
|
|
247
248
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
249
|
+
const { "Idempotency-Key": idempotencyKey } = request, _body = __rest(request, ["Idempotency-Key"]);
|
|
248
250
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
249
251
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
252
|
+
"Idempotency-Key": idempotencyKey !== undefined ? idempotencyKey : undefined,
|
|
250
253
|
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
251
254
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
252
255
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
@@ -256,7 +259,7 @@ export class AssetsClient {
|
|
|
256
259
|
contentType: "application/json",
|
|
257
260
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
258
261
|
requestType: "json",
|
|
259
|
-
body:
|
|
262
|
+
body: _body,
|
|
260
263
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
261
264
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
262
265
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -275,6 +278,8 @@ export class AssetsClient {
|
|
|
275
278
|
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
276
279
|
case 403:
|
|
277
280
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
281
|
+
case 409:
|
|
282
|
+
throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
|
|
278
283
|
case 410:
|
|
279
284
|
throw new AthenaIntelligence.GoneError(_response.error.body, _response.rawResponse);
|
|
280
285
|
case 422:
|
|
@@ -422,6 +427,70 @@ export class AssetsClient {
|
|
|
422
427
|
}
|
|
423
428
|
});
|
|
424
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* What POST /api/v0/assets/create takes beyond its documented body, by capability name. `create-idempotency-keys`: every server of this Athena honours the create's Idempotency-Key, so a create whose answer was lost (a timeout, a dropped connection, a gateway's 502, 503 or 504) may be sent again with the same key and is answered with the asset the first request made. A server names nothing for 30 minutes after it starts, longer than a rollout takes, so a client never sends a create again while a server that would create a second asset can still receive it. The answer says what this Athena's code does, never anything about you or your data, and is never cached.
|
|
432
|
+
*
|
|
433
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* await client.assets.getCreateCapabilities()
|
|
437
|
+
*/
|
|
438
|
+
getCreateCapabilities(requestOptions) {
|
|
439
|
+
return core.HttpResponsePromise.fromPromise(this.__getCreateCapabilities(requestOptions));
|
|
440
|
+
}
|
|
441
|
+
__getCreateCapabilities(requestOptions) {
|
|
442
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
443
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
444
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
445
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
446
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
447
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
448
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
449
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/assets/create/capabilities"),
|
|
450
|
+
method: "GET",
|
|
451
|
+
headers: _headers,
|
|
452
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
453
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
454
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
455
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
456
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
457
|
+
logging: this._options.logging,
|
|
458
|
+
});
|
|
459
|
+
if (_response.ok) {
|
|
460
|
+
return {
|
|
461
|
+
data: _response.body,
|
|
462
|
+
rawResponse: _response.rawResponse,
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
if (_response.error.reason === "status-code") {
|
|
466
|
+
throw new errors.AthenaIntelligenceError({
|
|
467
|
+
statusCode: _response.error.statusCode,
|
|
468
|
+
body: _response.error.body,
|
|
469
|
+
rawResponse: _response.rawResponse,
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
switch (_response.error.reason) {
|
|
473
|
+
case "non-json":
|
|
474
|
+
throw new errors.AthenaIntelligenceError({
|
|
475
|
+
statusCode: _response.error.statusCode,
|
|
476
|
+
body: _response.error.rawBody,
|
|
477
|
+
rawResponse: _response.rawResponse,
|
|
478
|
+
});
|
|
479
|
+
case "body-is-null":
|
|
480
|
+
throw new errors.AthenaIntelligenceError({
|
|
481
|
+
statusCode: _response.error.statusCode,
|
|
482
|
+
rawResponse: _response.rawResponse,
|
|
483
|
+
});
|
|
484
|
+
case "timeout":
|
|
485
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/assets/create/capabilities.");
|
|
486
|
+
case "unknown":
|
|
487
|
+
throw new errors.AthenaIntelligenceError({
|
|
488
|
+
message: _response.error.errorMessage,
|
|
489
|
+
rawResponse: _response.rawResponse,
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
}
|
|
425
494
|
/**
|
|
426
495
|
* Create a new project with custom metadata. Projects can be typed (e.g., 'candidate', 'user', 'company') and include flexible custom metadata for storing additional information.
|
|
427
496
|
*
|
|
@@ -8,6 +8,8 @@ import type * as AthenaIntelligence from "../../../../index.mjs";
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface CreateAssetRequestIn {
|
|
11
|
+
/** Optional caller-chosen key that makes this create safe to retry. Repeating the identical request with the same key, as the same user in the same workspace, answers with the asset the first request created instead of creating another. */
|
|
12
|
+
"Idempotency-Key"?: string | null;
|
|
11
13
|
/** collab_agent only. Initial agent configuration. Created as a draft; publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
12
14
|
agent_config?: AthenaIntelligence.PublicCollabAgentConfigIn | null;
|
|
13
15
|
/** Type of asset to create. Supported types: 'spreadsheet' (or 'sheet'), 'document' (or 'doc'), 'folder', 'database' (or 'db'), 'computer', 'generic_doc', 'user_interface' (or 'ui'), 'skill', 'collab_agent' (or 'agent'), 'figure', 'word_document' (or 'word'), 'presentation' (or 'deck'). 'document' is Athena's rich-text document; a Word document is 'word_document'. */
|
|
@@ -78,6 +78,8 @@ export interface UpdateAgentConfigRequestIn {
|
|
|
78
78
|
system_prompt?: string | null;
|
|
79
79
|
/** Sampling temperature override */
|
|
80
80
|
temperature?: number | null;
|
|
81
|
+
/** Status lines Slack rotates while the agent works */
|
|
82
|
+
thinking_verbs?: string[] | null;
|
|
81
83
|
/** Toolkit IDs the agent can use; replaces the list */
|
|
82
84
|
toolkits?: string[] | null;
|
|
83
85
|
/** Tool IDs the agent can use; replaces the list */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What ``POST /api/v0/assets/create`` takes beyond its documented body.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateCapabilitiesResponseOut {
|
|
5
|
+
/** Capability names. `create-idempotency-keys`: every server of this Athena honours the create's Idempotency-Key, so a create whose answer was lost may be sent again with its key. A server names nothing for a while after it starts, until a rollout that replaces servers without it has had time to finish. */
|
|
6
|
+
capabilities: string[];
|
|
7
|
+
}
|
|
@@ -52,6 +52,7 @@ export * from "./ConvertExcelToSheetResponseOut.mjs";
|
|
|
52
52
|
export * from "./ConvertToUserInterfaceResponseOut.mjs";
|
|
53
53
|
export * from "./CreatableAssetType.mjs";
|
|
54
54
|
export * from "./CreateAssetResponseOut.mjs";
|
|
55
|
+
export * from "./CreateCapabilitiesResponseOut.mjs";
|
|
55
56
|
export * from "./CreateNewSheetTabResponse.mjs";
|
|
56
57
|
export * from "./CreateProjectResponseOut.mjs";
|
|
57
58
|
export * from "./DatabaseColumnInfo.mjs";
|
|
@@ -52,6 +52,7 @@ export * from "./ConvertExcelToSheetResponseOut.mjs";
|
|
|
52
52
|
export * from "./ConvertToUserInterfaceResponseOut.mjs";
|
|
53
53
|
export * from "./CreatableAssetType.mjs";
|
|
54
54
|
export * from "./CreateAssetResponseOut.mjs";
|
|
55
|
+
export * from "./CreateCapabilitiesResponseOut.mjs";
|
|
55
56
|
export * from "./CreateNewSheetTabResponse.mjs";
|
|
56
57
|
export * from "./CreateProjectResponseOut.mjs";
|
|
57
58
|
export * from "./DatabaseColumnInfo.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.2296";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.2296";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -648,7 +648,7 @@ await client.assets.convertExcelToSheet({
|
|
|
648
648
|
<dl>
|
|
649
649
|
<dd>
|
|
650
650
|
|
|
651
|
-
Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
|
|
651
|
+
Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, figure, Word document, presentation, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Figures take figure_config, a FigureSpec (kind, rendered and provenance, plus spec or chart), validated as the Athena UI's figures are. A word_document is a Word document holding Athena's default template, and a presentation is a blank widescreen PPTX Studio deck (the workspace's default template is not applied): Athena creates each with its own studio credential, as your write, and answers once the studio has seeded it (502, keeping nothing, when PPTX Studio could not seed a deck). Edit them through DOCX Studio or PPTX Studio with a token from POST /api/v0/assets/{asset_id}/studio-token. From an agent run (a verified X-Athena-Session-Credential), their first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace. Send an `Idempotency-Key` header to make the create safe to retry: if the response is lost, repeating the identical request with the same key answers with the asset the first request created (with an `Idempotency-Replayed: true` header and its original status) instead of creating another. A key is private to you, the workspace the asset is created in and the asset type: another user, another workspace or another type with the same key creates its own asset. A retry that arrives while the first request is still creating gets 409 (`idempotency_key_in_progress`, with Retry-After); reusing a key with different parameters is rejected with 422; a key whose asset you can no longer open, or that is archived, gets 409 (`idempotency_key_reused`). Keys are kept for 24 hours. GET /api/v0/assets/create/capabilities names `create-idempotency-keys` once every server of this Athena honours them.
|
|
652
652
|
</dd>
|
|
653
653
|
</dl>
|
|
654
654
|
</dd>
|
|
@@ -764,6 +764,61 @@ await client.assets.createFromFile({
|
|
|
764
764
|
</dl>
|
|
765
765
|
|
|
766
766
|
|
|
767
|
+
</dd>
|
|
768
|
+
</dl>
|
|
769
|
+
</details>
|
|
770
|
+
|
|
771
|
+
<details><summary><code>client.assets.<a href="/src/api/resources/assets/client/Client.ts">getCreateCapabilities</a>() -> AthenaIntelligence.CreateCapabilitiesResponseOut</code></summary>
|
|
772
|
+
<dl>
|
|
773
|
+
<dd>
|
|
774
|
+
|
|
775
|
+
#### 📝 Description
|
|
776
|
+
|
|
777
|
+
<dl>
|
|
778
|
+
<dd>
|
|
779
|
+
|
|
780
|
+
<dl>
|
|
781
|
+
<dd>
|
|
782
|
+
|
|
783
|
+
What POST /api/v0/assets/create takes beyond its documented body, by capability name. `create-idempotency-keys`: every server of this Athena honours the create's Idempotency-Key, so a create whose answer was lost (a timeout, a dropped connection, a gateway's 502, 503 or 504) may be sent again with the same key and is answered with the asset the first request made. A server names nothing for 30 minutes after it starts, longer than a rollout takes, so a client never sends a create again while a server that would create a second asset can still receive it. The answer says what this Athena's code does, never anything about you or your data, and is never cached.
|
|
784
|
+
</dd>
|
|
785
|
+
</dl>
|
|
786
|
+
</dd>
|
|
787
|
+
</dl>
|
|
788
|
+
|
|
789
|
+
#### 🔌 Usage
|
|
790
|
+
|
|
791
|
+
<dl>
|
|
792
|
+
<dd>
|
|
793
|
+
|
|
794
|
+
<dl>
|
|
795
|
+
<dd>
|
|
796
|
+
|
|
797
|
+
```typescript
|
|
798
|
+
await client.assets.getCreateCapabilities();
|
|
799
|
+
|
|
800
|
+
```
|
|
801
|
+
</dd>
|
|
802
|
+
</dl>
|
|
803
|
+
</dd>
|
|
804
|
+
</dl>
|
|
805
|
+
|
|
806
|
+
#### ⚙️ Parameters
|
|
807
|
+
|
|
808
|
+
<dl>
|
|
809
|
+
<dd>
|
|
810
|
+
|
|
811
|
+
<dl>
|
|
812
|
+
<dd>
|
|
813
|
+
|
|
814
|
+
**requestOptions:** `AssetsClient.RequestOptions`
|
|
815
|
+
|
|
816
|
+
</dd>
|
|
817
|
+
</dl>
|
|
818
|
+
</dd>
|
|
819
|
+
</dl>
|
|
820
|
+
|
|
821
|
+
|
|
767
822
|
</dd>
|
|
768
823
|
</dl>
|
|
769
824
|
</details>
|