@opens/gateways 1.14.0 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat-webservice/contracts/index.d.mts +163 -1
- package/dist/chat-webservice/contracts/index.d.ts +163 -1
- package/dist/chat-webservice/contracts/index.js.map +1 -1
- package/dist/index.d.mts +62 -3
- package/dist/index.d.ts +62 -3
- package/dist/index.js +96 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -3
- package/dist/index.mjs.map +1 -1
- package/dist/rh/contracts/index.d.mts +19 -0
- package/dist/rh/contracts/index.d.ts +19 -0
- package/dist/rh/contracts/index.js +19 -0
- package/dist/rh/contracts/index.js.map +1 -0
- package/dist/rh/contracts/index.mjs +1 -0
- package/dist/rh/contracts/index.mjs.map +1 -0
- package/package.json +2 -2
|
@@ -127,4 +127,166 @@ interface LiveUserRoomResponse {
|
|
|
127
127
|
room: RoomResponse;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
/** Attachment metadata associated with a chat message. */
|
|
131
|
+
interface MessageAttachment {
|
|
132
|
+
id: string;
|
|
133
|
+
key: string;
|
|
134
|
+
bucket: string;
|
|
135
|
+
filename: string;
|
|
136
|
+
type: string;
|
|
137
|
+
contentType: string;
|
|
138
|
+
link?: string;
|
|
139
|
+
}
|
|
140
|
+
/** Status entry tracking delivery/read state of a chat message. */
|
|
141
|
+
interface MessageStatusResponse {
|
|
142
|
+
id: number;
|
|
143
|
+
status: string;
|
|
144
|
+
message: unknown;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
updatedAt: string;
|
|
147
|
+
chatRoomMessageId: number;
|
|
148
|
+
chatRoomId: number;
|
|
149
|
+
chatRoomMemberId: number;
|
|
150
|
+
attachmentIndex: number | null;
|
|
151
|
+
}
|
|
152
|
+
/** Reaction applied to a chat message. */
|
|
153
|
+
interface MessageReactionResponse {
|
|
154
|
+
id: number;
|
|
155
|
+
emoji: string;
|
|
156
|
+
chatRoomId: number;
|
|
157
|
+
chatRoomMessageId: number;
|
|
158
|
+
chatRoomMemberId: number;
|
|
159
|
+
createdAt: string;
|
|
160
|
+
updatedAt: string;
|
|
161
|
+
}
|
|
162
|
+
/** Compact representation of the message being replied to. */
|
|
163
|
+
interface MessageReplyContext {
|
|
164
|
+
id: number;
|
|
165
|
+
messageType: string;
|
|
166
|
+
messageBody: string;
|
|
167
|
+
filename?: string;
|
|
168
|
+
createdAt: string;
|
|
169
|
+
}
|
|
170
|
+
/** Optional metadata associated with a chat message. */
|
|
171
|
+
interface MessageMetadata {
|
|
172
|
+
isExternalInit?: boolean;
|
|
173
|
+
privateReason?: string;
|
|
174
|
+
hiddenByOperatorId?: string;
|
|
175
|
+
hiddenByOperatorName?: string;
|
|
176
|
+
hiddenAt?: string;
|
|
177
|
+
[key: string]: unknown;
|
|
178
|
+
}
|
|
179
|
+
/** Chat message entity returned by the Chat Webservice API. */
|
|
180
|
+
interface MessageResponse {
|
|
181
|
+
id: number;
|
|
182
|
+
chatRoomId: number;
|
|
183
|
+
chatRoomMemberId: number;
|
|
184
|
+
companyId: string;
|
|
185
|
+
secretId: unknown;
|
|
186
|
+
messageHeader: string;
|
|
187
|
+
messageBody: string;
|
|
188
|
+
messageFooter: unknown;
|
|
189
|
+
caption: unknown;
|
|
190
|
+
messageHeaderType: string;
|
|
191
|
+
messageType: string;
|
|
192
|
+
messageFooterType: unknown;
|
|
193
|
+
subject: unknown;
|
|
194
|
+
origin: unknown;
|
|
195
|
+
recipientId: string;
|
|
196
|
+
provider: string;
|
|
197
|
+
providerId: string;
|
|
198
|
+
canBeInteractedWith: boolean;
|
|
199
|
+
buttons: unknown;
|
|
200
|
+
replyingToId?: number;
|
|
201
|
+
attachments: unknown;
|
|
202
|
+
createdAt: string;
|
|
203
|
+
updatedAt: string;
|
|
204
|
+
topic: unknown;
|
|
205
|
+
isPrivate: boolean;
|
|
206
|
+
metadata?: MessageMetadata | null;
|
|
207
|
+
carousel?: {
|
|
208
|
+
data?: unknown[];
|
|
209
|
+
};
|
|
210
|
+
status: MessageStatusResponse[];
|
|
211
|
+
reactions: MessageReactionResponse[];
|
|
212
|
+
replyingTo?: MessageReplyContext;
|
|
213
|
+
echo?: string;
|
|
214
|
+
}
|
|
215
|
+
/** Query parameters for fetching the initial message context of a room. */
|
|
216
|
+
interface GetInitialContextRequest {
|
|
217
|
+
companyId: string;
|
|
218
|
+
chatRoomId: number;
|
|
219
|
+
chatRoomMemberId: number;
|
|
220
|
+
limit?: number;
|
|
221
|
+
associations?: string[];
|
|
222
|
+
}
|
|
223
|
+
/** Paginated initial context response centered around unread messages. */
|
|
224
|
+
interface GetInitialContextResponse {
|
|
225
|
+
data: MessageResponse[];
|
|
226
|
+
meta: {
|
|
227
|
+
count: number;
|
|
228
|
+
oldestCursor: number;
|
|
229
|
+
newestCursor: number;
|
|
230
|
+
lastUnreadMessageId: number | null;
|
|
231
|
+
hasMoreBefore: boolean;
|
|
232
|
+
hasMoreAfter: boolean;
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
/** Query parameters for cursor-based message pagination. */
|
|
236
|
+
interface GetMessagesByCursorRequest {
|
|
237
|
+
companyId: string;
|
|
238
|
+
chatRoomId: number;
|
|
239
|
+
beforeId?: number;
|
|
240
|
+
afterId?: number;
|
|
241
|
+
limit?: number;
|
|
242
|
+
associations?: string[];
|
|
243
|
+
}
|
|
244
|
+
/** Paginated response for cursor-based message listing. */
|
|
245
|
+
interface GetMessagesByCursorResponse {
|
|
246
|
+
data: MessageResponse[];
|
|
247
|
+
meta: {
|
|
248
|
+
hasMore: boolean;
|
|
249
|
+
count: number;
|
|
250
|
+
oldestCursor: number;
|
|
251
|
+
newestCursor: number;
|
|
252
|
+
hasMoreBefore?: boolean;
|
|
253
|
+
hasMoreAfter?: boolean;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/** Request payload for sending a chat message. */
|
|
257
|
+
interface SendMessageRequest {
|
|
258
|
+
recipientId: string;
|
|
259
|
+
origin: string;
|
|
260
|
+
channel: string;
|
|
261
|
+
provider: string;
|
|
262
|
+
chatRoomId: number;
|
|
263
|
+
companyId: string;
|
|
264
|
+
messageBody?: string;
|
|
265
|
+
messageType: string;
|
|
266
|
+
chatRoomMemberId: number;
|
|
267
|
+
attachments?: {
|
|
268
|
+
data: MessageAttachment[];
|
|
269
|
+
};
|
|
270
|
+
replyingToId?: number;
|
|
271
|
+
}
|
|
272
|
+
/** Response returned when sending an attachment message. */
|
|
273
|
+
interface SendAttachmentMessageResponse {
|
|
274
|
+
message: MessageResponse;
|
|
275
|
+
}
|
|
276
|
+
/** Request payload for marking specific messages as read. */
|
|
277
|
+
interface MarkMessagesAsReadRequest {
|
|
278
|
+
chatRoomId: number;
|
|
279
|
+
chatRoomMemberId: number;
|
|
280
|
+
chatRoomMessageId: number[];
|
|
281
|
+
status: string;
|
|
282
|
+
}
|
|
283
|
+
/** Response returned after marking messages as read. */
|
|
284
|
+
interface MarkMessagesAsReadResponse {
|
|
285
|
+
updatedMessageStatus: MessageStatusResponse[];
|
|
286
|
+
}
|
|
287
|
+
/** Request payload for updating a room member. */
|
|
288
|
+
interface UpdateMemberInRoomRequest {
|
|
289
|
+
new?: boolean;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export type { CancelInvitationRequest, GetInitialContextRequest, GetInitialContextResponse, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetRoomByIdRequest, InvitationResponse, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageResponse, MessageStatusResponse, ReplyInvitationRequest, RoomActiveDates, RoomMemberResponse, RoomResponse, RoomTagResponse, SendAttachmentMessageResponse, SendMessageRequest, UpdateMemberInRoomRequest };
|
|
@@ -127,4 +127,166 @@ interface LiveUserRoomResponse {
|
|
|
127
127
|
room: RoomResponse;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
/** Attachment metadata associated with a chat message. */
|
|
131
|
+
interface MessageAttachment {
|
|
132
|
+
id: string;
|
|
133
|
+
key: string;
|
|
134
|
+
bucket: string;
|
|
135
|
+
filename: string;
|
|
136
|
+
type: string;
|
|
137
|
+
contentType: string;
|
|
138
|
+
link?: string;
|
|
139
|
+
}
|
|
140
|
+
/** Status entry tracking delivery/read state of a chat message. */
|
|
141
|
+
interface MessageStatusResponse {
|
|
142
|
+
id: number;
|
|
143
|
+
status: string;
|
|
144
|
+
message: unknown;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
updatedAt: string;
|
|
147
|
+
chatRoomMessageId: number;
|
|
148
|
+
chatRoomId: number;
|
|
149
|
+
chatRoomMemberId: number;
|
|
150
|
+
attachmentIndex: number | null;
|
|
151
|
+
}
|
|
152
|
+
/** Reaction applied to a chat message. */
|
|
153
|
+
interface MessageReactionResponse {
|
|
154
|
+
id: number;
|
|
155
|
+
emoji: string;
|
|
156
|
+
chatRoomId: number;
|
|
157
|
+
chatRoomMessageId: number;
|
|
158
|
+
chatRoomMemberId: number;
|
|
159
|
+
createdAt: string;
|
|
160
|
+
updatedAt: string;
|
|
161
|
+
}
|
|
162
|
+
/** Compact representation of the message being replied to. */
|
|
163
|
+
interface MessageReplyContext {
|
|
164
|
+
id: number;
|
|
165
|
+
messageType: string;
|
|
166
|
+
messageBody: string;
|
|
167
|
+
filename?: string;
|
|
168
|
+
createdAt: string;
|
|
169
|
+
}
|
|
170
|
+
/** Optional metadata associated with a chat message. */
|
|
171
|
+
interface MessageMetadata {
|
|
172
|
+
isExternalInit?: boolean;
|
|
173
|
+
privateReason?: string;
|
|
174
|
+
hiddenByOperatorId?: string;
|
|
175
|
+
hiddenByOperatorName?: string;
|
|
176
|
+
hiddenAt?: string;
|
|
177
|
+
[key: string]: unknown;
|
|
178
|
+
}
|
|
179
|
+
/** Chat message entity returned by the Chat Webservice API. */
|
|
180
|
+
interface MessageResponse {
|
|
181
|
+
id: number;
|
|
182
|
+
chatRoomId: number;
|
|
183
|
+
chatRoomMemberId: number;
|
|
184
|
+
companyId: string;
|
|
185
|
+
secretId: unknown;
|
|
186
|
+
messageHeader: string;
|
|
187
|
+
messageBody: string;
|
|
188
|
+
messageFooter: unknown;
|
|
189
|
+
caption: unknown;
|
|
190
|
+
messageHeaderType: string;
|
|
191
|
+
messageType: string;
|
|
192
|
+
messageFooterType: unknown;
|
|
193
|
+
subject: unknown;
|
|
194
|
+
origin: unknown;
|
|
195
|
+
recipientId: string;
|
|
196
|
+
provider: string;
|
|
197
|
+
providerId: string;
|
|
198
|
+
canBeInteractedWith: boolean;
|
|
199
|
+
buttons: unknown;
|
|
200
|
+
replyingToId?: number;
|
|
201
|
+
attachments: unknown;
|
|
202
|
+
createdAt: string;
|
|
203
|
+
updatedAt: string;
|
|
204
|
+
topic: unknown;
|
|
205
|
+
isPrivate: boolean;
|
|
206
|
+
metadata?: MessageMetadata | null;
|
|
207
|
+
carousel?: {
|
|
208
|
+
data?: unknown[];
|
|
209
|
+
};
|
|
210
|
+
status: MessageStatusResponse[];
|
|
211
|
+
reactions: MessageReactionResponse[];
|
|
212
|
+
replyingTo?: MessageReplyContext;
|
|
213
|
+
echo?: string;
|
|
214
|
+
}
|
|
215
|
+
/** Query parameters for fetching the initial message context of a room. */
|
|
216
|
+
interface GetInitialContextRequest {
|
|
217
|
+
companyId: string;
|
|
218
|
+
chatRoomId: number;
|
|
219
|
+
chatRoomMemberId: number;
|
|
220
|
+
limit?: number;
|
|
221
|
+
associations?: string[];
|
|
222
|
+
}
|
|
223
|
+
/** Paginated initial context response centered around unread messages. */
|
|
224
|
+
interface GetInitialContextResponse {
|
|
225
|
+
data: MessageResponse[];
|
|
226
|
+
meta: {
|
|
227
|
+
count: number;
|
|
228
|
+
oldestCursor: number;
|
|
229
|
+
newestCursor: number;
|
|
230
|
+
lastUnreadMessageId: number | null;
|
|
231
|
+
hasMoreBefore: boolean;
|
|
232
|
+
hasMoreAfter: boolean;
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
/** Query parameters for cursor-based message pagination. */
|
|
236
|
+
interface GetMessagesByCursorRequest {
|
|
237
|
+
companyId: string;
|
|
238
|
+
chatRoomId: number;
|
|
239
|
+
beforeId?: number;
|
|
240
|
+
afterId?: number;
|
|
241
|
+
limit?: number;
|
|
242
|
+
associations?: string[];
|
|
243
|
+
}
|
|
244
|
+
/** Paginated response for cursor-based message listing. */
|
|
245
|
+
interface GetMessagesByCursorResponse {
|
|
246
|
+
data: MessageResponse[];
|
|
247
|
+
meta: {
|
|
248
|
+
hasMore: boolean;
|
|
249
|
+
count: number;
|
|
250
|
+
oldestCursor: number;
|
|
251
|
+
newestCursor: number;
|
|
252
|
+
hasMoreBefore?: boolean;
|
|
253
|
+
hasMoreAfter?: boolean;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/** Request payload for sending a chat message. */
|
|
257
|
+
interface SendMessageRequest {
|
|
258
|
+
recipientId: string;
|
|
259
|
+
origin: string;
|
|
260
|
+
channel: string;
|
|
261
|
+
provider: string;
|
|
262
|
+
chatRoomId: number;
|
|
263
|
+
companyId: string;
|
|
264
|
+
messageBody?: string;
|
|
265
|
+
messageType: string;
|
|
266
|
+
chatRoomMemberId: number;
|
|
267
|
+
attachments?: {
|
|
268
|
+
data: MessageAttachment[];
|
|
269
|
+
};
|
|
270
|
+
replyingToId?: number;
|
|
271
|
+
}
|
|
272
|
+
/** Response returned when sending an attachment message. */
|
|
273
|
+
interface SendAttachmentMessageResponse {
|
|
274
|
+
message: MessageResponse;
|
|
275
|
+
}
|
|
276
|
+
/** Request payload for marking specific messages as read. */
|
|
277
|
+
interface MarkMessagesAsReadRequest {
|
|
278
|
+
chatRoomId: number;
|
|
279
|
+
chatRoomMemberId: number;
|
|
280
|
+
chatRoomMessageId: number[];
|
|
281
|
+
status: string;
|
|
282
|
+
}
|
|
283
|
+
/** Response returned after marking messages as read. */
|
|
284
|
+
interface MarkMessagesAsReadResponse {
|
|
285
|
+
updatedMessageStatus: MessageStatusResponse[];
|
|
286
|
+
}
|
|
287
|
+
/** Request payload for updating a room member. */
|
|
288
|
+
interface UpdateMemberInRoomRequest {
|
|
289
|
+
new?: boolean;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export type { CancelInvitationRequest, GetInitialContextRequest, GetInitialContextResponse, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetRoomByIdRequest, InvitationResponse, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageResponse, MessageStatusResponse, ReplyInvitationRequest, RoomActiveDates, RoomMemberResponse, RoomResponse, RoomTagResponse, SendAttachmentMessageResponse, SendMessageRequest, UpdateMemberInRoomRequest };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/chat-webservice/contracts/index.ts"],"sourcesContent":["export * from './invitation';\nexport * from './room';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/chat-webservice/contracts/index.ts"],"sourcesContent":["export * from './invitation';\nexport * from './room';\nexport * from './message';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -13,12 +13,13 @@ import { GetContactPhonesParams, ContactPhoneSearchResponse, ContactCategoryResp
|
|
|
13
13
|
export { ContactPhoneResponse } from './contact-list/contracts/index.mjs';
|
|
14
14
|
import { GetIntegrationPartnersByCompanyRequest, IntegrationPartner, GetWebhooksByCompanyRequest as GetWebhooksByCompanyRequest$1, GetIntegrationHooksCatalogRequest, HookCatalogItem, CreateIntegrationPartnerRequest, CreateWebhookRequest as CreateWebhookRequest$1, DeleteIntegrationPartnerParams, CreateIntegrationActionRequest, IntegrationAction, UpdateIntegrationActionParams, CreateIntegrationFieldRequest, IntegrationField, UpdateIntegrationFieldParams, DeleteIntegrationFieldParams, DeleteIntegrationActionParams } from './integrations/contracts/index.mjs';
|
|
15
15
|
export { UpdateIntegrationActionRequest, UpdateIntegrationFieldRequest } from './integrations/contracts/index.mjs';
|
|
16
|
-
import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, CancelInvitationRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.mjs';
|
|
17
|
-
export {
|
|
16
|
+
import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, CancelInvitationRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse, GetInitialContextRequest, GetInitialContextResponse, GetMessagesByCursorRequest, GetMessagesByCursorResponse, SendMessageRequest, MessageResponse, SendAttachmentMessageResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, UpdateMemberInRoomRequest, RoomMemberResponse } from './chat-webservice/contracts/index.mjs';
|
|
17
|
+
export { MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageStatusResponse, RoomActiveDates, RoomTagResponse } from './chat-webservice/contracts/index.mjs';
|
|
18
18
|
import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.mjs';
|
|
19
19
|
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.mjs';
|
|
20
20
|
import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem } from './cases/contracts/index.mjs';
|
|
21
21
|
export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry } from './cases/contracts/index.mjs';
|
|
22
|
+
export { Event } from './rh/contracts/index.mjs';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Gateway for interacting with the Customer Service API.
|
|
@@ -427,6 +428,50 @@ declare class ChatWebserviceGateway {
|
|
|
427
428
|
* @returns The chat room data.
|
|
428
429
|
*/
|
|
429
430
|
getRoomById(id: number, params?: GetRoomByIdRequest): Promise<RoomResponse>;
|
|
431
|
+
/**
|
|
432
|
+
* Fetches the initial message context for a room member, centered around unread messages.
|
|
433
|
+
* @param params - The room, member, and pagination filters.
|
|
434
|
+
* @returns The initial page of messages with unread metadata.
|
|
435
|
+
*/
|
|
436
|
+
getInitialContext(params: GetInitialContextRequest): Promise<GetInitialContextResponse>;
|
|
437
|
+
/**
|
|
438
|
+
* Lists messages in a room using cursor-based pagination.
|
|
439
|
+
* @param params - The room, cursor, and association filters.
|
|
440
|
+
* @returns A page of messages with cursor metadata.
|
|
441
|
+
*/
|
|
442
|
+
getMessagesByCursor(params: GetMessagesByCursorRequest): Promise<GetMessagesByCursorResponse>;
|
|
443
|
+
/**
|
|
444
|
+
* Sends a chat message to a room.
|
|
445
|
+
* @param payload - The message content and routing metadata.
|
|
446
|
+
* @returns The created message.
|
|
447
|
+
*/
|
|
448
|
+
sendMessage(payload: SendMessageRequest): Promise<MessageResponse>;
|
|
449
|
+
/**
|
|
450
|
+
* Sends a chat message that includes attachments.
|
|
451
|
+
* @param payload - The message content, attachments, and routing metadata.
|
|
452
|
+
* @returns The created message wrapped in a response object.
|
|
453
|
+
*/
|
|
454
|
+
sendAttachmentMessage(payload: SendMessageRequest): Promise<SendAttachmentMessageResponse>;
|
|
455
|
+
/**
|
|
456
|
+
* Marks specific messages as read for a room member.
|
|
457
|
+
* @param payload - The room, member, and message identifiers to update.
|
|
458
|
+
* @returns The updated message status entries.
|
|
459
|
+
*/
|
|
460
|
+
markMessagesAsRead(payload: MarkMessagesAsReadRequest): Promise<MarkMessagesAsReadResponse>;
|
|
461
|
+
/**
|
|
462
|
+
* Marks all messages in a room as read for a given member.
|
|
463
|
+
* @param memberId - The chat room member identifier.
|
|
464
|
+
* @param roomId - The chat room identifier.
|
|
465
|
+
* @returns The API response payload.
|
|
466
|
+
*/
|
|
467
|
+
markAllRoomMessagesAsRead(memberId: number, roomId: number): Promise<unknown>;
|
|
468
|
+
/**
|
|
469
|
+
* Updates a room member's attributes.
|
|
470
|
+
* @param memberId - The chat room member identifier.
|
|
471
|
+
* @param payload - The member fields to update.
|
|
472
|
+
* @returns The updated room member.
|
|
473
|
+
*/
|
|
474
|
+
updateMemberInRoom(memberId: number, payload: UpdateMemberInRoomRequest): Promise<RoomMemberResponse>;
|
|
430
475
|
}
|
|
431
476
|
|
|
432
477
|
/**
|
|
@@ -478,6 +523,15 @@ declare class CasesGateway {
|
|
|
478
523
|
getCaseFeedByActions(payload: GetCaseFeedByActionsRequest): Promise<CaseFeedByActionItem[]>;
|
|
479
524
|
}
|
|
480
525
|
|
|
526
|
+
/**
|
|
527
|
+
* Gateway for interacting with the RH API.
|
|
528
|
+
*/
|
|
529
|
+
declare class RhGateway {
|
|
530
|
+
private readonly httpClient;
|
|
531
|
+
private readonly baseUrl;
|
|
532
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
533
|
+
}
|
|
534
|
+
|
|
481
535
|
/**
|
|
482
536
|
* Maps service identifiers to their corresponding gateway types.
|
|
483
537
|
* Used by the `gateway()` function to infer the correct return type
|
|
@@ -497,6 +551,7 @@ type GatewayMap = {
|
|
|
497
551
|
'chat-webservice': ChatWebserviceGateway;
|
|
498
552
|
'call-report': CallReportGateway;
|
|
499
553
|
cases: CasesGateway;
|
|
554
|
+
rh: RhGateway;
|
|
500
555
|
};
|
|
501
556
|
/**
|
|
502
557
|
* Parameters required to configure the SDK client.
|
|
@@ -539,6 +594,9 @@ interface GatewayClientParams {
|
|
|
539
594
|
cases?: {
|
|
540
595
|
baseUrl: string;
|
|
541
596
|
};
|
|
597
|
+
rh?: {
|
|
598
|
+
baseUrl: string;
|
|
599
|
+
};
|
|
542
600
|
};
|
|
543
601
|
}
|
|
544
602
|
|
|
@@ -553,6 +611,7 @@ declare const SERVICE_GATEWAYS: {
|
|
|
553
611
|
readonly CHAT_WEBSERVICE: "chat-webservice";
|
|
554
612
|
readonly CALL_REPORT: "call-report";
|
|
555
613
|
readonly CASES: "cases";
|
|
614
|
+
readonly RH: "rh";
|
|
556
615
|
};
|
|
557
616
|
type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS];
|
|
558
617
|
|
|
@@ -579,4 +638,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
579
638
|
*/
|
|
580
639
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
581
640
|
|
|
582
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
|
641
|
+
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,12 +13,13 @@ import { GetContactPhonesParams, ContactPhoneSearchResponse, ContactCategoryResp
|
|
|
13
13
|
export { ContactPhoneResponse } from './contact-list/contracts/index.js';
|
|
14
14
|
import { GetIntegrationPartnersByCompanyRequest, IntegrationPartner, GetWebhooksByCompanyRequest as GetWebhooksByCompanyRequest$1, GetIntegrationHooksCatalogRequest, HookCatalogItem, CreateIntegrationPartnerRequest, CreateWebhookRequest as CreateWebhookRequest$1, DeleteIntegrationPartnerParams, CreateIntegrationActionRequest, IntegrationAction, UpdateIntegrationActionParams, CreateIntegrationFieldRequest, IntegrationField, UpdateIntegrationFieldParams, DeleteIntegrationFieldParams, DeleteIntegrationActionParams } from './integrations/contracts/index.js';
|
|
15
15
|
export { UpdateIntegrationActionRequest, UpdateIntegrationFieldRequest } from './integrations/contracts/index.js';
|
|
16
|
-
import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, CancelInvitationRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.js';
|
|
17
|
-
export {
|
|
16
|
+
import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, CancelInvitationRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse, GetInitialContextRequest, GetInitialContextResponse, GetMessagesByCursorRequest, GetMessagesByCursorResponse, SendMessageRequest, MessageResponse, SendAttachmentMessageResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, UpdateMemberInRoomRequest, RoomMemberResponse } from './chat-webservice/contracts/index.js';
|
|
17
|
+
export { MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageStatusResponse, RoomActiveDates, RoomTagResponse } from './chat-webservice/contracts/index.js';
|
|
18
18
|
import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.js';
|
|
19
19
|
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.js';
|
|
20
20
|
import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem } from './cases/contracts/index.js';
|
|
21
21
|
export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry } from './cases/contracts/index.js';
|
|
22
|
+
export { Event } from './rh/contracts/index.js';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Gateway for interacting with the Customer Service API.
|
|
@@ -427,6 +428,50 @@ declare class ChatWebserviceGateway {
|
|
|
427
428
|
* @returns The chat room data.
|
|
428
429
|
*/
|
|
429
430
|
getRoomById(id: number, params?: GetRoomByIdRequest): Promise<RoomResponse>;
|
|
431
|
+
/**
|
|
432
|
+
* Fetches the initial message context for a room member, centered around unread messages.
|
|
433
|
+
* @param params - The room, member, and pagination filters.
|
|
434
|
+
* @returns The initial page of messages with unread metadata.
|
|
435
|
+
*/
|
|
436
|
+
getInitialContext(params: GetInitialContextRequest): Promise<GetInitialContextResponse>;
|
|
437
|
+
/**
|
|
438
|
+
* Lists messages in a room using cursor-based pagination.
|
|
439
|
+
* @param params - The room, cursor, and association filters.
|
|
440
|
+
* @returns A page of messages with cursor metadata.
|
|
441
|
+
*/
|
|
442
|
+
getMessagesByCursor(params: GetMessagesByCursorRequest): Promise<GetMessagesByCursorResponse>;
|
|
443
|
+
/**
|
|
444
|
+
* Sends a chat message to a room.
|
|
445
|
+
* @param payload - The message content and routing metadata.
|
|
446
|
+
* @returns The created message.
|
|
447
|
+
*/
|
|
448
|
+
sendMessage(payload: SendMessageRequest): Promise<MessageResponse>;
|
|
449
|
+
/**
|
|
450
|
+
* Sends a chat message that includes attachments.
|
|
451
|
+
* @param payload - The message content, attachments, and routing metadata.
|
|
452
|
+
* @returns The created message wrapped in a response object.
|
|
453
|
+
*/
|
|
454
|
+
sendAttachmentMessage(payload: SendMessageRequest): Promise<SendAttachmentMessageResponse>;
|
|
455
|
+
/**
|
|
456
|
+
* Marks specific messages as read for a room member.
|
|
457
|
+
* @param payload - The room, member, and message identifiers to update.
|
|
458
|
+
* @returns The updated message status entries.
|
|
459
|
+
*/
|
|
460
|
+
markMessagesAsRead(payload: MarkMessagesAsReadRequest): Promise<MarkMessagesAsReadResponse>;
|
|
461
|
+
/**
|
|
462
|
+
* Marks all messages in a room as read for a given member.
|
|
463
|
+
* @param memberId - The chat room member identifier.
|
|
464
|
+
* @param roomId - The chat room identifier.
|
|
465
|
+
* @returns The API response payload.
|
|
466
|
+
*/
|
|
467
|
+
markAllRoomMessagesAsRead(memberId: number, roomId: number): Promise<unknown>;
|
|
468
|
+
/**
|
|
469
|
+
* Updates a room member's attributes.
|
|
470
|
+
* @param memberId - The chat room member identifier.
|
|
471
|
+
* @param payload - The member fields to update.
|
|
472
|
+
* @returns The updated room member.
|
|
473
|
+
*/
|
|
474
|
+
updateMemberInRoom(memberId: number, payload: UpdateMemberInRoomRequest): Promise<RoomMemberResponse>;
|
|
430
475
|
}
|
|
431
476
|
|
|
432
477
|
/**
|
|
@@ -478,6 +523,15 @@ declare class CasesGateway {
|
|
|
478
523
|
getCaseFeedByActions(payload: GetCaseFeedByActionsRequest): Promise<CaseFeedByActionItem[]>;
|
|
479
524
|
}
|
|
480
525
|
|
|
526
|
+
/**
|
|
527
|
+
* Gateway for interacting with the RH API.
|
|
528
|
+
*/
|
|
529
|
+
declare class RhGateway {
|
|
530
|
+
private readonly httpClient;
|
|
531
|
+
private readonly baseUrl;
|
|
532
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
533
|
+
}
|
|
534
|
+
|
|
481
535
|
/**
|
|
482
536
|
* Maps service identifiers to their corresponding gateway types.
|
|
483
537
|
* Used by the `gateway()` function to infer the correct return type
|
|
@@ -497,6 +551,7 @@ type GatewayMap = {
|
|
|
497
551
|
'chat-webservice': ChatWebserviceGateway;
|
|
498
552
|
'call-report': CallReportGateway;
|
|
499
553
|
cases: CasesGateway;
|
|
554
|
+
rh: RhGateway;
|
|
500
555
|
};
|
|
501
556
|
/**
|
|
502
557
|
* Parameters required to configure the SDK client.
|
|
@@ -539,6 +594,9 @@ interface GatewayClientParams {
|
|
|
539
594
|
cases?: {
|
|
540
595
|
baseUrl: string;
|
|
541
596
|
};
|
|
597
|
+
rh?: {
|
|
598
|
+
baseUrl: string;
|
|
599
|
+
};
|
|
542
600
|
};
|
|
543
601
|
}
|
|
544
602
|
|
|
@@ -553,6 +611,7 @@ declare const SERVICE_GATEWAYS: {
|
|
|
553
611
|
readonly CHAT_WEBSERVICE: "chat-webservice";
|
|
554
612
|
readonly CALL_REPORT: "call-report";
|
|
555
613
|
readonly CASES: "cases";
|
|
614
|
+
readonly RH: "rh";
|
|
556
615
|
};
|
|
557
616
|
type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS];
|
|
558
617
|
|
|
@@ -579,4 +638,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
579
638
|
*/
|
|
580
639
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
581
640
|
|
|
582
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
|
641
|
+
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|