@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.
Files changed (47) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/api/Sessions.js +4 -3
  3. package/dist/cjs/api/Sessions.js.map +1 -1
  4. package/dist/esm/api/Sessions.js +3 -2
  5. package/dist/esm/api/Sessions.js.map +1 -1
  6. package/dist/types/HITL.d.ts +13 -0
  7. package/dist/types/HITL.d.ts.map +1 -1
  8. package/dist/types/api/Agents.d.ts +347 -0
  9. package/dist/types/api/Agents.d.ts.map +1 -1
  10. package/dist/types/api/CannedMessages.d.ts +168 -0
  11. package/dist/types/api/CannedMessages.d.ts.map +1 -1
  12. package/dist/types/api/Commands.d.ts +46 -0
  13. package/dist/types/api/Commands.d.ts.map +1 -1
  14. package/dist/types/api/Conferences.d.ts +120 -0
  15. package/dist/types/api/Conferences.d.ts.map +1 -1
  16. package/dist/types/api/ContactRuleGroups.d.ts +131 -0
  17. package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
  18. package/dist/types/api/Contacts.d.ts +37 -0
  19. package/dist/types/api/Contacts.d.ts.map +1 -1
  20. package/dist/types/api/ContactsMeta.d.ts +33 -0
  21. package/dist/types/api/ContactsMeta.d.ts.map +1 -1
  22. package/dist/types/api/EventTemplates.d.ts +135 -0
  23. package/dist/types/api/EventTemplates.d.ts.map +1 -1
  24. package/dist/types/api/Filters.d.ts +215 -0
  25. package/dist/types/api/Filters.d.ts.map +1 -1
  26. package/dist/types/api/Helpers.d.ts +33 -0
  27. package/dist/types/api/Helpers.d.ts.map +1 -1
  28. package/dist/types/api/Listeners.d.ts +150 -0
  29. package/dist/types/api/Listeners.d.ts.map +1 -1
  30. package/dist/types/api/Migrations.d.ts +222 -0
  31. package/dist/types/api/Migrations.d.ts.map +1 -1
  32. package/dist/types/api/RuleGroups.d.ts +127 -0
  33. package/dist/types/api/RuleGroups.d.ts.map +1 -1
  34. package/dist/types/api/SessionEvents.d.ts +145 -0
  35. package/dist/types/api/SessionEvents.d.ts.map +1 -1
  36. package/dist/types/api/SessionRelations.d.ts +109 -0
  37. package/dist/types/api/SessionRelations.d.ts.map +1 -1
  38. package/dist/types/api/Sessions.d.ts +455 -1
  39. package/dist/types/api/Sessions.d.ts.map +1 -1
  40. package/dist/types/api/Settings.d.ts +145 -0
  41. package/dist/types/api/Settings.d.ts.map +1 -1
  42. package/dist/types/api/Tasks.d.ts +39 -0
  43. package/dist/types/api/Tasks.d.ts.map +1 -1
  44. package/dist/types/api/Versions.d.ts +80 -0
  45. package/dist/types/api/Versions.d.ts.map +1 -1
  46. package/package.json +2 -2
  47. package/src/api/Sessions.ts +2 -1
@@ -1,10 +1,178 @@
1
1
  import { CannedMessage, GetCannedMessagesOptions, GetCannedMessagesResponse, CreateCannedMessageOptions, UpdateCannedMessageOptions, DeleteCannedMessageOptions } from '../types/canned-messages';
2
2
  import { HITLBase } from './HITLBase';
