@or-sdk/hitl 0.40.0 → 0.40.1-beta.4180.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.
Files changed (47) hide show
  1. package/dist/types/HITL.d.ts +13 -0
  2. package/dist/types/HITL.d.ts.map +1 -1
  3. package/dist/types/api/Agents.d.ts +347 -0
  4. package/dist/types/api/Agents.d.ts.map +1 -1
  5. package/dist/types/api/CannedMessages.d.ts +168 -0
  6. package/dist/types/api/CannedMessages.d.ts.map +1 -1
  7. package/dist/types/api/Commands.d.ts +48 -0
  8. package/dist/types/api/Commands.d.ts.map +1 -1
  9. package/dist/types/api/Conferences.d.ts +120 -0
  10. package/dist/types/api/Conferences.d.ts.map +1 -1
  11. package/dist/types/api/ContactRuleGroups.d.ts +131 -0
  12. package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
  13. package/dist/types/api/Contacts.d.ts +37 -0
  14. package/dist/types/api/Contacts.d.ts.map +1 -1
  15. package/dist/types/api/ContactsMeta.d.ts +33 -0
  16. package/dist/types/api/ContactsMeta.d.ts.map +1 -1
  17. package/dist/types/api/DraftMessages.d.ts +200 -0
  18. package/dist/types/api/DraftMessages.d.ts.map +1 -1
  19. package/dist/types/api/EventTemplates.d.ts +135 -0
  20. package/dist/types/api/EventTemplates.d.ts.map +1 -1
  21. package/dist/types/api/Filters.d.ts +215 -0
  22. package/dist/types/api/Filters.d.ts.map +1 -1
  23. package/dist/types/api/HITLBase.d.ts +5 -0
  24. package/dist/types/api/HITLBase.d.ts.map +1 -1
  25. package/dist/types/api/Helpers.d.ts +33 -0
  26. package/dist/types/api/Helpers.d.ts.map +1 -1
  27. package/dist/types/api/Listeners.d.ts +150 -0
  28. package/dist/types/api/Listeners.d.ts.map +1 -1
  29. package/dist/types/api/Migrations.d.ts +222 -0
  30. package/dist/types/api/Migrations.d.ts.map +1 -1
  31. package/dist/types/api/RuleGroups.d.ts +127 -0
  32. package/dist/types/api/RuleGroups.d.ts.map +1 -1
  33. package/dist/types/api/SessionEvents.d.ts +145 -0
  34. package/dist/types/api/SessionEvents.d.ts.map +1 -1
  35. package/dist/types/api/SessionRelations.d.ts +109 -0
  36. package/dist/types/api/SessionRelations.d.ts.map +1 -1
  37. package/dist/types/api/Sessions.d.ts +481 -0
  38. package/dist/types/api/Sessions.d.ts.map +1 -1
  39. package/dist/types/api/Settings.d.ts +145 -0
  40. package/dist/types/api/Settings.d.ts.map +1 -1
  41. package/dist/types/api/Tasks.d.ts +39 -0
  42. package/dist/types/api/Tasks.d.ts.map +1 -1
  43. package/dist/types/api/Versions.d.ts +80 -0
  44. package/dist/types/api/Versions.d.ts.map +1 -1
  45. package/dist/types/types/agents.d.ts +3 -0
  46. package/dist/types/types/agents.d.ts.map +1 -1
  47. package/package.json +2 -3
@@ -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"}
@@ -1,12 +1,212 @@
1
1
  import { DraftMessage, GetDraftMessagesOptions, GetDraftMessagesResponse, CreateDraftMessageOptions, UpdateDraftMessageOptions, DeleteDraftMessageOptions, GetDraftMessagesCountResponse, GetDraftMessagesCountOptions } from '../types/draft-messages';
2
2
  import { HITLBase } from './HITLBase';
