@athenaintel/sdk 4.3.2251 → 4.3.2253

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 (48) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +1 -1
  3. package/dist/cjs/api/resources/workspaces/client/Client.d.ts +39 -0
  4. package/dist/cjs/api/resources/workspaces/client/Client.js +195 -0
  5. package/dist/cjs/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.d.ts +18 -0
  6. package/dist/cjs/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.js +3 -0
  7. package/dist/cjs/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.d.ts +22 -0
  8. package/dist/cjs/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.js +3 -0
  9. package/dist/cjs/api/resources/workspaces/client/requests/index.d.ts +2 -0
  10. package/dist/cjs/api/types/WorkspaceMembershipListResponseOut.d.ts +12 -0
  11. package/dist/cjs/api/types/WorkspaceMembershipListResponseOut.js +3 -0
  12. package/dist/cjs/api/types/WorkspaceMembershipOut.d.ts +18 -0
  13. package/dist/cjs/api/types/WorkspaceMembershipOut.js +3 -0
  14. package/dist/cjs/api/types/WorkspaceUsageSessionRowOut.d.ts +65 -0
  15. package/dist/cjs/api/types/WorkspaceUsageSessionRowOut.js +3 -0
  16. package/dist/cjs/api/types/WorkspaceUsageSessionsResponseOut.d.ts +13 -0
  17. package/dist/cjs/api/types/WorkspaceUsageSessionsResponseOut.js +3 -0
  18. package/dist/cjs/api/types/WorkspaceUsageWindowOut.d.ts +15 -0
  19. package/dist/cjs/api/types/WorkspaceUsageWindowOut.js +3 -0
  20. package/dist/cjs/api/types/index.d.ts +5 -0
  21. package/dist/cjs/api/types/index.js +5 -0
  22. package/dist/cjs/version.d.ts +1 -1
  23. package/dist/cjs/version.js +1 -1
  24. package/dist/esm/BaseClient.mjs +2 -2
  25. package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +1 -1
  26. package/dist/esm/api/resources/workspaces/client/Client.d.mts +39 -0
  27. package/dist/esm/api/resources/workspaces/client/Client.mjs +195 -0
  28. package/dist/esm/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.d.mts +18 -0
  29. package/dist/esm/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.mjs +2 -0
  30. package/dist/esm/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.d.mts +22 -0
  31. package/dist/esm/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.mjs +2 -0
  32. package/dist/esm/api/resources/workspaces/client/requests/index.d.mts +2 -0
  33. package/dist/esm/api/types/WorkspaceMembershipListResponseOut.d.mts +12 -0
  34. package/dist/esm/api/types/WorkspaceMembershipListResponseOut.mjs +2 -0
  35. package/dist/esm/api/types/WorkspaceMembershipOut.d.mts +18 -0
  36. package/dist/esm/api/types/WorkspaceMembershipOut.mjs +2 -0
  37. package/dist/esm/api/types/WorkspaceUsageSessionRowOut.d.mts +65 -0
  38. package/dist/esm/api/types/WorkspaceUsageSessionRowOut.mjs +2 -0
  39. package/dist/esm/api/types/WorkspaceUsageSessionsResponseOut.d.mts +13 -0
  40. package/dist/esm/api/types/WorkspaceUsageSessionsResponseOut.mjs +2 -0
  41. package/dist/esm/api/types/WorkspaceUsageWindowOut.d.mts +15 -0
  42. package/dist/esm/api/types/WorkspaceUsageWindowOut.mjs +2 -0
  43. package/dist/esm/api/types/index.d.mts +5 -0
  44. package/dist/esm/api/types/index.mjs +5 -0
  45. package/dist/esm/version.d.mts +1 -1
  46. package/dist/esm/version.mjs +1 -1
  47. package/package.json +1 -1
  48. package/reference.md +134 -0
