@athenaintel/sdk 4.3.2262 → 4.3.2264

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.
Files changed (32) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/assets/client/Client.d.ts +20 -3
  3. package/dist/cjs/api/resources/assets/client/Client.js +88 -4
  4. package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +1 -1
  5. package/dist/cjs/api/resources/assets/client/requests/ListAssetsRequest.d.ts +3 -1
  6. package/dist/cjs/api/resources/assets/client/requests/RemoveWorkspaceAccessAssetsRequest.d.ts +10 -0
  7. package/dist/cjs/api/resources/assets/client/requests/RemoveWorkspaceAccessAssetsRequest.js +3 -0
  8. package/dist/cjs/api/resources/assets/client/requests/UpdateWorkspaceAccessRequestIn.d.ts +2 -2
  9. package/dist/cjs/api/resources/assets/client/requests/index.d.ts +1 -0
  10. package/dist/cjs/api/types/ActivityItemOut.d.ts +2 -2
  11. package/dist/cjs/api/types/WorkspaceAccessResponseOut.d.ts +1 -1
  12. package/dist/cjs/api/types/WorkspaceShareAccess.d.ts +2 -1
  13. package/dist/cjs/api/types/WorkspaceShareAccess.js +2 -1
  14. package/dist/cjs/version.d.ts +1 -1
  15. package/dist/cjs/version.js +1 -1
  16. package/dist/esm/BaseClient.mjs +2 -2
  17. package/dist/esm/api/resources/assets/client/Client.d.mts +20 -3
  18. package/dist/esm/api/resources/assets/client/Client.mjs +88 -4
  19. package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +1 -1
  20. package/dist/esm/api/resources/assets/client/requests/ListAssetsRequest.d.mts +3 -1
  21. package/dist/esm/api/resources/assets/client/requests/RemoveWorkspaceAccessAssetsRequest.d.mts +10 -0
  22. package/dist/esm/api/resources/assets/client/requests/RemoveWorkspaceAccessAssetsRequest.mjs +2 -0
  23. package/dist/esm/api/resources/assets/client/requests/UpdateWorkspaceAccessRequestIn.d.mts +2 -2
  24. package/dist/esm/api/resources/assets/client/requests/index.d.mts +1 -0
  25. package/dist/esm/api/types/ActivityItemOut.d.mts +2 -2
  26. package/dist/esm/api/types/WorkspaceAccessResponseOut.d.mts +1 -1
  27. package/dist/esm/api/types/WorkspaceShareAccess.d.mts +2 -1
  28. package/dist/esm/api/types/WorkspaceShareAccess.mjs +2 -1
  29. package/dist/esm/version.d.mts +1 -1
  30. package/dist/esm/version.mjs +1 -1
  31. package/package.json +1 -1
  32. package/reference.md +68 -3