3
+ /**
4
+ * Manages draft messages in the system
5
+ *
6
+ * This class provides functionality to create, retrieve, update, and delete draft messages.
7
+ * Draft messages are messages that can be sent at a specific time to contacts and sessions.
8
+ *
9
+ * Key features:
10
+ * - Schedule messages for future delivery
11
+ * - Target specific contacts and sessions
12
+ * - Support for various channel types for messages
13
+ *
14
+ * @example
15
+ * Basic usage:
16
+ * ```typescript
17
+ * // Get all draft messages
18
+ * const messages = await hitlApi.draftMessages.getDraftMessages();
19
+ *
20
+ * // Create a new draft message
21
+ * const newMessage = await hitlApi.draftMessages.createDraftMessage({
22
+ * message: {
23
+ * message: 'Hello! This is a draft message.',
24
+ * media: []
25
+ * },
26
+ * type: 'SMS',
27
+ * contactIds: ['contact-1', 'contact-2'],
28
+ * timestamp: new Date('2024-12-25T10:00:00Z').toISOString()
29
+ * });
30
+ * ```
31
+ *
32
+ * @remarks
33
+ * - All methods in this class interact with the `/draft-messages` endpoint
34
+ * - These methods are available only when you pass `{ version: 1 }` in the parameters.
35
+ * @public
36
+ */
3
37
  export declare class DraftMessages extends HITLBase {
4
38
  protected static MODULE_URL: string;
5
39
  protected static COUNT_URL: "count";
40
+ /**
41
+ * Gets a list of draft messages
42
+ *
43
+ * @param options - Configuration parameters for the draft messages list request
44
+ *
45
+ * Optional parameters:
46
+ * - `id` - (string) Get specific draft message by ID
47
+ * - `timeout` - (number) Request timeout in milliseconds
48
+ * - `version` - (string | number) API version to use
49
+ * - `agentId` - (string) ID of the agent to get specific DM for (for super admin and flow token)
50
+ *
51
+ * @returns {Promise<GetDraftMessagesResponse | DraftMessage>} Promise resolving to:
52
+ * - `data` - Array of draft message objects {@link DraftMessage}
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * const response = await hitlApi.draftMessages.getDraftMessages({
57
+ * id: 'message-id-1'
58
+ * });
59
+ * ```
60
+ *
61
+ * @remarks
62
+ * Makes a GET request to the `/draft-messages` endpoint
63
+ * @public
64
+ */
6
65
  static getDraftMessages(options?: GetDraftMessagesOptions): Promise<GetDraftMessagesResponse | DraftMessage>;
66
+ /**
67
+ * Gets the count of draft messages based on specified criteria
68
+ *
69
+ * @param options - Configuration parameters for counting draft messages
70
+ *
71
+ * Required parameters:
72
+ * - `status` - (string) Filter draft messages by status
73
+ *
74
+ * Optional parameters:
75
+ * - `sessionId` - (string) Filter draft messages by session ID
76
+ * - `contactIds` - (string[]) Array of contact IDs to filter by
77
+ * - `agentId` - (string) ID of the agent to count draft messages for (for super admin and flow token)
78
+ * - `timeout` - (number) Request timeout in milliseconds
79
+ * - `version` - (string | number) API version to use
80
+ *
81
+ * @returns {Promise<GetDraftMessagesCountResponse>} Promise resolving to count response
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * const countResponse = await hitlApi.draftMessages.getDraftMessagesCount({
86
+ * status: 'pending',
87
+ * sessionId: 'session-id-1'
88
+ * });
89
+ * ```
90
+ *
91
+ * @remarks
92
+ * Makes a GET request to the `/draft-messages/count` endpoint
93
+ * @public
94
+ */
7
95
  static getDraftMessagesCount({ status, sessionId, contactIds, agentId, ...options }: GetDraftMessagesCountOptions): Promise<GetDraftMessagesCountResponse>;
96
+ /**
97
+ * Creates a new draft message
98
+ *
99
+ * @param options - Configuration parameters for creating the draft message
100
+ *
101
+ * Required parameters:
102
+ * - `message` - (Message) Message content and media
103
+ * - `type` - (string) Type of the draft message
104
+ * - `contactIds` - (string[]) Array of contact IDs to send the message to
105
+ * - `timestamp` - (Date) When the message should be sent
106
+ *
107
+ * Optional parameters:
108
+ * - `sessionId` - (string) Session ID to associate with
109
+ * - `meta` - (object) Meta information for message
110
+ * - `timeout` - (number) Request timeout in milliseconds
111
+ * - `version` - (string | number) API version to use
112
+ * - `agentId` - (string) ID of the agent to get specific DM for (for super admin and flow token)
113
+ *
114
+ * @returns {Promise<DraftMessage>} Promise resolving to the created draft message
115
+ *
116
+ * @example
117
+ * ```typescript
118
+ * const newMessage = await hitlApi.draftMessages.createDraftMessage({
119
+ * message: {
120
+ * message: 'Your appointment is tomorrow at 3 PM',
121
+ * media: [
122
+ * {
123
+ * type: 'image',
124
+ * url: 'https://example.com/reminder.jpg'
125
+ * }
126
+ * ]
127
+ * },
128
+ * type: 'SMS',
129
+ * contactIds: ['contact-123'],
130
+ * timestamp: new Date('2024-12-24T15:00:00Z').toISOString(),
131
+ * sessionId: 'session-456'
132
+ * });
133
+ * ```
134
+ *
135
+ * @remarks
136
+ * Makes a POST request to the `/draft-messages` endpoint
137
+ * @public
138
+ */
8
139
  static createDraftMessage(options: CreateDraftMessageOptions): Promise<DraftMessage>;
140
+ /**
141
+ * Updates an existing draft message
142
+ *
143
+ * @param options - Configuration parameters for updating the draft message
144
+ *
145
+ * Required parameters:
146
+ * - `id` - (string) Unique identifier of the message to update
147
+ *
148
+ * Optional parameters:
149
+ * - `message` - (Message) Updated message content and media
150
+ * - `type` - (string) Updated type of the draft message
151
+ * - `contactIds` - (string[]) Updated array of contact IDs
152
+ * - `sessionId` - (string) Updated session ID
153
+ * - `meta` - (object) Updated meta information for message
154
+ * - `timestamp` - (Date) Updated send time
155
+ * - `timeout` - (number) Request timeout in milliseconds
156
+ * - `version` - (string | number) API version to use
157
+ * - `agentId` - (string) ID of the agent to get specific DM for (for super admin and flow token)
158
+ *
159
+ * System fields (automatically managed):
160
+ * - `createdAt` - (Date) Creation timestamp
161
+ * - `updatedAt` - (Date) Last update timestamp
162
+ * - `agentId` - (string) Agent who created the message
163
+ * - `status` - (string) Current status of the message
164
+ *
165
+ * @returns {Promise<DraftMessage>} Promise resolving to the updated draft message
166
+ *
167
+ * @example
168
+ * ```typescript
169
+ * const updatedMessage = await hitlApi.draftMessages.updateDraftMessage({
170
+ * id: "msg-id-1",
171
+ * message: {
172
+ * message: "Updated reminder: Your appointment is at 4 PM",
173
+ * media: []
174
+ * },
175
+ * timestamp: new Date('2024-12-24T16:00:00Z').toISOString()
176
+ * });
177
+ * ```
178
+ *
179
+ * @remarks
180
+ * Makes a PUT request to the `/draft-messages` endpoint
181
+ * @public
182
+ */
9
183
  static updateDraftMessage(options: UpdateDraftMessageOptions): Promise<DraftMessage>;
184
+ /**
185
+ * Deletes a draft message
186
+ *
187
+ * @param options - Configuration parameters for deleting the draft message
188
+ *
189
+ * Required parameters:
190
+ * - `id` - (string) Unique identifier of the message to delete
191
+ *
192
+ * Optional parameters:
193
+ * - `version` - (string | number) API version to use
194
+ * - `timeout` - (number) Request timeout in milliseconds
195
+ * - `agentId` - (string) ID of the agent to get specific DM for (for super admin and flow token)
196
+ *
197
+ * @returns {Promise<void>} Promise that resolves when deletion is complete
198
+ *
199
+ * @example
200
+ * ```typescript
201
+ * await hitlApi.draftMessages.deleteDraftMessage({
202
+ * id: "msg-id-1"
203
+ * });
204
+ * ```
205
+ *
206
+ * @remarks
207
+ * Makes a DELETE request to the `/draft-messages` endpoint
208
+ * @public
209
+ */
10
210
  static deleteDraftMessage({ id, agentId, ...options }: DeleteDraftMessageOptions): Promise<void>;
11
211
  }
