@or-sdk/hitl 0.36.1 → 0.36.2
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.map +1 -1
- package/dist/esm/api/Sessions.js.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/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/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/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/Sessions.d.ts +0 -453
- 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/types/sessions.d.ts +1 -1
- package/dist/types/types/sessions.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/Sessions.ts +1 -0
- package/src/types/sessions.ts +1 -1
|
@@ -1,129 +1,9 @@
|
|
|
1
1
|
import { GetConferenceMembersOptions, GetConferenceMembersResponse, ConferenceMember, AddOrUpdateConferenceMemberOptions, CleanUpConferenceOptions } from '../types/conferences';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
|
-
/**
|
|
4
|
-
* Manages voice conference members in the system
|
|
5
|
-
*
|
|
6
|
-
* This class provides functionality to manage conference participants, including retrieving,
|
|
7
|
-
* adding, updating, and removing conference members.
|
|
8
|
-
*
|
|
9
|
-
* Key features:
|
|
10
|
-
* - Manage conference member states and statuses
|
|
11
|
-
* - Track member connection states
|
|
12
|
-
* - Support for cleanup operations
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* - All methods in this class interact with the `/conferences` endpoint
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
3
|
export declare class Conferences extends HITLBase {
|
|
19
4
|
protected static MODULE_URL: string;
|
|
20
|
-
/**
|
|
21
|
-
* Gets a list of conference members or a specific member
|
|
22
|
-
*
|
|
23
|
-
* @param options - Configuration parameters for the conference members request
|
|
24
|
-
*
|
|
25
|
-
* Required parameters:
|
|
26
|
-
* - `hitlSessionId` - (string) ID of the HitL session
|
|
27
|
-
*
|
|
28
|
-
* Optional parameters:
|
|
29
|
-
* - `memberId` - (string) Get specific member by ID
|
|
30
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
31
|
-
* - `version` - (string | number) API version to use
|
|
32
|
-
*
|
|
33
|
-
* @returns {Promise<GetConferenceMembersResponse | ConferenceMember>} Promise resolving to:
|
|
34
|
-
* - Either a list of conference members or a single member if memberId is provided
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* // Get all members in a conference
|
|
39
|
-
* const response = await hitlApi.conferences.getConferenceMembers({
|
|
40
|
-
* hitlSessionId: 'session-id'
|
|
41
|
-
* });
|
|
42
|
-
*
|
|
43
|
-
* // Get a specific member
|
|
44
|
-
* const member = await hitlApi.conferences.getConferenceMembers({
|
|
45
|
-
* hitlSessionId: 'session-id',
|
|
46
|
-
* memberId: 'member-id'
|
|
47
|
-
* });
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* Makes a GET request to the `/conferences` endpoint
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
5
|
static getConferenceMembers({ hitlSessionId, memberId, ...options }: GetConferenceMembersOptions): Promise<GetConferenceMembersResponse | ConferenceMember>;
|
|
55
|
-
/**
|
|
56
|
-
* Adds or updates a conference member
|
|
57
|
-
*
|
|
58
|
-
* @param options - Configuration parameters for adding/updating the conference member
|
|
59
|
-
*
|
|
60
|
-
* Required parameters:
|
|
61
|
-
* - `hitlSessionId` - (string) ID of the HitL session
|
|
62
|
-
* - `identifier` - (string) Unique identifier for the member
|
|
63
|
-
* - `type` - (string) Type of the conference member
|
|
64
|
-
*
|
|
65
|
-
* Optional parameters:
|
|
66
|
-
* - `memberId` - (string) ID of the member to update
|
|
67
|
-
* - `status` - (string) Member's status
|
|
68
|
-
* - `state` - (string) Member's state
|
|
69
|
-
* - `disconnectedAt` - (Date) Timestamp when member disconnected
|
|
70
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
71
|
-
* - `version` - (string | number) API version to use
|
|
72
|
-
*
|
|
73
|
-
* @returns {Promise<ConferenceMember>} Promise resolving to the created/updated conference member
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```typescript
|
|
77
|
-
* const member = await hitlApi.conferences.addOrUpdateConferenceMember({
|
|
78
|
-
* hitlSessionId: 'session-id',
|
|
79
|
-
* identifier: '+1234567890',
|
|
80
|
-
* type: 'contact',
|
|
81
|
-
* status: 'JOINED',
|
|
82
|
-
* state: {
|
|
83
|
-
* isMuted: false,
|
|
84
|
-
* isOnHold: false
|
|
85
|
-
* }
|
|
86
|
-
* });
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* @remarks
|
|
90
|
-
* Makes a POST request to the `/conferences` endpoint
|
|
91
|
-
* @public
|
|
92
|
-
*/
|
|
93
6
|
static addOrUpdateConferenceMember({ hitlSessionId, memberId, identifier, type, status, state, disconnectedAt, ...options }: AddOrUpdateConferenceMemberOptions): Promise<ConferenceMember>;
|
|
94
|
-
/**
|
|
95
|
-
* Removes conference members from a session
|
|
96
|
-
*
|
|
97
|
-
* @param options - Configuration parameters for cleaning up the conference
|
|
98
|
-
*
|
|
99
|
-
* Required parameters:
|
|
100
|
-
* - `hitlSessionId` - (string) ID of the HitL session
|
|
101
|
-
*
|
|
102
|
-
* Optional parameters:
|
|
103
|
-
* - `memberId` - (string) Specific member to remove
|
|
104
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
105
|
-
* - `version` - (string | number) API version to use
|
|
106
|
-
*
|
|
107
|
-
* @returns {Promise<void>} Promise that resolves when cleanup is complete
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* // Clean up all conference members
|
|
112
|
-
* await hitlApi.conferences.cleanUpConference({
|
|
113
|
-
* hitlSessionId: 'session-id'
|
|
114
|
-
* });
|
|
115
|
-
*
|
|
116
|
-
* // Remove specific member
|
|
117
|
-
* await hitlApi.conferences.cleanUpConference({
|
|
118
|
-
* hitlSessionId: 'session-id',
|
|
119
|
-
* memberId: 'member-id'
|
|
120
|
-
* });
|
|
121
|
-
* ```
|
|
122
|
-
*
|
|
123
|
-
* @remarks
|
|
124
|
-
* Makes a DELETE request to the `/conferences` endpoint
|
|
125
|
-
* @public
|
|
126
|
-
*/
|
|
127
7
|
static cleanUpConference({ hitlSessionId, memberId, ...options }: CleanUpConferenceOptions): Promise<void>;
|
|
128
8
|
}
|
|
129
9
|
//# sourceMappingURL=Conferences.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Conferences.d.ts","sourceRoot":"","sources":["../../../src/api/Conferences.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,kCAAkC,EAClC,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Conferences.d.ts","sourceRoot":"","sources":["../../../src/api/Conferences.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,kCAAkC,EAClC,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiBtC,qBAAa,WAAY,SAAQ,QAAQ;IACvC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAiB;WAoC9B,oBAAoB,CAChC,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,2BAA2B,GACnE,OAAO,CAAC,4BAA4B,GAAG,gBAAgB,CAAC;WAmD7C,2BAA2B,CACvC,EACE,aAAa,EACb,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,OAAO,EACX,EAAE,kCAAkC,GACpC,OAAO,CAAC,gBAAgB,CAAC;WAoDd,iBAAiB,CAC7B,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,wBAAwB,GAChE,OAAO,CAAC,IAAI,CAAC;CAajB"}
|
|
@@ -1,141 +1,10 @@
|
|
|
1
1
|
import { SearchRuleGroupsOptions, SearchRuleGroupsResponse, RuleGroup, CreateRuleGroupOptions, UpdateRuleGroupOptions, DeleteRuleGroupOptions } from '../types/rule-groups';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
|
-
/**
|
|
4
|
-
* Manages contact rule groups in the system
|
|
5
|
-
*
|
|
6
|
-
* This class provides functionality to manage contact rule groups, including searching,
|
|
7
|
-
* creating, updating, and deleting contact rule groups.
|
|
8
|
-
*
|
|
9
|
-
* Key features:
|
|
10
|
-
* - Search and retrieve contact rule groups
|
|
11
|
-
* - Create new contact rule groups
|
|
12
|
-
* - Update existing contact rule groups
|
|
13
|
-
* - Delete contact rule groups
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* - All methods in this class interact with the `/contact-rule-groups` endpoint
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
3
|
export declare class ContactRuleGroups extends HITLBase {
|
|
20
4
|
protected static MODULE_URL: string;
|
|
21
|
-
/**
|
|
22
|
-
* Searches for contact rule groups or retrieves specific groups
|
|
23
|
-
*
|
|
24
|
-
* @param options - Configuration parameters for the rule groups search
|
|
25
|
-
*
|
|
26
|
-
* Optional parameters:
|
|
27
|
-
* - `groupIdList` - (string[]) List of specific group IDs to retrieve
|
|
28
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
29
|
-
* - `version` - (string | number) API version to use
|
|
30
|
-
*
|
|
31
|
-
* @returns {Promise<SearchRuleGroupsResponse | RuleGroup>} Promise resolving to:
|
|
32
|
-
* - Either a list of rule groups or a single rule group if specific ID is provided
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* // Search all rule groups
|
|
37
|
-
* const response = await hitlApi.contactRuleGroups.searchContactRuleGroups();
|
|
38
|
-
*
|
|
39
|
-
* // Search specific rule groups
|
|
40
|
-
* const groups = await hitlApi.contactRuleGroups.searchContactRuleGroups({
|
|
41
|
-
* groupIdList: ['group-1', 'group-2']
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @remarks
|
|
46
|
-
* Makes a GET request to the `/contact-rule-groups` endpoint
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
5
|
static searchContactRuleGroups({ groupIdList, ...options }?: SearchRuleGroupsOptions): Promise<SearchRuleGroupsResponse | RuleGroup>;
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new contact rule group
|
|
52
|
-
*
|
|
53
|
-
* @param options - Configuration parameters for creating the rule group
|
|
54
|
-
*
|
|
55
|
-
* Required parameters:
|
|
56
|
-
* - `groupId` - (string) Unique identifier for the group
|
|
57
|
-
* - `name` - (string) Name of the rule group
|
|
58
|
-
* - `rules` - (RuleDefinition[]) Array of rules for the group
|
|
59
|
-
*
|
|
60
|
-
* Optional parameters:
|
|
61
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
62
|
-
* - `version` - (string | number) API version to use
|
|
63
|
-
*
|
|
64
|
-
* @returns {Promise<RuleGroup>} Promise resolving to the created rule group
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```typescript
|
|
68
|
-
* const newGroup = await hitlApi.contactRuleGroups.createContactRuleGroup({
|
|
69
|
-
* groupId: 'group-1',
|
|
70
|
-
* name: 'Students',
|
|
71
|
-
* rules: [
|
|
72
|
-
* 'student', 'postgraduate student'
|
|
73
|
-
* ]
|
|
74
|
-
* });
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* @remarks
|
|
78
|
-
* Makes a POST request to the `/contact-rule-groups` endpoint
|
|
79
|
-
* @public
|
|
80
|
-
*/
|
|
81
6
|
static createContactRuleGroup({ groupId, name, rules, ...options }: CreateRuleGroupOptions): Promise<RuleGroup>;
|
|
82
|
-
/**
|
|
83
|
-
* Updates an existing contact rule group
|
|
84
|
-
*
|
|
85
|
-
* @param options - Configuration parameters for updating the rule group
|
|
86
|
-
*
|
|
87
|
-
* Required parameters:
|
|
88
|
-
* - `groupId` - (string) ID of the group to update
|
|
89
|
-
* - `name` - (string) Updated name for the rule group
|
|
90
|
-
* - `rules` - (RuleDefinition[]) Updated array of rules
|
|
91
|
-
*
|
|
92
|
-
* Optional parameters:
|
|
93
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
94
|
-
* - `version` - (string | number) API version to use
|
|
95
|
-
*
|
|
96
|
-
* @returns {Promise<RuleGroup>} Promise resolving to the updated rule group
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ```typescript
|
|
100
|
-
* const updatedGroup = await hitlApi.contactRuleGroups.updateContactRuleGroup({
|
|
101
|
-
* groupId: 'group-1',
|
|
102
|
-
* name: 'Updated Students',
|
|
103
|
-
* rules: [
|
|
104
|
-
* 'student'
|
|
105
|
-
* ]
|
|
106
|
-
* });
|
|
107
|
-
* ```
|
|
108
|
-
*
|
|
109
|
-
* @remarks
|
|
110
|
-
* Makes a PUT request to the `/contact-rule-groups` endpoint
|
|
111
|
-
* @public
|
|
112
|
-
*/
|
|
113
7
|
static updateContactRuleGroup({ groupId, name, rules, ...options }: UpdateRuleGroupOptions): Promise<RuleGroup>;
|
|
114
|
-
/**
|
|
115
|
-
* Deletes a contact rule group
|
|
116
|
-
*
|
|
117
|
-
* @param options - Configuration parameters for deleting the rule group
|
|
118
|
-
*
|
|
119
|
-
* Required parameters:
|
|
120
|
-
* - `groupId` - (string) ID of the group to delete
|
|
121
|
-
*
|
|
122
|
-
* Optional parameters:
|
|
123
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
124
|
-
* - `version` - (string | number) API version to use
|
|
125
|
-
*
|
|
126
|
-
* @returns {Promise<void>} Promise that resolves when deletion is complete
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```typescript
|
|
130
|
-
* await hitlApi.contactRuleGroups.deleteContactRuleGroup({
|
|
131
|
-
* groupId: 'group-1'
|
|
132
|
-
* });
|
|
133
|
-
* ```
|
|
134
|
-
*
|
|
135
|
-
* @remarks
|
|
136
|
-
* Makes a DELETE request to the `/contact-rule-groups` endpoint
|
|
137
|
-
* @public
|
|
138
|
-
*/
|
|
139
8
|
static deleteContactRuleGroup({ groupId, ...options }: DeleteRuleGroupOptions): Promise<void>;
|
|
140
9
|
}
|
|
141
10
|
//# sourceMappingURL=ContactRuleGroups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactRuleGroups.d.ts","sourceRoot":"","sources":["../../../src/api/ContactRuleGroups.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ContactRuleGroups.d.ts","sourceRoot":"","sources":["../../../src/api/ContactRuleGroups.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAkBtC,qBAAa,iBAAkB,SAAQ,QAAQ;IAC7C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAyB;WA8BtC,uBAAuB,CACnC,EAAE,WAAW,EAAE,GAAG,OAAO,EAAE,GAAE,uBAA4B,GACxD,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;WA6ClC,sBAAsB,CAClC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC3D,OAAO,CAAC,SAAS,CAAC;WA8CP,sBAAsB,CAClC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC3D,OAAO,CAAC,SAAS,CAAC;WAwCP,sBAAsB,CAClC,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC9C,OAAO,CAAC,IAAI,CAAC;CAUjB"}
|
|
@@ -1,145 +1,10 @@
|
|
|
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
|
-
*/
|
|
19
3
|
export declare class EventTemplates extends HITLBase {
|
|
20
4
|
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
|
-
*/
|
|
49
5
|
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
|
-
*/
|
|
83
6
|
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
|
-
*/
|
|
117
7
|
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
|
-
*/
|
|
143
8
|
static deleteEventTemplate({ templateId, ...options }: DeleteEventTemplateOptions): Promise<void>;
|
|
144
9
|
}
|
|
145
10
|
//# 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;AAkBtC,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,qBAAqB;WA8BrC,iBAAiB,CACnC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,GAAE,wBAA6B,GACxD,OAAO,CAAC,yBAAyB,GAAG,aAAa,CAAC;WA4CjC,mBAAmB,CACrC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC;WA+CL,mBAAmB,CACrC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC;WAuCL,mBAAmB,CACrC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,0BAA0B,GACrD,OAAO,CAAC,IAAI,CAAC;CAUjB"}
|
|
@@ -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"}
|