@or-sdk/hitl 0.34.56 → 0.34.57-beta.3229.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/README.md +62 -0
- package/dist/cjs/EKS.js.map +1 -1
- package/dist/cjs/HITL.js +1 -1
- package/dist/cjs/HITL.js.map +1 -1
- package/dist/cjs/api/Agents.js.map +1 -1
- package/dist/cjs/api/CannedMessages.js.map +1 -1
- package/dist/cjs/api/Commands.js.map +1 -1
- package/dist/cjs/api/Conferences.js.map +1 -1
- package/dist/cjs/api/ContactRuleGroups.js.map +1 -1
- package/dist/cjs/api/Contacts.js.map +1 -1
- package/dist/cjs/api/ContactsMeta.js.map +1 -1
- package/dist/cjs/api/EventTemplates.js.map +1 -1
- package/dist/cjs/api/Filters.js.map +1 -1
- package/dist/cjs/api/Helpers.js.map +1 -1
- package/dist/cjs/api/Listeners.js.map +1 -1
- package/dist/cjs/api/Migrations.js.map +1 -1
- package/dist/cjs/api/RuleGroups.js.map +1 -1
- package/dist/cjs/api/SessionEvents.js +1 -1
- package/dist/cjs/api/SessionEvents.js.map +1 -1
- package/dist/cjs/api/SessionRelations.js.map +1 -1
- package/dist/cjs/api/Sessions.js.map +1 -1
- package/dist/cjs/api/Settings.js.map +1 -1
- package/dist/cjs/api/Tasks.js.map +1 -1
- package/dist/cjs/api/Versions.js.map +1 -1
- package/dist/esm/EKS.js.map +1 -1
- package/dist/esm/HITL.js +1 -1
- package/dist/esm/HITL.js.map +1 -1
- package/dist/esm/api/Agents.js.map +1 -1
- package/dist/esm/api/CannedMessages.js.map +1 -1
- package/dist/esm/api/Commands.js.map +1 -1
- package/dist/esm/api/Conferences.js.map +1 -1
- package/dist/esm/api/ContactRuleGroups.js.map +1 -1
- package/dist/esm/api/Contacts.js.map +1 -1
- package/dist/esm/api/ContactsMeta.js.map +1 -1
- package/dist/esm/api/EventTemplates.js.map +1 -1
- package/dist/esm/api/Filters.js.map +1 -1
- package/dist/esm/api/Helpers.js.map +1 -1
- package/dist/esm/api/Listeners.js.map +1 -1
- package/dist/esm/api/Migrations.js.map +1 -1
- package/dist/esm/api/RuleGroups.js.map +1 -1
- package/dist/esm/api/SessionEvents.js +1 -1
- package/dist/esm/api/SessionEvents.js.map +1 -1
- package/dist/esm/api/SessionRelations.js.map +1 -1
- package/dist/esm/api/Sessions.js.map +1 -1
- package/dist/esm/api/Settings.js.map +1 -1
- package/dist/esm/api/Tasks.js.map +1 -1
- package/dist/esm/api/Versions.js.map +1 -1
- package/dist/types/EKS.d.ts.map +1 -1
- package/dist/types/HITL.d.ts.map +1 -1
- package/dist/types/api/Agents.d.ts.map +1 -1
- package/dist/types/api/CannedMessages.d.ts.map +1 -1
- package/dist/types/api/Commands.d.ts.map +1 -1
- package/dist/types/api/Conferences.d.ts.map +1 -1
- package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
- package/dist/types/api/Contacts.d.ts.map +1 -1
- package/dist/types/api/ContactsMeta.d.ts.map +1 -1
- package/dist/types/api/EventTemplates.d.ts.map +1 -1
- package/dist/types/api/Filters.d.ts.map +1 -1
- package/dist/types/api/Helpers.d.ts.map +1 -1
- package/dist/types/api/Listeners.d.ts.map +1 -1
- package/dist/types/api/Migrations.d.ts.map +1 -1
- package/dist/types/api/RuleGroups.d.ts.map +1 -1
- package/dist/types/api/SessionEvents.d.ts.map +1 -1
- package/dist/types/api/SessionRelations.d.ts.map +1 -1
- package/dist/types/api/Sessions.d.ts.map +1 -1
- package/dist/types/api/Settings.d.ts.map +1 -1
- package/dist/types/api/Tasks.d.ts.map +1 -1
- package/dist/types/api/Versions.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/EKS.ts +14 -1
- package/src/HITL.ts +15 -2
- package/src/api/Agents.ts +40 -0
- package/src/api/CannedMessages.ts +19 -0
- package/src/api/Commands.ts +4 -0
- package/src/api/Conferences.ts +12 -0
- package/src/api/ContactRuleGroups.ts +16 -0
- package/src/api/Contacts.ts +7 -0
- package/src/api/ContactsMeta.ts +6 -0
- package/src/api/EventTemplates.ts +16 -0
- package/src/api/Filters.ts +25 -0
- package/src/api/Helpers.ts +4 -0
- package/src/api/Listeners.ts +25 -0
- package/src/api/Migrations.ts +32 -0
- package/src/api/RuleGroups.ts +16 -0
- package/src/api/SessionEvents.ts +21 -1
- package/src/api/SessionRelations.ts +13 -1
- package/src/api/Sessions.ts +66 -1
- package/src/api/Settings.ts +17 -0
- package/src/api/Tasks.ts +4 -1
- package/src/api/Versions.ts +8 -0
|
@@ -15,6 +15,10 @@ import { HITLBase } from './HITLBase';
|
|
|
15
15
|
export class EventTemplates extends HITLBase {
|
|
16
16
|
protected static readonly MODULE_URL = 'event-templates';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @description Get Event templates
|
|
20
|
+
* @param options
|
|
21
|
+
*/
|
|
18
22
|
public static async getEventTemplates(
|
|
19
23
|
options: GetEventTemplatesOptions = {}
|
|
20
24
|
): Promise<GetEventTemplatesResponse | EventTemplate> {
|
|
@@ -29,6 +33,10 @@ export class EventTemplates extends HITLBase {
|
|
|
29
33
|
});
|
|
30
34
|
}
|
|
31
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @description Create Event template
|
|
38
|
+
* @param options
|
|
39
|
+
*/
|
|
32
40
|
public static async createEventTemplate(
|
|
33
41
|
options: CreateEventTemplateOptions
|
|
34
42
|
): Promise<EventTemplate> {
|
|
@@ -46,6 +54,10 @@ export class EventTemplates extends HITLBase {
|
|
|
46
54
|
});
|
|
47
55
|
}
|
|
48
56
|
|
|
57
|
+
/**
|
|
58
|
+
* @description Update Event template
|
|
59
|
+
* @param options
|
|
60
|
+
*/
|
|
49
61
|
public static async updateEventTemplate(
|
|
50
62
|
options: UpdateEventTemplateOptions
|
|
51
63
|
): Promise<EventTemplate> {
|
|
@@ -60,6 +72,10 @@ export class EventTemplates extends HITLBase {
|
|
|
60
72
|
});
|
|
61
73
|
}
|
|
62
74
|
|
|
75
|
+
/**
|
|
76
|
+
* @description Delete Event template
|
|
77
|
+
* @param options
|
|
78
|
+
*/
|
|
63
79
|
public static async deleteEventTemplate(
|
|
64
80
|
options: DeleteEventTemplateOptions
|
|
65
81
|
): Promise<void> {
|
package/src/api/Filters.ts
CHANGED
|
@@ -38,6 +38,10 @@ export class Filters extends HITLBase {
|
|
|
38
38
|
];
|
|
39
39
|
protected static FILTER_VERSION_FIELD = 'filterVersion';
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @description Get Conversation view filters list
|
|
43
|
+
* @param options
|
|
44
|
+
*/
|
|
41
45
|
public static getFilters(options: GetFiltersOptionsV1): Promise<GetFiltersResponseV1>;
|
|
42
46
|
public static getFilters(options: GetFiltersOptions): Promise<GetFiltersResponse>;
|
|
43
47
|
public static getFilters(
|
|
@@ -54,6 +58,11 @@ export class Filters extends HITLBase {
|
|
|
54
58
|
});
|
|
55
59
|
}
|
|
56
60
|
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @description Bulk get Conversation view filters list ignoring userId for personal filters
|
|
64
|
+
* @param options
|
|
65
|
+
*/
|
|
57
66
|
public static bulkGetFilters(options: BulkGetFiltersOptionsV1): Promise<GetFiltersResponseV1>;
|
|
58
67
|
public static bulkGetFilters(options: BulkGetFiltersOptions): Promise<GetFiltersResponse>;
|
|
59
68
|
public static bulkGetFilters(
|
|
@@ -71,6 +80,10 @@ export class Filters extends HITLBase {
|
|
|
71
80
|
});
|
|
72
81
|
}
|
|
73
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @description Create Conversation view filter
|
|
85
|
+
* @param options
|
|
86
|
+
*/
|
|
74
87
|
public static createFilter(options: CreateFilterOptionsV1): Promise<FilterV1>;
|
|
75
88
|
public static createFilter(options: CreateFilterOptions): Promise<Filter>;
|
|
76
89
|
public static createFilter(options: CreateFilterOptions) {
|
|
@@ -90,6 +103,10 @@ export class Filters extends HITLBase {
|
|
|
90
103
|
});
|
|
91
104
|
}
|
|
92
105
|
|
|
106
|
+
/**
|
|
107
|
+
* @description Update Conversation view filter
|
|
108
|
+
* @param options
|
|
109
|
+
*/
|
|
93
110
|
public static updateFilter(options: UpdateFilterOptionsV1): Promise<FilterV1>;
|
|
94
111
|
public static updateFilter(options: UpdateFilterOptions): Promise<Filter>;
|
|
95
112
|
public static updateFilter(options: UpdateFilterOptions) {
|
|
@@ -107,6 +124,10 @@ export class Filters extends HITLBase {
|
|
|
107
124
|
});
|
|
108
125
|
}
|
|
109
126
|
|
|
127
|
+
/**
|
|
128
|
+
* @description Bulk update Conversation view filters ignoring userId for personal filters
|
|
129
|
+
* @param options
|
|
130
|
+
*/
|
|
110
131
|
public static bulkUpdateFilters(options: BulkUpdateFiltersOptionsV1): Promise<BulkUpdateFiltersResponseV1>;
|
|
111
132
|
public static bulkUpdateFilters(options: BulkUpdateFiltersOptions): Promise<BulkUpdateFiltersResponse>;
|
|
112
133
|
public static bulkUpdateFilters(options: BulkUpdateFiltersOptionsV1) {
|
|
@@ -129,6 +150,10 @@ export class Filters extends HITLBase {
|
|
|
129
150
|
});
|
|
130
151
|
}
|
|
131
152
|
|
|
153
|
+
/**
|
|
154
|
+
* @description Delete Conversation view filter
|
|
155
|
+
* @param options
|
|
156
|
+
*/
|
|
132
157
|
public static deleteFilter(options: DeleteFilterOptionsV1): Promise<GetFiltersResponseV1 | FilterV1>;
|
|
133
158
|
public static deleteFilter(options: DeleteFilterOptions): Promise<GetFiltersResponse | Filter>;
|
|
134
159
|
public static deleteFilter(
|
package/src/api/Helpers.ts
CHANGED
|
@@ -9,6 +9,10 @@ export class Helpers extends HITLBase {
|
|
|
9
9
|
protected static MODULE_URL = 'helpers';
|
|
10
10
|
protected static CLEAN_CONTACTS = 'clean-contact-duplicates';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @description Delete Contact duplicates (Tables-based contacts v1)
|
|
14
|
+
* @param options
|
|
15
|
+
*/
|
|
12
16
|
public static async deleteContactDuplicates(
|
|
13
17
|
options: ApiVersionOptions
|
|
14
18
|
): Promise<CleanUpDuplicatesResponse> {
|
package/src/api/Listeners.ts
CHANGED
|
@@ -14,9 +14,18 @@ import {
|
|
|
14
14
|
|
|
15
15
|
import { HITLBase } from './HITLBase';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* HitL events Listener is an object describing a real-time Evnets callback -
|
|
19
|
+
* either an active WebSocket in Agent UI, flow event subscription callback or a
|
|
20
|
+
* mobile application push notification "callbacks"
|
|
21
|
+
*/
|
|
17
22
|
export class Listeners extends HITLBase {
|
|
18
23
|
protected static MODULE_URL = 'listeners';
|
|
19
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @description Get a list of HitL event listeners
|
|
27
|
+
* @param options
|
|
28
|
+
*/
|
|
20
29
|
public static async getListeners(
|
|
21
30
|
options: GetListenersOptions = {}
|
|
22
31
|
): Promise<GetListenersResponse> {
|
|
@@ -31,6 +40,10 @@ export class Listeners extends HITLBase {
|
|
|
31
40
|
});
|
|
32
41
|
}
|
|
33
42
|
|
|
43
|
+
/**
|
|
44
|
+
* @description Get HitL event listeners by id
|
|
45
|
+
* @param options
|
|
46
|
+
*/
|
|
34
47
|
public static async getListenerById(
|
|
35
48
|
options: GetListenerByIdOptions
|
|
36
49
|
): Promise<GetListenersResponse> {
|
|
@@ -46,6 +59,10 @@ export class Listeners extends HITLBase {
|
|
|
46
59
|
});
|
|
47
60
|
}
|
|
48
61
|
|
|
62
|
+
/**
|
|
63
|
+
* @description Create HitL event listener
|
|
64
|
+
* @param options
|
|
65
|
+
*/
|
|
49
66
|
public static async createListener(
|
|
50
67
|
options: CreateListenersOptions
|
|
51
68
|
): Promise<Listener> {
|
|
@@ -60,6 +77,10 @@ export class Listeners extends HITLBase {
|
|
|
60
77
|
});
|
|
61
78
|
}
|
|
62
79
|
|
|
80
|
+
/**
|
|
81
|
+
* @description Update HitL event listener
|
|
82
|
+
* @param options
|
|
83
|
+
*/
|
|
63
84
|
public static async updateListener(
|
|
64
85
|
options: UpdateListenersOptions
|
|
65
86
|
): Promise<Listener> {
|
|
@@ -75,6 +96,10 @@ export class Listeners extends HITLBase {
|
|
|
75
96
|
});
|
|
76
97
|
}
|
|
77
98
|
|
|
99
|
+
/**
|
|
100
|
+
* @description Delete HitL event listener
|
|
101
|
+
* @param options
|
|
102
|
+
*/
|
|
78
103
|
public static async deleteListener(
|
|
79
104
|
options: DeleteListenersOptions
|
|
80
105
|
): Promise<void> {
|
package/src/api/Migrations.ts
CHANGED
|
@@ -26,6 +26,10 @@ export class Migrations extends HITLBase {
|
|
|
26
26
|
protected static MIGRATIONS_LOCK_URL = 'lock';
|
|
27
27
|
protected static MIGRATIONS_STATUS_URL = 'status';
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @description Get list of pending migrations
|
|
31
|
+
* @param options
|
|
32
|
+
*/
|
|
29
33
|
public static async getListOfMigrations(
|
|
30
34
|
options: GetMigrationsOptions = {}
|
|
31
35
|
): Promise<GetMigrationsResponse> {
|
|
@@ -39,6 +43,10 @@ export class Migrations extends HITLBase {
|
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @description Run migrations
|
|
48
|
+
* @param options
|
|
49
|
+
*/
|
|
42
50
|
public static async runAllMigrations(
|
|
43
51
|
options: RunMigrationsOptions = {}
|
|
44
52
|
): Promise<RunMigrationsResponse> {
|
|
@@ -55,6 +63,10 @@ export class Migrations extends HITLBase {
|
|
|
55
63
|
});
|
|
56
64
|
}
|
|
57
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @description Get status of running migrations
|
|
68
|
+
* @param options
|
|
69
|
+
*/
|
|
58
70
|
public static async getRunMigrationsStatus(options: ApiVersionOptions = {}): Promise<GetRunMigrationsStatusResponse> {
|
|
59
71
|
const baseUrl = this.getBaseUrl({});
|
|
60
72
|
const route = new URI(baseUrl).segment(this.MIGRATIONS_STATUS_URL).href();
|
|
@@ -65,6 +77,10 @@ export class Migrations extends HITLBase {
|
|
|
65
77
|
});
|
|
66
78
|
}
|
|
67
79
|
|
|
80
|
+
/**
|
|
81
|
+
* @description Delete migrations table lock (set during migration runs)
|
|
82
|
+
* @param options
|
|
83
|
+
*/
|
|
68
84
|
public static async deleteMigrationsTableLock(options: ApiVersionOptions = {}) {
|
|
69
85
|
const baseUrl = this.getBaseUrl({});
|
|
70
86
|
const route = new URI(baseUrl).segment(this.MIGRATIONS_LOCK_URL).href();
|
|
@@ -76,6 +92,10 @@ export class Migrations extends HITLBase {
|
|
|
76
92
|
});
|
|
77
93
|
}
|
|
78
94
|
|
|
95
|
+
/**
|
|
96
|
+
* @description Get migrations info about compatibility with UI versions
|
|
97
|
+
* @param options
|
|
98
|
+
*/
|
|
79
99
|
public static async getMigrationsInfo(options: ApiVersionOptions = {}): Promise<GetMigrationsInfoResponse> {
|
|
80
100
|
const baseUrl = this.getBaseUrl({});
|
|
81
101
|
const route = new URI(baseUrl).segment(this.MIGRATIONS_INFO_URL).href();
|
|
@@ -86,6 +106,10 @@ export class Migrations extends HITLBase {
|
|
|
86
106
|
});
|
|
87
107
|
}
|
|
88
108
|
|
|
109
|
+
/**
|
|
110
|
+
* @description Get default records for some tables (settings, filters, eventTemplates, rule_groups)
|
|
111
|
+
* @param options
|
|
112
|
+
*/
|
|
89
113
|
public static async getTableDefaultRecords(options: GetDefaultRecordsOptions): Promise<GetDefaultRecordsResponse> {
|
|
90
114
|
const baseUrl = this.getBaseUrl({});
|
|
91
115
|
const route = new URI(baseUrl).segment(this.DEFAULT_RECORDS_URL).href();
|
|
@@ -99,6 +123,10 @@ export class Migrations extends HITLBase {
|
|
|
99
123
|
});
|
|
100
124
|
}
|
|
101
125
|
|
|
126
|
+
/**
|
|
127
|
+
* @description Add default records for some tables (settings, filters, event_templates, rule_groups)
|
|
128
|
+
* @param options
|
|
129
|
+
*/
|
|
102
130
|
public static async createTableDefaultRecords(options: ApiVersionOptions = {}): Promise<CreateDefaultRecordsResponse> {
|
|
103
131
|
const baseUrl = this.getBaseUrl({});
|
|
104
132
|
const route = new URI(baseUrl).segment(this.DEFAULT_RECORDS_URL).href();
|
|
@@ -110,6 +138,10 @@ export class Migrations extends HITLBase {
|
|
|
110
138
|
});
|
|
111
139
|
}
|
|
112
140
|
|
|
141
|
+
/**
|
|
142
|
+
* @description Sync default records for some tables (settings, filters, eventTemplates, rule_groups)
|
|
143
|
+
* @param options
|
|
144
|
+
*/
|
|
113
145
|
public static async syncTableDefaultRecords(options: SyncDefaultRecordsOptions): Promise<SyncDefaultRecordsResponse> {
|
|
114
146
|
const baseUrl = this.getBaseUrl({});
|
|
115
147
|
const route = new URI(baseUrl).segment(this.DEFAULT_RECORDS_URL).href();
|
package/src/api/RuleGroups.ts
CHANGED
|
@@ -15,6 +15,10 @@ import { HITLBase } from './HITLBase';
|
|
|
15
15
|
export class RuleGroups extends HITLBase {
|
|
16
16
|
protected static MODULE_URL = 'rule-groups';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @description Get/search Rule Groups
|
|
20
|
+
* @param options
|
|
21
|
+
*/
|
|
18
22
|
public static searchRuleGroups(
|
|
19
23
|
options: SearchRuleGroupsOptions = {}
|
|
20
24
|
): Promise<SearchRuleGroupsResponse | RuleGroup> {
|
|
@@ -30,6 +34,10 @@ export class RuleGroups extends HITLBase {
|
|
|
30
34
|
});
|
|
31
35
|
}
|
|
32
36
|
|
|
37
|
+
/**
|
|
38
|
+
* @description Create Rule Group
|
|
39
|
+
* @param options
|
|
40
|
+
*/
|
|
33
41
|
public static createRuleGroup(
|
|
34
42
|
options: CreateRuleGroupOptions
|
|
35
43
|
): Promise<RuleGroup> {
|
|
@@ -44,6 +52,10 @@ export class RuleGroups extends HITLBase {
|
|
|
44
52
|
});
|
|
45
53
|
}
|
|
46
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @description Update Rule Group
|
|
57
|
+
* @param options
|
|
58
|
+
*/
|
|
47
59
|
public static updateRuleGroup(
|
|
48
60
|
options: UpdateRuleGroupOptions
|
|
49
61
|
): Promise<RuleGroup> {
|
|
@@ -58,6 +70,10 @@ export class RuleGroups extends HITLBase {
|
|
|
58
70
|
});
|
|
59
71
|
}
|
|
60
72
|
|
|
73
|
+
/**
|
|
74
|
+
* @description Delete Rule Group
|
|
75
|
+
* @param options
|
|
76
|
+
*/
|
|
61
77
|
public static deleteRuleGroup(
|
|
62
78
|
options: DeleteRuleGroupOptions
|
|
63
79
|
): Promise<void> {
|
package/src/api/SessionEvents.ts
CHANGED
|
@@ -24,6 +24,10 @@ export class SessionEvents extends HITLBase {
|
|
|
24
24
|
protected static GET_EVENTS_COUNT_URL = 'get-new-events';
|
|
25
25
|
protected static SAVE_READ_EVENT_URL = 'save-read-event';
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @description Get Event list of a HitL Session
|
|
29
|
+
* @param options
|
|
30
|
+
*/
|
|
27
31
|
public static async getSessionEventsList(
|
|
28
32
|
options: GetSessionEventsOptions
|
|
29
33
|
): Promise<GetSessionEventsResponse> {
|
|
@@ -38,6 +42,10 @@ export class SessionEvents extends HITLBase {
|
|
|
38
42
|
});
|
|
39
43
|
}
|
|
40
44
|
|
|
45
|
+
/**
|
|
46
|
+
* @description Get Events of multiple HitL Sessions
|
|
47
|
+
* @param options
|
|
48
|
+
*/
|
|
41
49
|
public static async getBulkSessionEventsList(
|
|
42
50
|
options: GetBulkSessionEventsOptions
|
|
43
51
|
): Promise<GetBulkSessionsEventsResponse> {
|
|
@@ -53,12 +61,16 @@ export class SessionEvents extends HITLBase {
|
|
|
53
61
|
});
|
|
54
62
|
}
|
|
55
63
|
|
|
64
|
+
/**
|
|
65
|
+
* @description Add new Event to HitL Session
|
|
66
|
+
* @param options
|
|
67
|
+
*/
|
|
56
68
|
public static addEvents(
|
|
57
69
|
options: AddEventsOptions
|
|
58
70
|
): Promise<AddEventsResponse> {
|
|
59
71
|
const route = this.getBaseUrl(options);
|
|
60
72
|
const params = _.pick(options, ['sessionId']);
|
|
61
|
-
const data = _.pick(options, ['
|
|
73
|
+
const data = _.pick(options, ['Event']);
|
|
62
74
|
|
|
63
75
|
return this.request({
|
|
64
76
|
method: 'POST',
|
|
@@ -69,6 +81,10 @@ export class SessionEvents extends HITLBase {
|
|
|
69
81
|
});
|
|
70
82
|
}
|
|
71
83
|
|
|
84
|
+
/**
|
|
85
|
+
* @description Get unread Event count for an Agent
|
|
86
|
+
* @param options
|
|
87
|
+
*/
|
|
72
88
|
public static async getNewEventsCount(
|
|
73
89
|
options: GetNewEventsCountOptions
|
|
74
90
|
): Promise<GetNewEventsCountResponse> {
|
|
@@ -86,6 +102,10 @@ export class SessionEvents extends HITLBase {
|
|
|
86
102
|
});
|
|
87
103
|
}
|
|
88
104
|
|
|
105
|
+
/**
|
|
106
|
+
* @description Save last read Event info (event id and timestamp) for a Agent and HitL Session
|
|
107
|
+
* @param options
|
|
108
|
+
*/
|
|
89
109
|
public static async saveReadEventByUserId(
|
|
90
110
|
options: SaveLastReadEventOptions
|
|
91
111
|
): Promise<void> {
|
|
@@ -14,6 +14,10 @@ import { HITLBase } from './HITLBase';
|
|
|
14
14
|
export class SessionRelations extends HITLBase {
|
|
15
15
|
protected static MODULE_URL = 'session-relations';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @description Get a list of HitL Session Relations
|
|
19
|
+
* @param options
|
|
20
|
+
*/
|
|
17
21
|
public static getSessionRelations(
|
|
18
22
|
options: GetSessionRelationsOptions
|
|
19
23
|
): Promise<GetSessionRelationsResponse> {
|
|
@@ -28,6 +32,11 @@ export class SessionRelations extends HITLBase {
|
|
|
28
32
|
});
|
|
29
33
|
}
|
|
30
34
|
|
|
35
|
+
/**
|
|
36
|
+
* @description Create HitL Session Relations
|
|
37
|
+
* @param options
|
|
38
|
+
*/
|
|
39
|
+
|
|
31
40
|
public static createSessionRelations(options: CreateSessionRelationsOptions): Promise<CreateSessionRelationsResponse> {
|
|
32
41
|
const route = this.getBaseUrl(options);
|
|
33
42
|
const data = _.omit(options, DEFAULT_OMIT_FIELDS);
|
|
@@ -40,7 +49,10 @@ export class SessionRelations extends HITLBase {
|
|
|
40
49
|
});
|
|
41
50
|
}
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
/**
|
|
53
|
+
* @description Delete HitL Session Relations
|
|
54
|
+
* @param options
|
|
55
|
+
*/
|
|
44
56
|
public static deleteSessionRelations(
|
|
45
57
|
options: DeleteSessionRelationsOptions
|
|
46
58
|
) {
|
package/src/api/Sessions.ts
CHANGED
|
@@ -43,6 +43,10 @@ export class Sessions extends HITLBase {
|
|
|
43
43
|
protected static CLOSE_URL = 'close';
|
|
44
44
|
protected static REOPEN_URL = 'reopen';
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @description Get HitL Sessions
|
|
48
|
+
* @param options
|
|
49
|
+
*/
|
|
46
50
|
public static async getSessions(
|
|
47
51
|
options: GetSessionsOptions = {}
|
|
48
52
|
): Promise<GetSessionsResponse> {
|
|
@@ -57,6 +61,10 @@ export class Sessions extends HITLBase {
|
|
|
57
61
|
});
|
|
58
62
|
}
|
|
59
63
|
|
|
64
|
+
/**
|
|
65
|
+
* @description Get HitL Session by id
|
|
66
|
+
* @param options
|
|
67
|
+
*/
|
|
60
68
|
public static async getSessionById(
|
|
61
69
|
options: GetSessionByIdOptions
|
|
62
70
|
): Promise<Session> {
|
|
@@ -72,6 +80,10 @@ export class Sessions extends HITLBase {
|
|
|
72
80
|
});
|
|
73
81
|
}
|
|
74
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @description Search HitL Sessions
|
|
85
|
+
* @param options
|
|
86
|
+
*/
|
|
75
87
|
public static async searchSessions(
|
|
76
88
|
options: SearchSessionsOptions = {}
|
|
77
89
|
): Promise<SearchSessionsResponse> {
|
|
@@ -89,6 +101,10 @@ export class Sessions extends HITLBase {
|
|
|
89
101
|
});
|
|
90
102
|
}
|
|
91
103
|
|
|
104
|
+
/**
|
|
105
|
+
* @description Search HitL Sessions and return a list of found Sessions with their Contacts
|
|
106
|
+
* @param options
|
|
107
|
+
*/
|
|
92
108
|
public static async searchSessionsWithContacts(
|
|
93
109
|
options: SearchSessionsWithContactsOptions = {}
|
|
94
110
|
): Promise<SearchSessionsWithContactsResponse> {
|
|
@@ -109,6 +125,10 @@ export class Sessions extends HITLBase {
|
|
|
109
125
|
});
|
|
110
126
|
}
|
|
111
127
|
|
|
128
|
+
/**
|
|
129
|
+
* @description Get next HitL Session in the NEEDS_ACTION status
|
|
130
|
+
* @param options
|
|
131
|
+
*/
|
|
112
132
|
public static async getQueueSession(
|
|
113
133
|
options: GetQueueSessionOptions
|
|
114
134
|
): Promise<GetQueueSessionResponse> {
|
|
@@ -124,6 +144,11 @@ export class Sessions extends HITLBase {
|
|
|
124
144
|
});
|
|
125
145
|
}
|
|
126
146
|
|
|
147
|
+
/**
|
|
148
|
+
* @description Get a list of "init triggers" for HitL Sessions that
|
|
149
|
+
* can be started from Agent UI
|
|
150
|
+
* @param options
|
|
151
|
+
*/
|
|
127
152
|
public static async getSessionInitTriggers(
|
|
128
153
|
options: GetInitTriggersOptions = {}
|
|
129
154
|
): Promise<GetInitTriggersResponse> {
|
|
@@ -137,6 +162,12 @@ export class Sessions extends HITLBase {
|
|
|
137
162
|
});
|
|
138
163
|
}
|
|
139
164
|
|
|
165
|
+
/**
|
|
166
|
+
* @description Claim HitL Session by Agent. This will add an Agent id to claimedBy
|
|
167
|
+
* list of a HitL Session and send a "claimed" event to Request Agent Assistance (HitL)
|
|
168
|
+
* step in a flow currently in control of that HitL Session
|
|
169
|
+
* @param options
|
|
170
|
+
*/
|
|
140
171
|
public static async claimSessionByAgent(
|
|
141
172
|
options: ClaimSessionByAgentOptions
|
|
142
173
|
): Promise<Session> {
|
|
@@ -158,6 +189,12 @@ export class Sessions extends HITLBase {
|
|
|
158
189
|
});
|
|
159
190
|
}
|
|
160
191
|
|
|
192
|
+
/**
|
|
193
|
+
* @description Transfer HitL Session execution to bot.
|
|
194
|
+
* This will send an "Unpause" event to Pause Execution (HitL) step in a
|
|
195
|
+
* flow currently in control of the HitL Session
|
|
196
|
+
* @param options
|
|
197
|
+
*/
|
|
161
198
|
public static async transferToBot(
|
|
162
199
|
options: TransferToBotOptions
|
|
163
200
|
): Promise<Session> {
|
|
@@ -179,6 +216,10 @@ export class Sessions extends HITLBase {
|
|
|
179
216
|
});
|
|
180
217
|
}
|
|
181
218
|
|
|
219
|
+
/**
|
|
220
|
+
* @description Start new HitL Session
|
|
221
|
+
* @param options
|
|
222
|
+
*/
|
|
182
223
|
public static async startConversation(
|
|
183
224
|
options: StartConversationOptions
|
|
184
225
|
): Promise<Session> {
|
|
@@ -197,6 +238,10 @@ export class Sessions extends HITLBase {
|
|
|
197
238
|
});
|
|
198
239
|
}
|
|
199
240
|
|
|
241
|
+
/**
|
|
242
|
+
* @description Update HitL Session
|
|
243
|
+
* @param options
|
|
244
|
+
*/
|
|
200
245
|
public static async updateSession(
|
|
201
246
|
options: UpdateSessionOptions
|
|
202
247
|
): Promise<Session> {
|
|
@@ -212,6 +257,10 @@ export class Sessions extends HITLBase {
|
|
|
212
257
|
});
|
|
213
258
|
}
|
|
214
259
|
|
|
260
|
+
/**
|
|
261
|
+
* @description Create HitL Session
|
|
262
|
+
* @param options
|
|
263
|
+
*/
|
|
215
264
|
public static async createSessions(
|
|
216
265
|
options: CreateSessionsOptions
|
|
217
266
|
): Promise<CreateSessionsResponse> {
|
|
@@ -225,6 +274,10 @@ export class Sessions extends HITLBase {
|
|
|
225
274
|
});
|
|
226
275
|
}
|
|
227
276
|
|
|
277
|
+
/**
|
|
278
|
+
* @description Close HitL Session
|
|
279
|
+
* @param options
|
|
280
|
+
*/
|
|
228
281
|
public static async closeSession(
|
|
229
282
|
options: CloseSessionOptions
|
|
230
283
|
): Promise<Session> {
|
|
@@ -241,7 +294,10 @@ export class Sessions extends HITLBase {
|
|
|
241
294
|
});
|
|
242
295
|
}
|
|
243
296
|
|
|
244
|
-
|
|
297
|
+
/**
|
|
298
|
+
* @description Reopen closed HitL Session
|
|
299
|
+
* @param options
|
|
300
|
+
*/
|
|
245
301
|
public static async reopenSession(
|
|
246
302
|
options: ReopenSessionOptions
|
|
247
303
|
): Promise<Session> {
|
|
@@ -257,6 +313,11 @@ export class Sessions extends HITLBase {
|
|
|
257
313
|
...this.getBaseSettings(options),
|
|
258
314
|
});
|
|
259
315
|
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @description Delete closed HitL Session
|
|
319
|
+
* @param options
|
|
320
|
+
*/
|
|
260
321
|
public static async deleteClosedSession(
|
|
261
322
|
options: DeleteClosedSessionOptions
|
|
262
323
|
) {
|
|
@@ -269,6 +330,10 @@ export class Sessions extends HITLBase {
|
|
|
269
330
|
});
|
|
270
331
|
}
|
|
271
332
|
|
|
333
|
+
/**
|
|
334
|
+
* @description Delete HitL Sessions in bulk
|
|
335
|
+
* @param options
|
|
336
|
+
*/
|
|
272
337
|
public static async buldDeleteSessions(
|
|
273
338
|
options: BulkDeleteSessionsOptions
|
|
274
339
|
) {
|
package/src/api/Settings.ts
CHANGED
|
@@ -19,6 +19,10 @@ export class Settings extends HITLBase {
|
|
|
19
19
|
protected static readonly CONTACT_BOOK_INFO_URL = 'contact-book-info';
|
|
20
20
|
protected static readonly IGNORE_RULE_TAGS_HEADER = 'X-Ignore-Rule-Tags';
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @description Get settings
|
|
24
|
+
* @param options
|
|
25
|
+
*/
|
|
22
26
|
public static async getSettings(
|
|
23
27
|
options: GetSettingsOptions = {}
|
|
24
28
|
): Promise<GetSettingsResponse> {
|
|
@@ -34,6 +38,10 @@ export class Settings extends HITLBase {
|
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @description Get contact book info setting using agent rule groups for triggers
|
|
43
|
+
* @param options
|
|
44
|
+
*/
|
|
37
45
|
public static async getContactBookInfoSetting(
|
|
38
46
|
options: GetContactBookInfoSettingOptions = {}
|
|
39
47
|
): Promise<SettingsType> {
|
|
@@ -48,6 +56,10 @@ export class Settings extends HITLBase {
|
|
|
48
56
|
});
|
|
49
57
|
}
|
|
50
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @description Update setting
|
|
61
|
+
* @param options
|
|
62
|
+
*/
|
|
51
63
|
public static async updateSettings(
|
|
52
64
|
options: UpdateSettingsOptions
|
|
53
65
|
): Promise<UpdateSettingsResponse> {
|
|
@@ -67,6 +79,11 @@ export class Settings extends HITLBase {
|
|
|
67
79
|
});
|
|
68
80
|
}
|
|
69
81
|
|
|
82
|
+
/**
|
|
83
|
+
* @description Delete setting
|
|
84
|
+
* @param options
|
|
85
|
+
*/
|
|
86
|
+
|
|
70
87
|
public static async deleteSetting(
|
|
71
88
|
options: DeleteSettingOptions
|
|
72
89
|
): Promise<GetSettingsResponse> {
|
package/src/api/Tasks.ts
CHANGED
|
@@ -6,7 +6,10 @@ import { HITLBase } from './HITLBase';
|
|
|
6
6
|
|
|
7
7
|
export class Tasks extends HITLBase {
|
|
8
8
|
protected static MODULE_URL = 'tasks';
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @description Run task: send events, broadcasting, remove rule group etc
|
|
11
|
+
* @param options
|
|
12
|
+
*/
|
|
10
13
|
public static async runTask(
|
|
11
14
|
options: RunTaskOptions
|
|
12
15
|
): Promise<void> {
|
package/src/api/Versions.ts
CHANGED
|
@@ -9,6 +9,10 @@ export class Versions extends HITLBase {
|
|
|
9
9
|
protected static MODULE_URL = 'ui-versions';
|
|
10
10
|
protected static VERSION_INFO = 'version-info';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @description Get UI available versions
|
|
14
|
+
* @param options
|
|
15
|
+
*/
|
|
12
16
|
public static async getVersionsList(
|
|
13
17
|
options: ApiVersionOptions
|
|
14
18
|
): Promise<GetVersionsListResponse> {
|
|
@@ -20,6 +24,10 @@ export class Versions extends HITLBase {
|
|
|
20
24
|
});
|
|
21
25
|
}
|
|
22
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @description Get version info
|
|
29
|
+
* @param options
|
|
30
|
+
*/
|
|
23
31
|
public static async getVersionInfo(
|
|
24
32
|
options: ApiVersionOptions
|
|
25
33
|
): Promise<GetVersionInfoResponse> {
|