@@ -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.2262",
47
- "User-Agent": "@athenaintel/sdk/4.3.2262",
46
+ "X-Fern-SDK-Version": "4.3.2264",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2264",
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,
@@ -12,7 +12,7 @@ export declare class AssetsClient {
12
12
  protected readonly _options: NormalizedClientOptionsWithAuth<AssetsClient.Options>;
13
13
  constructor(options?: AssetsClient.Options);
14
14
  /**
15
- * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence.
15
+ * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence. Pass parent_folder_id to list one folder's direct children (not its whole subtree), or filters.parent_folder_id = null to list assets in no folder.
16
16
  *
17
17
  * @param {AthenaIntelligence.ListAssetsRequest} request
18
18
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -50,7 +50,7 @@ export declare class AssetsClient {
50
50
  convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
51
51
  private __convertExcelToSheet;
52
52
  /**
53
- * Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended.
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. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
54
54
  *
55
55
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
56
56
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -370,7 +370,7 @@ export declare class AssetsClient {
370
370
  share(request: AthenaIntelligence.ShareAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ShareAssetResponseOut>;
371
371
  private __share;
372
372
  /**
373
- * Update the workspace-level access on an asset. Only users who have edit access to the asset and permission to share with the workspace can use this endpoint. Set 'view' or 'edit' to grant workspace-wide access.
373
+ * Update the workspace-level access on an asset. Needs edit access to the asset. Set 'view' or 'edit' to grant workspace-wide access, which also needs permission to share with the workspace. Set 'none' (or null) to remove the workspace-wide share, as DELETE does; removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access.
374
374
  *
375
375
  * @param {AthenaIntelligence.UpdateWorkspaceAccessRequestIn} request
376
376
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -388,4 +388,21 @@ export declare class AssetsClient {
388
388
  */
389
389
  updateWorkspaceAccess(request: AthenaIntelligence.UpdateWorkspaceAccessRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceAccessResponseOut>;
390
390
  private __updateWorkspaceAccess;
391
+ /**
392
+ * Remove the workspace-wide share from an asset, so members of the workspace no longer get access through it. Needs edit access to the asset. Removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access. Calling it on an asset with no workspace share, or on one in the trash, succeeds with the same answer.
393
+ *
394
+ * @param {AthenaIntelligence.RemoveWorkspaceAccessAssetsRequest} request
395
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
396
+ *
397
+ * @throws {@link AthenaIntelligence.ForbiddenError}
398
+ * @throws {@link AthenaIntelligence.NotFoundError}
399
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
400
+ *
401
+ * @example
402
+ * await client.assets.removeWorkspaceAccess({
403
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
404
+ * })
405
+ */
406
+ removeWorkspaceAccess(request: AthenaIntelligence.RemoveWorkspaceAccessAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceAccessResponseOut>;
407
+ private __removeWorkspaceAccess;
391
408
  }
@@ -66,7 +66,7 @@ class AssetsClient {
66
66
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
67
67
  }
68
68
  /**
69
- * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence.
69
+ * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence. Pass parent_folder_id to list one folder's direct children (not its whole subtree), or filters.parent_folder_id = null to list assets in no folder.
70
70
  *
71
71
  * @param {AthenaIntelligence.ListAssetsRequest} request
72
72
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -85,7 +85,7 @@ class AssetsClient {
85
85
  __list() {
86
86
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
87
87
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
88
- const { limit, offset, filters, sort, workspace_id: workspaceId } = request;
88
+ const { limit, offset, filters, sort, workspace_id: workspaceId, parent_folder_id: parentFolderId } = request;
89
89
  const _queryParams = {};
90
90
  if (limit != null) {
91
91
  _queryParams.limit = limit.toString();
@@ -102,6 +102,9 @@ class AssetsClient {
102
102
  if (workspaceId !== undefined) {
103
103
  _queryParams.workspace_id = workspaceId;
104
104
  }
105
+ if (parentFolderId !== undefined) {
106
+ _queryParams.parent_folder_id = parentFolderId;
107
+ }
105
108
  const _authRequest = yield this._options.authProvider.getAuthRequest();
106
109
  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)({
107
110
  "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,
@@ -252,7 +255,7 @@ class AssetsClient {
252
255
  });
253
256
  }
254
257
  /**
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. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended.
258
+ * 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. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
256
259
  *
257
260
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
258
261
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1675,7 +1678,7 @@ class AssetsClient {
1675
1678
  });
1676
1679
  }
1677
1680
  /**
1678
- * Update the workspace-level access on an asset. Only users who have edit access to the asset and permission to share with the workspace can use this endpoint. Set 'view' or 'edit' to grant workspace-wide access.
1681
+ * Update the workspace-level access on an asset. Needs edit access to the asset. Set 'view' or 'edit' to grant workspace-wide access, which also needs permission to share with the workspace. Set 'none' (or null) to remove the workspace-wide share, as DELETE does; removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access.
1679
1682
  *
1680
1683
  * @param {AthenaIntelligence.UpdateWorkspaceAccessRequestIn} request
1681
1684
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1762,5 +1765,86 @@ class AssetsClient {
1762
1765
  }
1763
1766
  });
1764
1767
  }
1768
+ /**
1769
+ * Remove the workspace-wide share from an asset, so members of the workspace no longer get access through it. Needs edit access to the asset. Removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access. Calling it on an asset with no workspace share, or on one in the trash, succeeds with the same answer.
1770
+ *
1771
+ * @param {AthenaIntelligence.RemoveWorkspaceAccessAssetsRequest} request
1772
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
1773
+ *
1774
+ * @throws {@link AthenaIntelligence.ForbiddenError}
1775
+ * @throws {@link AthenaIntelligence.NotFoundError}
1776
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
1777
+ *
1778
+ * @example
1779
+ * await client.assets.removeWorkspaceAccess({
1780
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
1781
+ * })
1782
+ */
1783
+ removeWorkspaceAccess(request, requestOptions) {
1784
+ return core.HttpResponsePromise.fromPromise(this.__removeWorkspaceAccess(request, requestOptions));
1785
+ }
1786
+ __removeWorkspaceAccess(request, requestOptions) {
1787
+ return __awaiter(this, void 0, void 0, function* () {
1788
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1789
+ const { asset_id: assetId } = request;
1790
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1791
+ 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)({
1792
+ "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,
1793
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1794
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1795
+ 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)}/workspace-access`),
1796
+ method: "DELETE",
1797
+ headers: _headers,
1798
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1799
+ 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,
1800
+ 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,
1801
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1802
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1803
+ logging: this._options.logging,
1804
+ });
1805
+ if (_response.ok) {
1806
+ return {
1807
+ data: _response.body,
1808
+ rawResponse: _response.rawResponse,
1809
+ };
1810
+ }
1811
+ if (_response.error.reason === "status-code") {
1812
+ switch (_response.error.statusCode) {
1813
+ case 403:
1814
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
1815
+ case 404:
1816
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
1817
+ case 422:
1818
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1819
+ default:
1820
+ throw new errors.AthenaIntelligenceError({
1821
+ statusCode: _response.error.statusCode,
1822
+ body: _response.error.body,
1823
+ rawResponse: _response.rawResponse,
1824
+ });
1825
+ }
1826
+ }
1827
+ switch (_response.error.reason) {
1828
+ case "non-json":
1829
+ throw new errors.AthenaIntelligenceError({
1830
+ statusCode: _response.error.statusCode,
1831
+ body: _response.error.rawBody,
1832
+ rawResponse: _response.rawResponse,
1833
+ });
1834
+ case "body-is-null":
1835
+ throw new errors.AthenaIntelligenceError({
1836
+ statusCode: _response.error.statusCode,
1837
+ rawResponse: _response.rawResponse,
1838
+ });
1839
+ case "timeout":
1840
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling DELETE /api/v0/assets/{asset_id}/workspace-access.");
1841
+ case "unknown":
1842
+ throw new errors.AthenaIntelligenceError({
1843
+ message: _response.error.errorMessage,
1844
+ rawResponse: _response.rawResponse,
1845
+ });
1846
+ }
1847
+ });
1848
+ }
1765
1849
  }
1766
1850
  exports.AssetsClient = AssetsClient;
@@ -34,6 +34,6 @@ export interface CreateAssetRequestIn {
34
34
  template?: string | null;
35
35
  /** Title for the new asset */
36
36
  title?: string | null;
37
- /** ID of the workspace to create the asset in. If not provided, the asset is created in the user's current workspace. The user must be a member of the specified workspace. */
37
+ /** ID of the workspace to create the asset in. If not provided, the asset is created in the workspace of parent_folder_id when one is given, otherwise in the user's current workspace. The user must be a member of that workspace. */
38
38
  workspace_id?: string | null;
39
39
  }
@@ -10,10 +10,12 @@ export interface ListAssetsRequest {
10
10
  limit?: number;
11
11
  /** Number of assets to skip for pagination */
12
12
  offset?: number;
13
- /** JSON string of filter criteria. Supports: created_by_id, created_by_email, tags, created_after/before, updated_after/before, title_substring, is_archived, is_hidden, athena_metadata, media_type, athena_converted_type, athena_original_type, summary_ready, summary_status, workspace_id */
13
+ /** JSON string of filter criteria. Supports: created_by_id, created_by_email, tags, created_after/before, updated_after/before, title_substring, is_archived, is_hidden, athena_metadata, media_type, athena_converted_type, athena_original_type, summary_ready, summary_status, workspace_id, parent_folder_id (a folder id lists its direct children; null lists assets in no folder) */
14
14
  filters?: string | null;
15
15
  /** JSON string of sort criteria: [{"field": "updated_at", "direction": "desc"}]. Supported fields: created_by_id, created_by_email, created_at, updated_at, is_archived, is_hidden, summary_ready, summary_status */
16
16
  sort?: string | null;
17
17
  /** Workspace to list assets from. Caller must be a member. */
18
18
  workspace_id?: string | null;
19
+ /** Only list the direct children of this folder (not its whole subtree). Only assets you can access are returned. To list assets in no folder, pass filters.parent_folder_id = null instead. */
20
+ parent_folder_id?: string | null;
19
21
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
5
+ * }
6
+ */
7
+ export interface RemoveWorkspaceAccessAssetsRequest {
8
+ /** Unique identifier of the asset */
9
+ asset_id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,6 @@ import type * as AthenaIntelligence from "../../../../index.js";
9
9
  export interface UpdateWorkspaceAccessRequestIn {
10
10
  /** Unique identifier of the asset */
11
11
  asset_id: string;
12
- /** Permission level to grant to the entire workspace. Set to 'view' or 'edit'. */
13
- workspace_access: AthenaIntelligence.WorkspaceShareAccess;
12
+ /** Permission level to grant to the entire workspace: 'view' or 'edit'. Set 'none' (or null) to remove the workspace-wide share; people the asset is shared with directly keep their access. */
13
+ workspace_access: AthenaIntelligence.WorkspaceShareAccess | null;
14
14
  }
@@ -14,6 +14,7 @@ export type { ListActivityAssetsRequest } from "./ListActivityAssetsRequest.js";
14
14
  export type { ListAssetsRequest } from "./ListAssetsRequest.js";
15
15
  export type { MoveAssetRequestIn } from "./MoveAssetRequestIn.js";
16
16
  export type { PublishAssetRequestIn } from "./PublishAssetRequestIn.js";
17
+ export type { RemoveWorkspaceAccessAssetsRequest } from "./RemoveWorkspaceAccessAssetsRequest.js";
17
18
  export type { RenameAssetRequestIn } from "./RenameAssetRequestIn.js";
18
19
  export type { ShareAssetRequestIn } from "./ShareAssetRequestIn.js";
19
20
  export type { UpdateWorkspaceAccessRequestIn } from "./UpdateWorkspaceAccessRequestIn.js";
@@ -2,11 +2,11 @@
2
2
  * One entry in an asset's activity log.
3
3
  */
4
4
  export interface ActivityItemOut {
5
- /** Who made the edit: 'user', 'agent', 'canvas-ai', 'rollback', or 'version-restore'. Matches the in-app Activity pane. */
5
+ /** Who made the edit: 'user', 'agent', 'canvas-ai', 'rollback', 'version-restore', or 'system' (an automatic update, such as a query refreshed on open, which is nobody's edit). An edit naming an agent or an agent session is 'agent' whoever signed it. Matches the in-app Activity pane. */
6
6
  actor_type: string;
7
7
  /** Attribution metadata carried by the edit. Common keys: user_id, agent_id, session_id, user_message_tracking_id, ai_message_tracking_id, source. Join session_id against your trace store to link an edit to the run that produced it. */
8
8
  attributions?: Record<string, string>;
9
- /** Raw Keryx author id. 'backend-service' for agent writes; a user id for direct edits. Prefer actor_type for classification. */
9
+ /** Raw Keryx author id: 'backend-service' for Athena's own writes (most agent writes), otherwise the user id that signed the write, which can be an agent run applied from that user's browser. Prefer actor_type for classification. */
10
10
  by: string;
11
11
  /** Keryx clock at the start of the edit, in epoch milliseconds. Use with to_clock to request this item's delta. */
12
12
  from_clock: number;
@@ -4,6 +4,6 @@
4
4
  export interface WorkspaceAccessResponseOut {
5
5
  /** ID of the asset */
6
6
  asset_id: string;
7
- /** Workspace access level that was set ('view' or 'edit') */
7
+ /** Workspace access level now on the asset: 'view', 'edit', or 'none' when the workspace-wide share was removed */
8
8
  workspace_access: string;
9
9
  }
@@ -1,6 +1,7 @@
1
- /** Workspace-level access to grant on an asset. */
1
+ /** Workspace-level access on an asset; ``none`` removes the workspace share. */
2
2
  export declare const WorkspaceShareAccess: {
3
3
  readonly View: "view";
4
4
  readonly Edit: "edit";
5
+ readonly None: "none";
5
6
  };
6
7
  export type WorkspaceShareAccess = (typeof WorkspaceShareAccess)[keyof typeof WorkspaceShareAccess];
@@ -2,8 +2,9 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.WorkspaceShareAccess = void 0;
5
- /** Workspace-level access to grant on an asset. */
5
+ /** Workspace-level access on an asset; ``none`` removes the workspace share. */
6
6
  exports.WorkspaceShareAccess = {
7
7
  View: "view",
8
8
  Edit: "edit",
9
+ None: "none",
9
10
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2262";
1
+ export declare const SDK_VERSION = "4.3.2264";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.3.2262";
4
+ exports.SDK_VERSION = "4.3.2264";
@@ -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.2262",
10
- "User-Agent": "@athenaintel/sdk/4.3.2262",
9
+ "X-Fern-SDK-Version": "4.3.2264",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2264",
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,
@@ -12,7 +12,7 @@ export declare class AssetsClient {
12
12
  protected readonly _options: NormalizedClientOptionsWithAuth<AssetsClient.Options>;
13
13
  constructor(options?: AssetsClient.Options);
14
14
  /**
15
- * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence.
15
+ * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence. Pass parent_folder_id to list one folder's direct children (not its whole subtree), or filters.parent_folder_id = null to list assets in no folder.
16
16
  *
17
17
  * @param {AthenaIntelligence.ListAssetsRequest} request
18
18
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -50,7 +50,7 @@ export declare class AssetsClient {
50
50
  convertExcelToSheet(request: AthenaIntelligence.ConvertExcelToSheetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ConvertExcelToSheetResponseOut>;
51
51
  private __convertExcelToSheet;
52
52
  /**
53
- * Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended.
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. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
54
54
  *
55
55
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
56
56
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -370,7 +370,7 @@ export declare class AssetsClient {
370
370
  share(request: AthenaIntelligence.ShareAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ShareAssetResponseOut>;
371
371
  private __share;
372
372
  /**
373
- * Update the workspace-level access on an asset. Only users who have edit access to the asset and permission to share with the workspace can use this endpoint. Set 'view' or 'edit' to grant workspace-wide access.
373
+ * Update the workspace-level access on an asset. Needs edit access to the asset. Set 'view' or 'edit' to grant workspace-wide access, which also needs permission to share with the workspace. Set 'none' (or null) to remove the workspace-wide share, as DELETE does; removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access.
374
374
  *
375
375
  * @param {AthenaIntelligence.UpdateWorkspaceAccessRequestIn} request
376
376
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -388,4 +388,21 @@ export declare class AssetsClient {
388
388
  */
389
389
  updateWorkspaceAccess(request: AthenaIntelligence.UpdateWorkspaceAccessRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceAccessResponseOut>;
390
390
  private __updateWorkspaceAccess;
391
+ /**
392
+ * Remove the workspace-wide share from an asset, so members of the workspace no longer get access through it. Needs edit access to the asset. Removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access. Calling it on an asset with no workspace share, or on one in the trash, succeeds with the same answer.
393
+ *
394
+ * @param {AthenaIntelligence.RemoveWorkspaceAccessAssetsRequest} request
395
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
396
+ *
397
+ * @throws {@link AthenaIntelligence.ForbiddenError}
398
+ * @throws {@link AthenaIntelligence.NotFoundError}
399
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
400
+ *
401
+ * @example
402
+ * await client.assets.removeWorkspaceAccess({
403
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
404
+ * })
405
+ */
406
+ removeWorkspaceAccess(request: AthenaIntelligence.RemoveWorkspaceAccessAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceAccessResponseOut>;
407
+ private __removeWorkspaceAccess;
391
408
  }
@@ -30,7 +30,7 @@ export class AssetsClient {
30
30
  this._options = normalizeClientOptionsWithAuth(options);
31
31
  }
32
32
  /**
33
- * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence.
33
+ * Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence. Pass parent_folder_id to list one folder's direct children (not its whole subtree), or filters.parent_folder_id = null to list assets in no folder.
34
34
  *
35
35
  * @param {AthenaIntelligence.ListAssetsRequest} request
36
36
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -49,7 +49,7 @@ export class AssetsClient {
49
49
  __list() {
50
50
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
51
51
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
52
- const { limit, offset, filters, sort, workspace_id: workspaceId } = request;
52
+ const { limit, offset, filters, sort, workspace_id: workspaceId, parent_folder_id: parentFolderId } = request;
53
53
  const _queryParams = {};
54
54
  if (limit != null) {
55
55
  _queryParams.limit = limit.toString();
@@ -66,6 +66,9 @@ export class AssetsClient {
66
66
  if (workspaceId !== undefined) {
67
67
  _queryParams.workspace_id = workspaceId;
68
68
  }
69
+ if (parentFolderId !== undefined) {
70
+ _queryParams.parent_folder_id = parentFolderId;
71
+ }
69
72
  const _authRequest = yield this._options.authProvider.getAuthRequest();
70
73
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
71
74
  "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,
@@ -216,7 +219,7 @@ export class AssetsClient {
216
219
  });
217
220
  }
218
221
  /**
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. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended.
222
+ * 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. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
220
223
  *
221
224
  * @param {AthenaIntelligence.CreateAssetRequestIn} request
222
225
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1639,7 +1642,7 @@ export class AssetsClient {
1639
1642
  });
1640
1643
  }
1641
1644
  /**
1642
- * Update the workspace-level access on an asset. Only users who have edit access to the asset and permission to share with the workspace can use this endpoint. Set 'view' or 'edit' to grant workspace-wide access.
1645
+ * Update the workspace-level access on an asset. Needs edit access to the asset. Set 'view' or 'edit' to grant workspace-wide access, which also needs permission to share with the workspace. Set 'none' (or null) to remove the workspace-wide share, as DELETE does; removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access.
1643
1646
  *
1644
1647
  * @param {AthenaIntelligence.UpdateWorkspaceAccessRequestIn} request
1645
1648
  * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1726,4 +1729,85 @@ export class AssetsClient {
1726
1729
  }
1727
1730
  });
1728
1731
  }
1732
+ /**
1733
+ * Remove the workspace-wide share from an asset, so members of the workspace no longer get access through it. Needs edit access to the asset. Removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access. Calling it on an asset with no workspace share, or on one in the trash, succeeds with the same answer.
1734
+ *
1735
+ * @param {AthenaIntelligence.RemoveWorkspaceAccessAssetsRequest} request
1736
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
1737
+ *
1738
+ * @throws {@link AthenaIntelligence.ForbiddenError}
1739
+ * @throws {@link AthenaIntelligence.NotFoundError}
1740
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
1741
+ *
1742
+ * @example
1743
+ * await client.assets.removeWorkspaceAccess({
1744
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
1745
+ * })
1746
+ */
1747
+ removeWorkspaceAccess(request, requestOptions) {
1748
+ return core.HttpResponsePromise.fromPromise(this.__removeWorkspaceAccess(request, requestOptions));
1749
+ }
1750
+ __removeWorkspaceAccess(request, requestOptions) {
1751
+ return __awaiter(this, void 0, void 0, function* () {
1752
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1753
+ const { asset_id: assetId } = request;
1754
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1755
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1756
+ "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,
1757
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1758
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1759
+ 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)}/workspace-access`),
1760
+ method: "DELETE",
1761
+ headers: _headers,
1762
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1763
+ 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,
1764
+ 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,
1765
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1766
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1767
+ logging: this._options.logging,
1768
+ });
1769
+ if (_response.ok) {
1770
+ return {
1771
+ data: _response.body,
1772
+ rawResponse: _response.rawResponse,
1773
+ };
1774
+ }
1775
+ if (_response.error.reason === "status-code") {
1776
+ switch (_response.error.statusCode) {
1777
+ case 403:
1778
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
1779
+ case 404:
1780
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
1781
+ case 422:
1782
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1783
+ default:
1784
+ throw new errors.AthenaIntelligenceError({
1785
+ statusCode: _response.error.statusCode,
1786
+ body: _response.error.body,
1787
+ rawResponse: _response.rawResponse,
1788
+ });
1789
+ }
1790
+ }
1791
+ switch (_response.error.reason) {
1792
+ case "non-json":
1793
+ throw new errors.AthenaIntelligenceError({
1794
+ statusCode: _response.error.statusCode,
1795
+ body: _response.error.rawBody,
1796
+ rawResponse: _response.rawResponse,
1797
+ });
1798
+ case "body-is-null":
1799
+ throw new errors.AthenaIntelligenceError({
1800
+ statusCode: _response.error.statusCode,
1801
+ rawResponse: _response.rawResponse,
1802
+ });
1803
+ case "timeout":
1804
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling DELETE /api/v0/assets/{asset_id}/workspace-access.");
1805
+ case "unknown":
1806
+ throw new errors.AthenaIntelligenceError({
1807
+ message: _response.error.errorMessage,
1808
+ rawResponse: _response.rawResponse,
1809
+ });
1810
+ }
1811
+ });
1812
+ }
1729
1813
  }
