@athenaintel/sdk 4.3.2127 → 4.3.2129
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/sessions/client/Client.d.ts +35 -1
- package/dist/cjs/api/resources/sessions/client/Client.js +157 -2
- package/dist/cjs/api/resources/sessions/client/requests/ListSessionsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/sessions/client/requests/MarkReadSessionsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/sessions/client/requests/MarkReadSessionsRequest.js +3 -0
- package/dist/cjs/api/resources/sessions/client/requests/MarkUnreadSessionsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/sessions/client/requests/MarkUnreadSessionsRequest.js +3 -0
- package/dist/cjs/api/resources/sessions/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/SessionOut.d.ts +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/sessions/client/Client.d.mts +35 -1
- package/dist/esm/api/resources/sessions/client/Client.mjs +157 -2
- package/dist/esm/api/resources/sessions/client/requests/ListSessionsRequest.d.mts +2 -0
- package/dist/esm/api/resources/sessions/client/requests/MarkReadSessionsRequest.d.mts +10 -0
- package/dist/esm/api/resources/sessions/client/requests/MarkReadSessionsRequest.mjs +2 -0
- package/dist/esm/api/resources/sessions/client/requests/MarkUnreadSessionsRequest.d.mts +10 -0
- package/dist/esm/api/resources/sessions/client/requests/MarkUnreadSessionsRequest.mjs +2 -0
- package/dist/esm/api/resources/sessions/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/SessionOut.d.mts +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 +131 -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.2129",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.2129",
|
|
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);
|
|
@@ -12,7 +12,7 @@ export declare class SessionsClient {
|
|
|
12
12
|
protected readonly _options: NormalizedClientOptionsWithAuth<SessionsClient.Options>;
|
|
13
13
|
constructor(options?: SessionsClient.Options);
|
|
14
14
|
/**
|
|
15
|
-
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded.
|
|
15
|
+
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded, and only sessions in the caller's current workspace are visible — pass `workspace_id` to list sessions in another workspace the caller belongs to.
|
|
16
16
|
*
|
|
17
17
|
* @param {AthenaIntelligence.ListSessionsRequest} request
|
|
18
18
|
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -62,4 +62,38 @@ export declare class SessionsClient {
|
|
|
62
62
|
*/
|
|
63
63
|
download(request: AthenaIntelligence.DownloadSessionsRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
64
64
|
private __download;
|
|
65
|
+
/**
|
|
66
|
+
* Record that the calling user has read the session as of now, clearing its unread indicator. Idempotent: repeated calls only move the read receipt forward.
|
|
67
|
+
*
|
|
68
|
+
* @param {AthenaIntelligence.MarkReadSessionsRequest} request
|
|
69
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
72
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
73
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.sessions.markRead({
|
|
77
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
78
|
+
* })
|
|
79
|
+
*/
|
|
80
|
+
markRead(request: AthenaIntelligence.MarkReadSessionsRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SessionOut>;
|
|
81
|
+
private __markRead;
|
|
82
|
+
/**
|
|
83
|
+
* Clear the calling user's read receipt so the session shows as unread again. Idempotent: repeated calls leave the session unread.
|
|
84
|
+
*
|
|
85
|
+
* @param {AthenaIntelligence.MarkUnreadSessionsRequest} request
|
|
86
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
89
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
90
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* await client.sessions.markUnread({
|
|
94
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
95
|
+
* })
|
|
96
|
+
*/
|
|
97
|
+
markUnread(request: AthenaIntelligence.MarkUnreadSessionsRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SessionOut>;
|
|
98
|
+
private __markUnread;
|
|
65
99
|
}
|
|
@@ -56,7 +56,7 @@ class SessionsClient {
|
|
|
56
56
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded.
|
|
59
|
+
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded, and only sessions in the caller's current workspace are visible — pass `workspace_id` to list sessions in another workspace the caller belongs to.
|
|
60
60
|
*
|
|
61
61
|
* @param {AthenaIntelligence.ListSessionsRequest} request
|
|
62
62
|
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -75,7 +75,7 @@ class SessionsClient {
|
|
|
75
75
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
76
76
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
77
77
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
78
|
-
const { query, state, source_channel: sourceChannel, session_type: sessionType, app_id: appId, include_sub_sessions: includeSubSessions, include_task_sessions: includeTaskSessions, aop_asset_id: aopAssetId, trigger_type: triggerType, created_after: createdAfter, created_before: createdBefore, sort_by: sortBy, sort_direction: sortDirection, limit, offset, } = request;
|
|
78
|
+
const { query, state, source_channel: sourceChannel, session_type: sessionType, app_id: appId, include_sub_sessions: includeSubSessions, include_task_sessions: includeTaskSessions, aop_asset_id: aopAssetId, workspace_id: workspaceId, trigger_type: triggerType, created_after: createdAfter, created_before: createdBefore, sort_by: sortBy, sort_direction: sortDirection, limit, offset, } = request;
|
|
79
79
|
const _queryParams = {};
|
|
80
80
|
if (query !== undefined) {
|
|
81
81
|
_queryParams.query = query;
|
|
@@ -101,6 +101,9 @@ class SessionsClient {
|
|
|
101
101
|
if (aopAssetId !== undefined) {
|
|
102
102
|
_queryParams.aop_asset_id = aopAssetId;
|
|
103
103
|
}
|
|
104
|
+
if (workspaceId !== undefined) {
|
|
105
|
+
_queryParams.workspace_id = workspaceId;
|
|
106
|
+
}
|
|
104
107
|
if (triggerType !== undefined) {
|
|
105
108
|
_queryParams.trigger_type = (0, json_js_1.toJson)(triggerType);
|
|
106
109
|
}
|
|
@@ -344,5 +347,157 @@ class SessionsClient {
|
|
|
344
347
|
}
|
|
345
348
|
});
|
|
346
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* Record that the calling user has read the session as of now, clearing its unread indicator. Idempotent: repeated calls only move the read receipt forward.
|
|
352
|
+
*
|
|
353
|
+
* @param {AthenaIntelligence.MarkReadSessionsRequest} request
|
|
354
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
355
|
+
*
|
|
356
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
357
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
358
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* await client.sessions.markRead({
|
|
362
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
363
|
+
* })
|
|
364
|
+
*/
|
|
365
|
+
markRead(request, requestOptions) {
|
|
366
|
+
return core.HttpResponsePromise.fromPromise(this.__markRead(request, requestOptions));
|
|
367
|
+
}
|
|
368
|
+
__markRead(request, requestOptions) {
|
|
369
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
370
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
371
|
+
const { asset_id: assetId } = request;
|
|
372
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
373
|
+
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);
|
|
374
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
375
|
+
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/sessions/${core.url.encodePathParam(assetId)}/read`),
|
|
376
|
+
method: "POST",
|
|
377
|
+
headers: _headers,
|
|
378
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
379
|
+
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,
|
|
380
|
+
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,
|
|
381
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
382
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
383
|
+
logging: this._options.logging,
|
|
384
|
+
});
|
|
385
|
+
if (_response.ok) {
|
|
386
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
387
|
+
}
|
|
388
|
+
if (_response.error.reason === "status-code") {
|
|
389
|
+
switch (_response.error.statusCode) {
|
|
390
|
+
case 401:
|
|
391
|
+
throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
392
|
+
case 404:
|
|
393
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
394
|
+
case 422:
|
|
395
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
396
|
+
default:
|
|
397
|
+
throw new errors.AthenaIntelligenceError({
|
|
398
|
+
statusCode: _response.error.statusCode,
|
|
399
|
+
body: _response.error.body,
|
|
400
|
+
rawResponse: _response.rawResponse,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
switch (_response.error.reason) {
|
|
405
|
+
case "non-json":
|
|
406
|
+
throw new errors.AthenaIntelligenceError({
|
|
407
|
+
statusCode: _response.error.statusCode,
|
|
408
|
+
body: _response.error.rawBody,
|
|
409
|
+
rawResponse: _response.rawResponse,
|
|
410
|
+
});
|
|
411
|
+
case "body-is-null":
|
|
412
|
+
throw new errors.AthenaIntelligenceError({
|
|
413
|
+
statusCode: _response.error.statusCode,
|
|
414
|
+
rawResponse: _response.rawResponse,
|
|
415
|
+
});
|
|
416
|
+
case "timeout":
|
|
417
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/sessions/{asset_id}/read.");
|
|
418
|
+
case "unknown":
|
|
419
|
+
throw new errors.AthenaIntelligenceError({
|
|
420
|
+
message: _response.error.errorMessage,
|
|
421
|
+
rawResponse: _response.rawResponse,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Clear the calling user's read receipt so the session shows as unread again. Idempotent: repeated calls leave the session unread.
|
|
428
|
+
*
|
|
429
|
+
* @param {AthenaIntelligence.MarkUnreadSessionsRequest} request
|
|
430
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
431
|
+
*
|
|
432
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
433
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
434
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
435
|
+
*
|
|
436
|
+
* @example
|
|
437
|
+
* await client.sessions.markUnread({
|
|
438
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
439
|
+
* })
|
|
440
|
+
*/
|
|
441
|
+
markUnread(request, requestOptions) {
|
|
442
|
+
return core.HttpResponsePromise.fromPromise(this.__markUnread(request, requestOptions));
|
|
443
|
+
}
|
|
444
|
+
__markUnread(request, requestOptions) {
|
|
445
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
446
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
447
|
+
const { asset_id: assetId } = request;
|
|
448
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
449
|
+
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);
|
|
450
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
451
|
+
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/sessions/${core.url.encodePathParam(assetId)}/unread`),
|
|
452
|
+
method: "POST",
|
|
453
|
+
headers: _headers,
|
|
454
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
455
|
+
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,
|
|
456
|
+
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,
|
|
457
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
458
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
459
|
+
logging: this._options.logging,
|
|
460
|
+
});
|
|
461
|
+
if (_response.ok) {
|
|
462
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
463
|
+
}
|
|
464
|
+
if (_response.error.reason === "status-code") {
|
|
465
|
+
switch (_response.error.statusCode) {
|
|
466
|
+
case 401:
|
|
467
|
+
throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
468
|
+
case 404:
|
|
469
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
470
|
+
case 422:
|
|
471
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
472
|
+
default:
|
|
473
|
+
throw new errors.AthenaIntelligenceError({
|
|
474
|
+
statusCode: _response.error.statusCode,
|
|
475
|
+
body: _response.error.body,
|
|
476
|
+
rawResponse: _response.rawResponse,
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
switch (_response.error.reason) {
|
|
481
|
+
case "non-json":
|
|
482
|
+
throw new errors.AthenaIntelligenceError({
|
|
483
|
+
statusCode: _response.error.statusCode,
|
|
484
|
+
body: _response.error.rawBody,
|
|
485
|
+
rawResponse: _response.rawResponse,
|
|
486
|
+
});
|
|
487
|
+
case "body-is-null":
|
|
488
|
+
throw new errors.AthenaIntelligenceError({
|
|
489
|
+
statusCode: _response.error.statusCode,
|
|
490
|
+
rawResponse: _response.rawResponse,
|
|
491
|
+
});
|
|
492
|
+
case "timeout":
|
|
493
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/sessions/{asset_id}/unread.");
|
|
494
|
+
case "unknown":
|
|
495
|
+
throw new errors.AthenaIntelligenceError({
|
|
496
|
+
message: _response.error.errorMessage,
|
|
497
|
+
rawResponse: _response.rawResponse,
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
}
|
|
347
502
|
}
|
|
348
503
|
exports.SessionsClient = SessionsClient;
|
|
@@ -25,6 +25,8 @@ export interface ListSessionsRequest {
|
|
|
25
25
|
include_task_sessions?: boolean;
|
|
26
26
|
/** Only include task sessions originating from this AOP asset identifier */
|
|
27
27
|
aop_asset_id?: string | null;
|
|
28
|
+
/** Workspace to list sessions from. Defaults to the caller's current workspace; any other workspace the caller is a member of can be requested explicitly. */
|
|
29
|
+
workspace_id?: string | null;
|
|
28
30
|
/** Trigger type(s) to filter by (e.g. 'schedule', 'api', 'email'). Repeat the parameter or pass a comma-separated list. */
|
|
29
31
|
trigger_type?: string[] | null;
|
|
30
32
|
/** Only include sessions created at or after this ISO 8601 timestamp */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export type { DownloadSessionsRequest } from "./DownloadSessionsRequest.js";
|
|
2
2
|
export type { GetSessionsRequest } from "./GetSessionsRequest.js";
|
|
3
3
|
export type { ListSessionsRequest } from "./ListSessionsRequest.js";
|
|
4
|
+
export type { MarkReadSessionsRequest } from "./MarkReadSessionsRequest.js";
|
|
5
|
+
export type { MarkUnreadSessionsRequest } from "./MarkUnreadSessionsRequest.js";
|
|
@@ -22,6 +22,8 @@ export interface SessionOut {
|
|
|
22
22
|
id: string;
|
|
23
23
|
/** Whether this is a branched sub-session of another session */
|
|
24
24
|
is_sub_session?: boolean;
|
|
25
|
+
/** Whether the session is unread for the calling user: it changed since they last opened it, or they never opened it and it did not originate from the web app */
|
|
26
|
+
is_unread?: boolean;
|
|
25
27
|
/** Plain-text preview of the most recent message, when available */
|
|
26
28
|
last_message_preview?: string | null;
|
|
27
29
|
/** Model the session ran with, when set */
|
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.2129";
|
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.2129",
|
|
10
|
+
"User-Agent": "@athenaintel/sdk/4.3.2129",
|
|
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);
|
|
@@ -12,7 +12,7 @@ export declare class SessionsClient {
|
|
|
12
12
|
protected readonly _options: NormalizedClientOptionsWithAuth<SessionsClient.Options>;
|
|
13
13
|
constructor(options?: SessionsClient.Options);
|
|
14
14
|
/**
|
|
15
|
-
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded.
|
|
15
|
+
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded, and only sessions in the caller's current workspace are visible — pass `workspace_id` to list sessions in another workspace the caller belongs to.
|
|
16
16
|
*
|
|
17
17
|
* @param {AthenaIntelligence.ListSessionsRequest} request
|
|
18
18
|
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -62,4 +62,38 @@ export declare class SessionsClient {
|
|
|
62
62
|
*/
|
|
63
63
|
download(request: AthenaIntelligence.DownloadSessionsRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
64
64
|
private __download;
|
|
65
|
+
/**
|
|
66
|
+
* Record that the calling user has read the session as of now, clearing its unread indicator. Idempotent: repeated calls only move the read receipt forward.
|
|
67
|
+
*
|
|
68
|
+
* @param {AthenaIntelligence.MarkReadSessionsRequest} request
|
|
69
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
72
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
73
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.sessions.markRead({
|
|
77
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
78
|
+
* })
|
|
79
|
+
*/
|
|
80
|
+
markRead(request: AthenaIntelligence.MarkReadSessionsRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SessionOut>;
|
|
81
|
+
private __markRead;
|
|
82
|
+
/**
|
|
83
|
+
* Clear the calling user's read receipt so the session shows as unread again. Idempotent: repeated calls leave the session unread.
|
|
84
|
+
*
|
|
85
|
+
* @param {AthenaIntelligence.MarkUnreadSessionsRequest} request
|
|
86
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
89
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
90
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* await client.sessions.markUnread({
|
|
94
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
95
|
+
* })
|
|
96
|
+
*/
|
|
97
|
+
markUnread(request: AthenaIntelligence.MarkUnreadSessionsRequest, requestOptions?: SessionsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.SessionOut>;
|
|
98
|
+
private __markUnread;
|
|
65
99
|
}
|
|
@@ -20,7 +20,7 @@ export class SessionsClient {
|
|
|
20
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded.
|
|
23
|
+
* Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded, and only sessions in the caller's current workspace are visible — pass `workspace_id` to list sessions in another workspace the caller belongs to.
|
|
24
24
|
*
|
|
25
25
|
* @param {AthenaIntelligence.ListSessionsRequest} request
|
|
26
26
|
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -39,7 +39,7 @@ export class SessionsClient {
|
|
|
39
39
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
40
40
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
42
|
-
const { query, state, source_channel: sourceChannel, session_type: sessionType, app_id: appId, include_sub_sessions: includeSubSessions, include_task_sessions: includeTaskSessions, aop_asset_id: aopAssetId, trigger_type: triggerType, created_after: createdAfter, created_before: createdBefore, sort_by: sortBy, sort_direction: sortDirection, limit, offset, } = request;
|
|
42
|
+
const { query, state, source_channel: sourceChannel, session_type: sessionType, app_id: appId, include_sub_sessions: includeSubSessions, include_task_sessions: includeTaskSessions, aop_asset_id: aopAssetId, workspace_id: workspaceId, trigger_type: triggerType, created_after: createdAfter, created_before: createdBefore, sort_by: sortBy, sort_direction: sortDirection, limit, offset, } = request;
|
|
43
43
|
const _queryParams = {};
|
|
44
44
|
if (query !== undefined) {
|
|
45
45
|
_queryParams.query = query;
|
|
@@ -65,6 +65,9 @@ export class SessionsClient {
|
|
|
65
65
|
if (aopAssetId !== undefined) {
|
|
66
66
|
_queryParams.aop_asset_id = aopAssetId;
|
|
67
67
|
}
|
|
68
|
+
if (workspaceId !== undefined) {
|
|
69
|
+
_queryParams.workspace_id = workspaceId;
|
|
70
|
+
}
|
|
68
71
|
if (triggerType !== undefined) {
|
|
69
72
|
_queryParams.trigger_type = toJson(triggerType);
|
|
70
73
|
}
|
|
@@ -308,4 +311,156 @@ export class SessionsClient {
|
|
|
308
311
|
}
|
|
309
312
|
});
|
|
310
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* Record that the calling user has read the session as of now, clearing its unread indicator. Idempotent: repeated calls only move the read receipt forward.
|
|
316
|
+
*
|
|
317
|
+
* @param {AthenaIntelligence.MarkReadSessionsRequest} request
|
|
318
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
319
|
+
*
|
|
320
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
321
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
322
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
323
|
+
*
|
|
324
|
+
* @example
|
|
325
|
+
* await client.sessions.markRead({
|
|
326
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
327
|
+
* })
|
|
328
|
+
*/
|
|
329
|
+
markRead(request, requestOptions) {
|
|
330
|
+
return core.HttpResponsePromise.fromPromise(this.__markRead(request, requestOptions));
|
|
331
|
+
}
|
|
332
|
+
__markRead(request, requestOptions) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
335
|
+
const { asset_id: assetId } = request;
|
|
336
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
337
|
+
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);
|
|
338
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
339
|
+
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/sessions/${core.url.encodePathParam(assetId)}/read`),
|
|
340
|
+
method: "POST",
|
|
341
|
+
headers: _headers,
|
|
342
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
343
|
+
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,
|
|
344
|
+
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,
|
|
345
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
346
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
347
|
+
logging: this._options.logging,
|
|
348
|
+
});
|
|
349
|
+
if (_response.ok) {
|
|
350
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
351
|
+
}
|
|
352
|
+
if (_response.error.reason === "status-code") {
|
|
353
|
+
switch (_response.error.statusCode) {
|
|
354
|
+
case 401:
|
|
355
|
+
throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
356
|
+
case 404:
|
|
357
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
358
|
+
case 422:
|
|
359
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
360
|
+
default:
|
|
361
|
+
throw new errors.AthenaIntelligenceError({
|
|
362
|
+
statusCode: _response.error.statusCode,
|
|
363
|
+
body: _response.error.body,
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
switch (_response.error.reason) {
|
|
369
|
+
case "non-json":
|
|
370
|
+
throw new errors.AthenaIntelligenceError({
|
|
371
|
+
statusCode: _response.error.statusCode,
|
|
372
|
+
body: _response.error.rawBody,
|
|
373
|
+
rawResponse: _response.rawResponse,
|
|
374
|
+
});
|
|
375
|
+
case "body-is-null":
|
|
376
|
+
throw new errors.AthenaIntelligenceError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
rawResponse: _response.rawResponse,
|
|
379
|
+
});
|
|
380
|
+
case "timeout":
|
|
381
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/sessions/{asset_id}/read.");
|
|
382
|
+
case "unknown":
|
|
383
|
+
throw new errors.AthenaIntelligenceError({
|
|
384
|
+
message: _response.error.errorMessage,
|
|
385
|
+
rawResponse: _response.rawResponse,
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Clear the calling user's read receipt so the session shows as unread again. Idempotent: repeated calls leave the session unread.
|
|
392
|
+
*
|
|
393
|
+
* @param {AthenaIntelligence.MarkUnreadSessionsRequest} request
|
|
394
|
+
* @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
395
|
+
*
|
|
396
|
+
* @throws {@link AthenaIntelligence.UnauthorizedError}
|
|
397
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
398
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* await client.sessions.markUnread({
|
|
402
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
403
|
+
* })
|
|
404
|
+
*/
|
|
405
|
+
markUnread(request, requestOptions) {
|
|
406
|
+
return core.HttpResponsePromise.fromPromise(this.__markUnread(request, requestOptions));
|
|
407
|
+
}
|
|
408
|
+
__markUnread(request, requestOptions) {
|
|
409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
411
|
+
const { asset_id: assetId } = request;
|
|
412
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
413
|
+
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);
|
|
414
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
415
|
+
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/sessions/${core.url.encodePathParam(assetId)}/unread`),
|
|
416
|
+
method: "POST",
|
|
417
|
+
headers: _headers,
|
|
418
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
419
|
+
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,
|
|
420
|
+
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,
|
|
421
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
422
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
423
|
+
logging: this._options.logging,
|
|
424
|
+
});
|
|
425
|
+
if (_response.ok) {
|
|
426
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
427
|
+
}
|
|
428
|
+
if (_response.error.reason === "status-code") {
|
|
429
|
+
switch (_response.error.statusCode) {
|
|
430
|
+
case 401:
|
|
431
|
+
throw new AthenaIntelligence.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
432
|
+
case 404:
|
|
433
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
434
|
+
case 422:
|
|
435
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
436
|
+
default:
|
|
437
|
+
throw new errors.AthenaIntelligenceError({
|
|
438
|
+
statusCode: _response.error.statusCode,
|
|
439
|
+
body: _response.error.body,
|
|
440
|
+
rawResponse: _response.rawResponse,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
switch (_response.error.reason) {
|
|
445
|
+
case "non-json":
|
|
446
|
+
throw new errors.AthenaIntelligenceError({
|
|
447
|
+
statusCode: _response.error.statusCode,
|
|
448
|
+
body: _response.error.rawBody,
|
|
449
|
+
rawResponse: _response.rawResponse,
|
|
450
|
+
});
|
|
451
|
+
case "body-is-null":
|
|
452
|
+
throw new errors.AthenaIntelligenceError({
|
|
453
|
+
statusCode: _response.error.statusCode,
|
|
454
|
+
rawResponse: _response.rawResponse,
|
|
455
|
+
});
|
|
456
|
+
case "timeout":
|
|
457
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/sessions/{asset_id}/unread.");
|
|
458
|
+
case "unknown":
|
|
459
|
+
throw new errors.AthenaIntelligenceError({
|
|
460
|
+
message: _response.error.errorMessage,
|
|
461
|
+
rawResponse: _response.rawResponse,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
}
|
|
311
466
|
}
|
|
@@ -25,6 +25,8 @@ export interface ListSessionsRequest {
|
|
|
25
25
|
include_task_sessions?: boolean;
|
|
26
26
|
/** Only include task sessions originating from this AOP asset identifier */
|
|
27
27
|
aop_asset_id?: string | null;
|
|
28
|
+
/** Workspace to list sessions from. Defaults to the caller's current workspace; any other workspace the caller is a member of can be requested explicitly. */
|
|
29
|
+
workspace_id?: string | null;
|
|
28
30
|
/** Trigger type(s) to filter by (e.g. 'schedule', 'api', 'email'). Repeat the parameter or pass a comma-separated list. */
|
|
29
31
|
trigger_type?: string[] | null;
|
|
30
32
|
/** Only include sessions created at or after this ISO 8601 timestamp */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export type { DownloadSessionsRequest } from "./DownloadSessionsRequest.mjs";
|
|
2
2
|
export type { GetSessionsRequest } from "./GetSessionsRequest.mjs";
|
|
3
3
|
export type { ListSessionsRequest } from "./ListSessionsRequest.mjs";
|
|
4
|
+
export type { MarkReadSessionsRequest } from "./MarkReadSessionsRequest.mjs";
|
|
5
|
+
export type { MarkUnreadSessionsRequest } from "./MarkUnreadSessionsRequest.mjs";
|
|
@@ -22,6 +22,8 @@ export interface SessionOut {
|
|
|
22
22
|
id: string;
|
|
23
23
|
/** Whether this is a branched sub-session of another session */
|
|
24
24
|
is_sub_session?: boolean;
|
|
25
|
+
/** Whether the session is unread for the calling user: it changed since they last opened it, or they never opened it and it did not originate from the web app */
|
|
26
|
+
is_unread?: boolean;
|
|
25
27
|
/** Plain-text preview of the most recent message, when available */
|
|
26
28
|
last_message_preview?: string | null;
|
|
27
29
|
/** Model the session ran with, when set */
|
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.2129";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.2129";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2836,7 +2836,7 @@ await client.semanticModel.query({
|
|
|
2836
2836
|
<dl>
|
|
2837
2837
|
<dd>
|
|
2838
2838
|
|
|
2839
|
-
Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded.
|
|
2839
|
+
Retrieve a paginated list of agent sessions (conversations) with optional title search, state filtering, source channel filtering, date range filtering, and sorting. By default, AOP/workflow runs and branched sub-sessions are excluded, and only sessions in the caller's current workspace are visible — pass `workspace_id` to list sessions in another workspace the caller belongs to.
|
|
2840
2840
|
</dd>
|
|
2841
2841
|
</dl>
|
|
2842
2842
|
</dd>
|
|
@@ -3035,6 +3035,136 @@ await client.sessions.download({
|
|
|
3035
3035
|
</dl>
|
|
3036
3036
|
|
|
3037
3037
|
|
|
3038
|
+
</dd>
|
|
3039
|
+
</dl>
|
|
3040
|
+
</details>
|
|
3041
|
+
|
|
3042
|
+
<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">markRead</a>({ ...params }) -> AthenaIntelligence.SessionOut</code></summary>
|
|
3043
|
+
<dl>
|
|
3044
|
+
<dd>
|
|
3045
|
+
|
|
3046
|
+
#### 📝 Description
|
|
3047
|
+
|
|
3048
|
+
<dl>
|
|
3049
|
+
<dd>
|
|
3050
|
+
|
|
3051
|
+
<dl>
|
|
3052
|
+
<dd>
|
|
3053
|
+
|
|
3054
|
+
Record that the calling user has read the session as of now, clearing its unread indicator. Idempotent: repeated calls only move the read receipt forward.
|
|
3055
|
+
</dd>
|
|
3056
|
+
</dl>
|
|
3057
|
+
</dd>
|
|
3058
|
+
</dl>
|
|
3059
|
+
|
|
3060
|
+
#### 🔌 Usage
|
|
3061
|
+
|
|
3062
|
+
<dl>
|
|
3063
|
+
<dd>
|
|
3064
|
+
|
|
3065
|
+
<dl>
|
|
3066
|
+
<dd>
|
|
3067
|
+
|
|
3068
|
+
```typescript
|
|
3069
|
+
await client.sessions.markRead({
|
|
3070
|
+
asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
3071
|
+
});
|
|
3072
|
+
|
|
3073
|
+
```
|
|
3074
|
+
</dd>
|
|
3075
|
+
</dl>
|
|
3076
|
+
</dd>
|
|
3077
|
+
</dl>
|
|
3078
|
+
|
|
3079
|
+
#### ⚙️ Parameters
|
|
3080
|
+
|
|
3081
|
+
<dl>
|
|
3082
|
+
<dd>
|
|
3083
|
+
|
|
3084
|
+
<dl>
|
|
3085
|
+
<dd>
|
|
3086
|
+
|
|
3087
|
+
**request:** `AthenaIntelligence.MarkReadSessionsRequest`
|
|
3088
|
+
|
|
3089
|
+
</dd>
|
|
3090
|
+
</dl>
|
|
3091
|
+
|
|
3092
|
+
<dl>
|
|
3093
|
+
<dd>
|
|
3094
|
+
|
|
3095
|
+
**requestOptions:** `SessionsClient.RequestOptions`
|
|
3096
|
+
|
|
3097
|
+
</dd>
|
|
3098
|
+
</dl>
|
|
3099
|
+
</dd>
|
|
3100
|
+
</dl>
|
|
3101
|
+
|
|
3102
|
+
|
|
3103
|
+
</dd>
|
|
3104
|
+
</dl>
|
|
3105
|
+
</details>
|
|
3106
|
+
|
|
3107
|
+
<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">markUnread</a>({ ...params }) -> AthenaIntelligence.SessionOut</code></summary>
|
|
3108
|
+
<dl>
|
|
3109
|
+
<dd>
|
|
3110
|
+
|
|
3111
|
+
#### 📝 Description
|
|
3112
|
+
|
|
3113
|
+
<dl>
|
|
3114
|
+
<dd>
|
|
3115
|
+
|
|
3116
|
+
<dl>
|
|
3117
|
+
<dd>
|
|
3118
|
+
|
|
3119
|
+
Clear the calling user's read receipt so the session shows as unread again. Idempotent: repeated calls leave the session unread.
|
|
3120
|
+
</dd>
|
|
3121
|
+
</dl>
|
|
3122
|
+
</dd>
|
|
3123
|
+
</dl>
|
|
3124
|
+
|
|
3125
|
+
#### 🔌 Usage
|
|
3126
|
+
|
|
3127
|
+
<dl>
|
|
3128
|
+
<dd>
|
|
3129
|
+
|
|
3130
|
+
<dl>
|
|
3131
|
+
<dd>
|
|
3132
|
+
|
|
3133
|
+
```typescript
|
|
3134
|
+
await client.sessions.markUnread({
|
|
3135
|
+
asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f"
|
|
3136
|
+
});
|
|
3137
|
+
|
|
3138
|
+
```
|
|
3139
|
+
</dd>
|
|
3140
|
+
</dl>
|
|
3141
|
+
</dd>
|
|
3142
|
+
</dl>
|
|
3143
|
+
|
|
3144
|
+
#### ⚙️ Parameters
|
|
3145
|
+
|
|
3146
|
+
<dl>
|
|
3147
|
+
<dd>
|
|
3148
|
+
|
|
3149
|
+
<dl>
|
|
3150
|
+
<dd>
|
|
3151
|
+
|
|
3152
|
+
**request:** `AthenaIntelligence.MarkUnreadSessionsRequest`
|
|
3153
|
+
|
|
3154
|
+
</dd>
|
|
3155
|
+
</dl>
|
|
3156
|
+
|
|
3157
|
+
<dl>
|
|
3158
|
+
<dd>
|
|
3159
|
+
|
|
3160
|
+
**requestOptions:** `SessionsClient.RequestOptions`
|
|
3161
|
+
|
|
3162
|
+
</dd>
|
|
3163
|
+
</dl>
|
|
3164
|
+
</dd>
|
|
3165
|
+
</dl>
|
|
3166
|
+
|
|
3167
|
+
|
|
3038
3168
|
</dd>
|
|
3039
3169
|
</dl>
|
|
3040
3170
|
</details>
|