@athenaintel/sdk 4.3.2173 → 4.3.2175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/assets/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/assets/client/Client.js +19 -3
- package/dist/cjs/api/resources/assets/client/requests/DownloadAssetsRequest.d.ts +4 -0
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +20 -0
- package/dist/cjs/api/resources/workspaces/client/Client.js +89 -0
- package/dist/cjs/api/resources/workspaces/client/requests/SearchMembersWorkspacesRequest.d.ts +16 -0
- package/dist/cjs/api/resources/workspaces/client/requests/SearchMembersWorkspacesRequest.js +3 -0
- package/dist/cjs/api/resources/workspaces/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/WorkspaceMemberOut.d.ts +14 -0
- package/dist/cjs/api/types/WorkspaceMemberOut.js +3 -0
- package/dist/cjs/api/types/WorkspaceMemberSearchResponseOut.d.ts +12 -0
- package/dist/cjs/api/types/WorkspaceMemberSearchResponseOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/assets/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/assets/client/Client.mjs +19 -3
- package/dist/esm/api/resources/assets/client/requests/DownloadAssetsRequest.d.mts +4 -0
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +20 -0
- package/dist/esm/api/resources/workspaces/client/Client.mjs +89 -0
- package/dist/esm/api/resources/workspaces/client/requests/SearchMembersWorkspacesRequest.d.mts +16 -0
- package/dist/esm/api/resources/workspaces/client/requests/SearchMembersWorkspacesRequest.mjs +2 -0
- package/dist/esm/api/resources/workspaces/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/WorkspaceMemberOut.d.mts +14 -0
- package/dist/esm/api/types/WorkspaceMemberOut.mjs +2 -0
- package/dist/esm/api/types/WorkspaceMemberSearchResponseOut.d.mts +12 -0
- package/dist/esm/api/types/WorkspaceMemberSearchResponseOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +68 -1
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.2175",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.2175",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -251,7 +251,7 @@ export declare class AssetsClient {
|
|
|
251
251
|
createCollabToken(request: AthenaIntelligence.CollabTokenRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CollabTokenResponse>;
|
|
252
252
|
private __createCollabToken;
|
|
253
253
|
/**
|
|
254
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type.
|
|
254
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx or a PPTX Studio presentation's .pptx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel or PowerPoint with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
255
255
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
256
256
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
257
257
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -284,9 +284,12 @@ export declare class AssetsClient {
|
|
|
284
284
|
* @param {AthenaIntelligence.ShareAssetRequestIn} request
|
|
285
285
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
286
286
|
*
|
|
287
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
287
288
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
288
289
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
289
290
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
291
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
292
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
290
293
|
*
|
|
291
294
|
* @example
|
|
292
295
|
* await client.assets.share({
|
|
@@ -1105,7 +1105,7 @@ class AssetsClient {
|
|
|
1105
1105
|
});
|
|
1106
1106
|
}
|
|
1107
1107
|
/**
|
|
1108
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type.
|
|
1108
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx or a PPTX Studio presentation's .pptx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel or PowerPoint with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
1109
1109
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1110
1110
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1111
1111
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -1117,14 +1117,21 @@ class AssetsClient {
|
|
|
1117
1117
|
__download(request, requestOptions) {
|
|
1118
1118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1119
1119
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1120
|
-
const { asset_id: assetId } = request;
|
|
1120
|
+
const { asset_id: assetId, live_sync: liveSync, addin_id: addinId } = request;
|
|
1121
|
+
const _queryParams = {};
|
|
1122
|
+
if (liveSync != null) {
|
|
1123
|
+
_queryParams.live_sync = liveSync.toString();
|
|
1124
|
+
}
|
|
1125
|
+
if (addinId !== undefined) {
|
|
1126
|
+
_queryParams.addin_id = addinId;
|
|
1127
|
+
}
|
|
1121
1128
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1122
1129
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1123
1130
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1124
1131
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/download`),
|
|
1125
1132
|
method: "GET",
|
|
1126
1133
|
headers: _headers,
|
|
1127
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1134
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
1128
1135
|
responseType: "binary-response",
|
|
1129
1136
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
1130
1137
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
@@ -1267,9 +1274,12 @@ class AssetsClient {
|
|
|
1267
1274
|
* @param {AthenaIntelligence.ShareAssetRequestIn} request
|
|
1268
1275
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1269
1276
|
*
|
|
1277
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1270
1278
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1271
1279
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1272
1280
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1281
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
1282
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
1273
1283
|
*
|
|
1274
1284
|
* @example
|
|
1275
1285
|
* await client.assets.share({
|
|
@@ -1316,12 +1326,18 @@ class AssetsClient {
|
|
|
1316
1326
|
}
|
|
1317
1327
|
if (_response.error.reason === "status-code") {
|
|
1318
1328
|
switch (_response.error.statusCode) {
|
|
1329
|
+
case 400:
|
|
1330
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1319
1331
|
case 403:
|
|
1320
1332
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1321
1333
|
case 404:
|
|
1322
1334
|
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1323
1335
|
case 422:
|
|
1324
1336
|
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1337
|
+
case 429:
|
|
1338
|
+
throw new AthenaIntelligence.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
1339
|
+
case 503:
|
|
1340
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
1325
1341
|
default:
|
|
1326
1342
|
throw new errors.AthenaIntelligenceError({
|
|
1327
1343
|
statusCode: _response.error.statusCode,
|
|
@@ -7,4 +7,8 @@
|
|
|
7
7
|
export interface DownloadAssetsRequest {
|
|
8
8
|
/** Unique identifier of the asset to download */
|
|
9
9
|
asset_id: string;
|
|
10
|
+
/** Office live sync: when true and the asset is an Athena spreadsheet or a PPTX Studio presentation, the downloaded .xlsx / .pptx carries the Athena for Microsoft 365 add-in's link record and opens already syncing with this asset. Ignored for every other asset type. */
|
|
11
|
+
live_sync?: boolean;
|
|
12
|
+
/** GUID of the installed add-in manifest the live-sync record should reference (defaults to this deployment's Athena add-in). Only read together with `live_sync`; use it to target a preview-channel sideload. */
|
|
13
|
+
addin_id?: string | null;
|
|
10
14
|
}
|
|
@@ -45,6 +45,26 @@ export declare class WorkspacesClient {
|
|
|
45
45
|
*/
|
|
46
46
|
updateConfiguration(request: AthenaIntelligence.UpdateWorkspaceConfigurationRequestIn, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceConfigurationResponseOut>;
|
|
47
47
|
private __updateConfiguration;
|
|
48
|
+
/**
|
|
49
|
+
* Prefix-search the people an asset in this workspace can be shared with — active members plus external viewers provisioned for the workspace — by email, first name or last name. Built for share pickers: a query of at least two characters is required, results are capped, and only name and email are returned (no user ids). Callers must be a member of the workspace (or a deployment admin). External SSO viewers may search only their own workspace, only see people in their own email domain, receive at most 10 results per call, and hold a per-viewer budget of 120 searches per 10 minutes (429 with Retry-After when exhausted; 503 if the budget cannot be enforced).
|
|
50
|
+
*
|
|
51
|
+
* @param {AthenaIntelligence.SearchMembersWorkspacesRequest} request
|
|
52
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
55
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
56
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
57
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.workspaces.searchMembers({
|
|
61
|
+
* workspace_id: "workspace_eb171baf",
|
|
62
|
+
* q: "ale",
|
|
63
|
+
* limit: 20
|
|
64
|
+
* })
|
|
65
|
+
*/
|
|
66
|
+
searchMembers(request: AthenaIntelligence.SearchMembersWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceMemberSearchResponseOut>;
|
|
67
|
+
private __searchMembers;
|
|
48
68
|
/**
|
|
49
69
|
* 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.
|
|
50
70
|
*
|
|
@@ -226,6 +226,95 @@ class WorkspacesClient {
|
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Prefix-search the people an asset in this workspace can be shared with — active members plus external viewers provisioned for the workspace — by email, first name or last name. Built for share pickers: a query of at least two characters is required, results are capped, and only name and email are returned (no user ids). Callers must be a member of the workspace (or a deployment admin). External SSO viewers may search only their own workspace, only see people in their own email domain, receive at most 10 results per call, and hold a per-viewer budget of 120 searches per 10 minutes (429 with Retry-After when exhausted; 503 if the budget cannot be enforced).
|
|
231
|
+
*
|
|
232
|
+
* @param {AthenaIntelligence.SearchMembersWorkspacesRequest} request
|
|
233
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
234
|
+
*
|
|
235
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
236
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
237
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
238
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* await client.workspaces.searchMembers({
|
|
242
|
+
* workspace_id: "workspace_eb171baf",
|
|
243
|
+
* q: "ale",
|
|
244
|
+
* limit: 20
|
|
245
|
+
* })
|
|
246
|
+
*/
|
|
247
|
+
searchMembers(request, requestOptions) {
|
|
248
|
+
return core.HttpResponsePromise.fromPromise(this.__searchMembers(request, requestOptions));
|
|
249
|
+
}
|
|
250
|
+
__searchMembers(request, requestOptions) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
253
|
+
const { workspace_id: workspaceId, q, limit } = request;
|
|
254
|
+
const _queryParams = {};
|
|
255
|
+
_queryParams.q = q;
|
|
256
|
+
if (limit != null) {
|
|
257
|
+
_queryParams.limit = limit.toString();
|
|
258
|
+
}
|
|
259
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
260
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
261
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
262
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/workspaces/${core.url.encodePathParam(workspaceId)}/members`),
|
|
263
|
+
method: "GET",
|
|
264
|
+
headers: _headers,
|
|
265
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
266
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
267
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
268
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
269
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
270
|
+
logging: this._options.logging,
|
|
271
|
+
});
|
|
272
|
+
if (_response.ok) {
|
|
273
|
+
return {
|
|
274
|
+
data: _response.body,
|
|
275
|
+
rawResponse: _response.rawResponse,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
if (_response.error.reason === "status-code") {
|
|
279
|
+
switch (_response.error.statusCode) {
|
|
280
|
+
case 403:
|
|
281
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
282
|
+
case 422:
|
|
283
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
284
|
+
case 429:
|
|
285
|
+
throw new AthenaIntelligence.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
286
|
+
case 503:
|
|
287
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
288
|
+
default:
|
|
289
|
+
throw new errors.AthenaIntelligenceError({
|
|
290
|
+
statusCode: _response.error.statusCode,
|
|
291
|
+
body: _response.error.body,
|
|
292
|
+
rawResponse: _response.rawResponse,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
switch (_response.error.reason) {
|
|
297
|
+
case "non-json":
|
|
298
|
+
throw new errors.AthenaIntelligenceError({
|
|
299
|
+
statusCode: _response.error.statusCode,
|
|
300
|
+
body: _response.error.rawBody,
|
|
301
|
+
rawResponse: _response.rawResponse,
|
|
302
|
+
});
|
|
303
|
+
case "body-is-null":
|
|
304
|
+
throw new errors.AthenaIntelligenceError({
|
|
305
|
+
statusCode: _response.error.statusCode,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
307
|
+
});
|
|
308
|
+
case "timeout":
|
|
309
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/members.");
|
|
310
|
+
case "unknown":
|
|
311
|
+
throw new errors.AthenaIntelligenceError({
|
|
312
|
+
message: _response.error.errorMessage,
|
|
313
|
+
rawResponse: _response.rawResponse,
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
229
318
|
/**
|
|
230
319
|
* 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.
|
|
231
320
|
*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* workspace_id: "workspace_eb171baf",
|
|
5
|
+
* q: "ale",
|
|
6
|
+
* limit: 20
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface SearchMembersWorkspacesRequest {
|
|
10
|
+
/** Unique identifier of the workspace to search */
|
|
11
|
+
workspace_id: string;
|
|
12
|
+
/** Search prefix, matched case-insensitively against email, first name and last name */
|
|
13
|
+
q: string;
|
|
14
|
+
/** Maximum number of people to return */
|
|
15
|
+
limit?: number;
|
|
16
|
+
}
|
|
@@ -2,5 +2,6 @@ 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 { PresenceResolveRequestIn } from "./PresenceResolveRequestIn.js";
|
|
5
|
+
export type { SearchMembersWorkspacesRequest } from "./SearchMembersWorkspacesRequest.js";
|
|
5
6
|
export type { UpdateWorkspaceConfigurationRequestIn } from "./UpdateWorkspaceConfigurationRequestIn.js";
|
|
6
7
|
export type { UpdateWorkspaceToolRegistryRequestIn } from "./UpdateWorkspaceToolRegistryRequestIn.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A person an asset in the workspace can be shared with.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately name and email only: the share request addresses recipients
|
|
5
|
+
* by email, and this is the whole data contract a picker needs.
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkspaceMemberOut {
|
|
8
|
+
/** Email address of the user */
|
|
9
|
+
email: string;
|
|
10
|
+
/** First name of the user, when known */
|
|
11
|
+
first_name?: string | null;
|
|
12
|
+
/** Last name of the user, when known */
|
|
13
|
+
last_name?: string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response model for the workspace people search.
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkspaceMemberSearchResponseOut {
|
|
6
|
+
/** People matching the prefix, ordered by email */
|
|
7
|
+
members: AthenaIntelligence.WorkspaceMemberOut[];
|
|
8
|
+
/** The normalized search prefix that was applied */
|
|
9
|
+
query: string;
|
|
10
|
+
/** The workspace that was searched */
|
|
11
|
+
workspace_id: string;
|
|
12
|
+
}
|
|
@@ -144,6 +144,8 @@ export * from "./WorkspaceAccessResponseOut.js";
|
|
|
144
144
|
export * from "./WorkspaceConfigurationResponseOut.js";
|
|
145
145
|
export * from "./WorkspaceDisclaimerOut.js";
|
|
146
146
|
export * from "./WorkspaceInfoOut.js";
|
|
147
|
+
export * from "./WorkspaceMemberOut.js";
|
|
148
|
+
export * from "./WorkspaceMemberSearchResponseOut.js";
|
|
147
149
|
export * from "./WorkspaceShareAccess.js";
|
|
148
150
|
export * from "./WorkspaceToolRegistryResponseOut.js";
|
|
149
151
|
export * from "./WorkspaceToolRegistryToolOut.js";
|
|
@@ -160,6 +160,8 @@ __exportStar(require("./WorkspaceAccessResponseOut.js"), exports);
|
|
|
160
160
|
__exportStar(require("./WorkspaceConfigurationResponseOut.js"), exports);
|
|
161
161
|
__exportStar(require("./WorkspaceDisclaimerOut.js"), exports);
|
|
162
162
|
__exportStar(require("./WorkspaceInfoOut.js"), exports);
|
|
163
|
+
__exportStar(require("./WorkspaceMemberOut.js"), exports);
|
|
164
|
+
__exportStar(require("./WorkspaceMemberSearchResponseOut.js"), exports);
|
|
163
165
|
__exportStar(require("./WorkspaceShareAccess.js"), exports);
|
|
164
166
|
__exportStar(require("./WorkspaceToolRegistryResponseOut.js"), exports);
|
|
165
167
|
__exportStar(require("./WorkspaceToolRegistryToolOut.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.2175";
|
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.2175",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.2175",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -251,7 +251,7 @@ export declare class AssetsClient {
|
|
|
251
251
|
createCollabToken(request: AthenaIntelligence.CollabTokenRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CollabTokenResponse>;
|
|
252
252
|
private __createCollabToken;
|
|
253
253
|
/**
|
|
254
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type.
|
|
254
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx or a PPTX Studio presentation's .pptx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel or PowerPoint with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
255
255
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
256
256
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
257
257
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -284,9 +284,12 @@ export declare class AssetsClient {
|
|
|
284
284
|
* @param {AthenaIntelligence.ShareAssetRequestIn} request
|
|
285
285
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
286
286
|
*
|
|
287
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
287
288
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
288
289
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
289
290
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
291
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
292
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
290
293
|
*
|
|
291
294
|
* @example
|
|
292
295
|
* await client.assets.share({
|
|
@@ -1069,7 +1069,7 @@ export class AssetsClient {
|
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
/**
|
|
1072
|
-
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type.
|
|
1072
|
+
* Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx or a PPTX Studio presentation's .pptx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel or PowerPoint with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
1073
1073
|
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1074
1074
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1075
1075
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
@@ -1081,14 +1081,21 @@ export class AssetsClient {
|
|
|
1081
1081
|
__download(request, requestOptions) {
|
|
1082
1082
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1083
1083
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1084
|
-
const { asset_id: assetId } = request;
|
|
1084
|
+
const { asset_id: assetId, live_sync: liveSync, addin_id: addinId } = request;
|
|
1085
|
+
const _queryParams = {};
|
|
1086
|
+
if (liveSync != null) {
|
|
1087
|
+
_queryParams.live_sync = liveSync.toString();
|
|
1088
|
+
}
|
|
1089
|
+
if (addinId !== undefined) {
|
|
1090
|
+
_queryParams.addin_id = addinId;
|
|
1091
|
+
}
|
|
1085
1092
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1086
1093
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1087
1094
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1088
1095
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/download`),
|
|
1089
1096
|
method: "GET",
|
|
1090
1097
|
headers: _headers,
|
|
1091
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1098
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
1092
1099
|
responseType: "binary-response",
|
|
1093
1100
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
1094
1101
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
@@ -1231,9 +1238,12 @@ export class AssetsClient {
|
|
|
1231
1238
|
* @param {AthenaIntelligence.ShareAssetRequestIn} request
|
|
1232
1239
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1233
1240
|
*
|
|
1241
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1234
1242
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1235
1243
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1236
1244
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1245
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
1246
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
1237
1247
|
*
|
|
1238
1248
|
* @example
|
|
1239
1249
|
* await client.assets.share({
|
|
@@ -1280,12 +1290,18 @@ export class AssetsClient {
|
|
|
1280
1290
|
}
|
|
1281
1291
|
if (_response.error.reason === "status-code") {
|
|
1282
1292
|
switch (_response.error.statusCode) {
|
|
1293
|
+
case 400:
|
|
1294
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1283
1295
|
case 403:
|
|
1284
1296
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1285
1297
|
case 404:
|
|
1286
1298
|
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1287
1299
|
case 422:
|
|
1288
1300
|
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1301
|
+
case 429:
|
|
1302
|
+
throw new AthenaIntelligence.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
1303
|
+
case 503:
|
|
1304
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
1289
1305
|
default:
|
|
1290
1306
|
throw new errors.AthenaIntelligenceError({
|
|
1291
1307
|
statusCode: _response.error.statusCode,
|
|
@@ -7,4 +7,8 @@
|
|
|
7
7
|
export interface DownloadAssetsRequest {
|
|
8
8
|
/** Unique identifier of the asset to download */
|
|
9
9
|
asset_id: string;
|
|
10
|
+
/** Office live sync: when true and the asset is an Athena spreadsheet or a PPTX Studio presentation, the downloaded .xlsx / .pptx carries the Athena for Microsoft 365 add-in's link record and opens already syncing with this asset. Ignored for every other asset type. */
|
|
11
|
+
live_sync?: boolean;
|
|
12
|
+
/** GUID of the installed add-in manifest the live-sync record should reference (defaults to this deployment's Athena add-in). Only read together with `live_sync`; use it to target a preview-channel sideload. */
|
|
13
|
+
addin_id?: string | null;
|
|
10
14
|
}
|
|
@@ -45,6 +45,26 @@ export declare class WorkspacesClient {
|
|
|
45
45
|
*/
|
|
46
46
|
updateConfiguration(request: AthenaIntelligence.UpdateWorkspaceConfigurationRequestIn, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceConfigurationResponseOut>;
|
|
47
47
|
private __updateConfiguration;
|
|
48
|
+
/**
|
|
49
|
+
* Prefix-search the people an asset in this workspace can be shared with — active members plus external viewers provisioned for the workspace — by email, first name or last name. Built for share pickers: a query of at least two characters is required, results are capped, and only name and email are returned (no user ids). Callers must be a member of the workspace (or a deployment admin). External SSO viewers may search only their own workspace, only see people in their own email domain, receive at most 10 results per call, and hold a per-viewer budget of 120 searches per 10 minutes (429 with Retry-After when exhausted; 503 if the budget cannot be enforced).
|
|
50
|
+
*
|
|
51
|
+
* @param {AthenaIntelligence.SearchMembersWorkspacesRequest} request
|
|
52
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
55
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
56
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
57
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.workspaces.searchMembers({
|
|
61
|
+
* workspace_id: "workspace_eb171baf",
|
|
62
|
+
* q: "ale",
|
|
63
|
+
* limit: 20
|
|
64
|
+
* })
|
|
65
|
+
*/
|
|
66
|
+
searchMembers(request: AthenaIntelligence.SearchMembersWorkspacesRequest, requestOptions?: WorkspacesClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.WorkspaceMemberSearchResponseOut>;
|
|
67
|
+
private __searchMembers;
|
|
48
68
|
/**
|
|
49
69
|
* 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.
|
|
50
70
|
*
|
|
@@ -190,6 +190,95 @@ export class WorkspacesClient {
|
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Prefix-search the people an asset in this workspace can be shared with — active members plus external viewers provisioned for the workspace — by email, first name or last name. Built for share pickers: a query of at least two characters is required, results are capped, and only name and email are returned (no user ids). Callers must be a member of the workspace (or a deployment admin). External SSO viewers may search only their own workspace, only see people in their own email domain, receive at most 10 results per call, and hold a per-viewer budget of 120 searches per 10 minutes (429 with Retry-After when exhausted; 503 if the budget cannot be enforced).
|
|
195
|
+
*
|
|
196
|
+
* @param {AthenaIntelligence.SearchMembersWorkspacesRequest} request
|
|
197
|
+
* @param {WorkspacesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
198
|
+
*
|
|
199
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
200
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
201
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
202
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* await client.workspaces.searchMembers({
|
|
206
|
+
* workspace_id: "workspace_eb171baf",
|
|
207
|
+
* q: "ale",
|
|
208
|
+
* limit: 20
|
|
209
|
+
* })
|
|
210
|
+
*/
|
|
211
|
+
searchMembers(request, requestOptions) {
|
|
212
|
+
return core.HttpResponsePromise.fromPromise(this.__searchMembers(request, requestOptions));
|
|
213
|
+
}
|
|
214
|
+
__searchMembers(request, requestOptions) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
217
|
+
const { workspace_id: workspaceId, q, limit } = request;
|
|
218
|
+
const _queryParams = {};
|
|
219
|
+
_queryParams.q = q;
|
|
220
|
+
if (limit != null) {
|
|
221
|
+
_queryParams.limit = limit.toString();
|
|
222
|
+
}
|
|
223
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
224
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
225
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
226
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/workspaces/${core.url.encodePathParam(workspaceId)}/members`),
|
|
227
|
+
method: "GET",
|
|
228
|
+
headers: _headers,
|
|
229
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
230
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
231
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
232
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
233
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
234
|
+
logging: this._options.logging,
|
|
235
|
+
});
|
|
236
|
+
if (_response.ok) {
|
|
237
|
+
return {
|
|
238
|
+
data: _response.body,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
if (_response.error.reason === "status-code") {
|
|
243
|
+
switch (_response.error.statusCode) {
|
|
244
|
+
case 403:
|
|
245
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
246
|
+
case 422:
|
|
247
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
248
|
+
case 429:
|
|
249
|
+
throw new AthenaIntelligence.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
250
|
+
case 503:
|
|
251
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
252
|
+
default:
|
|
253
|
+
throw new errors.AthenaIntelligenceError({
|
|
254
|
+
statusCode: _response.error.statusCode,
|
|
255
|
+
body: _response.error.body,
|
|
256
|
+
rawResponse: _response.rawResponse,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
switch (_response.error.reason) {
|
|
261
|
+
case "non-json":
|
|
262
|
+
throw new errors.AthenaIntelligenceError({
|
|
263
|
+
statusCode: _response.error.statusCode,
|
|
264
|
+
body: _response.error.rawBody,
|
|
265
|
+
rawResponse: _response.rawResponse,
|
|
266
|
+
});
|
|
267
|
+
case "body-is-null":
|
|
268
|
+
throw new errors.AthenaIntelligenceError({
|
|
269
|
+
statusCode: _response.error.statusCode,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
});
|
|
272
|
+
case "timeout":
|
|
273
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/workspaces/{workspace_id}/members.");
|
|
274
|
+
case "unknown":
|
|
275
|
+
throw new errors.AthenaIntelligenceError({
|
|
276
|
+
message: _response.error.errorMessage,
|
|
277
|
+
rawResponse: _response.rawResponse,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
193
282
|
/**
|
|
194
283
|
* 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.
|
|
195
284
|
*
|
package/dist/esm/api/resources/workspaces/client/requests/SearchMembersWorkspacesRequest.d.mts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* workspace_id: "workspace_eb171baf",
|
|
5
|
+
* q: "ale",
|
|
6
|
+
* limit: 20
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface SearchMembersWorkspacesRequest {
|
|
10
|
+
/** Unique identifier of the workspace to search */
|
|
11
|
+
workspace_id: string;
|
|
12
|
+
/** Search prefix, matched case-insensitively against email, first name and last name */
|
|
13
|
+
q: string;
|
|
14
|
+
/** Maximum number of people to return */
|
|
15
|
+
limit?: number;
|
|
16
|
+
}
|
|
@@ -2,5 +2,6 @@ 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 { PresenceResolveRequestIn } from "./PresenceResolveRequestIn.mjs";
|
|
5
|
+
export type { SearchMembersWorkspacesRequest } from "./SearchMembersWorkspacesRequest.mjs";
|
|
5
6
|
export type { UpdateWorkspaceConfigurationRequestIn } from "./UpdateWorkspaceConfigurationRequestIn.mjs";
|
|
6
7
|
export type { UpdateWorkspaceToolRegistryRequestIn } from "./UpdateWorkspaceToolRegistryRequestIn.mjs";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A person an asset in the workspace can be shared with.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately name and email only: the share request addresses recipients
|
|
5
|
+
* by email, and this is the whole data contract a picker needs.
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkspaceMemberOut {
|
|
8
|
+
/** Email address of the user */
|
|
9
|
+
email: string;
|
|
10
|
+
/** First name of the user, when known */
|
|
11
|
+
first_name?: string | null;
|
|
12
|
+
/** Last name of the user, when known */
|
|
13
|
+
last_name?: string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Response model for the workspace people search.
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkspaceMemberSearchResponseOut {
|
|
6
|
+
/** People matching the prefix, ordered by email */
|
|
7
|
+
members: AthenaIntelligence.WorkspaceMemberOut[];
|
|
8
|
+
/** The normalized search prefix that was applied */
|
|
9
|
+
query: string;
|
|
10
|
+
/** The workspace that was searched */
|
|
11
|
+
workspace_id: string;
|
|
12
|
+
}
|
|
@@ -144,6 +144,8 @@ export * from "./WorkspaceAccessResponseOut.mjs";
|
|
|
144
144
|
export * from "./WorkspaceConfigurationResponseOut.mjs";
|
|
145
145
|
export * from "./WorkspaceDisclaimerOut.mjs";
|
|
146
146
|
export * from "./WorkspaceInfoOut.mjs";
|
|
147
|
+
export * from "./WorkspaceMemberOut.mjs";
|
|
148
|
+
export * from "./WorkspaceMemberSearchResponseOut.mjs";
|
|
147
149
|
export * from "./WorkspaceShareAccess.mjs";
|
|
148
150
|
export * from "./WorkspaceToolRegistryResponseOut.mjs";
|
|
149
151
|
export * from "./WorkspaceToolRegistryToolOut.mjs";
|
|
@@ -144,6 +144,8 @@ export * from "./WorkspaceAccessResponseOut.mjs";
|
|
|
144
144
|
export * from "./WorkspaceConfigurationResponseOut.mjs";
|
|
145
145
|
export * from "./WorkspaceDisclaimerOut.mjs";
|
|
146
146
|
export * from "./WorkspaceInfoOut.mjs";
|
|
147
|
+
export * from "./WorkspaceMemberOut.mjs";
|
|
148
|
+
export * from "./WorkspaceMemberSearchResponseOut.mjs";
|
|
147
149
|
export * from "./WorkspaceShareAccess.mjs";
|
|
148
150
|
export * from "./WorkspaceToolRegistryResponseOut.mjs";
|
|
149
151
|
export * from "./WorkspaceToolRegistryToolOut.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.2175";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.2175";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1322,7 +1322,7 @@ await client.assets.createCollabToken({
|
|
|
1322
1322
|
<dl>
|
|
1323
1323
|
<dd>
|
|
1324
1324
|
|
|
1325
|
-
Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type.
|
|
1325
|
+
Download an asset's file exactly as Athena stores or serves it — no type coercion, no pagination. Native collaborative assets are converted from live content to their canonical Office format: Athena documents download as .docx, spreadsheets as .xlsx (round-trip faithful — string identifiers, leading zeros, and number formats are preserved), PPTX Studio presentations and Word documents export their live studio content as .pptx/.docx. Uploaded files stream their original bytes. The response sets Content-Disposition with a filename derived from the asset title and media type. With `live_sync=true`, a spreadsheet's .xlsx or a PPTX Studio presentation's .pptx also carries the Athena for Microsoft 365 add-in's link record, so opening it in Excel or PowerPoint with the add-in installed starts syncing it with the asset; other asset types ignore the flag.
|
|
1326
1326
|
</dd>
|
|
1327
1327
|
</dl>
|
|
1328
1328
|
</dd>
|
|
@@ -4850,6 +4850,73 @@ await client.workspaces.updateConfiguration({
|
|
|
4850
4850
|
</dl>
|
|
4851
4851
|
|
|
4852
4852
|
|
|
4853
|
+
</dd>
|
|
4854
|
+
</dl>
|
|
4855
|
+
</details>
|
|
4856
|
+
|
|
4857
|
+
<details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">searchMembers</a>({ ...params }) -> AthenaIntelligence.WorkspaceMemberSearchResponseOut</code></summary>
|
|
4858
|
+
<dl>
|
|
4859
|
+
<dd>
|
|
4860
|
+
|
|
4861
|
+
#### 📝 Description
|
|
4862
|
+
|
|
4863
|
+
<dl>
|
|
4864
|
+
<dd>
|
|
4865
|
+
|
|
4866
|
+
<dl>
|
|
4867
|
+
<dd>
|
|
4868
|
+
|
|
4869
|
+
Prefix-search the people an asset in this workspace can be shared with — active members plus external viewers provisioned for the workspace — by email, first name or last name. Built for share pickers: a query of at least two characters is required, results are capped, and only name and email are returned (no user ids). Callers must be a member of the workspace (or a deployment admin). External SSO viewers may search only their own workspace, only see people in their own email domain, receive at most 10 results per call, and hold a per-viewer budget of 120 searches per 10 minutes (429 with Retry-After when exhausted; 503 if the budget cannot be enforced).
|
|
4870
|
+
</dd>
|
|
4871
|
+
</dl>
|
|
4872
|
+
</dd>
|
|
4873
|
+
</dl>
|
|
4874
|
+
|
|
4875
|
+
#### 🔌 Usage
|
|
4876
|
+
|
|
4877
|
+
<dl>
|
|
4878
|
+
<dd>
|
|
4879
|
+
|
|
4880
|
+
<dl>
|
|
4881
|
+
<dd>
|
|
4882
|
+
|
|
4883
|
+
```typescript
|
|
4884
|
+
await client.workspaces.searchMembers({
|
|
4885
|
+
workspace_id: "workspace_eb171baf",
|
|
4886
|
+
q: "ale",
|
|
4887
|
+
limit: 20
|
|
4888
|
+
});
|
|
4889
|
+
|
|
4890
|
+
```
|
|
4891
|
+
</dd>
|
|
4892
|
+
</dl>
|
|
4893
|
+
</dd>
|
|
4894
|
+
</dl>
|
|
4895
|
+
|
|
4896
|
+
#### ⚙️ Parameters
|
|
4897
|
+
|
|
4898
|
+
<dl>
|
|
4899
|
+
<dd>
|
|
4900
|
+
|
|
4901
|
+
<dl>
|
|
4902
|
+
<dd>
|
|
4903
|
+
|
|
4904
|
+
**request:** `AthenaIntelligence.SearchMembersWorkspacesRequest`
|
|
4905
|
+
|
|
4906
|
+
</dd>
|
|
4907
|
+
</dl>
|
|
4908
|
+
|
|
4909
|
+
<dl>
|
|
4910
|
+
<dd>
|
|
4911
|
+
|
|
4912
|
+
**requestOptions:** `WorkspacesClient.RequestOptions`
|
|
4913
|
+
|
|
4914
|
+
</dd>
|
|
4915
|
+
</dl>
|
|
4916
|
+
</dd>
|
|
4917
|
+
</dl>
|
|
4918
|
+
|
|
4919
|
+
|
|
4853
4920
|
</dd>
|
|
4854
4921
|
</dl>
|
|
4855
4922
|
</details>
|