@or-sdk/hitl 0.38.0 → 0.39.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 (49) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/types/HITL.d.ts +0 -13
  3. package/dist/types/HITL.d.ts.map +1 -1
  4. package/dist/types/api/Agents.d.ts +0 -347
  5. package/dist/types/api/Agents.d.ts.map +1 -1
  6. package/dist/types/api/CannedMessages.d.ts +0 -168
  7. package/dist/types/api/CannedMessages.d.ts.map +1 -1
  8. package/dist/types/api/Commands.d.ts +0 -48
  9. package/dist/types/api/Commands.d.ts.map +1 -1
  10. package/dist/types/api/Conferences.d.ts +0 -120
  11. package/dist/types/api/Conferences.d.ts.map +1 -1
  12. package/dist/types/api/ContactRuleGroups.d.ts +0 -131
  13. package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
  14. package/dist/types/api/Contacts.d.ts +0 -37
  15. package/dist/types/api/Contacts.d.ts.map +1 -1
  16. package/dist/types/api/ContactsMeta.d.ts +0 -33
  17. package/dist/types/api/ContactsMeta.d.ts.map +1 -1
  18. package/dist/types/api/DraftMessages.d.ts +0 -167
  19. package/dist/types/api/DraftMessages.d.ts.map +1 -1
  20. package/dist/types/api/EventTemplates.d.ts +0 -135
  21. package/dist/types/api/EventTemplates.d.ts.map +1 -1
  22. package/dist/types/api/Filters.d.ts +0 -215
  23. package/dist/types/api/Filters.d.ts.map +1 -1
  24. package/dist/types/api/HITLBase.d.ts +0 -5
  25. package/dist/types/api/HITLBase.d.ts.map +1 -1
  26. package/dist/types/api/Helpers.d.ts +0 -33
  27. package/dist/types/api/Helpers.d.ts.map +1 -1
  28. package/dist/types/api/Listeners.d.ts +0 -150
  29. package/dist/types/api/Listeners.d.ts.map +1 -1
  30. package/dist/types/api/Migrations.d.ts +0 -222
  31. package/dist/types/api/Migrations.d.ts.map +1 -1
  32. package/dist/types/api/RuleGroups.d.ts +0 -127
  33. package/dist/types/api/RuleGroups.d.ts.map +1 -1
  34. package/dist/types/api/SessionEvents.d.ts +0 -145
  35. package/dist/types/api/SessionEvents.d.ts.map +1 -1
  36. package/dist/types/api/SessionRelations.d.ts +0 -109
  37. package/dist/types/api/SessionRelations.d.ts.map +1 -1
  38. package/dist/types/api/Sessions.d.ts +0 -456
  39. package/dist/types/api/Sessions.d.ts.map +1 -1
  40. package/dist/types/api/Settings.d.ts +0 -145
  41. package/dist/types/api/Settings.d.ts.map +1 -1
  42. package/dist/types/api/Tasks.d.ts +0 -39
  43. package/dist/types/api/Tasks.d.ts.map +1 -1
  44. package/dist/types/api/Versions.d.ts +0 -80
  45. package/dist/types/api/Versions.d.ts.map +1 -1
  46. package/dist/types/types/agents.d.ts +0 -3
  47. package/dist/types/types/agents.d.ts.map +1 -1
  48. package/package.json +3 -3
  49. package/src/api/DraftMessages.ts +2 -2
