@athenaintel/sdk 4.3.2174 → 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 +3 -0
- package/dist/cjs/api/resources/assets/client/Client.js +9 -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 +3 -0
- package/dist/esm/api/resources/assets/client/Client.mjs +9 -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 +67 -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.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);
|
|
@@ -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({
|
|
@@ -1274,9 +1274,12 @@ class AssetsClient {
|
|
|
1274
1274
|
* @param {AthenaIntelligence.ShareAssetRequestIn} request
|
|
1275
1275
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1276
1276
|
*
|
|
1277
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1277
1278
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1278
1279
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1279
1280
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1281
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
1282
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
1280
1283
|
*
|
|
1281
1284
|
* @example
|
|
1282
1285
|
* await client.assets.share({
|
|
@@ -1323,12 +1326,18 @@ class AssetsClient {
|
|
|
1323
1326
|
}
|
|
1324
1327
|
if (_response.error.reason === "status-code") {
|
|
1325
1328
|
switch (_response.error.statusCode) {
|
|
1329
|
+
case 400:
|
|
1330
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1326
1331
|
case 403:
|
|
1327
1332
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1328
1333
|
case 404:
|
|
1329
1334
|
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1330
1335
|
case 422:
|
|
1331
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);
|
|
1332
1341
|
default:
|
|
1333
1342
|
throw new errors.AthenaIntelligenceError({
|
|
1334
1343
|
statusCode: _response.error.statusCode,
|
|
@@ -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);
|
|
@@ -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({
|
|
@@ -1238,9 +1238,12 @@ export class AssetsClient {
|
|
|
1238
1238
|
* @param {AthenaIntelligence.ShareAssetRequestIn} request
|
|
1239
1239
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1240
1240
|
*
|
|
1241
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1241
1242
|
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1242
1243
|
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1243
1244
|
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1245
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
1246
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
1244
1247
|
*
|
|
1245
1248
|
* @example
|
|
1246
1249
|
* await client.assets.share({
|
|
@@ -1287,12 +1290,18 @@ export class AssetsClient {
|
|
|
1287
1290
|
}
|
|
1288
1291
|
if (_response.error.reason === "status-code") {
|
|
1289
1292
|
switch (_response.error.statusCode) {
|
|
1293
|
+
case 400:
|
|
1294
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1290
1295
|
case 403:
|
|
1291
1296
|
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1292
1297
|
case 404:
|
|
1293
1298
|
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1294
1299
|
case 422:
|
|
1295
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);
|
|
1296
1305
|
default:
|
|
1297
1306
|
throw new errors.AthenaIntelligenceError({
|
|
1298
1307
|
statusCode: _response.error.statusCode,
|
|
@@ -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
|
@@ -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>
|