@@ -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.2251",
47
- "User-Agent": "@athenaintel/sdk/4.3.2251",
46
+ "X-Fern-SDK-Version": "4.3.2253",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2253",
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,
@@ -18,7 +18,7 @@ export interface CreateAssetRequestIn {
18
18
  disk?: number | null;
19
19
  /** Computer only. Environment variables to set on the computer. Must include every key the template or environment requires. Also accepted as 'envVars'. */
20
20
  env_vars?: Record<string, string | null> | null;
21
- /** user_interface only. HTML used as the interface's initial index.html; styles.css and script.js start empty. */
21
+ /** user_interface only. HTML used as the interface's initial index.html; without it the interface starts from Athena's starter page. */
22
22
  html_content?: string | null;
23
23
  /** Computer only. Memory in GiB. Defaults to the template's default. Same policy and admin rules as cpu. */
24
24
  memory?: number | null;
@@ -65,6 +65,25 @@ export declare class WorkspacesClient {
65
65
  */
66
66
  searchMembers(request: AthenaIntelligence.SearchMembersWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceMemberSearchResponseOut>;
67
67
  private __searchMembers;
68
+ /**
69
+ * The full membership roster of one workspace with each member's user id, name, email, role and join date — built for usage reporting and licence reconciliation, unlike the share-picker search at `GET /workspaces/{workspace_id}/members`. Removed members are left out unless `include_archived=true`. Pages are ordered by user id; `next_cursor` is returned while more remain. Requires workspace owner or manager (or Athena admin) permissions.
70
+ *
71
+ * @param {AthenaIntelligence.ListMembershipsWorkspacesRequest} request
72
+ * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
74
+ * @throws {@link AthenaIntelligence.ForbiddenError}
75
+ * @throws {@link AthenaIntelligence.NotFoundError}
76
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
77
+ *
78
+ * @example
79
+ * await client.workspaces.listMemberships({
80
+ * workspace_id: "workspace_eb171baf",
81
+ * include_archived: false,
82
+ * limit: 200
83
+ * })
84
+ */
85
+ listMemberships(request: AthenaIntelligence.ListMembershipsWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceMembershipListResponseOut>;
86
+ private __listMemberships;
68
87
  /**
69
88
  * Admin only. Mint a short-lived, read-only Keryx token for a workspace's live presence feed (the awareness room the People page renders). The token is bound to the calling user, so Keryx narrows every frame to the documents that user may open; it can never publish presence or write document content. Requires the presence roster to be enabled for the deployment and opted in for the workspace. Computer-asset sandbox credentials are refused: call with the viewing user's own token.
70
89
  *
@@ -158,4 +177,24 @@ export declare class WorkspacesClient {
158
177
  */
159
178
  getUsage(request: AthenaIntelligence.GetUsageWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceUsageResponseOut>;
160
179
  private __getUsage;
180
+ /**
181
+ * Per-session LLM token usage for one workspace — the same rows as the workspace usage CSV export, as JSON. Each session yields one row per provider/model/status combination with its token breakdown and billed cost; dry-run (test) sessions are excluded. Pick the window with `from`/`to` (UTC dates, inclusive, at most 365 days) or a rolling `days`. Pages are keyset-paginated newest first: `limit` counts sessions, and `next_cursor` is returned while more sessions remain. Requires workspace owner or manager (or Athena admin) permissions.
182
+ *
183
+ * @param {AthenaIntelligence.ListUsageSessionsWorkspacesRequest} request
184
+ * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
185
+ *
186
+ * @throws {@link AthenaIntelligence.BadRequestError}
187
+ * @throws {@link AthenaIntelligence.ForbiddenError}
188
+ * @throws {@link AthenaIntelligence.NotFoundError}
189
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
190
+ *
191
+ * @example
192
+ * await client.workspaces.listUsageSessions({
193
+ * workspace_id: "workspace_eb171baf",
194
+ * days: 30,
195
+ * limit: 100
196
+ * })
197
+ */
198
+ listUsageSessions(request: AthenaIntelligence.ListUsageSessionsWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceUsageSessionsResponseOut>;
199
+ private __listUsageSessions;
161
200
  }
@@ -321,6 +321,99 @@ class WorkspacesClient {
321
321
  }
322
322
  });
323
323
  }
324
+ /**
325
+ * The full membership roster of one workspace with each member's user id, name, email, role and join date — built for usage reporting and licence reconciliation, unlike the share-picker search at `GET /workspaces/{workspace_id}/members`. Removed members are left out unless `include_archived=true`. Pages are ordered by user id; `next_cursor` is returned while more remain. Requires workspace owner or manager (or Athena admin) permissions.
326
+ *
327
+ * @param {AthenaIntelligence.ListMembershipsWorkspacesRequest} request
328
+ * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
329
+ *
330
+ * @throws {@link AthenaIntelligence.ForbiddenError}
331
+ * @throws {@link AthenaIntelligence.NotFoundError}
332
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
333
+ *
334
+ * @example
335
+ * await client.workspaces.listMemberships({
336
+ * workspace_id: "workspace_eb171baf",
337
+ * include_archived: false,
338
+ * limit: 200
339
+ * })
340
+ */
341
+ listMemberships(request, requestOptions) {
342
+ return core.HttpResponsePromise.fromPromise(this.__listMemberships(request, requestOptions));
343
+ }
344
+ __listMemberships(request, requestOptions) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
347
+ const { workspace_id: workspaceId, include_archived: includeArchived, cursor, limit } = request;
348
+ const _queryParams = {};
349
+ if (includeArchived != null) {
350
+ _queryParams.include_archived = includeArchived.toString();
351
+ }
352
+ if (cursor !== undefined) {
353
+ _queryParams.cursor = cursor;
354
+ }
355
+ if (limit != null) {
356
+ _queryParams.limit = limit.toString();
357
+ }
358
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
359
+ 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)({
360
+ "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,
361
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
362
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
363
+ 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/workspaces/${core.url.encodePathParam(workspaceId)}/memberships`),
364
+ method: "GET",
365
+ headers: _headers,
366
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
367
+ 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,
368
+ 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,
369
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
370
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
371
+ logging: this._options.logging,
372
+ });
373
+ if (_response.ok) {
374
+ return {
375
+ data: _response.body,
376
+ rawResponse: _response.rawResponse,
377
+ };
378
+ }
379
+ if (_response.error.reason === "status-code") {
380
+ switch (_response.error.statusCode) {
381
+ case 403:
382
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
383
+ case 404:
384
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
385
+ case 422:
386
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
387
+ default:
388
+ throw new errors.AthenaIntelligenceError({
389
+ statusCode: _response.error.statusCode,
390
+ body: _response.error.body,
391
+ rawResponse: _response.rawResponse,
392
+ });
393
+ }
394
+ }
395
+ switch (_response.error.reason) {
396
+ case "non-json":
397
+ throw new errors.AthenaIntelligenceError({
398
+ statusCode: _response.error.statusCode,
399
+ body: _response.error.rawBody,
400
+ rawResponse: _response.rawResponse,
401
+ });
402
+ case "body-is-null":
403
+ throw new errors.AthenaIntelligenceError({
404
+ statusCode: _response.error.statusCode,
405
+ rawResponse: _response.rawResponse,
406
+ });
407
+ case "timeout":
408
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/memberships.");
409
+ case "unknown":
410
+ throw new errors.AthenaIntelligenceError({
411
+ message: _response.error.errorMessage,
412
+ rawResponse: _response.rawResponse,
413
+ });
414
+ }
415
+ });
416
+ }
324
417
  /**
325
418
  * Admin only. Mint a short-lived, read-only Keryx token for a workspace's live presence feed (the awareness room the People page renders). The token is bound to the calling user, so Keryx narrows every frame to the documents that user may open; it can never publish presence or write document content. Requires the presence roster to be enabled for the deployment and opted in for the workspace. Computer-asset sandbox credentials are refused: call with the viewing user's own token.
326
419
  *
@@ -740,5 +833,107 @@ class WorkspacesClient {
740
833
  }
741
834
  });
742
835
  }
836
+ /**
837
+ * Per-session LLM token usage for one workspace — the same rows as the workspace usage CSV export, as JSON. Each session yields one row per provider/model/status combination with its token breakdown and billed cost; dry-run (test) sessions are excluded. Pick the window with `from`/`to` (UTC dates, inclusive, at most 365 days) or a rolling `days`. Pages are keyset-paginated newest first: `limit` counts sessions, and `next_cursor` is returned while more sessions remain. Requires workspace owner or manager (or Athena admin) permissions.
838
+ *
839
+ * @param {AthenaIntelligence.ListUsageSessionsWorkspacesRequest} request
840
+ * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
841
+ *
842
+ * @throws {@link AthenaIntelligence.BadRequestError}
843
+ * @throws {@link AthenaIntelligence.ForbiddenError}
844
+ * @throws {@link AthenaIntelligence.NotFoundError}
845
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
846
+ *
847
+ * @example
848
+ * await client.workspaces.listUsageSessions({
849
+ * workspace_id: "workspace_eb171baf",
850
+ * days: 30,
851
+ * limit: 100
852
+ * })
853
+ */
854
+ listUsageSessions(request, requestOptions) {
855
+ return core.HttpResponsePromise.fromPromise(this.__listUsageSessions(request, requestOptions));
856
+ }
857
+ __listUsageSessions(request, requestOptions) {
858
+ return __awaiter(this, void 0, void 0, function* () {
859
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
860
+ const { workspace_id: workspaceId, from: from_, to, days, cursor, limit } = request;
861
+ const _queryParams = {};
862
+ if (from_ !== undefined) {
863
+ _queryParams.from = from_;
864
+ }
865
+ if (to !== undefined) {
866
+ _queryParams.to = to;
867
+ }
868
+ if (days != null) {
869
+ _queryParams.days = days.toString();
870
+ }
871
+ if (cursor !== undefined) {
872
+ _queryParams.cursor = cursor;
873
+ }
874
+ if (limit != null) {
875
+ _queryParams.limit = limit.toString();
876
+ }
877
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
878
+ 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)({
879
+ "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,
880
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
881
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
882
+ 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/workspaces/${core.url.encodePathParam(workspaceId)}/usage/sessions`),
883
+ method: "GET",
884
+ headers: _headers,
885
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
886
+ 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,
887
+ 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,
888
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
889
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
890
+ logging: this._options.logging,
891
+ });
892
+ if (_response.ok) {
893
+ return {
894
+ data: _response.body,
895
+ rawResponse: _response.rawResponse,
896
+ };
897
+ }
898
+ if (_response.error.reason === "status-code") {
899
+ switch (_response.error.statusCode) {
900
+ case 400:
901
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
902
+ case 403:
903
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
904
+ case 404:
905
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
906
+ case 422:
907
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
908
+ default:
909
+ throw new errors.AthenaIntelligenceError({
910
+ statusCode: _response.error.statusCode,
911
+ body: _response.error.body,
912
+ rawResponse: _response.rawResponse,
913
+ });
914
+ }
915
+ }
916
+ switch (_response.error.reason) {
917
+ case "non-json":
918
+ throw new errors.AthenaIntelligenceError({
919
+ statusCode: _response.error.statusCode,
920
+ body: _response.error.rawBody,
921
+ rawResponse: _response.rawResponse,
922
+ });
923
+ case "body-is-null":
924
+ throw new errors.AthenaIntelligenceError({
925
+ statusCode: _response.error.statusCode,
926
+ rawResponse: _response.rawResponse,
927
+ });
928
+ case "timeout":
929
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/usage/sessions.");
930
+ case "unknown":
931
+ throw new errors.AthenaIntelligenceError({
932
+ message: _response.error.errorMessage,
933
+ rawResponse: _response.rawResponse,
934
+ });
935
+ }
936
+ });
937
+ }
743
938
  }