3
+ /**
4
+ * Manages canned messages (predefined message templates) in the system
5
+ *
6
+ * This class provides functionality to create, retrieve, update, and delete canned messages.
7
+ * Canned messages are predefined templates that can be used for quick responses in various scenarios.
8
+ *
9
+ * Key features:
10
+ * - Manage message templates with categories and labels
11
+ * - Support for common (shared) messages across agents
12
+ * - Attachment handling capabilities
13
+ * - Rule-based tagging system
14
+ *
15
+ * @example
16
+ * Basic usage:
17
+ * ```typescript
18
+ * // Get all canned messages
19
+ * const messages = await hitlApi.cannedMessages.getCannedMessages();
20
+ *
21
+ * // Create a new template
22
+ * const newTemplate = await hitlApi.cannedMessages.createCannedMessage({
23
+ * category: 'greeting',
24
+ * text: 'Hello! How can I help you today?',
25
+ * isCommon: true
26
+ * });
27
+ * ```
28
+ *
29
+ * @remarks
30
+ * - All methods in this class interact with the `/canned-messages` endpoint
31
+ * - These methods are available only when you pass `{ version: 1 }` in the parameters.
32
+ * @public
33
+ */
3
34
  export declare class CannedMessages extends HITLBase {
4
35
  protected static MODULE_URL: string;
36
+ /**
37
+ * Gets a list of canned messages (message templates)
38
+ *
39
+ * @param options - Configuration parameters for the canned messages list request
40
+ *
41
+ * Optional parameters:
42
+ * - `agentId` - (string) Filter messages by specific agent
43
+ * - `categories` - (string[]) Filter by message categories
44
+ * - `id` - (string) Get specific message by ID
45
+ * - `ignoreRuleTags` - (boolean) Whether to ignore rule tags in filtering
46
+ * - `isCommon` - (boolean) Filter by system or personal message status
47
+ * - `timeout` - (number) Request timeout in milliseconds
48
+ * - `version` - (string | number) API version to use
49
+ *
50
+ * @returns {Promise<GetCannedMessagesResponse | CannedMessage>} Promise resolving to:
51
+ * - `data` - Array of canned message objects {@link CannedMessage}
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * const response = await hitlApi.cannedMessages.getCannedMessages({
56
+ * categories: ['support', 'greeting'],
57
+ * isCommon: true,
58
+ * agentId: 'agent-id-1'
59
+ * });
60
+ * ```
61
+ *
62
+ * @remarks
63
+ * Makes a GET request to the `/canned-messages` endpoint
64
+ * @public
65
+ */
5
66
  static getCannedMessages(options?: GetCannedMessagesOptions): Promise<GetCannedMessagesResponse | CannedMessage>;
67
+ /**
68
+ * Creates a new canned message (message template)
69
+ *
70
+ * @param options - Configuration parameters for creating the canned message
71
+ *
72
+ * Required parameters:
73
+ * - `category` - (string) Category of the message
74
+ * - `text` - (string) Content of the message
75
+ *
76
+ * Optional parameters:
77
+ * - `agentId` - (string) ID of the agent to associate with
78
+ * - `attachments` - (CannedMessageAttachment[]) Array of attachments
79
+ * - `isCommon` - (boolean) Whether the message is system or personal
80
+ * - `label` - (string) Label for the message
81
+ * - `ruleTags` - (string[]) Array of rule tags
82
+ * - `timeout` - (number) Request timeout in milliseconds
83
+ * - `version` - (string | number) API version to use
84
+ *
85
+ * @returns {Promise<CannedMessage>} Promise resolving to the created canned message
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * const newMessage = await hitlApi.cannedMessages.createCannedMessage({
90
+ * category: 'support',
91
+ * text: "Thank you for your patience!",
92
+ * label: "Thank You Response",
93
+ * isCommon: true,
94
+ * ruleTags: ['greeting', 'sms'],
95
+ * attachments: [
96
+ * {
97
+ * "key": "IMAGE.JPG"
98
+ * }
99
+ * ]
100
+ * });
101
+ * ```
102
+ *
103
+ * @remarks
104
+ * Makes a POST request to the `/canned-messages` endpoint
105
+ * @public
106
+ */
6
107
  static createCannedMessage({ isCommon, agentId, ...options }: CreateCannedMessageOptions): Promise<CannedMessage>;
108
+ /**
109
+ * Updates an existing canned message (message template)
110
+ *
111
+ * @param options - Configuration parameters for updating the canned message
112
+ *
113
+ * Required parameters:
114
+ * - `id` - (string) Unique identifier of the message to update
115
+ *
116
+ * Optional parameters:
117
+ * - `attachments` - (CannedMessageAttachment[]) Array of attachments
118
+ * - `category` - (string) New category for the message
119
+ * - `label` - (string) New label for the message
120
+ * - `ruleTags` - (string[]) New array of rule tags
121
+ * - `text` - (string) New content of the message
122
+ * - `timeout` - (number) Request timeout in milliseconds
123
+ * - `version` - (string | number) API version to use
124
+ *
125
+ * System fields (automatically managed):
126
+ * - `createdAt` - (Date) Creation timestamp
127
+ * - `updatedAt` - (Date) Last update timestamp
128
+ *
129
+ * @returns {Promise<CannedMessage>} Promise resolving to the updated canned message
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * const updatedMessage = await hitlApi.cannedMessages.updateCannedMessage({
134
+ * id: "msg-id-1",
135
+ * text: "Updated response text",
136
+ * category: "support",
137
+ * ruleTags: ['sms', 'admin'],
138
+ * attachments: [
139
+ * {
140
+ * "key": "IMAGE_2.JPG"
141
+ * }
142
+ * ]
143
+ * });
144
+ * ```
145
+ *
146
+ * @remarks
147
+ * Makes a PUT request to the `/canned-messages` endpoint
148
+ * @public
149
+ */
7
150
  static updateCannedMessage(options: UpdateCannedMessageOptions): Promise<CannedMessage>;
151
+ /**
152
+ * Deletes a canned message (message template)
153
+ *
154
+ * @param options - Configuration parameters for deleting the canned message
155
+ *
156
+ * Required parameters:
157
+ * - `id` - (string) Unique identifier of the message to delete
158
+ *
159
+ * Optional parameters:
160
+ * - `version` - (string | number) API version to use
161
+ * - `timeout` - (number) Request timeout in milliseconds
162
+ *
163
+ * @returns {Promise<void>} Promise that resolves when deletion is complete
164
+ *
165
+ * @example
166
+ * ```typescript
167
+ * await hitlApi.cannedMessages.deleteCannedMessage({
168
+ * id: "msg-id-1"
169
+ * });
170
+ * ```
171
+ *
172
+ * @remarks
173
+ * Makes a DELETE request to the `/canned-messages` endpoint
174
+ * @public
175
+ */
8
176
  static deleteCannedMessage({ id, ...options }: DeleteCannedMessageOptions): Promise<void>;
9
177
  }