@@ -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;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
+ {"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;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
+ {"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,44 +1,7 @@
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
- */
14
3
  export declare class Contacts extends HITLBase {
15
4
  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
- */
42
5
  static searchContacts(options: SearchContactsOptions): Promise<SearchContactsResponse>;
43
6
  }
44
7
  //# 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;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
+ {"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,41 +1,8 @@
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
- */
10
3
  export declare class ContactsMeta extends HITLBase {
11
4
  protected static MODULE_URL: string;
12
5
  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
- */
39
6
  static searchContactsMeta(options: SearchContactsMetaOptions): Promise<SearchContactsMetaResponse>;
40
7
  }
41
8
  //# 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;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
+ {"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,177 +1,10 @@
1
1
  import { DraftMessage, GetDraftMessagesOptions, GetDraftMessagesResponse, CreateDraftMessageOptions, UpdateDraftMessageOptions, DeleteDraftMessageOptions } 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
- */
37
3
  export declare class DraftMessages extends HITLBase {
38
4
  protected static MODULE_URL: string;
39
- /**
40
- * Gets a list of draft messages
41
- *
42
- * @param options - Configuration parameters for the draft messages list request
43
- *
44
- * Optional parameters:
45
- * - `id` - (string) Get specific draft message by ID
46
- * - `timeout` - (number) Request timeout in milliseconds
47
- * - `version` - (string | number) API version to use
48
- *
49
- * @returns {Promise<GetDraftMessagesResponse | DraftMessage>} Promise resolving to:
50
- * - `data` - Array of draft message objects {@link DraftMessage}
51
- *
52
- * @example
53
- * ```typescript
54
- * const response = await hitlApi.draftMessages.getDraftMessages({
55
- * id: 'message-id-1'
56
- * });
57
- * ```
58
- *
59
- * @remarks
60
- * Makes a GET request to the `/draft-messages` endpoint
61
- * @public
62
- */
63
5
  static getDraftMessages(options?: GetDraftMessagesOptions): Promise<GetDraftMessagesResponse | DraftMessage>;
64
- /**
65
- * Creates a new draft message
66
- *
67
- * @param options - Configuration parameters for creating the draft message
68
- *
69
- * Required parameters:
70
- * - `message` - (Message) Message content and media
71
- * - `type` - (string) Type of the draft message
72
- * - `contactIds` - (string[]) Array of contact IDs to send the message to
73
- * - `timestamp` - (Date) When the message should be sent
74
- *
75
- * Optional parameters:
76
- * - `sessionId` - (string) Session ID to associate with
77
- * - `toIdentifier` - (string) Identifier for message targeting
78
- * - `timeout` - (number) Request timeout in milliseconds
79
- * - `version` - (string | number) API version to use
80
- *
81
- * @returns {Promise<DraftMessage>} Promise resolving to the created draft message
82
- *
83
- * @example
84
- * ```typescript
85
- * const newMessage = await hitlApi.draftMessages.createDraftMessage({
86
- * message: {
87
- * message: 'Your appointment is tomorrow at 3 PM',
88
- * media: [
89
- * {
90
- * type: 'image',
91
- * url: 'https://example.com/reminder.jpg'
92
- * }
93
- * ]
94
- * },
95
- * type: 'SMS',
96
- * contactIds: ['contact-123'],
97
- * timestamp: new Date('2024-12-24T15:00:00Z').toISOString(),
98
- * sessionId: 'session-456'
99
- * });
100
- * ```
101
- *
102
- * @remarks
103
- * Makes a POST request to the `/draft-messages` endpoint
104
- * @public
105
- */
106
6
  static createDraftMessage(options: CreateDraftMessageOptions): Promise<DraftMessage>;
107
- /**
108
- * Updates an existing draft message
109
- *
110
- * @param options - Configuration parameters for updating the draft message
111
- *
112
- * Required parameters:
113
- * - `id` - (string) Unique identifier of the message to update
114
- *
115
- * Optional parameters:
116
- * - `message` - (Message) Updated message content and media
117
- * - `type` - (string) Updated type of the draft message
118
- * - `contactIds` - (string[]) Updated array of contact IDs
119
- * - `sessionId` - (string) Updated session ID
120
- * - `toIdentifier` - (string) Updated identifier for message targeting
121
- * - `timestamp` - (Date) Updated send time
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
- * - `agentId` - (string) Agent who created the message
129
- * - `status` - (string) Current status of the message
130
- *
131
- * @returns {Promise<DraftMessage>} Promise resolving to the updated draft message
132
- *
133
- * @example
134
- * ```typescript
135
- * const updatedMessage = await hitlApi.draftMessages.updateDraftMessage({
136
- * id: "msg-id-1",
137
- * message: {
138
- * message: "Updated reminder: Your appointment is at 4 PM",
139
- * media: []
140
- * },
141
- * timestamp: new Date('2024-12-24T16:00:00Z').toISOString()
142
- * });
143
- * ```
144
- *
145
- * @remarks
146
- * Makes a PUT request to the `/draft-messages` endpoint
147
- * @public
148
- */
149
7
  static updateDraftMessage(options: UpdateDraftMessageOptions): Promise<DraftMessage>;
150
- /**
151
- * Deletes a draft message
152
- *
153
- * @param options - Configuration parameters for deleting the draft message
154
- *
155
- * Required parameters:
156
- * - `id` - (string) Unique identifier of the message to delete
157
- *
158
- * Optional parameters:
159
- * - `version` - (string | number) API version to use
160
- * - `timeout` - (number) Request timeout in milliseconds
161
- *
162
- * @returns {Promise<void>} Promise that resolves when deletion is complete
163
- *
164
- * @example
165
- * ```typescript
166
- * await hitlApi.draftMessages.deleteDraftMessage({
167
- * id: "msg-id-1"
168
- * });
169
- * ```
170
- *
171
- * @remarks
172
- * Makes a DELETE request to the `/draft-messages` endpoint
173
- * @public
174
- */
175
8
  static deleteDraftMessage({ id, ...options }: DeleteDraftMessageOptions): Promise<void>;
176
9
  }
177
10
  //# sourceMappingURL=DraftMessages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DraftMessages.d.ts","sourceRoot":"","sources":["../../../src/api/DraftMessages.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EAC1B,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;IAE/C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;WACiB,gBAAgB,CAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,wBAAwB,GAAG,YAAY,CAAC;IAcnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;WACiB,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;IAcxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;WACiB,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;IAcxB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,kBAAkB,CACpC,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,yBAAyB,GAC5C,OAAO,CAAC,IAAI,CAAC;CAUjB"}
1
+ {"version":3,"file":"DraftMessages.d.ts","sourceRoot":"","sources":["../../../src/api/DraftMessages.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAqCtC,qBAAa,aAAc,SAAQ,QAAQ;IACzC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAoB;WA0B3B,gBAAgB,CAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,wBAAwB,GAAG,YAAY,CAAC;WAwD/B,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;WAwDJ,kBAAkB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,YAAY,CAAC;WAuCJ,kBAAkB,CACpC,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,yBAAyB,GAC5C,OAAO,CAAC,IAAI,CAAC;CAUjB"}