@athenaintel/sdk 4.3.2240 → 4.3.2242
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 +23 -2
- package/dist/cjs/api/resources/assets/client/Client.js +94 -2
- package/dist/cjs/api/resources/assets/client/requests/ConvertExcelToSheetRequestIn.d.ts +3 -0
- package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +5 -1
- package/dist/cjs/api/resources/assets/client/requests/PublishAssetRequestIn.d.ts +15 -0
- package/dist/cjs/api/resources/assets/client/requests/PublishAssetRequestIn.js +3 -0
- package/dist/cjs/api/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/ConvertExcelToSheetResponseOut.d.ts +2 -2
- package/dist/cjs/api/types/CreatableAssetType.d.ts +2 -0
- package/dist/cjs/api/types/CreatableAssetType.js +2 -0
- package/dist/cjs/api/types/PublicCollabAgentConfigIn.d.ts +19 -0
- package/dist/cjs/api/types/PublicCollabAgentConfigIn.js +3 -0
- package/dist/cjs/api/types/PublicSkillConfigIn.d.ts +19 -0
- package/dist/cjs/api/types/PublicSkillConfigIn.js +3 -0
- package/dist/cjs/api/types/PublishAssetResponseOut.d.ts +13 -0
- package/dist/cjs/api/types/PublishAssetResponseOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -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 +23 -2
- package/dist/esm/api/resources/assets/client/Client.mjs +94 -2
- package/dist/esm/api/resources/assets/client/requests/ConvertExcelToSheetRequestIn.d.mts +3 -0
- package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +5 -1
- package/dist/esm/api/resources/assets/client/requests/PublishAssetRequestIn.d.mts +15 -0
- package/dist/esm/api/resources/assets/client/requests/PublishAssetRequestIn.mjs +2 -0
- package/dist/esm/api/resources/assets/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/ConvertExcelToSheetResponseOut.d.mts +2 -2
- package/dist/esm/api/types/CreatableAssetType.d.mts +2 -0
- package/dist/esm/api/types/CreatableAssetType.mjs +2 -0
- package/dist/esm/api/types/PublicCollabAgentConfigIn.d.mts +19 -0
- package/dist/esm/api/types/PublicCollabAgentConfigIn.mjs +2 -0
- package/dist/esm/api/types/PublicSkillConfigIn.d.mts +19 -0
- package/dist/esm/api/types/PublicSkillConfigIn.mjs +2 -0
- package/dist/esm/api/types/PublishAssetResponseOut.d.mts +13 -0
- package/dist/esm/api/types/PublishAssetResponseOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +69 -2
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.2242",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.2242",
|
|
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,
|
|
@@ -28,7 +28,7 @@ export declare class AssetsClient {
|
|
|
28
28
|
list(request?: AthenaIntelligence.ListAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PaginatedAssetsOut>;
|
|
29
29
|
private __list;
|
|
30
30
|
/**
|
|
31
|
-
* Convert an uploaded Excel (.xlsx) asset into
|
|
31
|
+
* Convert an uploaded Excel (.xlsx) asset into an editable Athena sheet — the same conversion the Athena UI performs. By default a new sheet asset is created alongside the source Excel asset; pass run_async for large workbooks to get the sheet immediately and poll its athena_metadata.conversionStatus for completion. With in_place the uploaded file itself becomes the sheet and keeps its asset id (sheet_asset_id is excel_asset_id, and no second asset is created); poll that asset until its media_type is 'athena/spreadsheet', or until athena_metadata.sheet_upload_conversion.status is 'failed' or 'skipped'.
|
|
32
32
|
*
|
|
33
33
|
* @param {AthenaIntelligence.ConvertExcelToSheetRequestIn} request
|
|
34
34
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -38,17 +38,19 @@ export declare class AssetsClient {
|
|
|
38
38
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
39
39
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
40
40
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
41
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
41
42
|
*
|
|
42
43
|
* @example
|
|
43
44
|
* await client.assets.convertExcelToSheet({
|
|
44
45
|
* excel_asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
46
|
+
* in_place: false,
|
|
45
47
|
* run_async: false
|
|
46
48
|
* })
|
|
47
49
|
*/
|
|
48
50
|
convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
|
|
49
51
|
private __convertExcelToSheet;
|
|
50
52
|
/**
|
|
51
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, 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.
|
|
53
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, 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.
|
|
52
54
|
*
|
|
53
55
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
54
56
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -280,6 +282,25 @@ export declare class AssetsClient {
|
|
|
280
282
|
*/
|
|
281
283
|
move(request: AthenaIntelligence.MoveAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.MoveAssetResponseOut>;
|
|
282
284
|
private __move;
|
|
285
|
+
/**
|
|
286
|
+
* Publish a skill or collab agent so it is live for everyone who uses it. Omit version_id to snapshot and publish the current draft, or pass an existing version to promote it. Requires edit access to the asset.
|
|
287
|
+
*
|
|
288
|
+
* @param {AthenaIntelligence.PublishAssetRequestIn} request
|
|
289
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
290
|
+
*
|
|
291
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
292
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
293
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
294
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* await client.assets.publish({
|
|
298
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
299
|
+
* note: "First release"
|
|
300
|
+
* })
|
|
301
|
+
*/
|
|
302
|
+
publish(request: AthenaIntelligence.PublishAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PublishAssetResponseOut>;
|
|
303
|
+
private __publish;
|
|
283
304
|
/**
|
|
284
305
|
* Share an asset with specific users by email. Only users who have edit access to the asset can share it. You can share with individual users (granting 'view' or 'edit' permission). Sharing with a user who does not have an account will result in an error for that recipient, but other recipients will still be processed.
|
|
285
306
|
*
|
|
@@ -158,7 +158,7 @@ class AssetsClient {
|
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
|
-
* Convert an uploaded Excel (.xlsx) asset into
|
|
161
|
+
* Convert an uploaded Excel (.xlsx) asset into an editable Athena sheet — the same conversion the Athena UI performs. By default a new sheet asset is created alongside the source Excel asset; pass run_async for large workbooks to get the sheet immediately and poll its athena_metadata.conversionStatus for completion. With in_place the uploaded file itself becomes the sheet and keeps its asset id (sheet_asset_id is excel_asset_id, and no second asset is created); poll that asset until its media_type is 'athena/spreadsheet', or until athena_metadata.sheet_upload_conversion.status is 'failed' or 'skipped'.
|
|
162
162
|
*
|
|
163
163
|
* @param {AthenaIntelligence.ConvertExcelToSheetRequestIn} request
|
|
164
164
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -168,10 +168,12 @@ class AssetsClient {
|
|
|
168
168
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
169
169
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
170
170
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
171
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
171
172
|
*
|
|
172
173
|
* @example
|
|
173
174
|
* await client.assets.convertExcelToSheet({
|
|
174
175
|
* excel_asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
176
|
+
* in_place: false,
|
|
175
177
|
* run_async: false
|
|
176
178
|
* })
|
|
177
179
|
*/
|
|
@@ -217,6 +219,8 @@ class AssetsClient {
|
|
|
217
219
|
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
218
220
|
case 500:
|
|
219
221
|
throw new AthenaIntelligence.InternalServerError(_response.error.body, _response.rawResponse);
|
|
222
|
+
case 503:
|
|
223
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
220
224
|
default:
|
|
221
225
|
throw new errors.AthenaIntelligenceError({
|
|
222
226
|
statusCode: _response.error.statusCode,
|
|
@@ -248,7 +252,7 @@ class AssetsClient {
|
|
|
248
252
|
});
|
|
249
253
|
}
|
|
250
254
|
/**
|
|
251
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, 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.
|
|
255
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, 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.
|
|
252
256
|
*
|
|
253
257
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
254
258
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1302,6 +1306,94 @@ class AssetsClient {
|
|
|
1302
1306
|
}
|
|
1303
1307
|
});
|
|
1304
1308
|
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Publish a skill or collab agent so it is live for everyone who uses it. Omit version_id to snapshot and publish the current draft, or pass an existing version to promote it. Requires edit access to the asset.
|
|
1311
|
+
*
|
|
1312
|
+
* @param {AthenaIntelligence.PublishAssetRequestIn} request
|
|
1313
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1314
|
+
*
|
|
1315
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1316
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1317
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1318
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1319
|
+
*
|
|
1320
|
+
* @example
|
|
1321
|
+
* await client.assets.publish({
|
|
1322
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
1323
|
+
* note: "First release"
|
|
1324
|
+
* })
|
|
1325
|
+
*/
|
|
1326
|
+
publish(request, requestOptions) {
|
|
1327
|
+
return core.HttpResponsePromise.fromPromise(this.__publish(request, requestOptions));
|
|
1328
|
+
}
|
|
1329
|
+
__publish(request, requestOptions) {
|
|
1330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1331
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1332
|
+
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1333
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1334
|
+
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)({
|
|
1335
|
+
"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,
|
|
1336
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1337
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1338
|
+
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/${core.url.encodePathParam(assetId)}/publish`),
|
|
1339
|
+
method: "POST",
|
|
1340
|
+
headers: _headers,
|
|
1341
|
+
contentType: "application/json",
|
|
1342
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1343
|
+
requestType: "json",
|
|
1344
|
+
body: _body,
|
|
1345
|
+
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,
|
|
1346
|
+
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,
|
|
1347
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1348
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1349
|
+
logging: this._options.logging,
|
|
1350
|
+
});
|
|
1351
|
+
if (_response.ok) {
|
|
1352
|
+
return {
|
|
1353
|
+
data: _response.body,
|
|
1354
|
+
rawResponse: _response.rawResponse,
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
if (_response.error.reason === "status-code") {
|
|
1358
|
+
switch (_response.error.statusCode) {
|
|
1359
|
+
case 400:
|
|
1360
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1361
|
+
case 403:
|
|
1362
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1363
|
+
case 404:
|
|
1364
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1365
|
+
case 422:
|
|
1366
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1367
|
+
default:
|
|
1368
|
+
throw new errors.AthenaIntelligenceError({
|
|
1369
|
+
statusCode: _response.error.statusCode,
|
|
1370
|
+
body: _response.error.body,
|
|
1371
|
+
rawResponse: _response.rawResponse,
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
switch (_response.error.reason) {
|
|
1376
|
+
case "non-json":
|
|
1377
|
+
throw new errors.AthenaIntelligenceError({
|
|
1378
|
+
statusCode: _response.error.statusCode,
|
|
1379
|
+
body: _response.error.rawBody,
|
|
1380
|
+
rawResponse: _response.rawResponse,
|
|
1381
|
+
});
|
|
1382
|
+
case "body-is-null":
|
|
1383
|
+
throw new errors.AthenaIntelligenceError({
|
|
1384
|
+
statusCode: _response.error.statusCode,
|
|
1385
|
+
rawResponse: _response.rawResponse,
|
|
1386
|
+
});
|
|
1387
|
+
case "timeout":
|
|
1388
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/{asset_id}/publish.");
|
|
1389
|
+
case "unknown":
|
|
1390
|
+
throw new errors.AthenaIntelligenceError({
|
|
1391
|
+
message: _response.error.errorMessage,
|
|
1392
|
+
rawResponse: _response.rawResponse,
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1305
1397
|
/**
|
|
1306
1398
|
* Share an asset with specific users by email. Only users who have edit access to the asset can share it. You can share with individual users (granting 'view' or 'edit' permission). Sharing with a user who does not have an account will result in an error for that recipient, but other recipients will still be processed.
|
|
1307
1399
|
*
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* excel_asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
5
|
+
* in_place: false,
|
|
5
6
|
* run_async: false
|
|
6
7
|
* }
|
|
7
8
|
*/
|
|
8
9
|
export interface ConvertExcelToSheetRequestIn {
|
|
9
10
|
/** ID of the Excel (.xlsx) asset to convert into an Athena sheet */
|
|
10
11
|
excel_asset_id: string;
|
|
12
|
+
/** Make the uploaded file itself the Athena sheet, keeping its asset id: sheet_asset_id is excel_asset_id and no second asset is created. Needs edit access to the upload, and takes an .xlsx/.xlsm/.xlsb workbook or a .csv/.tsv file. A password-protected workbook is refused (convert it into a new sheet with `password` instead), and the sheet is always on the rnc engine. Without run_async the request waits up to about 50 seconds for the conversion; conversion_status 'converting' means it is still running. Poll the asset until its media_type is 'athena/spreadsheet', or until athena_metadata.sheet_upload_conversion.status is 'failed' or 'skipped' (with its reason). */
|
|
13
|
+
in_place?: boolean;
|
|
11
14
|
/** Optional password used to decrypt a password-protected workbook. Password-protected workbooks convert on either engine (they are decrypted server-side before an rnc import). */
|
|
12
15
|
password?: string | null;
|
|
13
16
|
/** Return the sheet asset immediately and convert in the background. Large workbooks outlive the gateway's ~60s response window on the synchronous path — with run_async the caller polls athena_metadata.conversionStatus ('converting' | 'completed' | 'failed', with conversionError on failure) instead. */
|
|
@@ -8,7 +8,9 @@ import type * as AthenaIntelligence from "../../../../index.js";
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface CreateAssetRequestIn {
|
|
11
|
-
/**
|
|
11
|
+
/** collab_agent only. Initial agent configuration. Created as a draft; publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
12
|
+
agent_config?: AthenaIntelligence.PublicCollabAgentConfigIn | null;
|
|
13
|
+
/** 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') */
|
|
12
14
|
asset_type: AthenaIntelligence.CreatableAssetType;
|
|
13
15
|
/** Computer only. vCPU count. Defaults to the template's default. Must be a size the environment's computer resource policy offers; sizes other than the template default require an admin. */
|
|
14
16
|
cpu?: number | null;
|
|
@@ -24,6 +26,8 @@ export interface CreateAssetRequestIn {
|
|
|
24
26
|
parent_folder_id?: string | null;
|
|
25
27
|
/** Computer only. Runtime provider for the computer (e.g. 'talos_v2'). Defaults to the environment's configured computer provider. */
|
|
26
28
|
provider?: string | null;
|
|
29
|
+
/** skill only. The skill's SKILL.md content. Created as a draft; publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
30
|
+
skill_config?: AthenaIntelligence.PublicSkillConfigIn | null;
|
|
27
31
|
/** Computer only. Template key to create the computer from, as picked in the Athena UI's computer creation dialog (e.g. 'default'), or an 'environment:<asset_id>' reference to a saved environment. Defaults to the default template. Also accepted as 'snapshot'. */
|
|
28
32
|
template?: string | null;
|
|
29
33
|
/** Title for the new asset */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
5
|
+
* note: "First release"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface PublishAssetRequestIn {
|
|
9
|
+
/** ID of the skill or collab agent to publish */
|
|
10
|
+
asset_id: string;
|
|
11
|
+
/** Optional release note shown in the publish history */
|
|
12
|
+
note?: string | null;
|
|
13
|
+
/** Existing version to promote to published. Omit to snapshot and publish the current draft. */
|
|
14
|
+
version_id?: string | null;
|
|
15
|
+
}
|
|
@@ -11,6 +11,7 @@ export type { GetAssetsRequest } from "./GetAssetsRequest.js";
|
|
|
11
11
|
export type { ListActivityAssetsRequest } from "./ListActivityAssetsRequest.js";
|
|
12
12
|
export type { ListAssetsRequest } from "./ListAssetsRequest.js";
|
|
13
13
|
export type { MoveAssetRequestIn } from "./MoveAssetRequestIn.js";
|
|
14
|
+
export type { PublishAssetRequestIn } from "./PublishAssetRequestIn.js";
|
|
14
15
|
export type { RenameAssetRequestIn } from "./RenameAssetRequestIn.js";
|
|
15
16
|
export type { ShareAssetRequestIn } from "./ShareAssetRequestIn.js";
|
|
16
17
|
export type { UpdateWorkspaceAccessRequestIn } from "./UpdateWorkspaceAccessRequestIn.js";
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
export interface ConvertExcelToSheetResponseOut {
|
|
5
5
|
/** Type of the created sheet asset */
|
|
6
6
|
asset_type: string;
|
|
7
|
-
/** Conversion status for background (run_async) conversions: 'converting' immediately after the request. Poll the asset's athena_metadata.conversionStatus for 'completed' | 'failed'. Null for synchronous conversions, which have already completed. */
|
|
7
|
+
/** Conversion status for background (run_async) conversions: 'converting' immediately after the request. Poll the asset's athena_metadata.conversionStatus for 'completed' | 'failed'. Null for synchronous conversions, which have already completed. An in_place conversion still running answers 'converting' too; see in_place for how to poll it. */
|
|
8
8
|
conversion_status?: string | null;
|
|
9
9
|
/** ID of the source Excel asset */
|
|
10
10
|
excel_asset_id: string;
|
|
11
11
|
/** ID of the sheet asset's parent folder */
|
|
12
12
|
parent_folder_id?: string | null;
|
|
13
|
-
/** ID of the
|
|
13
|
+
/** ID of the Athena sheet: a new asset, or excel_asset_id itself for an in_place conversion */
|
|
14
14
|
sheet_asset_id: string;
|
|
15
15
|
/** Title of the created sheet asset */
|
|
16
16
|
title: string;
|
|
@@ -7,5 +7,7 @@ export declare const CreatableAssetType: {
|
|
|
7
7
|
readonly Computer: "computer";
|
|
8
8
|
readonly GenericDoc: "generic_doc";
|
|
9
9
|
readonly UserInterface: "user_interface";
|
|
10
|
+
readonly Skill: "skill";
|
|
11
|
+
readonly CollabAgent: "collab_agent";
|
|
10
12
|
};
|
|
11
13
|
export type CreatableAssetType = (typeof CreatableAssetType)[keyof typeof CreatableAssetType];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initial configuration for a collab agent created via the public API.
|
|
3
|
+
*/
|
|
4
|
+
export interface PublicCollabAgentConfigIn {
|
|
5
|
+
/** What the agent does */
|
|
6
|
+
description?: string | null;
|
|
7
|
+
/** Model ID the agent runs on */
|
|
8
|
+
model?: string | null;
|
|
9
|
+
/** Agent name; also the asset title when title is omitted. */
|
|
10
|
+
name?: string | null;
|
|
11
|
+
/** Knowledge source references: native source IDs, or collab_source:<asset_id> to give the agent an asset as knowledge (e.g. collab_source:asset_123). Unrecognized entries are ignored. */
|
|
12
|
+
sources?: string[] | null;
|
|
13
|
+
/** Instructions the agent follows */
|
|
14
|
+
system_prompt?: string | null;
|
|
15
|
+
/** Toolkit IDs the agent can use */
|
|
16
|
+
toolkits?: string[] | null;
|
|
17
|
+
/** Tool IDs the agent can use */
|
|
18
|
+
tools?: string[] | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SKILL.md content for a skill created via the public API.
|
|
3
|
+
*/
|
|
4
|
+
export interface PublicSkillConfigIn {
|
|
5
|
+
/** Space-separated list of pre-approved tools (experimental) */
|
|
6
|
+
allowed_tools?: string | null;
|
|
7
|
+
/** The markdown instructions below the SKILL.md frontmatter */
|
|
8
|
+
body_markdown?: string;
|
|
9
|
+
/** Environment requirements (max 500 chars) */
|
|
10
|
+
compatibility?: string | null;
|
|
11
|
+
/** What the skill does and when to use it (max 1024 chars) */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** License name or reference */
|
|
14
|
+
license?: string | null;
|
|
15
|
+
/** Additional string metadata */
|
|
16
|
+
metadata?: Record<string, string | null> | null;
|
|
17
|
+
/** Skill name slug (lowercase letters, numbers, single hyphens; max 64 chars). Defaults to a slug of the asset title. */
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response model for publishing a skill or collab agent.
|
|
3
|
+
*/
|
|
4
|
+
export interface PublishAssetResponseOut {
|
|
5
|
+
/** ID of the published asset */
|
|
6
|
+
asset_id: string;
|
|
7
|
+
/** Type of the published asset */
|
|
8
|
+
asset_type: string;
|
|
9
|
+
/** Always true on success */
|
|
10
|
+
published: boolean;
|
|
11
|
+
/** Title of the published asset */
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
@@ -106,6 +106,9 @@ export * from "./PresenceSessionOut.js";
|
|
|
106
106
|
export * from "./PresenceTokenResponseOut.js";
|
|
107
107
|
export * from "./PromptMessage.js";
|
|
108
108
|
export * from "./PublicAssetOut.js";
|
|
109
|
+
export * from "./PublicCollabAgentConfigIn.js";
|
|
110
|
+
export * from "./PublicSkillConfigIn.js";
|
|
111
|
+
export * from "./PublishAssetResponseOut.js";
|
|
109
112
|
export * from "./ReadCapabilitiesOut.js";
|
|
110
113
|
export * from "./RedactedThinkingContent.js";
|
|
111
114
|
export * from "./RenameAssetResponseOut.js";
|
|
@@ -122,6 +122,9 @@ __exportStar(require("./PresenceSessionOut.js"), exports);
|
|
|
122
122
|
__exportStar(require("./PresenceTokenResponseOut.js"), exports);
|
|
123
123
|
__exportStar(require("./PromptMessage.js"), exports);
|
|
124
124
|
__exportStar(require("./PublicAssetOut.js"), exports);
|
|
125
|
+
__exportStar(require("./PublicCollabAgentConfigIn.js"), exports);
|
|
126
|
+
__exportStar(require("./PublicSkillConfigIn.js"), exports);
|
|
127
|
+
__exportStar(require("./PublishAssetResponseOut.js"), exports);
|
|
125
128
|
__exportStar(require("./ReadCapabilitiesOut.js"), exports);
|
|
126
129
|
__exportStar(require("./RedactedThinkingContent.js"), exports);
|
|
127
130
|
__exportStar(require("./RenameAssetResponseOut.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.2242";
|
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.2242",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.2242",
|
|
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,
|
|
@@ -28,7 +28,7 @@ export declare class AssetsClient {
|
|
|
28
28
|
list(request?: AthenaIntelligence.ListAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PaginatedAssetsOut>;
|
|
29
29
|
private __list;
|
|
30
30
|
/**
|
|
31
|
-
* Convert an uploaded Excel (.xlsx) asset into
|
|
31
|
+
* Convert an uploaded Excel (.xlsx) asset into an editable Athena sheet — the same conversion the Athena UI performs. By default a new sheet asset is created alongside the source Excel asset; pass run_async for large workbooks to get the sheet immediately and poll its athena_metadata.conversionStatus for completion. With in_place the uploaded file itself becomes the sheet and keeps its asset id (sheet_asset_id is excel_asset_id, and no second asset is created); poll that asset until its media_type is 'athena/spreadsheet', or until athena_metadata.sheet_upload_conversion.status is 'failed' or 'skipped'.
|
|
32
32
|
*
|
|
33
33
|
* @param {AthenaIntelligence.ConvertExcelToSheetRequestIn} request
|
|
34
34
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -38,17 +38,19 @@ export declare class AssetsClient {
|
|
|
38
38
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
39
39
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
40
40
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
41
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
41
42
|
*
|
|
42
43
|
* @example
|
|
43
44
|
* await client.assets.convertExcelToSheet({
|
|
44
45
|
* excel_asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
46
|
+
* in_place: false,
|
|
45
47
|
* run_async: false
|
|
46
48
|
* })
|
|
47
49
|
*/
|
|
48
50
|
convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
|
|
49
51
|
private __convertExcelToSheet;
|
|
50
52
|
/**
|
|
51
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, 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.
|
|
53
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, 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.
|
|
52
54
|
*
|
|
53
55
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
54
56
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -280,6 +282,25 @@ export declare class AssetsClient {
|
|
|
280
282
|
*/
|
|
281
283
|
move(request: AthenaIntelligence.MoveAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.MoveAssetResponseOut>;
|
|
282
284
|
private __move;
|
|
285
|
+
/**
|
|
286
|
+
* Publish a skill or collab agent so it is live for everyone who uses it. Omit version_id to snapshot and publish the current draft, or pass an existing version to promote it. Requires edit access to the asset.
|
|
287
|
+
*
|
|
288
|
+
* @param {AthenaIntelligence.PublishAssetRequestIn} request
|
|
289
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
290
|
+
*
|
|
291
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
292
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
293
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
294
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* await client.assets.publish({
|
|
298
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
299
|
+
* note: "First release"
|
|
300
|
+
* })
|
|
301
|
+
*/
|
|
302
|
+
publish(request: AthenaIntelligence.PublishAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PublishAssetResponseOut>;
|
|
303
|
+
private __publish;
|
|
283
304
|
/**
|
|
284
305
|
* Share an asset with specific users by email. Only users who have edit access to the asset can share it. You can share with individual users (granting 'view' or 'edit' permission). Sharing with a user who does not have an account will result in an error for that recipient, but other recipients will still be processed.
|
|
285
306
|
*
|
|
@@ -122,7 +122,7 @@ export class AssetsClient {
|
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
|
-
* Convert an uploaded Excel (.xlsx) asset into
|
|
125
|
+
* Convert an uploaded Excel (.xlsx) asset into an editable Athena sheet — the same conversion the Athena UI performs. By default a new sheet asset is created alongside the source Excel asset; pass run_async for large workbooks to get the sheet immediately and poll its athena_metadata.conversionStatus for completion. With in_place the uploaded file itself becomes the sheet and keeps its asset id (sheet_asset_id is excel_asset_id, and no second asset is created); poll that asset until its media_type is 'athena/spreadsheet', or until athena_metadata.sheet_upload_conversion.status is 'failed' or 'skipped'.
|
|
126
126
|
*
|
|
127
127
|
* @param {AthenaIntelligence.ConvertExcelToSheetRequestIn} request
|
|
128
128
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -132,10 +132,12 @@ export class AssetsClient {
|
|
|
132
132
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
133
133
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
134
134
|
* @throws {@link AthenaIntelligence.InternalServerError}
|
|
135
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
135
136
|
*
|
|
136
137
|
* @example
|
|
137
138
|
* await client.assets.convertExcelToSheet({
|
|
138
139
|
* excel_asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
140
|
+
* in_place: false,
|
|
139
141
|
* run_async: false
|
|
140
142
|
* })
|
|
141
143
|
*/
|
|
@@ -181,6 +183,8 @@ export class AssetsClient {
|
|
|
181
183
|
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
182
184
|
case 500:
|
|
183
185
|
throw new AthenaIntelligence.InternalServerError(_response.error.body, _response.rawResponse);
|
|
186
|
+
case 503:
|
|
187
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
184
188
|
default:
|
|
185
189
|
throw new errors.AthenaIntelligenceError({
|
|
186
190
|
statusCode: _response.error.statusCode,
|
|
@@ -212,7 +216,7 @@ export class AssetsClient {
|
|
|
212
216
|
});
|
|
213
217
|
}
|
|
214
218
|
/**
|
|
215
|
-
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, 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.
|
|
219
|
+
* Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, 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.
|
|
216
220
|
*
|
|
217
221
|
* @param {AthenaIntelligence.CreateAssetRequestIn} request
|
|
218
222
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1266,6 +1270,94 @@ export class AssetsClient {
|
|
|
1266
1270
|
}
|
|
1267
1271
|
});
|
|
1268
1272
|
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Publish a skill or collab agent so it is live for everyone who uses it. Omit version_id to snapshot and publish the current draft, or pass an existing version to promote it. Requires edit access to the asset.
|
|
1275
|
+
*
|
|
1276
|
+
* @param {AthenaIntelligence.PublishAssetRequestIn} request
|
|
1277
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1278
|
+
*
|
|
1279
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1280
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1281
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1282
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1283
|
+
*
|
|
1284
|
+
* @example
|
|
1285
|
+
* await client.assets.publish({
|
|
1286
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
1287
|
+
* note: "First release"
|
|
1288
|
+
* })
|
|
1289
|
+
*/
|
|
1290
|
+
publish(request, requestOptions) {
|
|
1291
|
+
return core.HttpResponsePromise.fromPromise(this.__publish(request, requestOptions));
|
|
1292
|
+
}
|
|
1293
|
+
__publish(request, requestOptions) {
|
|
1294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1296
|
+
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1297
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1298
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1299
|
+
"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,
|
|
1300
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1301
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1302
|
+
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/${core.url.encodePathParam(assetId)}/publish`),
|
|
1303
|
+
method: "POST",
|
|
1304
|
+
headers: _headers,
|
|
1305
|
+
contentType: "application/json",
|
|
1306
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1307
|
+
requestType: "json",
|
|
1308
|
+
body: _body,
|
|
1309
|
+
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,
|
|
1310
|
+
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,
|
|
1311
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1312
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1313
|
+
logging: this._options.logging,
|
|
1314
|
+
});
|
|
1315
|
+
if (_response.ok) {
|
|
1316
|
+
return {
|
|
1317
|
+
data: _response.body,
|
|
1318
|
+
rawResponse: _response.rawResponse,
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
if (_response.error.reason === "status-code") {
|
|
1322
|
+
switch (_response.error.statusCode) {
|
|
1323
|
+
case 400:
|
|
1324
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1325
|
+
case 403:
|
|
1326
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1327
|
+
case 404:
|
|
1328
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1329
|
+
case 422:
|
|
1330
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1331
|
+
default:
|
|
1332
|
+
throw new errors.AthenaIntelligenceError({
|
|
1333
|
+
statusCode: _response.error.statusCode,
|
|
1334
|
+
body: _response.error.body,
|
|
1335
|
+
rawResponse: _response.rawResponse,
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
switch (_response.error.reason) {
|
|
1340
|
+
case "non-json":
|
|
1341
|
+
throw new errors.AthenaIntelligenceError({
|
|
1342
|
+
statusCode: _response.error.statusCode,
|
|
1343
|
+
body: _response.error.rawBody,
|
|
1344
|
+
rawResponse: _response.rawResponse,
|
|
1345
|
+
});
|
|
1346
|
+
case "body-is-null":
|
|
1347
|
+
throw new errors.AthenaIntelligenceError({
|
|
1348
|
+
statusCode: _response.error.statusCode,
|
|
1349
|
+
rawResponse: _response.rawResponse,
|
|
1350
|
+
});
|
|
1351
|
+
case "timeout":
|
|
1352
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/assets/{asset_id}/publish.");
|
|
1353
|
+
case "unknown":
|
|
1354
|
+
throw new errors.AthenaIntelligenceError({
|
|
1355
|
+
message: _response.error.errorMessage,
|
|
1356
|
+
rawResponse: _response.rawResponse,
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1269
1361
|
/**
|
|
1270
1362
|
* Share an asset with specific users by email. Only users who have edit access to the asset can share it. You can share with individual users (granting 'view' or 'edit' permission). Sharing with a user who does not have an account will result in an error for that recipient, but other recipients will still be processed.
|
|
1271
1363
|
*
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* excel_asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
5
|
+
* in_place: false,
|
|
5
6
|
* run_async: false
|
|
6
7
|
* }
|
|
7
8
|
*/
|
|
8
9
|
export interface ConvertExcelToSheetRequestIn {
|
|
9
10
|
/** ID of the Excel (.xlsx) asset to convert into an Athena sheet */
|
|
10
11
|
excel_asset_id: string;
|
|
12
|
+
/** Make the uploaded file itself the Athena sheet, keeping its asset id: sheet_asset_id is excel_asset_id and no second asset is created. Needs edit access to the upload, and takes an .xlsx/.xlsm/.xlsb workbook or a .csv/.tsv file. A password-protected workbook is refused (convert it into a new sheet with `password` instead), and the sheet is always on the rnc engine. Without run_async the request waits up to about 50 seconds for the conversion; conversion_status 'converting' means it is still running. Poll the asset until its media_type is 'athena/spreadsheet', or until athena_metadata.sheet_upload_conversion.status is 'failed' or 'skipped' (with its reason). */
|
|
13
|
+
in_place?: boolean;
|
|
11
14
|
/** Optional password used to decrypt a password-protected workbook. Password-protected workbooks convert on either engine (they are decrypted server-side before an rnc import). */
|
|
12
15
|
password?: string | null;
|
|
13
16
|
/** Return the sheet asset immediately and convert in the background. Large workbooks outlive the gateway's ~60s response window on the synchronous path — with run_async the caller polls athena_metadata.conversionStatus ('converting' | 'completed' | 'failed', with conversionError on failure) instead. */
|
|
@@ -8,7 +8,9 @@ import type * as AthenaIntelligence from "../../../../index.mjs";
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface CreateAssetRequestIn {
|
|
11
|
-
/**
|
|
11
|
+
/** collab_agent only. Initial agent configuration. Created as a draft; publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
12
|
+
agent_config?: AthenaIntelligence.PublicCollabAgentConfigIn | null;
|
|
13
|
+
/** 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') */
|
|
12
14
|
asset_type: AthenaIntelligence.CreatableAssetType;
|
|
13
15
|
/** Computer only. vCPU count. Defaults to the template's default. Must be a size the environment's computer resource policy offers; sizes other than the template default require an admin. */
|
|
14
16
|
cpu?: number | null;
|
|
@@ -24,6 +26,8 @@ export interface CreateAssetRequestIn {
|
|
|
24
26
|
parent_folder_id?: string | null;
|
|
25
27
|
/** Computer only. Runtime provider for the computer (e.g. 'talos_v2'). Defaults to the environment's configured computer provider. */
|
|
26
28
|
provider?: string | null;
|
|
29
|
+
/** skill only. The skill's SKILL.md content. Created as a draft; publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
30
|
+
skill_config?: AthenaIntelligence.PublicSkillConfigIn | null;
|
|
27
31
|
/** Computer only. Template key to create the computer from, as picked in the Athena UI's computer creation dialog (e.g. 'default'), or an 'environment:<asset_id>' reference to a saved environment. Defaults to the default template. Also accepted as 'snapshot'. */
|
|
28
32
|
template?: string | null;
|
|
29
33
|
/** Title for the new asset */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
5
|
+
* note: "First release"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface PublishAssetRequestIn {
|
|
9
|
+
/** ID of the skill or collab agent to publish */
|
|
10
|
+
asset_id: string;
|
|
11
|
+
/** Optional release note shown in the publish history */
|
|
12
|
+
note?: string | null;
|
|
13
|
+
/** Existing version to promote to published. Omit to snapshot and publish the current draft. */
|
|
14
|
+
version_id?: string | null;
|
|
15
|
+
}
|
|
@@ -11,6 +11,7 @@ export type { GetAssetsRequest } from "./GetAssetsRequest.mjs";
|
|
|
11
11
|
export type { ListActivityAssetsRequest } from "./ListActivityAssetsRequest.mjs";
|
|
12
12
|
export type { ListAssetsRequest } from "./ListAssetsRequest.mjs";
|
|
13
13
|
export type { MoveAssetRequestIn } from "./MoveAssetRequestIn.mjs";
|
|
14
|
+
export type { PublishAssetRequestIn } from "./PublishAssetRequestIn.mjs";
|
|
14
15
|
export type { RenameAssetRequestIn } from "./RenameAssetRequestIn.mjs";
|
|
15
16
|
export type { ShareAssetRequestIn } from "./ShareAssetRequestIn.mjs";
|
|
16
17
|
export type { UpdateWorkspaceAccessRequestIn } from "./UpdateWorkspaceAccessRequestIn.mjs";
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
export interface ConvertExcelToSheetResponseOut {
|
|
5
5
|
/** Type of the created sheet asset */
|
|
6
6
|
asset_type: string;
|
|
7
|
-
/** Conversion status for background (run_async) conversions: 'converting' immediately after the request. Poll the asset's athena_metadata.conversionStatus for 'completed' | 'failed'. Null for synchronous conversions, which have already completed. */
|
|
7
|
+
/** Conversion status for background (run_async) conversions: 'converting' immediately after the request. Poll the asset's athena_metadata.conversionStatus for 'completed' | 'failed'. Null for synchronous conversions, which have already completed. An in_place conversion still running answers 'converting' too; see in_place for how to poll it. */
|
|
8
8
|
conversion_status?: string | null;
|
|
9
9
|
/** ID of the source Excel asset */
|
|
10
10
|
excel_asset_id: string;
|
|
11
11
|
/** ID of the sheet asset's parent folder */
|
|
12
12
|
parent_folder_id?: string | null;
|
|
13
|
-
/** ID of the
|
|
13
|
+
/** ID of the Athena sheet: a new asset, or excel_asset_id itself for an in_place conversion */
|
|
14
14
|
sheet_asset_id: string;
|
|
15
15
|
/** Title of the created sheet asset */
|
|
16
16
|
title: string;
|
|
@@ -7,5 +7,7 @@ export declare const CreatableAssetType: {
|
|
|
7
7
|
readonly Computer: "computer";
|
|
8
8
|
readonly GenericDoc: "generic_doc";
|
|
9
9
|
readonly UserInterface: "user_interface";
|
|
10
|
+
readonly Skill: "skill";
|
|
11
|
+
readonly CollabAgent: "collab_agent";
|
|
10
12
|
};
|
|
11
13
|
export type CreatableAssetType = (typeof CreatableAssetType)[keyof typeof CreatableAssetType];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initial configuration for a collab agent created via the public API.
|
|
3
|
+
*/
|
|
4
|
+
export interface PublicCollabAgentConfigIn {
|
|
5
|
+
/** What the agent does */
|
|
6
|
+
description?: string | null;
|
|
7
|
+
/** Model ID the agent runs on */
|
|
8
|
+
model?: string | null;
|
|
9
|
+
/** Agent name; also the asset title when title is omitted. */
|
|
10
|
+
name?: string | null;
|
|
11
|
+
/** Knowledge source references: native source IDs, or collab_source:<asset_id> to give the agent an asset as knowledge (e.g. collab_source:asset_123). Unrecognized entries are ignored. */
|
|
12
|
+
sources?: string[] | null;
|
|
13
|
+
/** Instructions the agent follows */
|
|
14
|
+
system_prompt?: string | null;
|
|
15
|
+
/** Toolkit IDs the agent can use */
|
|
16
|
+
toolkits?: string[] | null;
|
|
17
|
+
/** Tool IDs the agent can use */
|
|
18
|
+
tools?: string[] | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SKILL.md content for a skill created via the public API.
|
|
3
|
+
*/
|
|
4
|
+
export interface PublicSkillConfigIn {
|
|
5
|
+
/** Space-separated list of pre-approved tools (experimental) */
|
|
6
|
+
allowed_tools?: string | null;
|
|
7
|
+
/** The markdown instructions below the SKILL.md frontmatter */
|
|
8
|
+
body_markdown?: string;
|
|
9
|
+
/** Environment requirements (max 500 chars) */
|
|
10
|
+
compatibility?: string | null;
|
|
11
|
+
/** What the skill does and when to use it (max 1024 chars) */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** License name or reference */
|
|
14
|
+
license?: string | null;
|
|
15
|
+
/** Additional string metadata */
|
|
16
|
+
metadata?: Record<string, string | null> | null;
|
|
17
|
+
/** Skill name slug (lowercase letters, numbers, single hyphens; max 64 chars). Defaults to a slug of the asset title. */
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response model for publishing a skill or collab agent.
|
|
3
|
+
*/
|
|
4
|
+
export interface PublishAssetResponseOut {
|
|
5
|
+
/** ID of the published asset */
|
|
6
|
+
asset_id: string;
|
|
7
|
+
/** Type of the published asset */
|
|
8
|
+
asset_type: string;
|
|
9
|
+
/** Always true on success */
|
|
10
|
+
published: boolean;
|
|
11
|
+
/** Title of the published asset */
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
@@ -106,6 +106,9 @@ export * from "./PresenceSessionOut.mjs";
|
|
|
106
106
|
export * from "./PresenceTokenResponseOut.mjs";
|
|
107
107
|
export * from "./PromptMessage.mjs";
|
|
108
108
|
export * from "./PublicAssetOut.mjs";
|
|
109
|
+
export * from "./PublicCollabAgentConfigIn.mjs";
|
|
110
|
+
export * from "./PublicSkillConfigIn.mjs";
|
|
111
|
+
export * from "./PublishAssetResponseOut.mjs";
|
|
109
112
|
export * from "./ReadCapabilitiesOut.mjs";
|
|
110
113
|
export * from "./RedactedThinkingContent.mjs";
|
|
111
114
|
export * from "./RenameAssetResponseOut.mjs";
|
|
@@ -106,6 +106,9 @@ export * from "./PresenceSessionOut.mjs";
|
|
|
106
106
|
export * from "./PresenceTokenResponseOut.mjs";
|
|
107
107
|
export * from "./PromptMessage.mjs";
|
|
108
108
|
export * from "./PublicAssetOut.mjs";
|
|
109
|
+
export * from "./PublicCollabAgentConfigIn.mjs";
|
|
110
|
+
export * from "./PublicSkillConfigIn.mjs";
|
|
111
|
+
export * from "./PublishAssetResponseOut.mjs";
|
|
109
112
|
export * from "./ReadCapabilitiesOut.mjs";
|
|
110
113
|
export * from "./RedactedThinkingContent.mjs";
|
|
111
114
|
export * from "./RenameAssetResponseOut.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.2242";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.2242";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -581,7 +581,7 @@ await client.assets.list({
|
|
|
581
581
|
<dl>
|
|
582
582
|
<dd>
|
|
583
583
|
|
|
584
|
-
Convert an uploaded Excel (.xlsx) asset into
|
|
584
|
+
Convert an uploaded Excel (.xlsx) asset into an editable Athena sheet — the same conversion the Athena UI performs. By default a new sheet asset is created alongside the source Excel asset; pass run_async for large workbooks to get the sheet immediately and poll its athena_metadata.conversionStatus for completion. With in_place the uploaded file itself becomes the sheet and keeps its asset id (sheet_asset_id is excel_asset_id, and no second asset is created); poll that asset until its media_type is 'athena/spreadsheet', or until athena_metadata.sheet_upload_conversion.status is 'failed' or 'skipped'.
|
|
585
585
|
</dd>
|
|
586
586
|
</dl>
|
|
587
587
|
</dd>
|
|
@@ -598,6 +598,7 @@ Convert an uploaded Excel (.xlsx) asset into a new, editable Athena sheet asset
|
|
|
598
598
|
```typescript
|
|
599
599
|
await client.assets.convertExcelToSheet({
|
|
600
600
|
excel_asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
601
|
+
in_place: false,
|
|
601
602
|
run_async: false
|
|
602
603
|
});
|
|
603
604
|
|
|
@@ -647,7 +648,7 @@ await client.assets.convertExcelToSheet({
|
|
|
647
648
|
<dl>
|
|
648
649
|
<dd>
|
|
649
650
|
|
|
650
|
-
Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, 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.
|
|
651
|
+
Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, 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.
|
|
651
652
|
</dd>
|
|
652
653
|
</dl>
|
|
653
654
|
</dd>
|
|
@@ -1437,6 +1438,72 @@ await client.assets.move({
|
|
|
1437
1438
|
</dl>
|
|
1438
1439
|
|
|
1439
1440
|
|
|
1441
|
+
</dd>
|
|
1442
|
+
</dl>
|
|
1443
|
+
</details>
|
|
1444
|
+
|
|
1445
|
+
<details><summary><code>client.assets.<a href="/src/api/resources/assets/client/Client.ts">publish</a>({ ...params }) -> AthenaIntelligence.PublishAssetResponseOut</code></summary>
|
|
1446
|
+
<dl>
|
|
1447
|
+
<dd>
|
|
1448
|
+
|
|
1449
|
+
#### 📝 Description
|
|
1450
|
+
|
|
1451
|
+
<dl>
|
|
1452
|
+
<dd>
|
|
1453
|
+
|
|
1454
|
+
<dl>
|
|
1455
|
+
<dd>
|
|
1456
|
+
|
|
1457
|
+
Publish a skill or collab agent so it is live for everyone who uses it. Omit version_id to snapshot and publish the current draft, or pass an existing version to promote it. Requires edit access to the asset.
|
|
1458
|
+
</dd>
|
|
1459
|
+
</dl>
|
|
1460
|
+
</dd>
|
|
1461
|
+
</dl>
|
|
1462
|
+
|
|
1463
|
+
#### 🔌 Usage
|
|
1464
|
+
|
|
1465
|
+
<dl>
|
|
1466
|
+
<dd>
|
|
1467
|
+
|
|
1468
|
+
<dl>
|
|
1469
|
+
<dd>
|
|
1470
|
+
|
|
1471
|
+
```typescript
|
|
1472
|
+
await client.assets.publish({
|
|
1473
|
+
asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
1474
|
+
note: "First release"
|
|
1475
|
+
});
|
|
1476
|
+
|
|
1477
|
+
```
|
|
1478
|
+
</dd>
|
|
1479
|
+
</dl>
|
|
1480
|
+
</dd>
|
|
1481
|
+
</dl>
|
|
1482
|
+
|
|
1483
|
+
#### ⚙️ Parameters
|
|
1484
|
+
|
|
1485
|
+
<dl>
|
|
1486
|
+
<dd>
|
|
1487
|
+
|
|
1488
|
+
<dl>
|
|
1489
|
+
<dd>
|
|
1490
|
+
|
|
1491
|
+
**request:** `AthenaIntelligence.PublishAssetRequestIn`
|
|
1492
|
+
|
|
1493
|
+
</dd>
|
|
1494
|
+
</dl>
|
|
1495
|
+
|
|
1496
|
+
<dl>
|
|
1497
|
+
<dd>
|
|
1498
|
+
|
|
1499
|
+
**requestOptions:** `AssetsClient.RequestOptions`
|
|
1500
|
+
|
|
1501
|
+
</dd>
|
|
1502
|
+
</dl>
|
|
1503
|
+
</dd>
|
|
1504
|
+
</dl>
|
|
1505
|
+
|
|
1506
|
+
|
|
1440
1507
|
</dd>
|
|
1441
1508
|
</dl>
|
|
1442
1509
|
</details>
|