744
939
  exports.WorkspacesClient = WorkspacesClient;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * workspace_id: "workspace_eb171baf",
5
+ * include_archived: false,
6
+ * limit: 200
7
+ * }
8
+ */
9
+ export interface ListMembershipsWorkspacesRequest {
10
+ /** Unique identifier of the workspace */
11
+ workspace_id: string;
12
+ /** Also return memberships that were removed from the workspace */
13
+ include_archived?: boolean;
14
+ /** `next_cursor` from the previous page */
15
+ cursor?: string | null;
16
+ /** Maximum memberships per page */
17
+ limit?: number;
18
+ }
@@ -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 });
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * workspace_id: "workspace_eb171baf",
5
+ * days: 30,
6
+ * limit: 100
7
+ * }
8
+ */
9
+ export interface ListUsageSessionsWorkspacesRequest {
10
+ /** Unique identifier of the workspace */
11
+ workspace_id: string;
12
+ /** First UTC day of the window (YYYY-MM-DD); requires `to` */
13
+ from?: string | null;
14
+ /** Last UTC day of the window, inclusive (YYYY-MM-DD); requires `from` */
15
+ to?: string | null;
16
+ /** Rolling window in days ending now; ignored when `from`/`to` are given */
17
+ days?: number;
18
+ /** `next_cursor` from the previous page */
19
+ cursor?: string | null;
20
+ /** Maximum sessions per page (each may yield several rows) */
21
+ limit?: number;
22
+ }
@@ -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 });
@@ -2,6 +2,8 @@ export type { CreatePresenceTokenWorkspacesRequest } from "./CreatePresenceToken
2
2
  export type { GetConfigurationWorkspacesRequest } from "./GetConfigurationWorkspacesRequest.js";
