@opens/gateways 1.14.1 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/campaigns/contracts/index.d.mts +1 -1
- package/dist/campaigns/contracts/index.d.ts +1 -1
- 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 +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.js +74 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -402,7 +402,7 @@ interface CreateCampaignWorkGroupRequest {
|
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
/** Reason why a user has (or does not have) access to the Campaigns module. */
|
|
405
|
-
type CampaignAccessReason = 'admin' | 'manager' | '
|
|
405
|
+
type CampaignAccessReason = 'admin' | 'manager' | 'user' | 'none';
|
|
406
406
|
/** Response returned by the Campaigns API when checking the caller's access. */
|
|
407
407
|
interface CampaignAccessResponse {
|
|
408
408
|
hasAccess: boolean;
|
|
@@ -402,7 +402,7 @@ interface CreateCampaignWorkGroupRequest {
|
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
/** Reason why a user has (or does not have) access to the Campaigns module. */
|
|
405
|
-
type CampaignAccessReason = 'admin' | 'manager' | '
|
|
405
|
+
type CampaignAccessReason = 'admin' | 'manager' | 'user' | 'none';
|
|
406
406
|
/** Response returned by the Campaigns API when checking the caller's access. */
|
|
407
407
|
interface CampaignAccessResponse {
|
|
408
408
|
hasAccess: boolean;
|
|
@@ -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,8 +13,8 @@ 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';
|
|
@@ -428,6 +428,50 @@ declare class ChatWebserviceGateway {
|
|
|
428
428
|
* @returns The chat room data.
|
|
429
429
|
*/
|
|
430
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>;
|
|
431
475
|
}
|
|
432
476
|
|
|
433
477
|
/**
|
|
@@ -594,4 +638,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
594
638
|
*/
|
|
595
639
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
596
640
|
|
|
597
|
-
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,8 +13,8 @@ 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';
|
|
@@ -428,6 +428,50 @@ declare class ChatWebserviceGateway {
|
|
|
428
428
|
* @returns The chat room data.
|
|
429
429
|
*/
|
|
430
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>;
|
|
431
475
|
}
|
|
432
476
|
|
|
433
477
|
/**
|
|
@@ -594,4 +638,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
594
638
|
*/
|
|
595
639
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
596
640
|
|
|
597
|
-
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.js
CHANGED
|
@@ -746,6 +746,80 @@ var ChatWebserviceGateway = class {
|
|
|
746
746
|
const { data } = await this.httpClient.get(`${this.baseUrl}/room/${id}`, { params });
|
|
747
747
|
return data;
|
|
748
748
|
}
|
|
749
|
+
/**
|
|
750
|
+
* Fetches the initial message context for a room member, centered around unread messages.
|
|
751
|
+
* @param params - The room, member, and pagination filters.
|
|
752
|
+
* @returns The initial page of messages with unread metadata.
|
|
753
|
+
*/
|
|
754
|
+
async getInitialContext(params) {
|
|
755
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/message/initial-context`, {
|
|
756
|
+
params
|
|
757
|
+
});
|
|
758
|
+
return data;
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Lists messages in a room using cursor-based pagination.
|
|
762
|
+
* @param params - The room, cursor, and association filters.
|
|
763
|
+
* @returns A page of messages with cursor metadata.
|
|
764
|
+
*/
|
|
765
|
+
async getMessagesByCursor(params) {
|
|
766
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/message/cursor`, {
|
|
767
|
+
params
|
|
768
|
+
});
|
|
769
|
+
return data;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Sends a chat message to a room.
|
|
773
|
+
* @param payload - The message content and routing metadata.
|
|
774
|
+
* @returns The created message.
|
|
775
|
+
*/
|
|
776
|
+
async sendMessage(payload) {
|
|
777
|
+
const { data } = await this.httpClient.post(`${this.baseUrl}/message`, payload);
|
|
778
|
+
return data;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Sends a chat message that includes attachments.
|
|
782
|
+
* @param payload - The message content, attachments, and routing metadata.
|
|
783
|
+
* @returns The created message wrapped in a response object.
|
|
784
|
+
*/
|
|
785
|
+
async sendAttachmentMessage(payload) {
|
|
786
|
+
const { data } = await this.httpClient.post(
|
|
787
|
+
`${this.baseUrl}/message/attachment`,
|
|
788
|
+
payload
|
|
789
|
+
);
|
|
790
|
+
return data;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Marks specific messages as read for a room member.
|
|
794
|
+
* @param payload - The room, member, and message identifiers to update.
|
|
795
|
+
* @returns The updated message status entries.
|
|
796
|
+
*/
|
|
797
|
+
async markMessagesAsRead(payload) {
|
|
798
|
+
const { data } = await this.httpClient.patch(`${this.baseUrl}/message-status`, payload);
|
|
799
|
+
return data;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Marks all messages in a room as read for a given member.
|
|
803
|
+
* @param memberId - The chat room member identifier.
|
|
804
|
+
* @param roomId - The chat room identifier.
|
|
805
|
+
* @returns The API response payload.
|
|
806
|
+
*/
|
|
807
|
+
async markAllRoomMessagesAsRead(memberId, roomId) {
|
|
808
|
+
const { data } = await this.httpClient.patch(
|
|
809
|
+
`${this.baseUrl}/message-status/mark-all-as-read/${memberId}/${roomId}`
|
|
810
|
+
);
|
|
811
|
+
return data;
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Updates a room member's attributes.
|
|
815
|
+
* @param memberId - The chat room member identifier.
|
|
816
|
+
* @param payload - The member fields to update.
|
|
817
|
+
* @returns The updated room member.
|
|
818
|
+
*/
|
|
819
|
+
async updateMemberInRoom(memberId, payload) {
|
|
820
|
+
const { data } = await this.httpClient.patch(`${this.baseUrl}/member/${memberId}`, payload);
|
|
821
|
+
return data;
|
|
822
|
+
}
|
|
749
823
|
};
|
|
750
824
|
|
|
751
825
|
// src/call-report/index.ts
|