@or-sdk/hitl 0.36.3 → 0.36.4-beta.4095.0
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/types/HITL.d.ts +0 -13
- package/dist/types/HITL.d.ts.map +1 -1
- package/dist/types/api/Agents.d.ts +0 -347
- package/dist/types/api/Agents.d.ts.map +1 -1
- package/dist/types/api/CannedMessages.d.ts +0 -168
- package/dist/types/api/CannedMessages.d.ts.map +1 -1
- package/dist/types/api/Commands.d.ts +0 -46
- package/dist/types/api/Commands.d.ts.map +1 -1
- package/dist/types/api/Conferences.d.ts +0 -120
- package/dist/types/api/Conferences.d.ts.map +1 -1
- package/dist/types/api/ContactRuleGroups.d.ts +0 -131
- package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
- package/dist/types/api/Contacts.d.ts +0 -37
- package/dist/types/api/Contacts.d.ts.map +1 -1
- package/dist/types/api/ContactsMeta.d.ts +0 -33
- package/dist/types/api/ContactsMeta.d.ts.map +1 -1
- package/dist/types/api/EventTemplates.d.ts +0 -135
- package/dist/types/api/EventTemplates.d.ts.map +1 -1
- package/dist/types/api/Filters.d.ts +0 -215
- package/dist/types/api/Filters.d.ts.map +1 -1
- package/dist/types/api/HITLBase.d.ts +0 -5
- package/dist/types/api/HITLBase.d.ts.map +1 -1
- package/dist/types/api/Helpers.d.ts +0 -33
- package/dist/types/api/Helpers.d.ts.map +1 -1
- package/dist/types/api/Listeners.d.ts +0 -150
- package/dist/types/api/Listeners.d.ts.map +1 -1
- package/dist/types/api/Migrations.d.ts +0 -222
- package/dist/types/api/Migrations.d.ts.map +1 -1
- package/dist/types/api/RuleGroups.d.ts +0 -127
- package/dist/types/api/RuleGroups.d.ts.map +1 -1
- package/dist/types/api/SessionEvents.d.ts +0 -145
- package/dist/types/api/SessionEvents.d.ts.map +1 -1
- package/dist/types/api/SessionRelations.d.ts +0 -109
- package/dist/types/api/SessionRelations.d.ts.map +1 -1
- package/dist/types/api/Sessions.d.ts +0 -454
- package/dist/types/api/Sessions.d.ts.map +1 -1
- package/dist/types/api/Settings.d.ts +0 -145
- package/dist/types/api/Settings.d.ts.map +1 -1
- package/dist/types/api/Tasks.d.ts +0 -39
- package/dist/types/api/Tasks.d.ts.map +1 -1
- package/dist/types/api/Versions.d.ts +0 -80
- package/dist/types/api/Versions.d.ts.map +1 -1
- package/dist/types/types/agents.d.ts +0 -3
- package/dist/types/types/agents.d.ts.map +1 -1
- package/package.json +3 -4
|
@@ -1,235 +1,20 @@
|
|
|
1
1
|
import { FilterV1, Filter, GetFiltersOptionsV1, GetFiltersOptions, GetFiltersResponseV1, GetFiltersResponse, CreateFilterOptionsV1, CreateFilterOptions, UpdateFilterOptionsV1, UpdateFilterOptions, DeleteFilterOptionsV1, DeleteFilterOptions, BulkGetFiltersOptionsV1, BulkGetFiltersOptions, BulkUpdateFiltersOptionsV1, BulkUpdateFiltersOptions, BulkUpdateFiltersResponseV1, BulkUpdateFiltersResponse } from '../types/filters';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
|
-
/**
|
|
4
|
-
* Manages conversation view filters in the system
|
|
5
|
-
*
|
|
6
|
-
* This class provides functionality to manage conversation filters, including retrieving,
|
|
7
|
-
* creating, updating, and deleting filters, with support for both individual and bulk operations.
|
|
8
|
-
*
|
|
9
|
-
* Key features:
|
|
10
|
-
* - Retrieve conversation filters
|
|
11
|
-
* - Create new filters
|
|
12
|
-
* - Update existing filters
|
|
13
|
-
* - Delete filters
|
|
14
|
-
* - Bulk operations for filters
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* - All methods in this class interact with the `/filters` endpoint
|
|
18
|
-
* - For all methods in this class, you must include `{ version: 2 }` in the parameters for the method to execute correctly.
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
3
|
export declare class Filters extends HITLBase {
|
|
22
4
|
protected static MODULE_URL: string;
|
|
23
5
|
protected static BULK_URL: string;
|
|
24
6
|
protected static DEFAULT_FIELDS: string[];
|
|
25
7
|
protected static FILTER_VERSION_FIELD: "filterVersion";
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves a list of conversation view filters
|
|
28
|
-
*
|
|
29
|
-
* @param options - Configuration parameters for retrieving filters
|
|
30
|
-
*
|
|
31
|
-
* Optional parameters:
|
|
32
|
-
* - `id` - (string) Specific filter ID
|
|
33
|
-
* - `agentId` - (string) Agent ID to filter by
|
|
34
|
-
* - `ignoreRuleTags` - (boolean) Whether to ignore rule tags
|
|
35
|
-
* - `isCommon` - (boolean) Filter by system or personal filters
|
|
36
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
37
|
-
* - `version` - (string | number) API version to use
|
|
38
|
-
*
|
|
39
|
-
* @returns {Promise<GetFiltersResponse | GetFiltersResponseV1>} Promise resolving to the filters list
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```typescript
|
|
43
|
-
* const filters = await hitlApi.filters.getFilters({
|
|
44
|
-
* agentId: 'agent-1',
|
|
45
|
-
* isCommon: true,
|
|
46
|
-
* version: 2,
|
|
47
|
-
* });
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* Makes a GET request to the `/filters` endpoint
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
8
|
static getFilters(options: GetFiltersOptionsV1): Promise<GetFiltersResponseV1>;
|
|
55
9
|
static getFilters(options: GetFiltersOptions): Promise<GetFiltersResponse>;
|
|
56
|
-
/**
|
|
57
|
-
* Bulk retrieves conversation view filters, ignoring userId for personal filters
|
|
58
|
-
*
|
|
59
|
-
* @param options - Configuration parameters for bulk retrieving filters
|
|
60
|
-
*
|
|
61
|
-
* Optional parameters:
|
|
62
|
-
* - `accountId` - (string) Account ID
|
|
63
|
-
* - `ignoreRuleTags` - (boolean) Whether to ignore rule tags
|
|
64
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
65
|
-
* - `version` - (string | number) API version to use
|
|
66
|
-
*
|
|
67
|
-
* @returns {Promise<GetFiltersResponse | GetFiltersResponseV1>} Promise resolving to the filters list
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```typescript
|
|
71
|
-
* const filters = await hitlApi.filters.bulkGetFilters({
|
|
72
|
-
* ignoreRuleTags: true,
|
|
73
|
-
* });
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* Makes a GET request to the `/filters/bulk` endpoint
|
|
78
|
-
* @public
|
|
79
|
-
*/
|
|
80
10
|
static bulkGetFilters(options: BulkGetFiltersOptionsV1): Promise<GetFiltersResponseV1>;
|
|
81
11
|
static bulkGetFilters(options: BulkGetFiltersOptions): Promise<GetFiltersResponse>;
|
|
82
|
-
/**
|
|
83
|
-
* Creates a new conversation view filter
|
|
84
|
-
*
|
|
85
|
-
* @param options - Configuration parameters for creating the filter
|
|
86
|
-
*
|
|
87
|
-
* Required parameters:
|
|
88
|
-
* - `isDefault` - (boolean) Whether this is a default filter
|
|
89
|
-
* - `name` - (string) Name of the filter
|
|
90
|
-
* - `order` - (number) Order/priority of the filter
|
|
91
|
-
* - `settings` - (any) Filter settings configuration
|
|
92
|
-
*
|
|
93
|
-
* Optional parameters:
|
|
94
|
-
* - `agentId` - (string) Agent ID associated with the filter
|
|
95
|
-
* - `filterVersion` - (number) Version of the filter
|
|
96
|
-
* - `isCommon` - (boolean) Whether the filter is common
|
|
97
|
-
* - `isEnabled` - (boolean) Whether the filter is enabled
|
|
98
|
-
* - `ruleTags` - (string[]) Array of rule tags
|
|
99
|
-
* - `tags` - (string[]) Array of tags
|
|
100
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
101
|
-
* - `version` - (string | number) API version to use
|
|
102
|
-
*
|
|
103
|
-
* @returns {Promise<Filter | FilterV1>} Promise resolving to the created filter
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```typescript
|
|
107
|
-
* const filter = await hitlApi.filters.createFilter({
|
|
108
|
-
* name: 'My Filter',
|
|
109
|
-
* isCommon: true,
|
|
110
|
-
* ruleTags: ['hitl'],
|
|
111
|
-
* settings: {
|
|
112
|
-
* customization: {},
|
|
113
|
-
* display: {
|
|
114
|
-
* type: "GROUP_BY_CONTACT"
|
|
115
|
-
* },
|
|
116
|
-
* contacts: {},
|
|
117
|
-
* conversations: {
|
|
118
|
-
* tags: [],
|
|
119
|
-
* needsAction: false,
|
|
120
|
-
* status: [
|
|
121
|
-
* 'CLAIMED',
|
|
122
|
-
* ],
|
|
123
|
-
* claimedBy: "[agent-id]",
|
|
124
|
-
* claimedByHistory: ""
|
|
125
|
-
* }
|
|
126
|
-
* },
|
|
127
|
-
* filterVersion: 2,
|
|
128
|
-
* version: 2
|
|
129
|
-
* });
|
|
130
|
-
* ```
|
|
131
|
-
*
|
|
132
|
-
* @remarks
|
|
133
|
-
* Makes a POST request to the `/filters` endpoint
|
|
134
|
-
* @public
|
|
135
|
-
*/
|
|
136
12
|
static createFilter(options: CreateFilterOptionsV1): Promise<FilterV1>;
|
|
137
13
|
static createFilter(options: CreateFilterOptions): Promise<Filter>;
|
|
138
|
-
/**
|
|
139
|
-
* Updates an existing conversation view filter
|
|
140
|
-
*
|
|
141
|
-
* @param options - Configuration parameters for updating the filter
|
|
142
|
-
*
|
|
143
|
-
* Required parameters:
|
|
144
|
-
* - `id` - (string) ID of the filter to update
|
|
145
|
-
*
|
|
146
|
-
* Optional parameters:
|
|
147
|
-
* - `filterVersion` - (number) Version of the filter
|
|
148
|
-
* - `isDefault` - (boolean) Whether this is a default filter
|
|
149
|
-
* - `isEnabled` - (boolean) Whether the filter is enabled
|
|
150
|
-
* - `name` - (string) Name of the filter
|
|
151
|
-
* - `order` - (number) Order/priority of the filter
|
|
152
|
-
* - `ruleTags` - (string[]) Array of rule tags
|
|
153
|
-
* - `settings` - (any) Filter settings configuration
|
|
154
|
-
* - `tags` - (string[]) Array of tags
|
|
155
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
156
|
-
* - `version` - (string | number) API version to use
|
|
157
|
-
*
|
|
158
|
-
* @returns {Promise<Filter | FilterV1>} Promise resolving to the updated filter
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* ```typescript
|
|
162
|
-
* const filter = await hitlApi.filters.updateFilter({
|
|
163
|
-
* id: 'filter-1',
|
|
164
|
-
* name: 'Updated Filter',
|
|
165
|
-
* tags: ['pets'],
|
|
166
|
-
* version: 2,
|
|
167
|
-
* filterVersion: 2,
|
|
168
|
-
* });
|
|
169
|
-
* ```
|
|
170
|
-
*
|
|
171
|
-
* @remarks
|
|
172
|
-
* Makes a PUT request to the `/filters` endpoint
|
|
173
|
-
* @public
|
|
174
|
-
*/
|
|
175
14
|
static updateFilter(options: UpdateFilterOptionsV1): Promise<FilterV1>;
|
|
176
15
|
static updateFilter(options: UpdateFilterOptions): Promise<Filter>;
|
|
177
|
-
/**
|
|
178
|
-
* Bulk updates conversation view filters
|
|
179
|
-
*
|
|
180
|
-
* @param options - Configuration parameters for bulk updating filters
|
|
181
|
-
*
|
|
182
|
-
* Required parameters:
|
|
183
|
-
* - `filters` - ({@link UpdateFilterBody|UpdateFilterBodyV1 }[]) Array of filters to update
|
|
184
|
-
*
|
|
185
|
-
* Optional parameters:
|
|
186
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
187
|
-
* - `version` - (string | number) API version to use
|
|
188
|
-
*
|
|
189
|
-
* @returns {Promise<BulkUpdateFiltersResponse | BulkUpdateFiltersResponseV1>} Promise resolving to the update response
|
|
190
|
-
*
|
|
191
|
-
* @example
|
|
192
|
-
* ```typescript
|
|
193
|
-
* const result = await hitlApi.filters.bulkUpdateFilters({
|
|
194
|
-
* filters: [
|
|
195
|
-
* { id: 'filter-1', name: 'Updated Filter 1', ... },
|
|
196
|
-
* { id: 'filter-2', name: 'Updated Filter 2', ... },
|
|
197
|
-
* ],
|
|
198
|
-
* version: 2
|
|
199
|
-
* });
|
|
200
|
-
* ```
|
|
201
|
-
*
|
|
202
|
-
* @remarks
|
|
203
|
-
* Makes a PUT request to the `/filters/bulk` endpoint
|
|
204
|
-
* @public
|
|
205
|
-
*/
|
|
206
16
|
static bulkUpdateFilters(options: BulkUpdateFiltersOptionsV1): Promise<BulkUpdateFiltersResponseV1>;
|
|
207
17
|
static bulkUpdateFilters(options: BulkUpdateFiltersOptions): Promise<BulkUpdateFiltersResponse>;
|
|
208
|
-
/**
|
|
209
|
-
* Deletes a conversation view filter
|
|
210
|
-
*
|
|
211
|
-
* @param options - Configuration parameters for deleting the filter
|
|
212
|
-
*
|
|
213
|
-
* Required parameters:
|
|
214
|
-
* - `id` - (string) ID of the filter to delete
|
|
215
|
-
*
|
|
216
|
-
* Optional parameters:
|
|
217
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
218
|
-
* - `version` - (string | number) API version to use
|
|
219
|
-
*
|
|
220
|
-
* @returns {Promise<GetFiltersResponse | Filter | GetFiltersResponseV1 | FilterV1>} Promise resolving to remaining filters or deleted filter
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* ```typescript
|
|
224
|
-
* await hitlApi.filters.deleteFilter({
|
|
225
|
-
* id: 'filter-1',
|
|
226
|
-
* });
|
|
227
|
-
* ```
|
|
228
|
-
*
|
|
229
|
-
* @remarks
|
|
230
|
-
* Makes a DELETE request to the `/filters` endpoint
|
|
231
|
-
* @public
|
|
232
|
-
*/
|
|
233
18
|
static deleteFilter(options: DeleteFilterOptionsV1): Promise<GetFiltersResponseV1 | FilterV1>;
|
|
234
19
|
static deleteFilter(options: DeleteFilterOptions): Promise<GetFiltersResponse | Filter>;
|
|
235
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Filters.d.ts","sourceRoot":"","sources":["../../../src/api/Filters.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,MAAM,EAKN,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Filters.d.ts","sourceRoot":"","sources":["../../../src/api/Filters.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,MAAM,EAKN,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAoBtC,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAa;IACxC,SAAS,CAAC,MAAM,CAAC,QAAQ,SAAU;IACnC,SAAS,CAAC,MAAM,CAAC,cAAc,WAQ7B;IACF,SAAS,CAAC,MAAM,CAAC,oBAAoB,kBAA4B;WA8BnD,UAAU,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;WACvE,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;WA0CnE,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC;WAC/E,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC;WAqE3E,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;WAC/D,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;WA2D3D,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;WAC/D,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;WA+C3D,iBAAiB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;WAC5F,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;WAiDxF,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,GAAG,QAAQ,CAAC;WACtF,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,GAAG,MAAM,CAAC;CAW/F"}
|
|
@@ -2,14 +2,9 @@ import { Request, BaseUrlOptions } from '../types';
|
|
|
2
2
|
export declare class HITLBase {
|
|
3
3
|
protected static readonly BASE_URL = "/api/v{version}/{module}";
|
|
4
4
|
protected static readonly LATEST_VERSION = 1;
|
|
5
|
-
/** This variable should be overridden in child classes */
|
|
6
5
|
protected static readonly MODULE_URL: string;
|
|
7
6
|
protected static request: Request;
|
|
8
7
|
static configure<T extends typeof HITLBase>(request: Request): T;
|
|
9
|
-
/**
|
|
10
|
-
* Function similar to "format" from Python
|
|
11
|
-
* https://stackoverflow.com/questions/610406/javascript-equivalent-to-printf-string-format
|
|
12
|
-
*/
|
|
13
8
|
static format(template: string, values: Record<string, string>): string;
|
|
14
9
|
protected static getBaseUrl(options?: BaseUrlOptions): string;
|
|
15
10
|
protected static getBaseSettings({ timeout }?: BaseUrlOptions): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HITLBase.d.ts","sourceRoot":"","sources":["../../../src/api/HITLBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEnD,qBAAa,QAAQ;IACnB,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,8BAA8B;IAChE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,KAAK;
|
|
1
|
+
{"version":3,"file":"HITLBase.d.ts","sourceRoot":"","sources":["../../../src/api/HITLBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEnD,qBAAa,QAAQ;IACnB,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,8BAA8B;IAChE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,KAAK;IAE7C,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAM;IAElD,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC;WAEpB,SAAS,CAAC,CAAC,SAAS,OAAO,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC;WASzD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;IAQ9E,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,GAAE,cAAmB,GAAG,MAAM;IAajE,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,GAAE,cAAmB;;;CAGlE"}
|
|
@@ -1,42 +1,9 @@
|
|
|
1
1
|
import { ApiVersionOptions } from '../types';
|
|
2
2
|
import { CleanUpDuplicatesResponse } from '../types/helpers';
|
|
3
3
|
import { HITLBase } from './HITLBase';
|
|
4
|
-
/**
|
|
5
|
-
* Provides helper utilities for the HITL system
|
|
6
|
-
*
|
|
7
|
-
* This class contains utility methods for maintaining and cleaning up
|
|
8
|
-
* system data, such as removing duplicate contacts.
|
|
9
|
-
*
|
|
10
|
-
* Key features:
|
|
11
|
-
* - Clean up duplicate contacts
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* - All methods in this class interact with the `/helpers` endpoint
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
4
|
export declare class Helpers extends HITLBase {
|
|
18
5
|
protected static MODULE_URL: string;
|
|
19
6
|
protected static CLEAN_CONTACTS: string;
|
|
20
|
-
/**
|
|
21
|
-
* Deletes duplicate contacts from Tables-based contacts (v1)
|
|
22
|
-
*
|
|
23
|
-
* @param options - Configuration parameters for the cleanup operation
|
|
24
|
-
*
|
|
25
|
-
* Optional parameters:
|
|
26
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
27
|
-
* - `version` - (string | number) API version to use
|
|
28
|
-
*
|
|
29
|
-
* @returns {Promise<CleanUpDuplicatesResponse>} Promise resolving to the cleanup operation results
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```typescript
|
|
33
|
-
* const result = await hitlApi.helpers.deleteContactDuplicates();
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* Makes a DELETE request to the `/helpers/clean-contact-duplicates` endpoint
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
7
|
static deleteContactDuplicates(options: ApiVersionOptions): Promise<CleanUpDuplicatesResponse>;
|
|
41
8
|
}
|
|
42
9
|
//# sourceMappingURL=Helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Helpers.d.ts","sourceRoot":"","sources":["../../../src/api/Helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Helpers.d.ts","sourceRoot":"","sources":["../../../src/api/Helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAa;IACxC,SAAS,CAAC,MAAM,CAAC,cAAc,SAA8B;WAsBzC,uBAAuB,CACzC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,yBAAyB,CAAC;CAUtC"}
|
|
@@ -1,162 +1,12 @@
|
|
|
1
1
|
import { Listener, GetListenersOptions, GetListenerByIdOptions, GetListenersResponse, CreateListenersOptions, UpdateListenersOptions, DeleteListenersOptions } from '../types/listeners';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
|
-
/**
|
|
4
|
-
* Manages HitL event listeners in the system
|
|
5
|
-
*
|
|
6
|
-
* This class provides functionality to manage event listeners, which can be:
|
|
7
|
-
* - Active WebSocket connections in Agent UI
|
|
8
|
-
* - Flow event subscription callbacks
|
|
9
|
-
* - Mobile application push notification callbacks
|
|
10
|
-
*
|
|
11
|
-
* Key features:
|
|
12
|
-
* - Retrieve listeners (all or by ID)
|
|
13
|
-
* - Create new listeners
|
|
14
|
-
* - Update existing listeners
|
|
15
|
-
* - Delete listeners
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* - All methods in this class interact with the `/listeners` endpoint
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
3
|
export declare class Listeners extends HITLBase {
|
|
22
4
|
protected static MODULE_URL: string;
|
|
23
5
|
protected static LISTENER_VERSION_FIELD: "listenerVersion";
|
|
24
|
-
/**
|
|
25
|
-
* Retrieves a list of HitL event listeners
|
|
26
|
-
*
|
|
27
|
-
* @param options - Configuration parameters for retrieving listeners
|
|
28
|
-
*
|
|
29
|
-
* Optional parameters:
|
|
30
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
31
|
-
* - `version` - (string | number) API version to use
|
|
32
|
-
*
|
|
33
|
-
* @returns {Promise<GetListenersResponse>} Promise resolving to the listeners list
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* const listeners = await hitlApi.listeners.getListeners();
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* Makes a GET request to the `/listeners` endpoint
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
6
|
static getListeners(options?: GetListenersOptions): Promise<GetListenersResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves a specific HitL event listener by ID
|
|
47
|
-
*
|
|
48
|
-
* @param options - Configuration parameters for retrieving the listener
|
|
49
|
-
*
|
|
50
|
-
* Required parameters:
|
|
51
|
-
* - `callbackId` - (string) ID of the listener to retrieve
|
|
52
|
-
*
|
|
53
|
-
* Optional parameters:
|
|
54
|
-
* - `agentId` - (string) Agent ID to filter by
|
|
55
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
56
|
-
* - `version` - (string | number) API version to use
|
|
57
|
-
*
|
|
58
|
-
* @returns {Promise<GetListenersResponse>} Promise resolving to the listener details
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```typescript
|
|
62
|
-
* const listener = await hitlApi.listeners.getListenerById({
|
|
63
|
-
* callbackId: 'listener-1'
|
|
64
|
-
* });
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
* @remarks
|
|
68
|
-
* Makes a GET request to the `/listeners/{callbackId}` endpoint
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
7
|
static getListenerById({ agentId, callbackId, ...options }: GetListenerByIdOptions): Promise<GetListenersResponse>;
|
|
72
|
-
/**
|
|
73
|
-
* Creates a new HitL event listener
|
|
74
|
-
*
|
|
75
|
-
* @param options - Configuration parameters for creating the listener
|
|
76
|
-
*
|
|
77
|
-
* Required parameters:
|
|
78
|
-
* - `callback` - ({@link ListenerCallback}) Callback configuration for the listener
|
|
79
|
-
*
|
|
80
|
-
* Optional parameters:
|
|
81
|
-
* - `agentId` - (string) ID of the agent associated with the listener
|
|
82
|
-
* - `listenerVersion` - (number) Version of the listener
|
|
83
|
-
* - `sessionIds` - (string[]) Array of session IDs to associate with the listener
|
|
84
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
85
|
-
* - `type` - (any) Type of the listener
|
|
86
|
-
* - `version` - (string | number) API version to use
|
|
87
|
-
*
|
|
88
|
-
* @returns {Promise<Listener>} Promise resolving to the created listener
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```typescript
|
|
92
|
-
* const newListener = await hitlApi.listeners.createListener({
|
|
93
|
-
* callback: {
|
|
94
|
-
* type: "sync",
|
|
95
|
-
* expire: 1750940155085,
|
|
96
|
-
* name: "MxPMqfr4PHcCGCw=",
|
|
97
|
-
* v: 0
|
|
98
|
-
* }
|
|
99
|
-
* });
|
|
100
|
-
* ```
|
|
101
|
-
*
|
|
102
|
-
* @remarks
|
|
103
|
-
* Makes a POST request to the `/listeners` endpoint
|
|
104
|
-
* @public
|
|
105
|
-
*/
|
|
106
8
|
static createListener(options: CreateListenersOptions): Promise<Listener>;
|
|
107
|
-
/**
|
|
108
|
-
* Updates an existing HitL event listener
|
|
109
|
-
*
|
|
110
|
-
* @param options - Configuration parameters for updating the listener
|
|
111
|
-
*
|
|
112
|
-
* Required parameters:
|
|
113
|
-
* - `callbackId` - (string) ID of the listener to update
|
|
114
|
-
* - `sessionIds` - (string[]) list of subscribed sessions by this listener
|
|
115
|
-
*
|
|
116
|
-
* Optional parameters:
|
|
117
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
118
|
-
* - `version` - (string | number) API version to use
|
|
119
|
-
*
|
|
120
|
-
* @returns {Promise<Listener>} Promise resolving to the updated listener
|
|
121
|
-
*
|
|
122
|
-
* @example
|
|
123
|
-
* ```typescript
|
|
124
|
-
* const updatedListener = await hitlApi.listeners.updateListener({
|
|
125
|
-
* callbackId: 'listener-1',
|
|
126
|
-
* sessionIds: ['session-id-1']
|
|
127
|
-
* });
|
|
128
|
-
* ```
|
|
129
|
-
*
|
|
130
|
-
* @remarks
|
|
131
|
-
* Makes a PUT request to the `/listeners/{callbackId}` endpoint
|
|
132
|
-
* @public
|
|
133
|
-
*/
|
|
134
9
|
static updateListener({ callbackId, ...options }: UpdateListenersOptions): Promise<Listener>;
|
|
135
|
-
/**
|
|
136
|
-
* Deletes a HitL event listener
|
|
137
|
-
*
|
|
138
|
-
* @param options - Configuration parameters for deleting the listener
|
|
139
|
-
*
|
|
140
|
-
* Required parameters:
|
|
141
|
-
* - `callbackId` - (string) ID of the listener to delete
|
|
142
|
-
*
|
|
143
|
-
* Optional parameters:
|
|
144
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
145
|
-
* - `version` - (string | number) API version to use
|
|
146
|
-
*
|
|
147
|
-
* @returns {Promise<void>} Promise that resolves when deletion is complete
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```typescript
|
|
151
|
-
* await hitlApi.listeners.deleteListener({
|
|
152
|
-
* callbackId: 'listener-1',
|
|
153
|
-
* });
|
|
154
|
-
* ```
|
|
155
|
-
*
|
|
156
|
-
* @remarks
|
|
157
|
-
* Makes a DELETE request to the `/listeners/{callbackId}` endpoint
|
|
158
|
-
* @public
|
|
159
|
-
*/
|
|
160
10
|
static deleteListener({ callbackId, ...options }: DeleteListenersOptions): Promise<void>;
|
|
161
11
|
}
|
|
162
12
|
//# sourceMappingURL=Listeners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listeners.d.ts","sourceRoot":"","sources":["../../../src/api/Listeners.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAGR,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Listeners.d.ts","sourceRoot":"","sources":["../../../src/api/Listeners.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAGR,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAoBtC,qBAAa,SAAU,SAAQ,QAAQ;IACrC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAe;IAC1C,SAAS,CAAC,MAAM,CAAC,sBAAsB,oBAA8B;WAsBjD,YAAY,CAC9B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,oBAAoB,CAAC;WAwCZ,eAAe,CACjC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC1D,OAAO,CAAC,oBAAoB,CAAC;WA8CZ,cAAc,CAChC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,QAAQ,CAAC;WA4CA,cAAc,CAChC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GACjD,OAAO,CAAC,QAAQ,CAAC;WAwCA,cAAc,CAChC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GACjD,OAAO,CAAC,IAAI,CAAC;CAUjB"}
|