@@ -34,6 +34,6 @@ export interface CreateAssetRequestIn {
34
34
  template?: string | null;
35
35
  /** Title for the new asset */
36
36
  title?: string | null;
37
- /** ID of the workspace to create the asset in. If not provided, the asset is created in the user's current workspace. The user must be a member of the specified workspace. */
37
+ /** ID of the workspace to create the asset in. If not provided, the asset is created in the workspace of parent_folder_id when one is given, otherwise in the user's current workspace. The user must be a member of that workspace. */
38
38
  workspace_id?: string | null;
39
39
  }
@@ -10,10 +10,12 @@ export interface ListAssetsRequest {
10
10
  limit?: number;
11
11
  /** Number of assets to skip for pagination */
12
12
  offset?: number;
13
- /** JSON string of filter criteria. Supports: created_by_id, created_by_email, tags, created_after/before, updated_after/before, title_substring, is_archived, is_hidden, athena_metadata, media_type, athena_converted_type, athena_original_type, summary_ready, summary_status, workspace_id */
13
+ /** JSON string of filter criteria. Supports: created_by_id, created_by_email, tags, created_after/before, updated_after/before, title_substring, is_archived, is_hidden, athena_metadata, media_type, athena_converted_type, athena_original_type, summary_ready, summary_status, workspace_id, parent_folder_id (a folder id lists its direct children; null lists assets in no folder) */
14
14
  filters?: string | null;
15
15
  /** JSON string of sort criteria: [{"field": "updated_at", "direction": "desc"}]. Supported fields: created_by_id, created_by_email, created_at, updated_at, is_archived, is_hidden, summary_ready, summary_status */
16
16
  sort?: string | null;
17
17
  /** Workspace to list assets from. Caller must be a member. */
18
18
  workspace_id?: string | null;
19
+ /** Only list the direct children of this folder (not its whole subtree). Only assets you can access are returned. To list assets in no folder, pass filters.parent_folder_id = null instead. */
20
+ parent_folder_id?: string | null;
19
21
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
5
+ * }
6
+ */
7
+ export interface RemoveWorkspaceAccessAssetsRequest {
8
+ /** Unique identifier of the asset */
9
+ asset_id: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -9,6 +9,6 @@ import type * as AthenaIntelligence from "../../../../index.mjs";
9
9
  export interface UpdateWorkspaceAccessRequestIn {
10
10
  /** Unique identifier of the asset */
11
11
  asset_id: string;
12
- /** Permission level to grant to the entire workspace. Set to 'view' or 'edit'. */
13
- workspace_access: AthenaIntelligence.WorkspaceShareAccess;
12
+ /** Permission level to grant to the entire workspace: 'view' or 'edit'. Set 'none' (or null) to remove the workspace-wide share; people the asset is shared with directly keep their access. */
13
+ workspace_access: AthenaIntelligence.WorkspaceShareAccess | null;
14
14
  }
@@ -14,6 +14,7 @@ export type { ListActivityAssetsRequest } from "./ListActivityAssetsRequest.mjs"
14
14
  export type { ListAssetsRequest } from "./ListAssetsRequest.mjs";
15
15
  export type { MoveAssetRequestIn } from "./MoveAssetRequestIn.mjs";
16
16
  export type { PublishAssetRequestIn } from "./PublishAssetRequestIn.mjs";
17
+ export type { RemoveWorkspaceAccessAssetsRequest } from "./RemoveWorkspaceAccessAssetsRequest.mjs";
17
18
  export type { RenameAssetRequestIn } from "./RenameAssetRequestIn.mjs";
18
19
  export type { ShareAssetRequestIn } from "./ShareAssetRequestIn.mjs";
19
20
  export type { UpdateWorkspaceAccessRequestIn } from "./UpdateWorkspaceAccessRequestIn.mjs";
@@ -2,11 +2,11 @@
2
2
  * One entry in an asset's activity log.
3
3
  */
4
4
  export interface ActivityItemOut {
5
- /** Who made the edit: 'user', 'agent', 'canvas-ai', 'rollback', or 'version-restore'. Matches the in-app Activity pane. */
5
+ /** Who made the edit: 'user', 'agent', 'canvas-ai', 'rollback', 'version-restore', or 'system' (an automatic update, such as a query refreshed on open, which is nobody's edit). An edit naming an agent or an agent session is 'agent' whoever signed it. Matches the in-app Activity pane. */
6
6
  actor_type: string;
7
7
  /** Attribution metadata carried by the edit. Common keys: user_id, agent_id, session_id, user_message_tracking_id, ai_message_tracking_id, source. Join session_id against your trace store to link an edit to the run that produced it. */
8
8
  attributions?: Record<string, string>;
9
- /** Raw Keryx author id. 'backend-service' for agent writes; a user id for direct edits. Prefer actor_type for classification. */
9
+ /** Raw Keryx author id: 'backend-service' for Athena's own writes (most agent writes), otherwise the user id that signed the write, which can be an agent run applied from that user's browser. Prefer actor_type for classification. */
10
10
  by: string;
11
11
  /** Keryx clock at the start of the edit, in epoch milliseconds. Use with to_clock to request this item's delta. */
12
12
  from_clock: number;
@@ -4,6 +4,6 @@
4
4
  export interface WorkspaceAccessResponseOut {
5
5
  /** ID of the asset */
6
6
  asset_id: string;
7
- /** Workspace access level that was set ('view' or 'edit') */
7
+ /** Workspace access level now on the asset: 'view', 'edit', or 'none' when the workspace-wide share was removed */
8
8
  workspace_access: string;
9
9
  }
@@ -1,6 +1,7 @@
1
- /** Workspace-level access to grant on an asset. */
1
+ /** Workspace-level access on an asset; ``none`` removes the workspace share. */
2
2
  export declare const WorkspaceShareAccess: {
3
3
  readonly View: "view";
4
4
  readonly Edit: "edit";
5
+ readonly None: "none";
5
6
  };
6
7
  export type WorkspaceShareAccess = (typeof WorkspaceShareAccess)[keyof typeof WorkspaceShareAccess];
@@ -1,6 +1,7 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** Workspace-level access to grant on an asset. */
2
+ /** Workspace-level access on an asset; ``none`` removes the workspace share. */
3
3
  export const WorkspaceShareAccess = {
4
4
  View: "view",
5
5
  Edit: "edit",
6
+ None: "none",
6
7
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2262";
1
+ export declare const SDK_VERSION = "4.3.2264";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.2262";
1
+ export const SDK_VERSION = "4.3.2264";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenaintel/sdk",
3
- "version": "4.3.2262",
3
+ "version": "4.3.2264",
4
4
  "private": false,
5
5
  "repository": "github:Athena-Intel/athena-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -515,7 +515,7 @@ await client.aop.updateConfig({
515
515
  <dl>
516
516
  <dd>
517
517
 
518
- Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence.
518
+ Retrieve a paginated list of assets with optional filtering and sorting. Assets include documents, presentations, spreadsheets, images, videos, and other file types managed by Athena Intelligence. Pass parent_folder_id to list one folder's direct children (not its whole subtree), or filters.parent_folder_id = null to list assets in no folder.
519
519
  </dd>
520
520
  </dl>
521
521
  </dd>
@@ -648,7 +648,7 @@ await client.assets.convertExcelToSheet({
648
648
  <dl>
649
649
  <dd>
650
650
 
651
- Create a new asset such as a spreadsheet, document, folder, database, computer, user interface, skill, collab agent, or generic doc (admin-only) in your workspace with your current permissions. Computer assets return 202 after durable submission, which commits the asset and initialization delivery intent together. Runtime provisioning continues asynchronously. Inspect the returned asset ID for progress instead of repeating creation. Computers accept the same configuration as the Athena UI's creation dialog: template, provider, cpu, memory (GiB), disk (GiB) and env_vars. Sizes must be offered by the environment's computer resource policy, and only admins may pick a size other than the template default (403 otherwise). In capability enforce mode, computer creation requires computer.create and returns 403 when denied. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended.
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. Databases accept suspend_timeout_seconds, the auto-suspend window from the database's Settings in Athena: 0 keeps the database running (it never suspends, and keeps using capacity), otherwise 60 to 86400 seconds. A database is provisioned in the background: poll GET /api/v0/databases/{asset_id}/compute-status until it reports running or suspended. Without workspace_id the asset is created in the workspace of parent_folder_id when one is given, otherwise in your current workspace; you must be a member of that workspace.
652
652
  </dd>
653
653
  </dl>
654
654
  </dd>
@@ -1724,7 +1724,7 @@ await client.assets.share({
1724
1724
  <dl>
1725
1725
  <dd>
1726
1726
 
1727
- Update the workspace-level access on an asset. Only users who have edit access to the asset and permission to share with the workspace can use this endpoint. Set 'view' or 'edit' to grant workspace-wide access.
1727
+ Update the workspace-level access on an asset. Needs edit access to the asset. Set 'view' or 'edit' to grant workspace-wide access, which also needs permission to share with the workspace. Set 'none' (or null) to remove the workspace-wide share, as DELETE does; removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access.
1728
1728
  </dd>
1729
1729
  </dl>
1730
1730
  </dd>
@@ -1774,6 +1774,71 @@ await client.assets.updateWorkspaceAccess({
1774
1774
  </dl>
1775
1775
 
1776
1776
 
1777
+ </dd>
1778
+ </dl>
1779
+ </details>
1780
+
1781
+ <details><summary><code>client.assets.<a href="/src/api/resources/assets/client/Client.ts">removeWorkspaceAccess</a>({ ...params }) -> AthenaIntelligence.WorkspaceAccessResponseOut</code></summary>
1782
+ <dl>
1783
+ <dd>
1784
+
1785
+ #### 📝 Description
1786
+
1787
+ <dl>
1788
+ <dd>
1789
+
1790
+ <dl>
1791
+ <dd>
1792
+
1793
+ Remove the workspace-wide share from an asset, so members of the workspace no longer get access through it. Needs edit access to the asset. Removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access. Calling it on an asset with no workspace share, or on one in the trash, succeeds with the same answer.
1794
+ </dd>
1795
+ </dl>
1796
+ </dd>
1797
+ </dl>
1798
+
1799
+ #### 🔌 Usage
1800
+
1801
+ <dl>
1802
+ <dd>
1803
+
1804
+ <dl>
1805
+ <dd>
1806
+
1807
+ ```typescript
1808
+ await client.assets.removeWorkspaceAccess({
1809
+ asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
1810
+ });
1811
+
1812
+ ```
1813
+ </dd>
1814
+ </dl>
1815
+ </dd>
1816
+ </dl>
1817
+
1818
+ #### ⚙️ Parameters
1819
+
1820
+ <dl>
1821
+ <dd>
1822
+
1823
+ <dl>
1824
+ <dd>
1825
+
1826
+ **request:** `AthenaIntelligence.RemoveWorkspaceAccessAssetsRequest`
1827
+
1828
+ </dd>
1829
+ </dl>
1830
+
1831
+ <dl>
1832
+ <dd>
1833
+
1834
+ **requestOptions:** `AssetsClient.RequestOptions`
1835
+
1836
+ </dd>
1837
+ </dl>
1838
+ </dd>
1839
+ </dl>
1840
+
1841
+
1777
1842
  </dd>
1778
1843
  </dl>
1779
1844
  </details>