starta.apiclient 1.112.12901 → 1.112.12904
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StartaRequestRunner, StartaSSECallbacks, StartaSSEHandle } from '../types';
|
|
1
|
+
import { StartaRequestRunner, StartaSSECallbacks, StartaSSEHandle, SortDirection } from '../types';
|
|
2
2
|
export default class LandingChats {
|
|
3
3
|
private _requestRunner;
|
|
4
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
@@ -23,4 +23,14 @@ export default class LandingChats {
|
|
|
23
23
|
* @param landingChatId Chat session ID
|
|
24
24
|
*/
|
|
25
25
|
get(landingChatId: string): Promise<import("../types").StartaResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Get paginated list of landing chats.
|
|
28
|
+
* @param options Pagination and sorting options
|
|
29
|
+
*/
|
|
30
|
+
index({ skip, limit, sortColumn, sortDirection, }?: {
|
|
31
|
+
skip?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
sortColumn?: 'createdAt';
|
|
34
|
+
sortDirection?: SortDirection;
|
|
35
|
+
}): Promise<import("../types").StartaResponse>;
|
|
26
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const _helpers_1 = require("./_helpers");
|
|
3
4
|
class LandingChats {
|
|
4
5
|
constructor(requestRunner) {
|
|
5
6
|
this._requestRunner = requestRunner;
|
|
@@ -59,5 +60,23 @@ class LandingChats {
|
|
|
59
60
|
},
|
|
60
61
|
});
|
|
61
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Get paginated list of landing chats.
|
|
65
|
+
* @param options Pagination and sorting options
|
|
66
|
+
*/
|
|
67
|
+
index({ skip, limit, sortColumn, sortDirection, } = {}) {
|
|
68
|
+
return this._requestRunner.performRequest({
|
|
69
|
+
url: `landing-chats${(0, _helpers_1.buildQuery)({
|
|
70
|
+
skip,
|
|
71
|
+
limit,
|
|
72
|
+
sortColumn,
|
|
73
|
+
sortDirection,
|
|
74
|
+
})}`,
|
|
75
|
+
method: 'GET',
|
|
76
|
+
config: {
|
|
77
|
+
rewriteBaseUrl: (url) => url.replace('/api', '/comm/api'),
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
62
81
|
}
|
|
63
82
|
exports.default = LandingChats;
|