10
178
  //# sourceMappingURL=CannedMessages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CannedMessages.d.ts","sourceRoot":"","sources":["../../../src/api/CannedMessages.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiCtC,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAqB;WAgC5B,iBAAiB,CACnC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,yBAAyB,GAAG,aAAa,CAAC;WAsDjC,mBAAmB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,0BAA0B,GAC5D,OAAO,CAAC,aAAa,CAAC;WA4DL,mBAAmB,CACrC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC;WAuCL,mBAAmB,CACrC,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,0BAA0B,GAC7C,OAAO,CAAC,IAAI,CAAC;CAUjB"}
1
+ {"version":3,"file":"CannedMessages.d.ts","sourceRoot":"","sources":["../../../src/api/CannedMessages.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAqB;IAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACiB,iBAAiB,CACnC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,yBAAyB,GAAG,aAAa,CAAC;IAcrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;WACiB,mBAAmB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,0BAA0B,GAC5D,OAAO,CAAC,aAAa,CAAC;IAkBzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;WACiB,mBAAmB,CACrC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC;IAczB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,mBAAmB,CACrC,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,0BAA0B,GAC7C,OAAO,CAAC,IAAI,CAAC;CAUjB"}
@@ -1,7 +1,53 @@
1
1
  import { ApplyCommandOptions } from '../types/commands';
2
2
  import { HITLBase } from './HITLBase';
3
+ /**
4
+ * Manages command operations in the HitL (Human-in-the-Loop) system
5
+ *
6
+ * This class provides functionality to send and manage commands within HitL sessions,
7
+ * allowing control and interaction with conversations or processes.
8
+ *
9
+ * @remarks
10
+ * - All methods in this class interact with the `/commands` endpoint
11
+ * - These methods are available only when you pass `{ version: 1 }` in the parameters.
12
+ *
13
+ * @public
14
+ */
3
15
  export declare class Commands extends HITLBase {
4
16
  protected static MODULE_URL: string;
17
+ /**
18
+ * Sends a command to the flow currently controlling the HitL session
19
+ *
20
+ * This method allows sending specific commands to modify or control the behavior
21
+ * of a HitL session. The command is processed by the flow's subscription
22
+ * of the specified session.
23
+ *
24
+ * @param options - Configuration parameters for the command
25
+ *
26
+ * Required parameters:
27
+ * - `command` - (string) The command to be executed in the session
28
+ * - `sessionId` - (string) ID of the target HITL session
29
+ * - `data` - (object) Command-specific payload containing parameters for execution
30
+ *
31
+ * Optional parameters:
32
+ * - `version` - (number) API version to use for the request
33
+ * - `timeout` - (number) Request timeout in milliseconds
34
+ *
35
+ * @returns Promise<void> that resolves when the command is successfully applied
36
+ *
37
+ * @example
38
+ * ```typescript
39
+ * await hitlApi.commands.applyCommandToSession({
40
+ * command: 'send_message',
41
+ * sessionId: 'session-id',
42
+ * data: {
43
+ * media: [],
44
+ * text: 'hello world'
45
+ * }
46
+ * });
47
+ * ```
48
+ *
49
+ * @public
50
+ */
5
51
  static applyCommandToSession({ command, sessionId, data, ...options }: ApplyCommandOptions): Promise<void>;
6
52
  }
7
53
  //# sourceMappingURL=Commands.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Commands.d.ts","sourceRoot":"","sources":["../../../src/api/Commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AActC,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAc;WAoCrB,qBAAqB,CACvC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,mBAAmB,GAC5D,OAAO,CAAC,IAAI,CAAC;CAcjB"}
1
+ {"version":3,"file":"Commands.d.ts","sourceRoot":"","sources":["../../../src/api/Commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAc;IAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;WACiB,qBAAqB,CACvC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,mBAAmB,GAC5D,OAAO,CAAC,IAAI,CAAC;CAcjB"}
@@ -1,9 +1,129 @@
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
+ */
3
18
  export declare class Conferences extends HITLBase {
4
19
  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
+ */
5
54
  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
+ */
6
93
  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
+ */
7
127
  static cleanUpConference({ hitlSessionId, memberId, ...options }: CleanUpConferenceOptions): Promise<void>;
8
128
  }
9
129
  //# 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;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
+ {"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;AAEtC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAiB;IAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;WACW,oBAAoB,CAChC,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,2BAA2B,GACnE,OAAO,CAAC,4BAA4B,GAAG,gBAAgB,CAAC;IAa3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;WACW,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;IAmB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;WACW,iBAAiB,CAC7B,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,wBAAwB,GAChE,OAAO,CAAC,IAAI,CAAC;CAajB"}
@@ -1,10 +1,141 @@
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
+ */
3
19
  export declare class ContactRuleGroups extends HITLBase {
4
20
  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
+ */
5
49
  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
+ */
6
81
  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
+ */
7
113
  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
+ */
8
139
  static deleteContactRuleGroup({ groupId, ...options }: DeleteRuleGroupOptions): Promise<void>;
9
140
  }
10
141
  //# 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;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
+ {"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;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;IAC7C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAyB;IAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACW,uBAAuB,CACnC,EAAE,WAAW,EAAE,GAAG,OAAO,EAAE,GAAE,uBAA4B,GACxD,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAchD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;WACW,sBAAsB,CAClC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC3D,OAAO,CAAC,SAAS,CAAC;IAerB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;WACW,sBAAsB,CAClC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC3D,OAAO,CAAC,SAAS,CAAC;IAerB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACW,sBAAsB,CAClC,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC9C,OAAO,CAAC,IAAI,CAAC;CAUjB"}
@@ -1,7 +1,44 @@
1
1
  import { SearchContactsOptions, SearchContactsResponse } from '../types/contacts';
2
2
  import { HITLBase } from './HITLBase';
3
+ /**
4
+ * This class provides functionality to search contacts with respect to
5
+ * agent's permissions and rule groups.
6
+ *
7
+ * Key features:
8
+ * - Search contacts with filtering based on agent's contact rule groups
9
+ *
10
+ * @remarks
11
+ * - All methods in this class interact with the `/contacts` endpoint
12
+ * @public
13
+ */
3
14
  export declare class Contacts extends HITLBase {
4
15
  protected static MODULE_URL: string;
16
+ /**
17
+ * Searches for contacts limited by the agent's contact rule groups
18
+ *
19
+ * Filters out contact records not visible to a given agent, according
20
+ * to the contact rule groups the agent is a member of
21
+ *
22
+ * @param options - Configuration parameters for the contacts search
23
+ *
24
+ * Optional parameters:
25
+ * - `timeout` - (number) Request timeout in milliseconds
26
+ * - `version` - (string | number) API version to use
27
+ *
28
+ * @returns {Promise<SearchContactsResponse>} Promise resolving to the search results
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * const contacts = await hitlApi.contacts.searchContacts({
33
+ * contact_book: '0cc3f3bb-a064-4b2d-89d9-4c4846a061e2',
34
+ * contactIds: ['contact-id-1', 'contact-id-2']
35
+ * });
36
+ * ```
37
+ *
38
+ * @remarks
39
+ * Makes a POST request to the `/contacts` endpoint
40
+ * @public
41
+ */
5
42
  static searchContacts(options: SearchContactsOptions): Promise<SearchContactsResponse>;
6
43
  }
7
44
  //# sourceMappingURL=Contacts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Contacts.d.ts","sourceRoot":"","sources":["../../../src/api/Contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAatC,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAc;WA4BrB,cAAc,CAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;CAUnC"}
1
+ {"version":3,"file":"Contacts.d.ts","sourceRoot":"","sources":["../../../src/api/Contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAc;IAEzC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;WACiB,cAAc,CAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;CAUnC"}
@@ -1,8 +1,41 @@
1
1
  import { SearchContactsMetaOptions, SearchContactsMetaResponse } from '../types/contacts-meta';
2
2
  import { HITLBase } from './HITLBase';
3
+ /**
4
+ * This class provides functionality to retrieve metadata information about contacts.
5
+ *
6
+ * @remarks
7
+ * - All methods in this class interact with the `/contacts-meta` endpoint
8
+ * @public
9
+ */
3
10
  export declare class ContactsMeta extends HITLBase {
4
11
  protected static MODULE_URL: string;
5
12
  protected static SEARCH_URL: string;
13
+ /**
14
+ * Retrieves HitL-specific contact parameters (metadata)
15
+ *
16
+ * @param options - Configuration parameters for the metadata search
17
+ *
18
+ * Required parameters:
19
+ * - `contactIds` - (string[]) List of specific contact IDs to retrieve
20
+ *
21
+ * Optional parameters:
22
+ * - `timeout` - (number) Request timeout in milliseconds
23
+ * - `version` - (string | number) API version to use
24
+ *
25
+ * @returns {Promise<SearchContactsMetaResponse>} Promise resolving to:
26
+ * - `data` - Contact last event timestamps
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * const metadata = await hitlApi.contactsMeta.searchContactsMeta({
31
+ * contactIds: ['contact-id-1', 'contact-id-2']
32
+ * });
33
+ * ```
34
+ *
35
+ * @remarks
36
+ * Makes a POST request to the `/contacts-meta/search` endpoint
37
+ * @public
38
+ */
6
39
  static searchContactsMeta(options: SearchContactsMetaOptions): Promise<SearchContactsMetaResponse>;
7
40
  }
8
41
  //# sourceMappingURL=ContactsMeta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContactsMeta.d.ts","sourceRoot":"","sources":["../../../src/api/ContactsMeta.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC,qBAAa,YAAa,SAAQ,QAAQ;IACxC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAmB;IAC9C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAY;WA4BnB,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;CAcvC"}
1
+ {"version":3,"file":"ContactsMeta.d.ts","sourceRoot":"","sources":["../../../src/api/ContactsMeta.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,QAAQ;IACxC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAmB;IAC9C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAY;IAEvC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;WACiB,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;CAcvC"}