3
3
  export type { GetToolRegistryWorkspacesRequest } from "./GetToolRegistryWorkspacesRequest.js";
4
4
  export type { GetUsageWorkspacesRequest } from "./GetUsageWorkspacesRequest.js";
5
+ export type { ListMembershipsWorkspacesRequest } from "./ListMembershipsWorkspacesRequest.js";
6
+ export type { ListUsageSessionsWorkspacesRequest } from "./ListUsageSessionsWorkspacesRequest.js";
5
7
  export type { PresenceResolveRequestIn } from "./PresenceResolveRequestIn.js";
6
8
  export type { SearchMembersWorkspacesRequest } from "./SearchMembersWorkspacesRequest.js";
7
9
  export type { UpdateWorkspaceConfigurationRequestIn } from "./UpdateWorkspaceConfigurationRequestIn.js";
@@ -0,0 +1,12 @@
1
+ import type * as AthenaIntelligence from "../index.js";
2
+ /**
3
+ * One page of a workspace's membership roster.
4
+ */
5
+ export interface WorkspaceMembershipListResponseOut {
6
+ /** Memberships for this page, ordered by user id */
7
+ memberships: AthenaIntelligence.WorkspaceMembershipOut[];
8
+ /** Pass as `cursor` to fetch the next page; null on the last page */
9
+ next_cursor: string | null;
10
+ /** Workspace the roster belongs to */
11
+ workspace_id: string;
12
+ }
@@ -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 });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * One member of a workspace and their role.
3
+ */
4
+ export interface WorkspaceMembershipOut {
5
+ email: string;
6
+ first_name: string | null;
7
+ /** Membership has been removed from the workspace */
8
+ is_archived: boolean;
9
+ /** The user account is suspended deployment-wide */
10
+ is_suspended: boolean;
11
+ /** When the membership was created */
12
+ joined_at: string;
13
+ last_name: string | null;
14
+ /** Workspace role: owner, manager or user */
15
+ role: string;
16
+ /** User id, stable across workspaces */
17
+ user_id: string;
18
+ }
@@ -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 });
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Token usage of one session for one provider/model/status combination.
3
+ */
4
+ export interface WorkspaceUsageSessionRowOut {
5
+ /** AOP asset id when started by an AOP run */
6
+ aop_id: string | null;
7
+ /** Title of that AOP */
8
+ aop_title: string | null;
9
+ /** Billing attribution of the session */
10
+ billed_to: string | null;
11
+ /** Null for an `untracked` row */
12
+ cache_creation_input_tokens: number | null;
13
+ /** Null for an `untracked` row */
14
+ cache_read_input_tokens: number | null;
15
+ /** Earliest model call in the row */
16
+ first_event_at: string | null;
17
+ /** Null for an `untracked` row */
18
+ input_tokens: number | null;
19
+ /** Latest model call in the row */
20
+ last_event_at: string | null;
21
+ /** How the session was started (user_chat, aop_execution, public_api, ...) */
22
+ origin_kind: string | null;
23
+ /** Human label for origin_kind */
24
+ origin_kind_label: string | null;
25
+ /** Null for an `untracked` row */
26
+ output_tokens: number | null;
27
+ /** Project asset id, if any */
28
+ project_id: string | null;
29
+ /** Title of that project */
30
+ project_title: string | null;
31
+ /** LLM provider */
32
+ provider: string;
33
+ /** Null for an `untracked` row */
34
+ reasoning_output_tokens: number | null;
35
+ /** Model the session asked for */
36
+ requested_model: string | null;
37
+ /** Model that actually served the calls */
38
+ resolved_model: string;
39
+ /** Billed cost of this row in USD; safe to sum across rows */
40
+ row_total_cost_usd: number;
41
+ /** Model calls aggregated into this row */
42
+ run_count: number;
43
+ /** When the session was created */
44
+ session_created_at: string;
45
+ /** Session (conversation) asset id */
46
+ session_id: string;
47
+ /** Billed cost of the whole session in USD, carried by the session's first row only and null on its other rows, so summing the column never double-counts (same convention as the CSV export) */
48
+ session_total_cost_usd: number | null;
49
+ /** Outcome of the aggregated calls; `untracked` marks a session metered before token tracking existed, whose token counters are null */
50
+ status: string;
51
+ /** Null for an `untracked` row */
52
+ total_tokens: number | null;
53
+ /** AOP trigger type, if any */
54
+ trigger_type: string | null;
55
+ /** Null for an `untracked` row */
56
+ uncached_input_tokens: number | null;
57
+ /** Window end (exclusive) the row was bounded to */
58
+ usage_period_end_exclusive: string | null;
59
+ /** Window start the row was bounded to */
60
+ usage_period_start: string;
61
+ /** Email of the member who ran the session */
62
+ user_email: string | null;
63
+ /** Display name of that member */
64
+ user_name: string | null;
65
+ }
@@ -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 });
@@ -0,0 +1,13 @@
1
+ import type * as AthenaIntelligence from "../index.js";
2
+ /**
3
+ * One page of per-session token usage for a workspace.
4
+ */
5
+ export interface WorkspaceUsageSessionsResponseOut {
6
+ /** Pass as `cursor` to fetch the next page; null when the window is exhausted */
7
+ next_cursor: string | null;
8
+ /** Rows for this page, newest session first */
9
+ sessions: AthenaIntelligence.WorkspaceUsageSessionRowOut[];
10
+ window: AthenaIntelligence.WorkspaceUsageWindowOut;
11
+ /** Workspace the rows belong to */
12
+ workspace_id: string;
13
+ }
@@ -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 });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The reporting window a usage page covers.
3
+ */
4
+ export interface WorkspaceUsageWindowOut {
5
+ /** Number of days the window spans */
6
+ days: number;
7
+ /** Last UTC day (inclusive) of an explicit window; null for a rolling window */
8
+ end_date: string | null;
9
+ /** First UTC day of an explicit `from`/`to` window; null for a rolling window */
10
+ start_date: string | null;
11
+ /** Window end (exclusive); null means 'now' for a rolling window */
12
+ usage_period_end_exclusive: string | null;
13
+ /** Window start (inclusive) */
14
+ usage_period_start: string;
15
+ }
@@ -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 });
@@ -165,12 +165,17 @@ export * from "./WorkspaceDisclaimerOut.js";
165
165
  export * from "./WorkspaceInfoOut.js";
