@athenaintel/sdk 4.3.2251 → 4.3.2252
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +39 -0
- package/dist/cjs/api/resources/workspaces/client/Client.js +195 -0
- package/dist/cjs/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.d.ts +18 -0
- package/dist/cjs/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.js +3 -0
- package/dist/cjs/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.d.ts +22 -0
- package/dist/cjs/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.js +3 -0
- package/dist/cjs/api/resources/workspaces/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/WorkspaceMembershipListResponseOut.d.ts +12 -0
- package/dist/cjs/api/types/WorkspaceMembershipListResponseOut.js +3 -0
- package/dist/cjs/api/types/WorkspaceMembershipOut.d.ts +18 -0
- package/dist/cjs/api/types/WorkspaceMembershipOut.js +3 -0
- package/dist/cjs/api/types/WorkspaceUsageSessionRowOut.d.ts +65 -0
- package/dist/cjs/api/types/WorkspaceUsageSessionRowOut.js +3 -0
- package/dist/cjs/api/types/WorkspaceUsageSessionsResponseOut.d.ts +13 -0
- package/dist/cjs/api/types/WorkspaceUsageSessionsResponseOut.js +3 -0
- package/dist/cjs/api/types/WorkspaceUsageWindowOut.d.ts +15 -0
- package/dist/cjs/api/types/WorkspaceUsageWindowOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +39 -0
- package/dist/esm/api/resources/workspaces/client/Client.mjs +195 -0
- package/dist/esm/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.d.mts +18 -0
- package/dist/esm/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.mjs +2 -0
- package/dist/esm/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.d.mts +22 -0
- package/dist/esm/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.mjs +2 -0
- package/dist/esm/api/resources/workspaces/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/WorkspaceMembershipListResponseOut.d.mts +12 -0
- package/dist/esm/api/types/WorkspaceMembershipListResponseOut.mjs +2 -0
- package/dist/esm/api/types/WorkspaceMembershipOut.d.mts +18 -0
- package/dist/esm/api/types/WorkspaceMembershipOut.mjs +2 -0
- package/dist/esm/api/types/WorkspaceUsageSessionRowOut.d.mts +65 -0
- package/dist/esm/api/types/WorkspaceUsageSessionRowOut.mjs +2 -0
- package/dist/esm/api/types/WorkspaceUsageSessionsResponseOut.d.mts +13 -0
- package/dist/esm/api/types/WorkspaceUsageSessionsResponseOut.mjs +2 -0
- package/dist/esm/api/types/WorkspaceUsageWindowOut.d.mts +15 -0
- package/dist/esm/api/types/WorkspaceUsageWindowOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +134 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "4.3.
|
|
47
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
46
|
+
"X-Fern-SDK-Version": "4.3.2252",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.2252",
|
|
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,
|
|
@@ -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;
|
package/dist/cjs/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.d.ts
ADDED
|
@@ -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
|
+
}
|
package/dist/cjs/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.d.ts
ADDED
|
@@ -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
|
+
}
|
|
@@ -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,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,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,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,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
|
+
}
|
|
@@ -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);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.2252";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "4.3.
|
|
10
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
9
|
+
"X-Fern-SDK-Version": "4.3.2252",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.2252",
|
|
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,
|
|
@@ -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
|
}
|
|
@@ -285,6 +285,99 @@ export class WorkspacesClient {
|
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* 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.
|
|
290
|
+
*
|
|
291
|
+
* @param {AthenaIntelligence.ListMembershipsWorkspacesRequest} request
|
|
292
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
293
|
+
*
|
|
294
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
295
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
296
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* await client.workspaces.listMemberships({
|
|
300
|
+
* workspace_id: "workspace_eb171baf",
|
|
301
|
+
* include_archived: false,
|
|
302
|
+
* limit: 200
|
|
303
|
+
* })
|
|
304
|
+
*/
|
|
305
|
+
listMemberships(request, requestOptions) {
|
|
306
|
+
return core.HttpResponsePromise.fromPromise(this.__listMemberships(request, requestOptions));
|
|
307
|
+
}
|
|
308
|
+
__listMemberships(request, requestOptions) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
311
|
+
const { workspace_id: workspaceId, include_archived: includeArchived, cursor, limit } = request;
|
|
312
|
+
const _queryParams = {};
|
|
313
|
+
if (includeArchived != null) {
|
|
314
|
+
_queryParams.include_archived = includeArchived.toString();
|
|
315
|
+
}
|
|
316
|
+
if (cursor !== undefined) {
|
|
317
|
+
_queryParams.cursor = cursor;
|
|
318
|
+
}
|
|
319
|
+
if (limit != null) {
|
|
320
|
+
_queryParams.limit = limit.toString();
|
|
321
|
+
}
|
|
322
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
323
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
324
|
+
"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,
|
|
325
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
326
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
327
|
+
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`),
|
|
328
|
+
method: "GET",
|
|
329
|
+
headers: _headers,
|
|
330
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
331
|
+
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,
|
|
332
|
+
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,
|
|
333
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
334
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
335
|
+
logging: this._options.logging,
|
|
336
|
+
});
|
|
337
|
+
if (_response.ok) {
|
|
338
|
+
return {
|
|
339
|
+
data: _response.body,
|
|
340
|
+
rawResponse: _response.rawResponse,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
if (_response.error.reason === "status-code") {
|
|
344
|
+
switch (_response.error.statusCode) {
|
|
345
|
+
case 403:
|
|
346
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
347
|
+
case 404:
|
|
348
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
349
|
+
case 422:
|
|
350
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
351
|
+
default:
|
|
352
|
+
throw new errors.AthenaIntelligenceError({
|
|
353
|
+
statusCode: _response.error.statusCode,
|
|
354
|
+
body: _response.error.body,
|
|
355
|
+
rawResponse: _response.rawResponse,
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
switch (_response.error.reason) {
|
|
360
|
+
case "non-json":
|
|
361
|
+
throw new errors.AthenaIntelligenceError({
|
|
362
|
+
statusCode: _response.error.statusCode,
|
|
363
|
+
body: _response.error.rawBody,
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
});
|
|
366
|
+
case "body-is-null":
|
|
367
|
+
throw new errors.AthenaIntelligenceError({
|
|
368
|
+
statusCode: _response.error.statusCode,
|
|
369
|
+
rawResponse: _response.rawResponse,
|
|
370
|
+
});
|
|
371
|
+
case "timeout":
|
|
372
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/memberships.");
|
|
373
|
+
case "unknown":
|
|
374
|
+
throw new errors.AthenaIntelligenceError({
|
|
375
|
+
message: _response.error.errorMessage,
|
|
376
|
+
rawResponse: _response.rawResponse,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
}
|
|
288
381
|
/**
|
|
289
382
|
* 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.
|
|
290
383
|
*
|
|
@@ -704,4 +797,106 @@ export class WorkspacesClient {
|
|
|
704
797
|
}
|
|
705
798
|
});
|
|
706
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* 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.
|
|
802
|
+
*
|
|
803
|
+
* @param {AthenaIntelligence.ListUsageSessionsWorkspacesRequest} request
|
|
804
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
805
|
+
*
|
|
806
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
807
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
808
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
809
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
810
|
+
*
|
|
811
|
+
* @example
|
|
812
|
+
* await client.workspaces.listUsageSessions({
|
|
813
|
+
* workspace_id: "workspace_eb171baf",
|
|
814
|
+
* days: 30,
|
|
815
|
+
* limit: 100
|
|
816
|
+
* })
|
|
817
|
+
*/
|
|
818
|
+
listUsageSessions(request, requestOptions) {
|
|
819
|
+
return core.HttpResponsePromise.fromPromise(this.__listUsageSessions(request, requestOptions));
|
|
820
|
+
}
|
|
821
|
+
__listUsageSessions(request, requestOptions) {
|
|
822
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
823
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
824
|
+
const { workspace_id: workspaceId, from: from_, to, days, cursor, limit } = request;
|
|
825
|
+
const _queryParams = {};
|
|
826
|
+
if (from_ !== undefined) {
|
|
827
|
+
_queryParams.from = from_;
|
|
828
|
+
}
|
|
829
|
+
if (to !== undefined) {
|
|
830
|
+
_queryParams.to = to;
|
|
831
|
+
}
|
|
832
|
+
if (days != null) {
|
|
833
|
+
_queryParams.days = days.toString();
|
|
834
|
+
}
|
|
835
|
+
if (cursor !== undefined) {
|
|
836
|
+
_queryParams.cursor = cursor;
|
|
837
|
+
}
|
|
838
|
+
if (limit != null) {
|
|
839
|
+
_queryParams.limit = limit.toString();
|
|
840
|
+
}
|
|
841
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
842
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
843
|
+
"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,
|
|
844
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
845
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
846
|
+
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`),
|
|
847
|
+
method: "GET",
|
|
848
|
+
headers: _headers,
|
|
849
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
850
|
+
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,
|
|
851
|
+
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,
|
|
852
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
853
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
854
|
+
logging: this._options.logging,
|
|
855
|
+
});
|
|
856
|
+
if (_response.ok) {
|
|
857
|
+
return {
|
|
858
|
+
data: _response.body,
|
|
859
|
+
rawResponse: _response.rawResponse,
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
if (_response.error.reason === "status-code") {
|
|
863
|
+
switch (_response.error.statusCode) {
|
|
864
|
+
case 400:
|
|
865
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
866
|
+
case 403:
|
|
867
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
868
|
+
case 404:
|
|
869
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
870
|
+
case 422:
|
|
871
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
872
|
+
default:
|
|
873
|
+
throw new errors.AthenaIntelligenceError({
|
|
874
|
+
statusCode: _response.error.statusCode,
|
|
875
|
+
body: _response.error.body,
|
|
876
|
+
rawResponse: _response.rawResponse,
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
switch (_response.error.reason) {
|
|
881
|
+
case "non-json":
|
|
882
|
+
throw new errors.AthenaIntelligenceError({
|
|
883
|
+
statusCode: _response.error.statusCode,
|
|
884
|
+
body: _response.error.rawBody,
|
|
885
|
+
rawResponse: _response.rawResponse,
|
|
886
|
+
});
|
|
887
|
+
case "body-is-null":
|
|
888
|
+
throw new errors.AthenaIntelligenceError({
|
|
889
|
+
statusCode: _response.error.statusCode,
|
|
890
|
+
rawResponse: _response.rawResponse,
|
|
891
|
+
});
|
|
892
|
+
case "timeout":
|
|
893
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/usage/sessions.");
|
|
894
|
+
case "unknown":
|
|
895
|
+
throw new errors.AthenaIntelligenceError({
|
|
896
|
+
message: _response.error.errorMessage,
|
|
897
|
+
rawResponse: _response.rawResponse,
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
}
|
|
707
902
|
}
|
package/dist/esm/api/resources/workspaces/client/requests/ListMembershipsWorkspacesRequest.d.mts
ADDED
|
@@ -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
|
+
}
|
package/dist/esm/api/resources/workspaces/client/requests/ListUsageSessionsWorkspacesRequest.d.mts
ADDED
|
@@ -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
|
+
}
|
|
@@ -2,6 +2,8 @@ export type { CreatePresenceTokenWorkspacesRequest } from "./CreatePresenceToken
|
|
|
2
2
|
export type { GetConfigurationWorkspacesRequest } from "./GetConfigurationWorkspacesRequest.mjs";
|
|
3
3
|
export type { GetToolRegistryWorkspacesRequest } from "./GetToolRegistryWorkspacesRequest.mjs";
|
|
4
4
|
export type { GetUsageWorkspacesRequest } from "./GetUsageWorkspacesRequest.mjs";
|
|
5
|
+
export type { ListMembershipsWorkspacesRequest } from "./ListMembershipsWorkspacesRequest.mjs";
|
|
6
|
+
export type { ListUsageSessionsWorkspacesRequest } from "./ListUsageSessionsWorkspacesRequest.mjs";
|
|
5
7
|
export type { PresenceResolveRequestIn } from "./PresenceResolveRequestIn.mjs";
|
|
6
8
|
export type { SearchMembersWorkspacesRequest } from "./SearchMembersWorkspacesRequest.mjs";
|
|
7
9
|
export type { UpdateWorkspaceConfigurationRequestIn } from "./UpdateWorkspaceConfigurationRequestIn.mjs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
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,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,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,13 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
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,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
|
+
}
|
|
@@ -165,12 +165,17 @@ export * from "./WorkspaceDisclaimerOut.mjs";
|
|
|
165
165
|
export * from "./WorkspaceInfoOut.mjs";
|
|
166
166
|
export * from "./WorkspaceMemberOut.mjs";
|
|
167
167
|
export * from "./WorkspaceMemberSearchResponseOut.mjs";
|
|
168
|
+
export * from "./WorkspaceMembershipListResponseOut.mjs";
|
|
169
|
+
export * from "./WorkspaceMembershipOut.mjs";
|
|
168
170
|
export * from "./WorkspaceShareAccess.mjs";
|
|
169
171
|
export * from "./WorkspaceToolRegistryResponseOut.mjs";
|
|
170
172
|
export * from "./WorkspaceToolRegistryToolOut.mjs";
|
|
171
173
|
export * from "./WorkspaceUsageComputerOut.mjs";
|
|
172
174
|
export * from "./WorkspaceUsageDayOut.mjs";
|
|
173
175
|
export * from "./WorkspaceUsageResponseOut.mjs";
|
|
176
|
+
export * from "./WorkspaceUsageSessionRowOut.mjs";
|
|
177
|
+
export * from "./WorkspaceUsageSessionsResponseOut.mjs";
|
|
174
178
|
export * from "./WorkspaceUsageTokensOut.mjs";
|
|
175
179
|
export * from "./WorkspaceUsageUserOut.mjs";
|
|
180
|
+
export * from "./WorkspaceUsageWindowOut.mjs";
|
|
176
181
|
export * from "./WrapStrategy.mjs";
|
|
@@ -165,12 +165,17 @@ export * from "./WorkspaceDisclaimerOut.mjs";
|
|
|
165
165
|
export * from "./WorkspaceInfoOut.mjs";
|
|
166
166
|
export * from "./WorkspaceMemberOut.mjs";
|
|
167
167
|
export * from "./WorkspaceMemberSearchResponseOut.mjs";
|
|
168
|
+
export * from "./WorkspaceMembershipListResponseOut.mjs";
|
|
169
|
+
export * from "./WorkspaceMembershipOut.mjs";
|
|
168
170
|
export * from "./WorkspaceShareAccess.mjs";
|
|
169
171
|
export * from "./WorkspaceToolRegistryResponseOut.mjs";
|
|
170
172
|
export * from "./WorkspaceToolRegistryToolOut.mjs";
|
|
171
173
|
export * from "./WorkspaceUsageComputerOut.mjs";
|
|
172
174
|
export * from "./WorkspaceUsageDayOut.mjs";
|
|
173
175
|
export * from "./WorkspaceUsageResponseOut.mjs";
|
|
176
|
+
export * from "./WorkspaceUsageSessionRowOut.mjs";
|
|
177
|
+
export * from "./WorkspaceUsageSessionsResponseOut.mjs";
|
|
174
178
|
export * from "./WorkspaceUsageTokensOut.mjs";
|
|
175
179
|
export * from "./WorkspaceUsageUserOut.mjs";
|
|
180
|
+
export * from "./WorkspaceUsageWindowOut.mjs";
|
|
176
181
|
export * from "./WrapStrategy.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.2252";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.2252";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -5578,6 +5578,73 @@ await client.workspaces.searchMembers({
|
|
|
5578
5578
|
</dl>
|
|
5579
5579
|
|
|
5580
5580
|
|
|
5581
|
+
</dd>
|
|
5582
|
+
</dl>
|
|
5583
|
+
</details>
|
|
5584
|
+
|
|
5585
|
+
<details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">listMemberships</a>({ ...params }) -> AthenaIntelligence.WorkspaceMembershipListResponseOut</code></summary>
|
|
5586
|
+
<dl>
|
|
5587
|
+
<dd>
|
|
5588
|
+
|
|
5589
|
+
#### 📝 Description
|
|
5590
|
+
|
|
5591
|
+
<dl>
|
|
5592
|
+
<dd>
|
|
5593
|
+
|
|
5594
|
+
<dl>
|
|
5595
|
+
<dd>
|
|
5596
|
+
|
|
5597
|
+
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.
|
|
5598
|
+
</dd>
|
|
5599
|
+
</dl>
|
|
5600
|
+
</dd>
|
|
5601
|
+
</dl>
|
|
5602
|
+
|
|
5603
|
+
#### 🔌 Usage
|
|
5604
|
+
|
|
5605
|
+
<dl>
|
|
5606
|
+
<dd>
|
|
5607
|
+
|
|
5608
|
+
<dl>
|
|
5609
|
+
<dd>
|
|
5610
|
+
|
|
5611
|
+
```typescript
|
|
5612
|
+
await client.workspaces.listMemberships({
|
|
5613
|
+
workspace_id: "workspace_eb171baf",
|
|
5614
|
+
include_archived: false,
|
|
5615
|
+
limit: 200
|
|
5616
|
+
});
|
|
5617
|
+
|
|
5618
|
+
```
|
|
5619
|
+
</dd>
|
|
5620
|
+
</dl>
|
|
5621
|
+
</dd>
|
|
5622
|
+
</dl>
|
|
5623
|
+
|
|
5624
|
+
#### ⚙️ Parameters
|
|
5625
|
+
|
|
5626
|
+
<dl>
|
|
5627
|
+
<dd>
|
|
5628
|
+
|
|
5629
|
+
<dl>
|
|
5630
|
+
<dd>
|
|
5631
|
+
|
|
5632
|
+
**request:** `AthenaIntelligence.ListMembershipsWorkspacesRequest`
|
|
5633
|
+
|
|
5634
|
+
</dd>
|
|
5635
|
+
</dl>
|
|
5636
|
+
|
|
5637
|
+
<dl>
|
|
5638
|
+
<dd>
|
|
5639
|
+
|
|
5640
|
+
**requestOptions:** `WorkspacesClient.RequestOptions`
|
|
5641
|
+
|
|
5642
|
+
</dd>
|
|
5643
|
+
</dl>
|
|
5644
|
+
</dd>
|
|
5645
|
+
</dl>
|
|
5646
|
+
|
|
5647
|
+
|
|
5581
5648
|
</dd>
|
|
5582
5649
|
</dl>
|
|
5583
5650
|
</details>
|
|
@@ -5913,6 +5980,73 @@ await client.workspaces.getUsage({
|
|
|
5913
5980
|
</dl>
|
|
5914
5981
|
|
|
5915
5982
|
|
|
5983
|
+
</dd>
|
|
5984
|
+
</dl>
|
|
5985
|
+
</details>
|
|
5986
|
+
|
|
5987
|
+
<details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">listUsageSessions</a>({ ...params }) -> AthenaIntelligence.WorkspaceUsageSessionsResponseOut</code></summary>
|
|
5988
|
+
<dl>
|
|
5989
|
+
<dd>
|
|
5990
|
+
|
|
5991
|
+
#### 📝 Description
|
|
5992
|
+
|
|
5993
|
+
<dl>
|
|
5994
|
+
<dd>
|
|
5995
|
+
|
|
5996
|
+
<dl>
|
|
5997
|
+
<dd>
|
|
5998
|
+
|
|
5999
|
+
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.
|
|
6000
|
+
</dd>
|
|
6001
|
+
</dl>
|
|
6002
|
+
</dd>
|
|
6003
|
+
</dl>
|
|
6004
|
+
|
|
6005
|
+
#### 🔌 Usage
|
|
6006
|
+
|
|
6007
|
+
<dl>
|
|
6008
|
+
<dd>
|
|
6009
|
+
|
|
6010
|
+
<dl>
|
|
6011
|
+
<dd>
|
|
6012
|
+
|
|
6013
|
+
```typescript
|
|
6014
|
+
await client.workspaces.listUsageSessions({
|
|
6015
|
+
workspace_id: "workspace_eb171baf",
|
|
6016
|
+
days: 30,
|
|
6017
|
+
limit: 100
|
|
6018
|
+
});
|
|
6019
|
+
|
|
6020
|
+
```
|
|
6021
|
+
</dd>
|
|
6022
|
+
</dl>
|
|
6023
|
+
</dd>
|
|
6024
|
+
</dl>
|
|
6025
|
+
|
|
6026
|
+
#### ⚙️ Parameters
|
|
6027
|
+
|
|
6028
|
+
<dl>
|
|
6029
|
+
<dd>
|
|
6030
|
+
|
|
6031
|
+
<dl>
|
|
6032
|
+
<dd>
|
|
6033
|
+
|
|
6034
|
+
**request:** `AthenaIntelligence.ListUsageSessionsWorkspacesRequest`
|
|
6035
|
+
|
|
6036
|
+
</dd>
|
|
6037
|
+
</dl>
|
|
6038
|
+
|
|
6039
|
+
<dl>
|
|
6040
|
+
<dd>
|
|
6041
|
+
|
|
6042
|
+
**requestOptions:** `WorkspacesClient.RequestOptions`
|
|
6043
|
+
|
|
6044
|
+
</dd>
|
|
6045
|
+
</dl>
|
|
6046
|
+
</dd>
|
|
6047
|
+
</dl>
|
|
6048
|
+
|
|
6049
|
+
|
|
5916
6050
|
</dd>
|
|
5917
6051
|
</dl>
|
|
5918
6052
|
</details>
|