contactstudiocstools 1.0.278 → 1.0.280
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/module.json
CHANGED
|
@@ -2,6 +2,7 @@ import { IDoubts, IMailing, IPauses, ISchedules, IUser, IChatContacts, INodes, I
|
|
|
2
2
|
export declare function IPortfolioSchedulesDTO(primitives: any[]): IPortfolioSchedules;
|
|
3
3
|
export declare function IClientHistoriesDTO(primitives: any[]): IClientHistories;
|
|
4
4
|
export declare function FlowsDTO(primitives: any[]): IFlows;
|
|
5
|
+
export declare function ChatMessageDTO(primitive: any): IChatMessage;
|
|
5
6
|
export declare function ChatMessageTextDTO(primitive: any): IChatMessage;
|
|
6
7
|
export declare function ChatMessageOptionDTO(primitive: any): IChatMessage;
|
|
7
8
|
export declare function ChatMessageFileDTO(primitive: any): IChatMessage;
|
|
@@ -56,7 +56,7 @@ function FieldSelectOptionsDTO(primitives) {
|
|
|
56
56
|
}
|
|
57
57
|
return options;
|
|
58
58
|
}
|
|
59
|
-
function ChatMessageDTO(primitive) {
|
|
59
|
+
export function ChatMessageDTO(primitive) {
|
|
60
60
|
const { when, content, user_defined_fields } = primitive;
|
|
61
61
|
const isRobot = content.who.type === "robot";
|
|
62
62
|
return {
|
|
@@ -28,6 +28,7 @@ export declare function eventTypeIsTyping(primitive: any): boolean;
|
|
|
28
28
|
export declare function typingIsOn(primitive: any): boolean;
|
|
29
29
|
export declare function chatInteractionIsCommand(primitive: any): boolean;
|
|
30
30
|
export declare function treatChatMessage(primitive: any): IChatMessage;
|
|
31
|
+
export declare function treatChatCallingEvent(primitive: any): IChatMessage;
|
|
31
32
|
export declare function chatMessageIsText(primitive: any): boolean;
|
|
32
33
|
export declare function chatMessageIsReadOnly(primitive: any): boolean;
|
|
33
34
|
export declare function chatMessageIsOption(primitive: any): boolean;
|
|
@@ -215,6 +215,9 @@ export function treatChatMessage(primitive) {
|
|
|
215
215
|
}
|
|
216
216
|
return ChatMessageTextDTO(primitive);
|
|
217
217
|
}
|
|
218
|
+
export function treatChatCallingEvent(primitive) {
|
|
219
|
+
return ChatMessageTextDTO(primitive);
|
|
220
|
+
}
|
|
218
221
|
export function chatMessageIsText(primitive) {
|
|
219
222
|
return primitive.content.message_type === "text";
|
|
220
223
|
}
|
|
@@ -259,8 +262,8 @@ export function newChatHistoryEvent({
|
|
|
259
262
|
name
|
|
260
263
|
}) {
|
|
261
264
|
const interaction = newChatInteraction({ company, roomID, nickname, name });
|
|
262
|
-
interaction.interaction_type = "
|
|
263
|
-
interaction.content.
|
|
265
|
+
interaction.interaction_type = "command";
|
|
266
|
+
interaction.content.command_type = "request_history";
|
|
264
267
|
return interaction;
|
|
265
268
|
}
|
|
266
269
|
export function newChatTextMessage({
|