166
166
  export * from "./WorkspaceMemberOut.js";
167
167
  export * from "./WorkspaceMemberSearchResponseOut.js";
168
+ export * from "./WorkspaceMembershipListResponseOut.js";
169
+ export * from "./WorkspaceMembershipOut.js";
168
170
  export * from "./WorkspaceShareAccess.js";
169
171
  export * from "./WorkspaceToolRegistryResponseOut.js";
170
172
  export * from "./WorkspaceToolRegistryToolOut.js";
171
173
  export * from "./WorkspaceUsageComputerOut.js";
172
174
  export * from "./WorkspaceUsageDayOut.js";
173
175
  export * from "./WorkspaceUsageResponseOut.js";
176
+ export * from "./WorkspaceUsageSessionRowOut.js";
177
+ export * from "./WorkspaceUsageSessionsResponseOut.js";
174
178
  export * from "./WorkspaceUsageTokensOut.js";
175
179
  export * from "./WorkspaceUsageUserOut.js";
180
+ export * from "./WorkspaceUsageWindowOut.js";
176
181
  export * from "./WrapStrategy.js";
@@ -181,12 +181,17 @@ __exportStar(require("./WorkspaceDisclaimerOut.js"), exports);
181
181
  __exportStar(require("./WorkspaceInfoOut.js"), exports);
