@or-sdk/hitl 0.40.1-beta.4180.0 → 0.40.1-beta.4182.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.
@@ -2,13 +2,6 @@ import { AxiosError, Base } from '@or-sdk/base';
2
2
  import { Migrations, Settings, Agents, RuleGroups, ContactRuleGroups, EventTemplates, Conferences, Filters, CannedMessages, Sessions, SessionEvents, Listeners, Commands, ContactsMeta, Helpers, Versions, Tasks, SessionRelations, Contacts, DraftMessages } from './api';
3
3
  import { AppError } from './AppError';
4
4
  import { HITLConfig, AppErrorObject } from './types';
5
- /**
6
- * OneReach HitL service client
7
- * ## Installation:
8
- * ```
9
- * $ npm i @or-sdk/hitl
10
- * ```
11
- */
12
5
  export declare class HITL extends Base {
13
6
  readonly migrations: typeof Migrations;
14
7
  readonly settings: typeof Settings;
@@ -30,12 +23,6 @@ export declare class HITL extends Base {
30
23
  readonly sessionRelations: typeof SessionRelations;
31
24
  readonly contacts: typeof Contacts;
32
25
  readonly draftMessages: typeof DraftMessages;
33
- /**
34
- * ```typescript
35
- * import { HITL } from '@or-sdk/hitl'
36
- * const hitlApi = new HITL({token: 'my-account-token-string', discoveryUrl: 'http://example.hitl/endpoint'});
37
- * ```
38
- */
39
26
  constructor(params: HITLConfig);
40
27
  parseError(e: AxiosError<AppErrorObject>): AppError;
41
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HITL.d.ts","sourceRoot":"","sources":["../../src/HITL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EACL,UAAU,EACV,QAAQ,EACR,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,OAAO,EACP,cAAc,EACd,QAAQ,EACR,aAAa,EACb,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,QAAQ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;IAClD,SAAgB,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1C,SAAgB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpC,SAAgB,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1D,SAAgB,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1C,SAAgB,aAAa,EAAE,OAAO,aAAa,CAAC;gBAQxC,MAAM,EAAE,UAAU;IAgCvB,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,GAAG,QAAQ;CAG3D;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -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,212 +1,12 @@
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
- */
37
3
  export declare class DraftMessages extends HITLBase {
38
4
  protected static MODULE_URL: string;
39
5
  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
- */
65
6
  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
- */
95
7
  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
- */
139
8
  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
- */
183
9
  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
- */
210
10
  static deleteDraftMessage({ id, agentId, ...options }: DeleteDraftMessageOptions): Promise<void>;
211
11
  }
212
12
  //# 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;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"}
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 +1 @@
1
- {"version":3,"file":"Helpers.d.ts","sourceRoot":"","sources":["../../../src/api/Helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;GAYG;AACH,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAa;IACxC,SAAS,CAAC,MAAM,CAAC,cAAc,SAA8B;IAE7D;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,uBAAuB,CACzC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,yBAAyB,CAAC;CAUtC"}
1
+ {"version":3,"file":"Helpers.d.ts","sourceRoot":"","sources":["../../../src/api/Helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAa;IACxC,SAAS,CAAC,MAAM,CAAC,cAAc,SAA8B;WAsBzC,uBAAuB,CACzC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,yBAAyB,CAAC;CAUtC"}
@@ -1,118 +1,9 @@
1
1
  import { GetSessionRelationsOptions, GetSessionRelationsResponse, CreateSessionRelationsOptions, CreateSessionRelationsResponse, DeleteSessionRelationsOptions } from '../types/session-relations';
2
2
  import { HITLBase } from './HITLBase';
3
- /**
4
- * Manages relationships between HitL (Human-in-the-Loop) sessions
5
- *
6
- * This class provides functionality to:
7
- * - Retrieve session relationships
8
- * - Create new relationships between sessions
9
- * - Remove existing relationships
10
- *
11
- * @remarks
12
- * - All methods in this class interact with the `/session-relations` endpoint
13
- * @public
14
- */
15
3
  export declare class SessionRelations extends HITLBase {
16
4
  protected static MODULE_URL: string;
17
- /**
18
- * Retrieves a list of HitL session relations based on specified criteria
19
- *
20
- * @param options - Configuration parameters for retrieving HitL session relations
21
- *
22
- * Required parameters:
23
- * - `sessionIds` - (string[]) Array of session IDs to retrieve relations for
24
- *
25
- * Optional parameters:
26
- * - `relations` - (string[]) Array of specific relation types to retrieve
27
- * - `skipSessions` - (boolean) Whether to skip retrieving session details
28
- * - `timeout` - (number) Request timeout in milliseconds
29
- * - `version` - (string | number) API version to use
30
- *
31
- * @returns {Promise<GetSessionRelationsResponse>} Promise resolving to session relationships
32
- *
33
- * @example
34
- * ```typescript
35
- * // Get all relations and sessions from this relations for specific sessions
36
- * const relations = await hitlApi.sessionRelations.getSessionRelations({
37
- * sessionIds: ['session-id-1', 'session-id-2']
38
- * });
39
- *
40
- * // Get specific relation types with session details skipped
41
- * const relations = await hitlApi.sessionRelations.getSessionRelations({
42
- * sessionIds: ['session-id-1'],
43
- * relations: ['parent', 'child'],
44
- * skipSessions: true
45
- * });
46
- * ```
47
- *
48
- * @remarks
49
- * Makes a GET request to the `/session-relations` endpoint
50
- * @public
51
- */
52
5
  static getSessionRelations(options: GetSessionRelationsOptions): Promise<GetSessionRelationsResponse>;
53
- /**
54
- * Creates new relations between HitL sessions
55
- *
56
- * @param options - Configuration parameters for creating session relations
57
- *
58
- * Required parameters:
59
- * - `relations` - ({@link SessionRelation}[]) Array of session relation objects to create
60
- *
61
- * Optional parameters:
62
- * - `timeout` - (number) Request timeout in milliseconds
63
- * - `version` - (string | number) API version to use
64
- *
65
- * @returns {Promise<SessionRelation[]>} Promise resolving to array of created session relations
66
- *
67
- * @example
68
- * ```typescript
69
- * const created = await hitlApi.sessionRelations.createSessionRelations({
70
- * relations: [{
71
- * aSessionId: 'session-id-1',
72
- * bSessionId: 'session-id-2',
73
- * relation: 'parent'
74
- * }, {
75
- * aSessionId: 'session-id-1',
76
- * bSessionId: 'session-id-3',
77
- * relation: 'parent'
78
- * }]
79
- * });
80
- * ```
81
- *
82
- * @remarks
83
- * Makes a POST request to the `/session-relations` endpoint
84
- * @public
85
- */
86
6
  static createSessionRelations(options: CreateSessionRelationsOptions): Promise<CreateSessionRelationsResponse>;
87
- /**
88
- * Deletes specified HitL session relationships
89
- *
90
- * @param options - Configuration parameters for deleting relationships
91
- *
92
- * Required parameters:
93
- * - `relations` - ({@link SessionRelation}[]) Array of session relation objects to delete
94
- *
95
- * Optional parameters:
96
- * - `timeout` - (number) Request timeout in milliseconds
97
- * - `version` - (string | number) API version to use
98
- *
99
- * @returns {Promise<void>} Promise that resolves when deletion is complete
100
- *
101
- * @example
102
- * ```typescript
103
- * await hitlApi.sessionRelations.deleteSessionRelations({
104
- * relations: [{
105
- * aSessionId: 'session-id-1',
106
- * bSessionId: 'session-id-2',
107
- * relation: 'parent'
108
- * }]
109
- * });
110
- * ```
111
- *
112
- * @remarks
113
- * Makes a DELETE request to the `/session-relations` endpoint
114
- * @public
115
- */
116
7
  static deleteSessionRelations(options: DeleteSessionRelationsOptions): Promise<void>;
117
8
  }
118
9
  //# sourceMappingURL=SessionRelations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SessionRelations.d.ts","sourceRoot":"","sources":["../../../src/api/SessionRelations.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAuB;IAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;WACW,mBAAmB,CAC/B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC;IAcvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;WACW,sBAAsB,CAClC,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAc1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACW,sBAAsB,CAClC,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,IAAI,CAAC;CAajB"}
1
+ {"version":3,"file":"SessionRelations.d.ts","sourceRoot":"","sources":["../../../src/api/SessionRelations.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AActC,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,SAAS,CAAC,MAAM,CAAC,UAAU,SAAuB;WAqCpC,mBAAmB,CAC/B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC;WA+CzB,sBAAsB,CAClC,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,8BAA8B,CAAC;WA2C5B,sBAAsB,CAClC,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,IAAI,CAAC;CAajB"}
@@ -1,46 +1,7 @@
1
1
  import { RunTaskOptions } from '../types/tasks';
2
2
  import { HITLBase } from './HITLBase';
3
- /**
4
- * Manages asynchronous task execution in the system
5
- *
6
- * This class provides functionality to:
7
- * - Execute various system tasks like event sending, broadcasting, sharing cards to agents, etc.
8
- *
9
- * @remarks
10
- * - All methods in this class interact with the `/tasks` endpoint
11
- * @public
12
- */
13
3
  export declare class Tasks extends HITLBase {
14
4
  protected static MODULE_URL: string;
15
- /**
16
- * Executes a specified task with provided data
17
- *
18
- * @param options - Configuration parameters for task execution
19
- *
20
- * Required parameters:
21
- * - `task` - (string) The type/name of task to execute
22
- * - `data` - (object) Task-specific data required for execution
23
- *
24
- * Optional parameters:
25
- * - `timeout` - (number) Request timeout in milliseconds
26
- * - `version` - (string | number) API version to use
27
- *
28
- * @returns {Promise<void>} Promise that resolves when the task is initiated
29
- *
30
- * @example
31
- * ```typescript
32
- * await hitlApi.tasks.runTask({
33
- * task: 'shareCardsToAgents',
34
- * data: {
35
- * cardIds: ['card-id-1', 'card-id-2'],
36
- * }
37
- * });
38
- * ```
39
- *
40
- * @remarks
41
- * Makes a POST request to the `/tasks` endpoint
42
- * @public
43
- */
44
5
  static runTask({ task, data, ...options }: RunTaskOptions): Promise<void>;
45
6
  }
46
7
  //# sourceMappingURL=Tasks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tasks.d.ts","sourceRoot":"","sources":["../../../src/api/Tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;GASG;AACH,qBAAa,KAAM,SAAQ,QAAQ;IACjC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAW;IAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACiB,OAAO,CACzB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,cAAc,GACzC,OAAO,CAAC,IAAI,CAAC;CAWjB"}
1
+ {"version":3,"file":"Tasks.d.ts","sourceRoot":"","sources":["../../../src/api/Tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAYtC,qBAAa,KAAM,SAAQ,QAAQ;IACjC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAW;WA+BlB,OAAO,CACzB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,cAAc,GACzC,OAAO,CAAC,IAAI,CAAC;CAWjB"}
@@ -1,92 +1,12 @@
1
1
  import { ApiVersionOptions } from '../types';
2
2
  import { GetVersionsListResponse, GetVersionInfoResponse, GetStepsToUIVersionsMapOptions } from '../types/versions';
3
3
  import { HITLBase } from './HITLBase';
4
- /**
5
- * Manages UI version information and compatibility
6
- *
7
- * This class provides functionality to:
8
- * - Retrieve available UI versions
9
- * - Get detailed version information
10
- *
11
- * Key features:
12
- * - List all available UI versions
13
- * - Get specific version details
14
- *
15
- * @remarks
16
- * - All methods in this class interact with the `/ui-versions` endpoint
17
- * @public
18
- */
19
4
  export declare class Versions extends HITLBase {
20
5
  protected static MODULE_URL: string;
21
6
  protected static VERSION_INFO: string;
22
7
  protected static STEPS_TO_UI_VERSIONS_MAP: string;
23
- /**
24
- * Retrieves a list of available UI versions
25
- *
26
- * @param options - Configuration parameters for retrieving versions
27
- *
28
- * Optional parameters:
29
- * - `timeout` - (number) Request timeout in milliseconds
30
- * - `version` - (string | number) API version to use
31
- *
32
- * @returns {Promise<GetVersionsListResponse>} Promise resolving to the list of available versions
33
- *
34
- * @example
35
- * ```typescript
36
- * const versions = await hitlApi.versions.getVersionsList();
37
- * ```
38
- *
39
- * @remarks
40
- * Makes a GET request to the `/ui-versions` endpoint
41
- * @public
42
- */
43
8
  static getVersionsList(options: ApiVersionOptions): Promise<GetVersionsListResponse>;
44
- /**
45
- * Retrieves detailed information about the last available version of HitL UI
46
- *
47
- * @param options - Configuration parameters for retrieving version information
48
- *
49
- * Optional parameters:
50
- * - `timeout` - (number) Request timeout in milliseconds
51
- * - `version` - (string | number) API version to use
52
- *
53
- * @returns {Promise<GetVersionInfoResponse>} Promise resolving to the version information
54
- *
55
- * @example
56
- * ```typescript
57
- * const versionInfo = await hitlApi.versions.getVersionInfo();
58
- * ```
59
- *
60
- * @remarks
61
- * Makes a GET request to the `/ui-versions/version-info` endpoint
62
- * @public
63
- */
64
9
  static getVersionInfo(options: ApiVersionOptions): Promise<GetVersionInfoResponse>;
65
- /**
66
- * Retrieves information about the compatibility of steps to UI versions
67
- *
68
- * @param options - Configuration parameters for retrieving steps to UI versions map
69
- *
70
- * Optional parameters:
71
- * - `stepName` - (string) The name of the step to retrieve mapping information for
72
- * - `timeout` - (number) Request timeout in milliseconds
73
- * - `version` - (string | number) API version to use
74
- *
75
- * @returns {Promise<GetStepsToUIVersionsMapResponse>} Promise resolving to steps to UI versions map
76
- *
77
- * @example
78
- * ```typescript
79
- * const stepsToUIVesionsMap = await hitlApi.versions.getStepsToUIVersionsMap();
80
- * ```
81
- *
82
- * ```typescript
83
- * const stepToUIVesionsMap = await hitlApi.versions.getStepsToUIVersionsMap({ stepName });
84
- * ```
85
- *
86
- * @remarks
87
- * Makes a GET request to the `/ui-versions/steps-to-ui-map` endpoint
88
- * @public
89
- */
90
10
  static getStepsToUIVersionsMap({ stepName, ...options }: GetStepsToUIVersionsMapOptions): Promise<object>;
91
11
  }
92
12
  //# sourceMappingURL=Versions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Versions.d.ts","sourceRoot":"","sources":["../../../src/api/Versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAiB;IAC5C,SAAS,CAAC,MAAM,CAAC,YAAY,SAAkB;IAC/C,SAAS,CAAC,MAAM,CAAC,wBAAwB,SAAqB;IAE9D;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,eAAe,CACjC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,uBAAuB,CAAC;IASnC;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,cAAc,CAChC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,CAAC;IAUlC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,uBAAuB,CACzC,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,8BAA8B,GACvD,OAAO,CAAC,MAAM,CAAC;CAUnB"}
1
+ {"version":3,"file":"Versions.d.ts","sourceRoot":"","sources":["../../../src/api/Versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiBtC,qBAAa,QAAS,SAAQ,QAAQ;IACpC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAiB;IAC5C,SAAS,CAAC,MAAM,CAAC,YAAY,SAAkB;IAC/C,SAAS,CAAC,MAAM,CAAC,wBAAwB,SAAqB;WAsB1C,eAAe,CACjC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,uBAAuB,CAAC;WA6Bf,cAAc,CAChC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,CAAC;WAmCd,uBAAuB,CACzC,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,EAAE,8BAA8B,GACvD,OAAO,CAAC,MAAM,CAAC;CAUnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or-sdk/hitl",
3
- "version": "0.40.1-beta.4180.0",
3
+ "version": "0.40.1-beta.4182.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@onereach/types-hitl-api": "1.0.7-rc.4",
22
- "@or-sdk/base": "^0.44.2",
22
+ "@or-sdk/base": "^0.44.3-beta.4182.0",
23
23
  "urijs": "^1.19.8"
24
24
  },
25
25
  "devDependencies": {