@athenaintel/sdk 4.3.2296 → 4.3.2298
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 +4 -2
- package/dist/cjs/api/resources/assets/client/Client.js +12 -3
- package/dist/cjs/api/resources/assets/client/requests/BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost.d.ts +1 -1
- package/dist/cjs/api/resources/assets/client/requests/DownloadAssetsRequest.d.ts +3 -1
- 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 +4 -2
- package/dist/esm/api/resources/assets/client/Client.mjs +12 -3
- package/dist/esm/api/resources/assets/client/requests/BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost.d.mts +1 -1
- package/dist/esm/api/resources/assets/client/requests/DownloadAssetsRequest.d.mts +3 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +2 -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.2298",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.2298",
|
|
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,
|
|
@@ -74,7 +74,7 @@ export declare class AssetsClient {
|
|
|
74
74
|
create(request: AthenaIntelligence.CreateAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateAssetResponseOut>;
|
|
75
75
|
private __create;
|
|
76
76
|
/**
|
|
77
|
-
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). Nothing is left behind when the import fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run,
|
|
77
|
+
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). A Markdown (.md, .markdown) or plain-text (.txt, .text) file becomes an Athena document, its Markdown rendered (headings, lists, tables, links) and plain text one paragraph per line, and an HTML (.html, .htm) file becomes a user interface: Athena stores the file and converts it in place in the request, as the app's Convert to does, so the original upload stays downloadable from the new asset's Versions pane. A Markdown or text file may be up to 2 MiB and an HTML file up to 5 MiB. Nothing is left behind when the import or conversion fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run, a presentation takes the create_presentation_pptx_studio tool policy and a user interface the create_new_user_interface tool policy.
|
|
78
78
|
*
|
|
79
79
|
* @param {AthenaIntelligence.BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost} request
|
|
80
80
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -82,9 +82,11 @@ export declare class AssetsClient {
|
|
|
82
82
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
83
83
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
84
84
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
85
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
85
86
|
* @throws {@link AthenaIntelligence.ContentTooLargeError}
|
|
86
87
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
87
88
|
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
89
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
88
90
|
*
|
|
89
91
|
* @example
|
|
90
92
|
* import { createReadStream } from "fs";
|
|
@@ -349,7 +351,7 @@ export declare class AssetsClient {
|
|
|
349
351
|
convertToUserInterface(request: AthenaIntelligence.ConvertToUserInterfaceAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertToUserInterfaceResponseOut>;
|
|
350
352
|
private __convertToUserInterface;
|
|
351
353
|
/**
|
|
352
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
354
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag. A Word document's live-sync copy requires EDIT. With `read_only=true`, a Word document downloads as a plain .docx that Word offers to open read-only (Read-only recommended) and that carries no live-sync link; it requires VIEW, like every download, and cannot be combined with `live_sync`.
|
|
353
355
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
354
356
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
355
357
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -357,7 +357,7 @@ class AssetsClient {
|
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
/**
|
|
360
|
-
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). Nothing is left behind when the import fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run,
|
|
360
|
+
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). A Markdown (.md, .markdown) or plain-text (.txt, .text) file becomes an Athena document, its Markdown rendered (headings, lists, tables, links) and plain text one paragraph per line, and an HTML (.html, .htm) file becomes a user interface: Athena stores the file and converts it in place in the request, as the app's Convert to does, so the original upload stays downloadable from the new asset's Versions pane. A Markdown or text file may be up to 2 MiB and an HTML file up to 5 MiB. Nothing is left behind when the import or conversion fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run, a presentation takes the create_presentation_pptx_studio tool policy and a user interface the create_new_user_interface tool policy.
|
|
361
361
|
*
|
|
362
362
|
* @param {AthenaIntelligence.BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost} request
|
|
363
363
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -365,9 +365,11 @@ class AssetsClient {
|
|
|
365
365
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
366
366
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
367
367
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
368
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
368
369
|
* @throws {@link AthenaIntelligence.ContentTooLargeError}
|
|
369
370
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
370
371
|
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
372
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
371
373
|
*
|
|
372
374
|
* @example
|
|
373
375
|
* import { createReadStream } from "fs";
|
|
@@ -427,12 +429,16 @@ class AssetsClient {
|
|
|
427
429
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
428
430
|
case 404:
|
|
429
431
|
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
432
|
+
case 409:
|
|
433
|
+
throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
|
|
430
434
|
case 413:
|
|
431
435
|
throw new AthenaIntelligence.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
432
436
|
case 422:
|
|
433
437
|
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
434
438
|
case 502:
|
|
435
439
|
throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
440
|
+
case 503:
|
|
441
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
436
442
|
default:
|
|
437
443
|
throw new errors.AthenaIntelligenceError({
|
|
438
444
|
statusCode: _response.error.statusCode,
|
|
@@ -1594,7 +1600,7 @@ class AssetsClient {
|
|
|
1594
1600
|
});
|
|
1595
1601
|
}
|
|
1596
1602
|
/**
|
|
1597
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
1603
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag. A Word document's live-sync copy requires EDIT. With `read_only=true`, a Word document downloads as a plain .docx that Word offers to open read-only (Read-only recommended) and that carries no live-sync link; it requires VIEW, like every download, and cannot be combined with `live_sync`.
|
|
1598
1604
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1599
1605
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1600
1606
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -1606,11 +1612,14 @@ class AssetsClient {
|
|
|
1606
1612
|
__download(request, requestOptions) {
|
|
1607
1613
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1608
1614
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1609
|
-
const { asset_id: assetId, live_sync: liveSync, addin_id: addinId } = request;
|
|
1615
|
+
const { asset_id: assetId, live_sync: liveSync, read_only: readOnly, addin_id: addinId } = request;
|
|
1610
1616
|
const _queryParams = {};
|
|
1611
1617
|
if (liveSync != null) {
|
|
1612
1618
|
_queryParams.live_sync = liveSync.toString();
|
|
1613
1619
|
}
|
|
1620
|
+
if (readOnly != null) {
|
|
1621
|
+
_queryParams.read_only = readOnly.toString();
|
|
1622
|
+
}
|
|
1614
1623
|
if (addinId !== undefined) {
|
|
1615
1624
|
_queryParams.addin_id = addinId;
|
|
1616
1625
|
}
|
|
@@ -14,6 +14,6 @@ export interface BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost {
|
|
|
14
14
|
workspace_id?: string | null;
|
|
15
15
|
/** An asset you can read that the file came from; without parent_folder_id the new asset goes next to it when you may create there */
|
|
16
16
|
source_asset_id?: string | null;
|
|
17
|
-
/** The .docx, .pptx or .
|
|
17
|
+
/** The .docx, .pptx, .potx, .md, .markdown, .txt, .text, .html or .htm file to create the asset from */
|
|
18
18
|
file: core.file.Uploadable;
|
|
19
19
|
}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
export interface DownloadAssetsRequest {
|
|
8
8
|
/** Unique identifier of the asset to download */
|
|
9
9
|
asset_id: string;
|
|
10
|
-
/** Office live sync: when true and the asset is an Athena spreadsheet, a PPTX Studio presentation or a Word document, the downloaded .xlsx / .pptx / .docx carries the Athena for Office add-in's link record and opens already syncing with this asset. Ignored for every other asset type. */
|
|
10
|
+
/** Office live sync: when true and the asset is an Athena spreadsheet, a PPTX Studio presentation or a Word document, the downloaded .xlsx / .pptx / .docx carries the Athena for Office add-in's link record and opens already syncing with this asset; a Word document's requires EDIT access. Ignored for every other asset type. */
|
|
11
11
|
live_sync?: boolean;
|
|
12
|
+
/** Read-only copy: when true and the asset is a Word document, the downloaded .docx carries no live-sync link and Word's Read-only recommended setting, so Word offers to open it read-only. Cannot be combined with `live_sync`. Ignored for every other asset type. */
|
|
13
|
+
read_only?: boolean;
|
|
12
14
|
/** GUID of the installed add-in manifest the live-sync record should reference (defaults to this deployment's Athena add-in). Only read together with `live_sync`; use it to target a preview-channel sideload. */
|
|
13
15
|
addin_id?: string | null;
|
|
14
16
|
}
|
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.2298";
|
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.2298",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.2298",
|
|
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,
|
|
@@ -74,7 +74,7 @@ export declare class AssetsClient {
|
|
|
74
74
|
create(request: AthenaIntelligence.CreateAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CreateAssetResponseOut>;
|
|
75
75
|
private __create;
|
|
76
76
|
/**
|
|
77
|
-
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). Nothing is left behind when the import fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run,
|
|
77
|
+
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). A Markdown (.md, .markdown) or plain-text (.txt, .text) file becomes an Athena document, its Markdown rendered (headings, lists, tables, links) and plain text one paragraph per line, and an HTML (.html, .htm) file becomes a user interface: Athena stores the file and converts it in place in the request, as the app's Convert to does, so the original upload stays downloadable from the new asset's Versions pane. A Markdown or text file may be up to 2 MiB and an HTML file up to 5 MiB. Nothing is left behind when the import or conversion fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run, a presentation takes the create_presentation_pptx_studio tool policy and a user interface the create_new_user_interface tool policy.
|
|
78
78
|
*
|
|
79
79
|
* @param {AthenaIntelligence.BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost} request
|
|
80
80
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -82,9 +82,11 @@ export declare class AssetsClient {
|
|
|
82
82
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
83
83
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
84
84
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
85
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
85
86
|
* @throws {@link AthenaIntelligence.ContentTooLargeError}
|
|
86
87
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
87
88
|
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
89
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
88
90
|
*
|
|
89
91
|
* @example
|
|
90
92
|
* import { createReadStream } from "fs";
|
|
@@ -349,7 +351,7 @@ export declare class AssetsClient {
|
|
|
349
351
|
convertToUserInterface(request: AthenaIntelligence.ConvertToUserInterfaceAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertToUserInterfaceResponseOut>;
|
|
350
352
|
private __convertToUserInterface;
|
|
351
353
|
/**
|
|
352
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
354
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag. A Word document's live-sync copy requires EDIT. With `read_only=true`, a Word document downloads as a plain .docx that Word offers to open read-only (Read-only recommended) and that carries no live-sync link; it requires VIEW, like every download, and cannot be combined with `live_sync`.
|
|
353
355
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
354
356
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
355
357
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -321,7 +321,7 @@ export class AssetsClient {
|
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
323
|
/**
|
|
324
|
-
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). Nothing is left behind when the import fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run,
|
|
324
|
+
* Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). A Markdown (.md, .markdown) or plain-text (.txt, .text) file becomes an Athena document, its Markdown rendered (headings, lists, tables, links) and plain text one paragraph per line, and an HTML (.html, .htm) file becomes a user interface: Athena stores the file and converts it in place in the request, as the app's Convert to does, so the original upload stays downloadable from the new asset's Versions pane. A Markdown or text file may be up to 2 MiB and an HTML file up to 5 MiB. Nothing is left behind when the import or conversion fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run, a presentation takes the create_presentation_pptx_studio tool policy and a user interface the create_new_user_interface tool policy.
|
|
325
325
|
*
|
|
326
326
|
* @param {AthenaIntelligence.BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost} request
|
|
327
327
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -329,9 +329,11 @@ export class AssetsClient {
|
|
|
329
329
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
330
330
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
331
331
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
332
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
332
333
|
* @throws {@link AthenaIntelligence.ContentTooLargeError}
|
|
333
334
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
334
335
|
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
336
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
335
337
|
*
|
|
336
338
|
* @example
|
|
337
339
|
* import { createReadStream } from "fs";
|
|
@@ -391,12 +393,16 @@ export class AssetsClient {
|
|
|
391
393
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
392
394
|
case 404:
|
|
393
395
|
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
396
|
+
case 409:
|
|
397
|
+
throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
|
|
394
398
|
case 413:
|
|
395
399
|
throw new AthenaIntelligence.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
396
400
|
case 422:
|
|
397
401
|
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
398
402
|
case 502:
|
|
399
403
|
throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
404
|
+
case 503:
|
|
405
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
400
406
|
default:
|
|
401
407
|
throw new errors.AthenaIntelligenceError({
|
|
402
408
|
statusCode: _response.error.statusCode,
|
|
@@ -1558,7 +1564,7 @@ export class AssetsClient {
|
|
|
1558
1564
|
});
|
|
1559
1565
|
}
|
|
1560
1566
|
/**
|
|
1561
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
1567
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag. A Word document's live-sync copy requires EDIT. With `read_only=true`, a Word document downloads as a plain .docx that Word offers to open read-only (Read-only recommended) and that carries no live-sync link; it requires VIEW, like every download, and cannot be combined with `live_sync`.
|
|
1562
1568
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1563
1569
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1564
1570
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -1570,11 +1576,14 @@ export class AssetsClient {
|
|
|
1570
1576
|
__download(request, requestOptions) {
|
|
1571
1577
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1572
1578
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1573
|
-
const { asset_id: assetId, live_sync: liveSync, addin_id: addinId } = request;
|
|
1579
|
+
const { asset_id: assetId, live_sync: liveSync, read_only: readOnly, addin_id: addinId } = request;
|
|
1574
1580
|
const _queryParams = {};
|
|
1575
1581
|
if (liveSync != null) {
|
|
1576
1582
|
_queryParams.live_sync = liveSync.toString();
|
|
1577
1583
|
}
|
|
1584
|
+
if (readOnly != null) {
|
|
1585
|
+
_queryParams.read_only = readOnly.toString();
|
|
1586
|
+
}
|
|
1578
1587
|
if (addinId !== undefined) {
|
|
1579
1588
|
_queryParams.addin_id = addinId;
|
|
1580
1589
|
}
|
|
@@ -14,6 +14,6 @@ export interface BodyCreateAssetFromFilePublicApiV0AssetsCreateFromFilePost {
|
|
|
14
14
|
workspace_id?: string | null;
|
|
15
15
|
/** An asset you can read that the file came from; without parent_folder_id the new asset goes next to it when you may create there */
|
|
16
16
|
source_asset_id?: string | null;
|
|
17
|
-
/** The .docx, .pptx or .
|
|
17
|
+
/** The .docx, .pptx, .potx, .md, .markdown, .txt, .text, .html or .htm file to create the asset from */
|
|
18
18
|
file: core.file.Uploadable;
|
|
19
19
|
}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
export interface DownloadAssetsRequest {
|
|
8
8
|
/** Unique identifier of the asset to download */
|
|
9
9
|
asset_id: string;
|
|
10
|
-
/** Office live sync: when true and the asset is an Athena spreadsheet, a PPTX Studio presentation or a Word document, the downloaded .xlsx / .pptx / .docx carries the Athena for Office add-in's link record and opens already syncing with this asset. Ignored for every other asset type. */
|
|
10
|
+
/** Office live sync: when true and the asset is an Athena spreadsheet, a PPTX Studio presentation or a Word document, the downloaded .xlsx / .pptx / .docx carries the Athena for Office add-in's link record and opens already syncing with this asset; a Word document's requires EDIT access. Ignored for every other asset type. */
|
|
11
11
|
live_sync?: boolean;
|
|
12
|
+
/** Read-only copy: when true and the asset is a Word document, the downloaded .docx carries no live-sync link and Word's Read-only recommended setting, so Word offers to open it read-only. Cannot be combined with `live_sync`. Ignored for every other asset type. */
|
|
13
|
+
read_only?: boolean;
|
|
12
14
|
/** GUID of the installed add-in manifest the live-sync record should reference (defaults to this deployment's Athena add-in). Only read together with `live_sync`; use it to target a preview-channel sideload. */
|
|
13
15
|
addin_id?: string | null;
|
|
14
16
|
}
|
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.2298";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.2298";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -715,7 +715,7 @@ await client.assets.create({
|
|
|
715
715
|
<dl>
|
|
716
716
|
<dd>
|
|
717
717
|
|
|
718
|
-
Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). Nothing is left behind when the import fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run,
|
|
718
|
+
Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). A Markdown (.md, .markdown) or plain-text (.txt, .text) file becomes an Athena document, its Markdown rendered (headings, lists, tables, links) and plain text one paragraph per line, and an HTML (.html, .htm) file becomes a user interface: Athena stores the file and converts it in place in the request, as the app's Convert to does, so the original upload stays downloadable from the new asset's Versions pane. A Markdown or text file may be up to 2 MiB and an HTML file up to 5 MiB. Nothing is left behind when the import or conversion fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 100 MB, Word for the web's limit, a PowerPoint file up to 100 MiB. A Word file gets the app's upload checks before anything is created, and one it refuses answers 422 with detail {code, message}: code is password_protected, rights_managed, damaged (unreadable content, which File > Import in the app can recover), format_mismatch (a template or macro-enabled file named .docx), not_ooxml, too_large or uncompressed_too_large, and message says why in Word's words. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run, a presentation takes the create_presentation_pptx_studio tool policy and a user interface the create_new_user_interface tool policy.
|
|
719
719
|
</dd>
|
|
720
720
|
</dl>
|
|
721
721
|
</dd>
|
|
@@ -1640,7 +1640,7 @@ await client.assets.convertToUserInterface({
|
|
|
1640
1640
|
<dl>
|
|
1641
1641
|
<dd>
|
|
1642
1642
|
|
|
1643
|
-
Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
1643
|
+
Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx, a PPTX Studio presentation's .pptx or a Word document's .docx also carries the Athena for Office add-in's link record, so opening it in Excel, PowerPoint or Word with the add-in installed starts syncing it with the asset; other asset types ignore the flag. A Word document's live-sync copy requires EDIT. With `read_only=true`, a Word document downloads as a plain .docx that Word offers to open read-only (Read-only recommended) and that carries no live-sync link; it requires VIEW, like every download, and cannot be combined with `live_sync`.
|
|
1644
1644
|
</dd>
|
|
1645
1645
|
</dl>
|
|
1646
1646
|
</dd>
|