182
182
  __exportStar(require("./WorkspaceMemberOut.js"), exports);
183
183
  __exportStar(require("./WorkspaceMemberSearchResponseOut.js"), exports);
184
+ __exportStar(require("./WorkspaceMembershipListResponseOut.js"), exports);
185
+ __exportStar(require("./WorkspaceMembershipOut.js"), exports);
184
186
  __exportStar(require("./WorkspaceShareAccess.js"), exports);
185
187
  __exportStar(require("./WorkspaceToolRegistryResponseOut.js"), exports);
186
188
  __exportStar(require("./WorkspaceToolRegistryToolOut.js"), exports);
187
189
  __exportStar(require("./WorkspaceUsageComputerOut.js"), exports);
188
190
  __exportStar(require("./WorkspaceUsageDayOut.js"), exports);
189
191
  __exportStar(require("./WorkspaceUsageResponseOut.js"), exports);
192
+ __exportStar(require("./WorkspaceUsageSessionRowOut.js"), exports);
193
+ __exportStar(require("./WorkspaceUsageSessionsResponseOut.js"), exports);
190
194
  __exportStar(require("./WorkspaceUsageTokensOut.js"), exports);
191
195
  __exportStar(require("./WorkspaceUsageUserOut.js"), exports);
196
+ __exportStar(require("./WorkspaceUsageWindowOut.js"), exports);
192
197
  __exportStar(require("./WrapStrategy.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2251";
1
+ export declare const SDK_VERSION = "4.3.2253";
@@ -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.2251";
4
+ exports.SDK_VERSION = "4.3.2253";
@@ -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.2251",
10
- "User-Agent": "@athenaintel/sdk/4.3.2251",
9
+ "X-Fern-SDK-Version": "4.3.2253",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2253",
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,
@@ -18,7 +18,7 @@ export interface CreateAssetRequestIn {
18
18
  disk?: number | null;
19
19
  /** Computer only. Environment variables to set on the computer. Must include every key the template or environment requires. Also accepted as 'envVars'. */
20
20
  env_vars?: Record<string, string | null> | null;
21
- /** user_interface only. HTML used as the interface's initial index.html; styles.css and script.js start empty. */
21
+ /** user_interface only. HTML used as the interface's initial index.html; without it the interface starts from Athena's starter page. */
22
22
  html_content?: string | null;
23
23
  /** Computer only. Memory in GiB. Defaults to the template's default. Same policy and admin rules as cpu. */
24
24
  memory?: number | null;
@@ -65,6 +65,25 @@ export declare class WorkspacesClient {
65
65
  */
66
66
  searchMembers(request: AthenaIntelligence.SearchMembersWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceMemberSearchResponseOut>;
67
67
  private __searchMembers;
68
+ /**
69
+ * The full membership roster of one workspace with each member's user id, name, email, role and join date — built for usage reporting and licence reconciliation, unlike the share-picker search at `GET /workspaces/{workspace_id}/members`. Removed members are left out unless `include_archived=true`. Pages are ordered by user id; `next_cursor` is returned while more remain. Requires workspace owner or manager (or Athena admin) permissions.
70
+ *
71
+ * @param {AthenaIntelligence.ListMembershipsWorkspacesRequest} request
72
+ * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
74
+ * @throws {@link AthenaIntelligence.ForbiddenError}
75
+ * @throws {@link AthenaIntelligence.NotFoundError}
76
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
77
+ *
78
+ * @example
79
+ * await client.workspaces.listMemberships({
80
+ * workspace_id: "workspace_eb171baf",
81
+ * include_archived: false,
82
+ * limit: 200
83
+ * })
84
+ */
85
+ listMemberships(request: AthenaIntelligence.ListMembershipsWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceMembershipListResponseOut>;
86
+ private __listMemberships;
68
87
  /**
69
88
  * Admin only. Mint a short-lived, read-only Keryx token for a workspace's live presence feed (the awareness room the People page renders). The token is bound to the calling user, so Keryx narrows every frame to the documents that user may open; it can never publish presence or write document content. Requires the presence roster to be enabled for the deployment and opted in for the workspace. Computer-asset sandbox credentials are refused: call with the viewing user's own token.
70
89
  *
@@ -158,4 +177,24 @@ export declare class WorkspacesClient {
158
177
  */
159
178
  getUsage(request: AthenaIntelligence.GetUsageWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceUsageResponseOut>;
160
179
  private __getUsage;
180
+ /**
181
+ * Per-session LLM token usage for one workspace — the same rows as the workspace usage CSV export, as JSON. Each session yields one row per provider/model/status combination with its token breakdown and billed cost; dry-run (test) sessions are excluded. Pick the window with `from`/`to` (UTC dates, inclusive, at most 365 days) or a rolling `days`. Pages are keyset-paginated newest first: `limit` counts sessions, and `next_cursor` is returned while more sessions remain. Requires workspace owner or manager (or Athena admin) permissions.
182
+ *
183
+ * @param {AthenaIntelligence.ListUsageSessionsWorkspacesRequest} request
184
+ * @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
185
+ *
186
+ * @throws {@link AthenaIntelligence.BadRequestError}
187
+ * @throws {@link AthenaIntelligence.ForbiddenError}
188
+ * @throws {@link AthenaIntelligence.NotFoundError}
189
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
190
+ *
191
+ * @example
192
+ * await client.workspaces.listUsageSessions({
193
+ * workspace_id: "workspace_eb171baf",
194
+ * days: 30,
195
+ * limit: 100
196
+ * })
197
+ */
198
+ listUsageSessions(request: AthenaIntelligence.ListUsageSessionsWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceUsageSessionsResponseOut>;
199
+ private __listUsageSessions;
161
200
  }