12
212
  //# sourceMappingURL=DraftMessages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DraftMessages.d.ts","sourceRoot":"","sources":["../../../src/api/DraftMessages.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EAAE,6BAA6B,EAAE,4BAA4B,EACvF,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAqCtC,qBAAa,aAAc,SAAQ,QAAQ;IACzC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAoB;IAC/C,SAAS,CAAC,MAAM,CAAC,SAAS,UAAoB;WA2B1B,gBAAgB,CAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,wBAAwB,GAAG,YAAY,CAAC;WA2C/B,qBAAqB,CACvC,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,4BAA4B,GACnF,OAAO,CAAC,6BAA6B,CAAC;WA4DrB,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;WA2DJ,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;WA0CJ,kBAAkB,CACpC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,yBAAyB,GACrD,OAAO,CAAC,IAAI,CAAC;CAajB"}
1
+ {"version":3,"file":"DraftMessages.d.ts","sourceRoot":"","sources":["../../../src/api/DraftMessages.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EAAE,6BAA6B,EAAE,4BAA4B,EACvF,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,qBAAa,aAAc,SAAQ,QAAQ;IACzC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAoB;IAC/C,SAAS,CAAC,MAAM,CAAC,SAAS,UAAoB;IAE9C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,gBAAgB,CAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,wBAAwB,GAAG,YAAY,CAAC;IAcnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACiB,qBAAqB,CACvC,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,4BAA4B,GACnF,OAAO,CAAC,6BAA6B,CAAC;IAiBzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;WACiB,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;IAgBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;WACiB,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;IAgBxB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;WACiB,kBAAkB,CACpC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,yBAAyB,GACrD,OAAO,CAAC,IAAI,CAAC;CAajB"}