@or-sdk/hitl 0.36.2 → 0.36.3
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/CHANGELOG.md +9 -0
- package/dist/cjs/api/Sessions.js +4 -3
- package/dist/cjs/api/Sessions.js.map +1 -1
- package/dist/esm/api/Sessions.js +3 -2
- package/dist/esm/api/Sessions.js.map +1 -1
- package/dist/types/HITL.d.ts +13 -0
- package/dist/types/HITL.d.ts.map +1 -1
- package/dist/types/api/Agents.d.ts +347 -0
- package/dist/types/api/Agents.d.ts.map +1 -1
- package/dist/types/api/CannedMessages.d.ts +168 -0
- package/dist/types/api/CannedMessages.d.ts.map +1 -1
- package/dist/types/api/Commands.d.ts +46 -0
- package/dist/types/api/Commands.d.ts.map +1 -1
- package/dist/types/api/Conferences.d.ts +120 -0
- package/dist/types/api/Conferences.d.ts.map +1 -1
- package/dist/types/api/ContactRuleGroups.d.ts +131 -0
- package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
- package/dist/types/api/Contacts.d.ts +37 -0
- package/dist/types/api/Contacts.d.ts.map +1 -1
- package/dist/types/api/ContactsMeta.d.ts +33 -0
- package/dist/types/api/ContactsMeta.d.ts.map +1 -1
- package/dist/types/api/EventTemplates.d.ts +135 -0
- package/dist/types/api/EventTemplates.d.ts.map +1 -1
- package/dist/types/api/Filters.d.ts +215 -0
- package/dist/types/api/Filters.d.ts.map +1 -1
- package/dist/types/api/Helpers.d.ts +33 -0
- package/dist/types/api/Helpers.d.ts.map +1 -1
- package/dist/types/api/Listeners.d.ts +150 -0
- package/dist/types/api/Listeners.d.ts.map +1 -1
- package/dist/types/api/Migrations.d.ts +222 -0
- package/dist/types/api/Migrations.d.ts.map +1 -1
- package/dist/types/api/RuleGroups.d.ts +127 -0
- package/dist/types/api/RuleGroups.d.ts.map +1 -1
- package/dist/types/api/SessionEvents.d.ts +145 -0
- package/dist/types/api/SessionEvents.d.ts.map +1 -1
- package/dist/types/api/SessionRelations.d.ts +109 -0
- package/dist/types/api/SessionRelations.d.ts.map +1 -1
- package/dist/types/api/Sessions.d.ts +455 -1
- package/dist/types/api/Sessions.d.ts.map +1 -1
- package/dist/types/api/Settings.d.ts +145 -0
- package/dist/types/api/Settings.d.ts.map +1 -1
- package/dist/types/api/Tasks.d.ts +39 -0
- package/dist/types/api/Tasks.d.ts.map +1 -1
- package/dist/types/api/Versions.d.ts +80 -0
- package/dist/types/api/Versions.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/api/Sessions.ts +2 -1
|
@@ -1,10 +1,145 @@
|
|
|
1
1
|
import { GetEventTemplatesOptions, GetEventTemplatesResponse, CreateEventTemplateOptions, UpdateEventTemplateOptions, DeleteEventTemplateOptions, EventTemplate } from '../types/event-templates';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
|
+
/**
|
|
4
|
+
* Manages event templates in the system
|
|
5
|
+
*
|
|
6
|
+
* This class provides functionality to manage event templates, including retrieving,
|
|
7
|
+
* creating, updating, and deleting templates.
|
|
8
|
+
*
|
|
9
|
+
* Key features:
|
|
10
|
+
* - Retrieve event templates
|
|
11
|
+
* - Create new event templates
|
|
12
|
+
* - Update existing event templates
|
|
13
|
+
* - Delete event templates
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* - All methods in this class interact with the `/event-templates` endpoint
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
3
19
|
export declare class EventTemplates extends HITLBase {
|
|
4
20
|
protected static readonly MODULE_URL = "event-templates";
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves event templates or a specific template
|
|
23
|
+
*
|
|
24
|
+
* @param options - Configuration parameters for retrieving templates
|
|
25
|
+
*
|
|
26
|
+
* Optional parameters:
|
|
27
|
+
* - `templateId` - (string) Specific template ID to retrieve
|
|
28
|
+
* - `timeout` - (number) Request timeout in milliseconds
|
|
29
|
+
* - `version` - (string | number) API version to use
|
|
30
|
+
*
|
|
31
|
+
* @returns {Promise<GetEventTemplatesResponse | EventTemplate>} Promise resolving to:
|
|
32
|
+
* - Either a list of templates or a single template if specific ID is provided
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* // Get all templates
|
|
37
|
+
* const templates = await hitlApi.eventTemplates.getEventTemplates();
|
|
38
|
+
*
|
|
39
|
+
* // Get specific template
|
|
40
|
+
* const template = await hitlApi.eventTemplates.getEventTemplates({
|
|
41
|
+
* templateId: 'template-1'
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* Makes a GET request to the `/event-templates` endpoint
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
5
49
|
static getEventTemplates({ templateId, ...options }?: GetEventTemplatesOptions): Promise<GetEventTemplatesResponse | EventTemplate>;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new event template
|
|
52
|
+
*
|
|
53
|
+
* @param options - Configuration parameters for creating the template
|
|
54
|
+
*
|
|
55
|
+
* Required parameters:
|
|
56
|
+
* - `eventType` - (string) Type of the event
|
|
57
|
+
* - `rule` - (string) Rule expression for the template
|
|
58
|
+
* - `template` - ({@link EventTemplateContent}) Content configuration for the template
|
|
59
|
+
*
|
|
60
|
+
* Optional parameters:
|
|
61
|
+
* - `isActive` - (boolean) Whether the template is active
|
|
62
|
+
* - `isVisible` - (boolean) Whether the template is visible
|
|
63
|
+
* - `timeout` - (number) Request timeout in milliseconds
|
|
64
|
+
* - `version` - (string | number) API version to use
|
|
65
|
+
*
|
|
66
|
+
* @returns {Promise<EventTemplate>} Promise resolving to the created event template
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const template = await hitlApi.eventTemplates.createTemplate({
|
|
71
|
+
* eventType: "Custom",
|
|
72
|
+
* rule: "type == 'Transcript'",
|
|
73
|
+
* template: {
|
|
74
|
+
* html: '', js: 'return {}', sass: ''
|
|
75
|
+
* }
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* Makes a POST request to the `/event-templates` endpoint
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
6
83
|
static createEventTemplate(options: CreateEventTemplateOptions): Promise<EventTemplate>;
|
|
84
|
+
/**
|
|
85
|
+
* Updates an existing event template
|
|
86
|
+
*
|
|
87
|
+
* @param options - Configuration parameters for updating the template
|
|
88
|
+
*
|
|
89
|
+
* Required parameters:
|
|
90
|
+
* - `templateId` - (string) ID of the template to update
|
|
91
|
+
*
|
|
92
|
+
* Optional parameters:
|
|
93
|
+
* - `eventType` - (string) Type of the event
|
|
94
|
+
* - `isActive` - (boolean) Whether the template is active
|
|
95
|
+
* - `isVisible` - (boolean) Whether the template is visible
|
|
96
|
+
* - `rule` - (string) Rule expression for the template
|
|
97
|
+
* - `template` - ({@link EventTemplateContent}) Content configuration for the template
|
|
98
|
+
* - `timeout` - (number) Request timeout in milliseconds
|
|
99
|
+
* - `version` - (string | number) API version to use
|
|
100
|
+
*
|
|
101
|
+
* @returns {Promise<EventTemplate>} Promise resolving to the updated template
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* const updatedTemplate = await hitlApi.eventTemplates.updateEventTemplate({
|
|
106
|
+
* templateId: "template-1",
|
|
107
|
+
* eventType: "Custom",
|
|
108
|
+
* rule: "type == 'Transcript'",
|
|
109
|
+
* isVisible: true,
|
|
110
|
+
* });
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* Makes a PUT request to the `/event-templates` endpoint
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
7
117
|
static updateEventTemplate(options: UpdateEventTemplateOptions): Promise<EventTemplate>;
|
|
118
|
+
/**
|
|
119
|
+
* Deletes an event template
|
|
120
|
+
*
|
|
121
|
+
* @param options - Configuration parameters for deleting the template
|
|
122
|
+
*
|
|
123
|
+
* Required parameters:
|
|
124
|
+
* - `templateId` - (string) ID of the template to delete
|
|
125
|
+
*
|
|
126
|
+
* Optional parameters:
|
|
127
|
+
* - `timeout` - (number) Request timeout in milliseconds
|
|
128
|
+
* - `version` - (string | number) API version to use
|
|
129
|
+
*
|
|
130
|
+
* @returns {Promise<void>} Promise that resolves when deletion is complete
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* await hitlApi.eventTemplates.deleteEventTemplate({
|
|
135
|
+
* templateId: 'template-1'
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @remarks
|
|
140
|
+
* Makes a DELETE request to the `/event-templates` endpoint
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
8
143
|
static deleteEventTemplate({ templateId, ...options }: DeleteEventTemplateOptions): Promise<void>;
|
|
9
144
|
}
|
|
10
145
|
//# sourceMappingURL=EventTemplates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTemplates.d.ts","sourceRoot":"","sources":["../../../src/api/EventTemplates.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,aAAa,EAGd,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"EventTemplates.d.ts","sourceRoot":"","sources":["../../../src/api/EventTemplates.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,aAAa,EAGd,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,qBAAqB;IAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACiB,iBAAiB,CACnC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,GAAE,wBAA6B,GACxD,OAAO,CAAC,yBAAyB,GAAG,aAAa,CAAC;IAWrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;WACiB,mBAAmB,CACrC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC;IAczB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;WACiB,mBAAmB,CACrC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC;IAczB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,mBAAmB,CACrC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,0BAA0B,GACrD,OAAO,CAAC,IAAI,CAAC;CAUjB"}
|
|
@@ -1,20 +1,235 @@
|
|
|
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
|
+
*/
|
|
3
21
|
export declare class Filters extends HITLBase {
|
|
4
22
|
protected static MODULE_URL: string;
|
|
5
23
|
protected static BULK_URL: string;
|
|
6
24
|
protected static DEFAULT_FIELDS: string[];
|
|
7
25
|
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
|
+
*/
|
|
8
54
|
static getFilters(options: GetFiltersOptionsV1): Promise<GetFiltersResponseV1>;
|
|
9
55
|
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
|
+
*/
|
|
10
80
|
static bulkGetFilters(options: BulkGetFiltersOptionsV1): Promise<GetFiltersResponseV1>;
|
|
11
81
|
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
|
+
*/
|
|
12
136
|
static createFilter(options: CreateFilterOptionsV1): Promise<FilterV1>;
|
|
13
137
|
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
|
+
*/
|
|
14
175
|
static updateFilter(options: UpdateFilterOptionsV1): Promise<FilterV1>;
|
|
15
176
|
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
|
+
*/
|
|
16
206
|
static bulkUpdateFilters(options: BulkUpdateFiltersOptionsV1): Promise<BulkUpdateFiltersResponseV1>;
|
|
17
207
|
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
|
+
*/
|
|
18
233
|
static deleteFilter(options: DeleteFilterOptionsV1): Promise<GetFiltersResponseV1 | FilterV1>;
|
|
19
234
|
static deleteFilter(options: DeleteFilterOptions): Promise<GetFiltersResponse | Filter>;
|
|
20
235
|
}
|
|
@@ -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;AAEtC;;;;;;;;;;;;;;;;;GAiBG;AACH,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;IAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACW,UAAU,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;WACvE,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAkBjF;;;;;;;;;;;;;;;;;;;;;;;OAuBG;WACW,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC;WAC/E,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAezF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqDG;WACW,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;WAC/D,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;IAsBzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;WACW,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;WAC/D,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;IAkBzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACW,iBAAiB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;WAC5F,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAwBtG;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACW,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"}
|
|
@@ -1,9 +1,42 @@
|
|
|
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
|
+
*/
|
|
4
17
|
export declare class Helpers extends HITLBase {
|
|
5
18
|
protected static MODULE_URL: string;
|
|
6
19
|
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
|
+
*/
|
|
7
40
|
static deleteContactDuplicates(options: ApiVersionOptions): Promise<CleanUpDuplicatesResponse>;
|
|
8
41
|
}
|
|
9
42
|
//# 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;;;;;;;;;;;;GAYG;AACH,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAa;IACxC,SAAS,CAAC,MAAM,CAAC,cAAc,SAA8B;IAE7D;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,uBAAuB,CACzC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,yBAAyB,CAAC;CAUtC"}
|
|
@@ -1,12 +1,162 @@
|
|
|
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
|
+
*/
|
|
3
21
|
export declare class Listeners extends HITLBase {
|
|
4
22
|
protected static MODULE_URL: string;
|
|
5
23
|
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
|
+
*/
|
|
6
44
|
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
|
+
*/
|
|
7
71
|
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
|
+
*/
|
|
8
106
|
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
|
+
*/
|
|
9
134
|
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
|
+
*/
|
|
10
160
|
static deleteListener({ callbackId, ...options }: DeleteListenersOptions): Promise<void>;
|
|
11
161
|
}
|
|
12
162
|
//# 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;AAEtC;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,SAAU,SAAQ,QAAQ;IACrC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAe;IAC1C,SAAS,CAAC,MAAM,CAAC,sBAAsB,oBAA8B;IAErE;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,YAAY,CAC9B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,oBAAoB,CAAC;IAchC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;WACiB,eAAe,CACjC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC1D,OAAO,CAAC,oBAAoB,CAAC;IAYhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;WACiB,cAAc,CAChC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,QAAQ,CAAC;IAiBpB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;WACiB,cAAc,CAChC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GACjD,OAAO,CAAC,QAAQ,CAAC;IAepB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,cAAc,CAChC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GACjD,OAAO,CAAC,IAAI,CAAC;CAUjB"}
|