@trii/types 2.10.386 → 2.10.388
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/Accounts/accounts.d.ts +88 -88
- package/dist/Accounts/accounts.js +21 -21
- package/dist/Accounts/device.d.ts +31 -31
- package/dist/Accounts/device.js +16 -16
- package/dist/Accounts/index.d.ts +2 -2
- package/dist/Accounts/index.js +2 -2
- package/dist/ApiResponses/index.d.ts +8 -8
- package/dist/ApiResponses/index.js +1 -1
- package/dist/AuditLogs/auditLog.d.ts +7 -7
- package/dist/AuditLogs/auditLog.js +1 -1
- package/dist/AuditLogs/auditLogType.d.ts +5 -5
- package/dist/AuditLogs/auditLogType.js +6 -6
- package/dist/AuditLogs/index.d.ts +2 -2
- package/dist/AuditLogs/index.js +2 -2
- package/dist/Calendar/Event.d.ts +63 -63
- package/dist/Calendar/Event.js +13 -13
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/Calls/Call.d.ts +55 -55
- package/dist/Calls/Call.js +22 -22
- package/dist/Calls/index.d.ts +1 -1
- package/dist/Calls/index.js +1 -1
- package/dist/Common/API/AuthApiKey.d.ts +5 -5
- package/dist/Common/API/AuthApiKey.js +1 -1
- package/dist/Common/API/AuthBasic.d.ts +4 -4
- package/dist/Common/API/AuthBasic.js +1 -1
- package/dist/Common/API/AuthBearer.d.ts +5 -5
- package/dist/Common/API/AuthBearer.js +1 -1
- package/dist/Common/API/AuthType.d.ts +6 -6
- package/dist/Common/API/AuthType.js +7 -7
- package/dist/Common/API/Method.d.ts +4 -4
- package/dist/Common/API/Method.js +5 -5
- package/dist/Common/API/index.d.ts +5 -5
- package/dist/Common/API/index.js +5 -5
- package/dist/Common/Channels/Channel.d.ts +47 -47
- package/dist/Common/Channels/Channel.js +1 -1
- package/dist/Common/Channels/ChannelType.d.ts +24 -24
- package/dist/Common/Channels/ChannelType.js +25 -25
- package/dist/Common/Channels/Email.d.ts +59 -59
- package/dist/Common/Channels/Email.js +30 -30
- package/dist/Common/Channels/Facebook.d.ts +23 -23
- package/dist/Common/Channels/Facebook.js +2 -2
- package/dist/Common/Channels/Form.d.ts +52 -52
- package/dist/Common/Channels/Form.js +25 -25
- package/dist/Common/Channels/GoogleBusiness.d.ts +20 -20
- package/dist/Common/Channels/GoogleBusiness.js +4 -4
- package/dist/Common/Channels/Instagram.d.ts +22 -22
- package/dist/Common/Channels/Instagram.js +2 -2
- package/dist/Common/Channels/MercadoLibre.d.ts +27 -27
- package/dist/Common/Channels/MercadoLibre.js +4 -4
- package/dist/Common/Channels/Pbx.d.ts +2 -2
- package/dist/Common/Channels/Pbx.js +2 -2
- package/dist/Common/Channels/Permission.d.ts +6 -6
- package/dist/Common/Channels/Permission.js +2 -2
- package/dist/Common/Channels/RCS.d.ts +33 -33
- package/dist/Common/Channels/RCS.js +4 -4
- package/dist/Common/Channels/Sip.d.ts +2 -2
- package/dist/Common/Channels/Sip.js +2 -2
- package/dist/Common/Channels/Sms.d.ts +42 -42
- package/dist/Common/Channels/Sms.js +12 -12
- package/dist/Common/Channels/WebChat.d.ts +60 -60
- package/dist/Common/Channels/WebChat.js +14 -14
- package/dist/Common/Channels/WhatsApp.d.ts +41 -41
- package/dist/Common/Channels/WhatsApp.js +10 -10
- package/dist/Common/Channels/index.d.ts +15 -15
- package/dist/Common/Channels/index.js +15 -15
- package/dist/Common/EventsQueue/EmailTemplate.d.ts +10 -10
- package/dist/Common/EventsQueue/EmailTemplate.js +1 -1
- package/dist/Common/EventsQueue/EventQueue.d.ts +12 -12
- package/dist/Common/EventsQueue/EventQueue.js +1 -1
- package/dist/Common/EventsQueue/UserUpdate.d.ts +8 -8
- package/dist/Common/EventsQueue/UserUpdate.js +1 -1
- package/dist/Common/EventsQueue/index.d.ts +3 -3
- package/dist/Common/EventsQueue/index.js +3 -3
- package/dist/Common/Logs/Log.d.ts +18 -18
- package/dist/Common/Logs/Log.js +10 -10
- package/dist/Common/Logs/index.d.ts +1 -1
- package/dist/Common/Logs/index.js +1 -1
- package/dist/Common/Messages/MediaFile.d.ts +5 -5
- package/dist/Common/Messages/MediaFile.js +1 -1
- package/dist/Common/Messages/Message.d.ts +359 -359
- package/dist/Common/Messages/Message.js +53 -53
- package/dist/Common/Messages/Template.d.ts +62 -62
- package/dist/Common/Messages/Template.js +20 -20
- package/dist/Common/Messages/index.d.ts +3 -3
- package/dist/Common/Messages/index.js +3 -3
- package/dist/Common/Notifications/Notification.d.ts +19 -19
- package/dist/Common/Notifications/Notification.js +7 -7
- package/dist/Common/Notifications/UserNotificationsConfig.d.ts +30 -30
- package/dist/Common/Notifications/UserNotificationsConfig.js +8 -8
- package/dist/Common/Notifications/index.d.ts +2 -2
- package/dist/Common/Notifications/index.js +2 -2
- package/dist/Common/Schedules/Schedules.d.ts +32 -32
- package/dist/Common/Schedules/Schedules.js +1 -1
- package/dist/Common/Schedules/index.d.ts +1 -1
- package/dist/Common/Schedules/index.js +1 -1
- package/dist/Common/index.d.ts +6 -6
- package/dist/Common/index.js +12 -12
- package/dist/Contacts/File.d.ts +17 -17
- package/dist/Contacts/File.js +1 -1
- package/dist/Contacts/Label.d.ts +9 -9
- package/dist/Contacts/Label.js +1 -1
- package/dist/Contacts/Note.d.ts +15 -15
- package/dist/Contacts/Note.js +1 -1
- package/dist/Contacts/contacts.d.ts +240 -240
- package/dist/Contacts/contacts.js +39 -39
- package/dist/Contacts/index.d.ts +5 -5
- package/dist/Contacts/index.js +5 -5
- package/dist/Contacts/segments.d.ts +51 -51
- package/dist/Contacts/segments.js +49 -49
- package/dist/Conversations/Conversation.d.ts +92 -92
- package/dist/Conversations/Conversation.js +44 -44
- package/dist/Conversations/DashBoard/dashboard.d.ts +84 -84
- package/dist/Conversations/DashBoard/dashboard.js +45 -45
- package/dist/Conversations/DashBoard/dashboardChannels.d.ts +5 -5
- package/dist/Conversations/DashBoard/dashboardChannels.js +2 -2
- package/dist/Conversations/DashBoard/dashboardForms.d.ts +44 -44
- package/dist/Conversations/DashBoard/dashboardForms.js +14 -14
- package/dist/Conversations/DashBoard/dashboardMessages.d.ts +13 -13
- package/dist/Conversations/DashBoard/dashboardMessages.js +4 -4
- package/dist/Conversations/Ending.d.ts +11 -11
- package/dist/Conversations/Ending.js +1 -1
- package/dist/Conversations/Flows/Flow.d.ts +104 -104
- package/dist/Conversations/Flows/Flow.js +36 -36
- package/dist/Conversations/Flows/Nodes/NodeApi.d.ts +20 -20
- package/dist/Conversations/Flows/Nodes/NodeApi.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeConditional.d.ts +21 -21
- package/dist/Conversations/Flows/Nodes/NodeConditional.js +16 -16
- package/dist/Conversations/Flows/Nodes/NodeContactSearch.d.ts +8 -8
- package/dist/Conversations/Flows/Nodes/NodeContactSearch.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeContactUpdate.d.ts +12 -12
- package/dist/Conversations/Flows/Nodes/NodeContactUpdate.js +7 -7
- package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.d.ts +6 -6
- package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.d.ts +4 -4
- package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.d.ts +15 -15
- package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.js +11 -11
- package/dist/Conversations/Flows/Nodes/NodeFillForm.d.ts +12 -12
- package/dist/Conversations/Flows/Nodes/NodeFillForm.js +4 -4
- package/dist/Conversations/Flows/Nodes/NodeFillTicket.d.ts +22 -22
- package/dist/Conversations/Flows/Nodes/NodeFillTicket.js +9 -9
- package/dist/Conversations/Flows/Nodes/NodeMsgText.d.ts +47 -47
- package/dist/Conversations/Flows/Nodes/NodeMsgText.js +27 -27
- package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.d.ts +45 -45
- package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.js +31 -31
- package/dist/Conversations/Flows/Nodes/NodeRedirect.d.ts +7 -7
- package/dist/Conversations/Flows/Nodes/NodeRedirect.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeSendEmail.d.ts +9 -9
- package/dist/Conversations/Flows/Nodes/NodeSendEmail.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeSqlQuery.d.ts +14 -14
- package/dist/Conversations/Flows/Nodes/NodeSqlQuery.js +8 -8
- package/dist/Conversations/Flows/Nodes/NodeStart.d.ts +32 -32
- package/dist/Conversations/Flows/Nodes/NodeStart.js +184 -184
- package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.d.ts +6 -6
- package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeTimeTimer.d.ts +9 -9
- package/dist/Conversations/Flows/Nodes/NodeTimeTimer.js +2 -2
- package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.d.ts +6 -6
- package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.js +2 -2
- package/dist/Conversations/Flows/Nodes/index.d.ts +18 -18
- package/dist/Conversations/Flows/Nodes/index.js +18 -18
- package/dist/Conversations/Flows/index.d.ts +2 -2
- package/dist/Conversations/Flows/index.js +3 -3
- package/dist/Conversations/Groups/Group.d.ts +23 -23
- package/dist/Conversations/Groups/Group.js +6 -6
- package/dist/Conversations/Label.d.ts +10 -10
- package/dist/Conversations/Label.js +1 -1
- package/dist/Conversations/QuickResponse.d.ts +34 -34
- package/dist/Conversations/QuickResponse.js +1 -1
- package/dist/Conversations/SocialWalls.d.ts +55 -55
- package/dist/Conversations/SocialWalls.js +1 -1
- package/dist/Conversations/WebHook.d.ts +22 -22
- package/dist/Conversations/WebHook.js +1 -1
- package/dist/Conversations/index.d.ts +12 -12
- package/dist/Conversations/index.js +14 -14
- package/dist/Marketing/Campaign.d.ts +50 -50
- package/dist/Marketing/Campaign.js +25 -25
- package/dist/Marketing/Dashboard.d.ts +48 -48
- package/dist/Marketing/Dashboard.js +1 -1
- package/dist/Marketing/index.d.ts +2 -2
- package/dist/Marketing/index.js +2 -2
- package/dist/PublicAPI/apiKey.d.ts +12 -12
- package/dist/PublicAPI/apiKey.js +1 -1
- package/dist/Security/Security.d.ts +5 -5
- package/dist/Security/Security.js +1 -1
- package/dist/Security/index.d.ts +1 -1
- package/dist/Security/index.js +1 -1
- package/dist/Spaces/Dashboard.d.ts +4 -4
- package/dist/Spaces/Dashboard.js +1 -1
- package/dist/Spaces/index.d.ts +2 -2
- package/dist/Spaces/index.js +2 -2
- package/dist/Spaces/spaces.d.ts +92 -92
- package/dist/Spaces/spaces.js +77 -77
- package/dist/Tickets/AccessLevel.d.ts +5 -5
- package/dist/Tickets/AccessLevel.js +6 -6
- package/dist/Tickets/index.d.ts +1 -1
- package/dist/Tickets/index.js +1 -1
- package/dist/Users/UserActivitySummary.d.ts +5 -5
- package/dist/Users/UserActivitySummary.js +1 -1
- package/dist/Users/UserProfile.d.ts +105 -105
- package/dist/Users/UserProfile.js +78 -78
- package/dist/Users/UserTrii.d.ts +94 -94
- package/dist/Users/UserTrii.js +15 -15
- package/dist/Users/UserType.d.ts +10 -10
- package/dist/Users/UserType.js +11 -11
- package/dist/Users/index.d.ts +4 -4
- package/dist/Users/index.js +4 -4
- package/dist/index.d.ts +14 -14
- package/dist/index.js +28 -28
- package/package.json +5 -2
- package/dist/Campaigns/Campaign.d.ts +0 -40
- package/dist/Campaigns/Campaign.js +0 -18
- package/dist/Campaigns/index.d.ts +0 -1
- package/dist/Campaigns/index.js +0 -1
|
@@ -1,359 +1,359 @@
|
|
|
1
|
-
import { IContactAddress } from "../../Contacts/contacts";
|
|
2
|
-
import { UserInfo } from "../../Users/UserTrii";
|
|
3
|
-
import { IChannelInfo } from "../Channels/Channel";
|
|
4
|
-
export interface IMessage {
|
|
5
|
-
id: string;
|
|
6
|
-
externalId?: string;
|
|
7
|
-
shardKey?: string;
|
|
8
|
-
/**only for Front-End */
|
|
9
|
-
idLocal?: number;
|
|
10
|
-
spaceId: string;
|
|
11
|
-
conversationId: string;
|
|
12
|
-
/**only for Front-End */
|
|
13
|
-
contactId?: string;
|
|
14
|
-
read?: boolean;
|
|
15
|
-
/**ISO8601 timestamp */
|
|
16
|
-
timestamp: Date;
|
|
17
|
-
userId: string;
|
|
18
|
-
channelInfo?: IChannelInfo;
|
|
19
|
-
/**
|
|
20
|
-
* ejemplos
|
|
21
|
-
* wa:5493584023801,
|
|
22
|
-
* email:info@trii.app,
|
|
23
|
-
* Fb:11111111111111111,
|
|
24
|
-
* Ig:22222222222222222,
|
|
25
|
-
* sms:3584023801
|
|
26
|
-
* */
|
|
27
|
-
from: string;
|
|
28
|
-
to: string;
|
|
29
|
-
remoteContactData?: MessageContactData;
|
|
30
|
-
direction: MessageDirection;
|
|
31
|
-
ack: MessageAck;
|
|
32
|
-
ackLogs: ackLog[];
|
|
33
|
-
forwarded: boolean;
|
|
34
|
-
remoteDeleted: boolean;
|
|
35
|
-
type: MessageType;
|
|
36
|
-
header?: MessageHeader;
|
|
37
|
-
footer?: string;
|
|
38
|
-
mentions: [];
|
|
39
|
-
context?: string;
|
|
40
|
-
text?: MessageText;
|
|
41
|
-
contacts?: MessageContact[];
|
|
42
|
-
audio: MessageAudio;
|
|
43
|
-
images?: MessageImage[];
|
|
44
|
-
videos?: MessageVideo[];
|
|
45
|
-
cdr?: MessageCdr;
|
|
46
|
-
locations?: MessageLocation[];
|
|
47
|
-
documents?: MessageDocument[];
|
|
48
|
-
stickers?: MessageSticker[];
|
|
49
|
-
info?: MessageInfo;
|
|
50
|
-
form?: MessageForm;
|
|
51
|
-
ticket?: MessageTicket;
|
|
52
|
-
email?: MessageEmail;
|
|
53
|
-
buttons?: MessageButton[];
|
|
54
|
-
poll?: MessagePoll;
|
|
55
|
-
reactions?: MessageReaction[];
|
|
56
|
-
messageReference?: MessageReference;
|
|
57
|
-
comment?: CommentData;
|
|
58
|
-
isLoaded: boolean;
|
|
59
|
-
isHighlighted: boolean;
|
|
60
|
-
deleted: boolean;
|
|
61
|
-
updatedAt?: Date;
|
|
62
|
-
updatedBy?: UserInfo;
|
|
63
|
-
}
|
|
64
|
-
export interface CommentData {
|
|
65
|
-
userId: string;
|
|
66
|
-
text: string;
|
|
67
|
-
timestamp: Date;
|
|
68
|
-
}
|
|
69
|
-
export interface MessageContactData {
|
|
70
|
-
address?: string;
|
|
71
|
-
name?: string;
|
|
72
|
-
imageUrl?: string;
|
|
73
|
-
}
|
|
74
|
-
export declare enum MessageDirection {
|
|
75
|
-
IN = 1,
|
|
76
|
-
OUT = 2
|
|
77
|
-
}
|
|
78
|
-
export declare enum MessageAck {
|
|
79
|
-
ACK_QUEUE = -2,
|
|
80
|
-
ACK_PENDING = -1,
|
|
81
|
-
ACK_NONE = 0,
|
|
82
|
-
ACK_ERROR = 1,
|
|
83
|
-
ACK_SERVER = 2,
|
|
84
|
-
ACK_DEVICE = 3,
|
|
85
|
-
ACK_READ = 4,
|
|
86
|
-
ACK_PLAYED = 5
|
|
87
|
-
}
|
|
88
|
-
export interface ackLog {
|
|
89
|
-
ack: MessageAck;
|
|
90
|
-
timestamp: Date;
|
|
91
|
-
errorMessage: string;
|
|
92
|
-
userId?: string;
|
|
93
|
-
}
|
|
94
|
-
export declare enum MessageType {
|
|
95
|
-
CHAT = 1,
|
|
96
|
-
CHAT_EXTERNAL = 2,
|
|
97
|
-
NOTE = 3,
|
|
98
|
-
CDR_PBX = 4,
|
|
99
|
-
CALL = 5,
|
|
100
|
-
COMMENT = 6,
|
|
101
|
-
INFO = 7,
|
|
102
|
-
NOTIFICATION_NEW_CONVERSATION = 12,
|
|
103
|
-
N2B = 13
|
|
104
|
-
}
|
|
105
|
-
export
|
|
106
|
-
export interface MessageHeader {
|
|
107
|
-
type: MessageHeaderType;
|
|
108
|
-
text: string;
|
|
109
|
-
url: string;
|
|
110
|
-
mimeType: string;
|
|
111
|
-
filename: string;
|
|
112
|
-
locationName: string;
|
|
113
|
-
locationAddress: string;
|
|
114
|
-
}
|
|
115
|
-
export declare enum MessageHeaderType {
|
|
116
|
-
TEXT = 0,
|
|
117
|
-
IMAGE = 1,
|
|
118
|
-
VIDEO = 2,
|
|
119
|
-
FILE = 3,
|
|
120
|
-
LOCATION = 4
|
|
121
|
-
}
|
|
122
|
-
export interface MessageText {
|
|
123
|
-
previewUrl: boolean;
|
|
124
|
-
body: string;
|
|
125
|
-
}
|
|
126
|
-
export interface MessageAudio {
|
|
127
|
-
/** para uso en front */
|
|
128
|
-
id: string | '';
|
|
129
|
-
/** para uso en front */
|
|
130
|
-
filename: string | '';
|
|
131
|
-
/**The mime type for the video audio. */
|
|
132
|
-
mimeType: string;
|
|
133
|
-
/**The url of the audio. */
|
|
134
|
-
url: string;
|
|
135
|
-
mediaid?: string;
|
|
136
|
-
}
|
|
137
|
-
export interface MessageImage {
|
|
138
|
-
/** para uso en front */
|
|
139
|
-
id: string | '';
|
|
140
|
-
/** para uso en front */
|
|
141
|
-
filename: string | '';
|
|
142
|
-
/**image/webp */
|
|
143
|
-
mimeType: string;
|
|
144
|
-
/**The url of the image. */
|
|
145
|
-
url: string;
|
|
146
|
-
caption: string;
|
|
147
|
-
mediaid?: string;
|
|
148
|
-
}
|
|
149
|
-
export interface MessageVideo {
|
|
150
|
-
id: string;
|
|
151
|
-
animated?: boolean;
|
|
152
|
-
/**The name for the file on the sender's device. */
|
|
153
|
-
filename: string | '';
|
|
154
|
-
/**image/webp */
|
|
155
|
-
mimeType: string;
|
|
156
|
-
/**The url of the video. */
|
|
157
|
-
url: string;
|
|
158
|
-
caption: string;
|
|
159
|
-
mediaid?: string;
|
|
160
|
-
}
|
|
161
|
-
export interface MessageCdr {
|
|
162
|
-
callerId: string;
|
|
163
|
-
trunk: string;
|
|
164
|
-
ringTime: number;
|
|
165
|
-
connectedTime: number;
|
|
166
|
-
totalTime: number;
|
|
167
|
-
calls: MessageCdrCall[];
|
|
168
|
-
}
|
|
169
|
-
export interface MessageCdrCall {
|
|
170
|
-
extension: string;
|
|
171
|
-
ringTime: number;
|
|
172
|
-
connectedTime: number;
|
|
173
|
-
status: MessageCdrCallStatus;
|
|
174
|
-
audioUrl: string;
|
|
175
|
-
}
|
|
176
|
-
export declare enum MessageCdrCallStatus {
|
|
177
|
-
ANSWERED = 1,
|
|
178
|
-
UNANSWERED = 2,
|
|
179
|
-
LOST = 3
|
|
180
|
-
}
|
|
181
|
-
export interface MessageLocation {
|
|
182
|
-
lat: string;
|
|
183
|
-
lng: string;
|
|
184
|
-
title: string;
|
|
185
|
-
description: string;
|
|
186
|
-
url: string;
|
|
187
|
-
}
|
|
188
|
-
export interface MessageDocument {
|
|
189
|
-
id: string;
|
|
190
|
-
/**The name for the file*/
|
|
191
|
-
filename: string | '';
|
|
192
|
-
/** mimetype o the file */
|
|
193
|
-
mimeType: string;
|
|
194
|
-
caption: string;
|
|
195
|
-
/**The url of the fie. */
|
|
196
|
-
url: string;
|
|
197
|
-
mediaid?: string;
|
|
198
|
-
}
|
|
199
|
-
export interface MessageReference {
|
|
200
|
-
messageId: string;
|
|
201
|
-
channelId: string;
|
|
202
|
-
externalId?: string;
|
|
203
|
-
}
|
|
204
|
-
export interface MessageReaction {
|
|
205
|
-
userId: string;
|
|
206
|
-
timestamp: Date;
|
|
207
|
-
emoji?: string;
|
|
208
|
-
}
|
|
209
|
-
export interface MessageEmail {
|
|
210
|
-
/**Cuenta de correo electrónico asociado a Trii */
|
|
211
|
-
emailAccount: string;
|
|
212
|
-
/**Remitente del correo */
|
|
213
|
-
from: string;
|
|
214
|
-
/**Lista de destinatarios (puede ser uno o varios) */
|
|
215
|
-
to: IContactAddress[];
|
|
216
|
-
/**Lista de destinatarios en copia (opcional) */
|
|
217
|
-
cc?: IContactAddress[];
|
|
218
|
-
/**Lista de destinatarios en copia oculta (opcional) */
|
|
219
|
-
bcc?: IContactAddress[];
|
|
220
|
-
/**Asunto del correo */
|
|
221
|
-
subject: string;
|
|
222
|
-
preHeader: string;
|
|
223
|
-
/**Cuerpo del correo */
|
|
224
|
-
bodyHtml: string;
|
|
225
|
-
bodyText: string;
|
|
226
|
-
/**Lista de archivos adjuntos (opcional) */
|
|
227
|
-
attachments?: EmailDocument[];
|
|
228
|
-
/**Marca de tiempo del correo */
|
|
229
|
-
timestamp: Date;
|
|
230
|
-
/**Encabezados del correo (p. ej., {"Reply-To": "reply@example.com"}) */
|
|
231
|
-
headers?: Record<string, string>;
|
|
232
|
-
/**Indicador de si el correo se considera spam (opcional) */
|
|
233
|
-
isSpam?: boolean;
|
|
234
|
-
/**Puntuación de spam (opcional) */
|
|
235
|
-
spamScore?: number;
|
|
236
|
-
}
|
|
237
|
-
export interface EmailDocument {
|
|
238
|
-
id: string;
|
|
239
|
-
/**The name for the file*/
|
|
240
|
-
filename: string | '';
|
|
241
|
-
/** mimetype o the file */
|
|
242
|
-
mimeType: string;
|
|
243
|
-
/**The url of the fie. */
|
|
244
|
-
url: string;
|
|
245
|
-
isInline: boolean;
|
|
246
|
-
}
|
|
247
|
-
export interface MessageSticker {
|
|
248
|
-
/**The ID for the video. */
|
|
249
|
-
id: string;
|
|
250
|
-
/**The caption for the video, if provided. */
|
|
251
|
-
caption: string | '';
|
|
252
|
-
/**The name for the file on the sender's device. */
|
|
253
|
-
filename: string | '';
|
|
254
|
-
/**The mime type for the video file. */
|
|
255
|
-
mimeType: string;
|
|
256
|
-
/**The url of the video. */
|
|
257
|
-
url: string;
|
|
258
|
-
animated: boolean;
|
|
259
|
-
mediaid?: string;
|
|
260
|
-
}
|
|
261
|
-
export interface MessageInfo {
|
|
262
|
-
code: string;
|
|
263
|
-
data: MessageInfoVar;
|
|
264
|
-
}
|
|
265
|
-
export interface MessageInfoVar {
|
|
266
|
-
id?: string;
|
|
267
|
-
contactId?: string;
|
|
268
|
-
contactName?: string;
|
|
269
|
-
userId?: string;
|
|
270
|
-
userName?: string;
|
|
271
|
-
transferTo?: string;
|
|
272
|
-
transferToName?: string;
|
|
273
|
-
reassignedTo?: string;
|
|
274
|
-
reassignedToName?: string;
|
|
275
|
-
groupName?: string;
|
|
276
|
-
}
|
|
277
|
-
export interface MessageTicket {
|
|
278
|
-
}
|
|
279
|
-
export interface MessageForm {
|
|
280
|
-
url: string;
|
|
281
|
-
title?: string;
|
|
282
|
-
subTitle?: string;
|
|
283
|
-
color?: string;
|
|
284
|
-
status: MessageFormStatus;
|
|
285
|
-
responses?: MessageFormResponse[];
|
|
286
|
-
expireAt?: Date;
|
|
287
|
-
completedAt?: Date;
|
|
288
|
-
}
|
|
289
|
-
export interface MessageButton {
|
|
290
|
-
text: string;
|
|
291
|
-
url: string;
|
|
292
|
-
payload: string;
|
|
293
|
-
type: MessageButtonType;
|
|
294
|
-
}
|
|
295
|
-
export declare enum MessageButtonType {
|
|
296
|
-
TEXT = 0,
|
|
297
|
-
URL = 1
|
|
298
|
-
}
|
|
299
|
-
export interface MessageFormResponse {
|
|
300
|
-
question: string;
|
|
301
|
-
response: string;
|
|
302
|
-
}
|
|
303
|
-
export declare enum MessageFormStatus {
|
|
304
|
-
pending = 0,
|
|
305
|
-
completed = 1,
|
|
306
|
-
expired = 2
|
|
307
|
-
}
|
|
308
|
-
export interface MessagePoll {
|
|
309
|
-
pollName: string;
|
|
310
|
-
pollOptions: MessagePollOption[];
|
|
311
|
-
pollSelectableOptionsCount: number;
|
|
312
|
-
pollInvalidated: boolean;
|
|
313
|
-
}
|
|
314
|
-
export interface MessagePollOption {
|
|
315
|
-
name: string;
|
|
316
|
-
localId: string;
|
|
317
|
-
}
|
|
318
|
-
export interface MessageContact {
|
|
319
|
-
name: MessageContactName;
|
|
320
|
-
profileUrl?: string;
|
|
321
|
-
birthday?: string;
|
|
322
|
-
org?: MessageContactOrg;
|
|
323
|
-
phones?: MessageContactPhone[];
|
|
324
|
-
emails?: MessageContactEmail[];
|
|
325
|
-
addresses?: MessageContactAddress[];
|
|
326
|
-
}
|
|
327
|
-
export interface MessageContactAddress {
|
|
328
|
-
street: string;
|
|
329
|
-
city: string;
|
|
330
|
-
state: string;
|
|
331
|
-
zip: string;
|
|
332
|
-
country: string;
|
|
333
|
-
countryCode: string;
|
|
334
|
-
type: string;
|
|
335
|
-
urls: [];
|
|
336
|
-
}
|
|
337
|
-
export interface MessageContactEmail {
|
|
338
|
-
email: string;
|
|
339
|
-
type: string;
|
|
340
|
-
}
|
|
341
|
-
export interface MessageContactName {
|
|
342
|
-
formattedName: string;
|
|
343
|
-
firstName?: string;
|
|
344
|
-
lastName?: string;
|
|
345
|
-
middleName?: string;
|
|
346
|
-
}
|
|
347
|
-
export interface MessageContactOrg {
|
|
348
|
-
company: string;
|
|
349
|
-
department: string;
|
|
350
|
-
title: string;
|
|
351
|
-
}
|
|
352
|
-
export interface MessageContactPhone {
|
|
353
|
-
phone: string;
|
|
354
|
-
type: string;
|
|
355
|
-
}
|
|
356
|
-
export interface MessageContactUrl {
|
|
357
|
-
url: string;
|
|
358
|
-
type: string;
|
|
359
|
-
}
|
|
1
|
+
import { IContactAddress } from "../../Contacts/contacts";
|
|
2
|
+
import { UserInfo } from "../../Users/UserTrii";
|
|
3
|
+
import { IChannelInfo } from "../Channels/Channel";
|
|
4
|
+
export interface IMessage {
|
|
5
|
+
id: string;
|
|
6
|
+
externalId?: string;
|
|
7
|
+
shardKey?: string;
|
|
8
|
+
/**only for Front-End */
|
|
9
|
+
idLocal?: number;
|
|
10
|
+
spaceId: string;
|
|
11
|
+
conversationId: string;
|
|
12
|
+
/**only for Front-End */
|
|
13
|
+
contactId?: string;
|
|
14
|
+
read?: boolean;
|
|
15
|
+
/**ISO8601 timestamp */
|
|
16
|
+
timestamp: Date;
|
|
17
|
+
userId: string;
|
|
18
|
+
channelInfo?: IChannelInfo;
|
|
19
|
+
/**
|
|
20
|
+
* ejemplos
|
|
21
|
+
* wa:5493584023801,
|
|
22
|
+
* email:info@trii.app,
|
|
23
|
+
* Fb:11111111111111111,
|
|
24
|
+
* Ig:22222222222222222,
|
|
25
|
+
* sms:3584023801
|
|
26
|
+
* */
|
|
27
|
+
from: string;
|
|
28
|
+
to: string;
|
|
29
|
+
remoteContactData?: MessageContactData;
|
|
30
|
+
direction: MessageDirection;
|
|
31
|
+
ack: MessageAck;
|
|
32
|
+
ackLogs: ackLog[];
|
|
33
|
+
forwarded: boolean;
|
|
34
|
+
remoteDeleted: boolean;
|
|
35
|
+
type: MessageType;
|
|
36
|
+
header?: MessageHeader;
|
|
37
|
+
footer?: string;
|
|
38
|
+
mentions: [];
|
|
39
|
+
context?: string;
|
|
40
|
+
text?: MessageText;
|
|
41
|
+
contacts?: MessageContact[];
|
|
42
|
+
audio: MessageAudio;
|
|
43
|
+
images?: MessageImage[];
|
|
44
|
+
videos?: MessageVideo[];
|
|
45
|
+
cdr?: MessageCdr;
|
|
46
|
+
locations?: MessageLocation[];
|
|
47
|
+
documents?: MessageDocument[];
|
|
48
|
+
stickers?: MessageSticker[];
|
|
49
|
+
info?: MessageInfo;
|
|
50
|
+
form?: MessageForm;
|
|
51
|
+
ticket?: MessageTicket;
|
|
52
|
+
email?: MessageEmail;
|
|
53
|
+
buttons?: MessageButton[];
|
|
54
|
+
poll?: MessagePoll;
|
|
55
|
+
reactions?: MessageReaction[];
|
|
56
|
+
messageReference?: MessageReference;
|
|
57
|
+
comment?: CommentData;
|
|
58
|
+
isLoaded: boolean;
|
|
59
|
+
isHighlighted: boolean;
|
|
60
|
+
deleted: boolean;
|
|
61
|
+
updatedAt?: Date;
|
|
62
|
+
updatedBy?: UserInfo;
|
|
63
|
+
}
|
|
64
|
+
export interface CommentData {
|
|
65
|
+
userId: string;
|
|
66
|
+
text: string;
|
|
67
|
+
timestamp: Date;
|
|
68
|
+
}
|
|
69
|
+
export interface MessageContactData {
|
|
70
|
+
address?: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
imageUrl?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare enum MessageDirection {
|
|
75
|
+
IN = 1,
|
|
76
|
+
OUT = 2
|
|
77
|
+
}
|
|
78
|
+
export declare enum MessageAck {
|
|
79
|
+
ACK_QUEUE = -2,
|
|
80
|
+
ACK_PENDING = -1,
|
|
81
|
+
ACK_NONE = 0,
|
|
82
|
+
ACK_ERROR = 1,
|
|
83
|
+
ACK_SERVER = 2,
|
|
84
|
+
ACK_DEVICE = 3,
|
|
85
|
+
ACK_READ = 4,
|
|
86
|
+
ACK_PLAYED = 5
|
|
87
|
+
}
|
|
88
|
+
export interface ackLog {
|
|
89
|
+
ack: MessageAck;
|
|
90
|
+
timestamp: Date;
|
|
91
|
+
errorMessage: string;
|
|
92
|
+
userId?: string;
|
|
93
|
+
}
|
|
94
|
+
export declare enum MessageType {
|
|
95
|
+
CHAT = 1,
|
|
96
|
+
CHAT_EXTERNAL = 2,
|
|
97
|
+
NOTE = 3,
|
|
98
|
+
CDR_PBX = 4,
|
|
99
|
+
CALL = 5,
|
|
100
|
+
COMMENT = 6,
|
|
101
|
+
INFO = 7,
|
|
102
|
+
NOTIFICATION_NEW_CONVERSATION = 12,
|
|
103
|
+
N2B = 13
|
|
104
|
+
}
|
|
105
|
+
export type MessageType2 = 'audio' | 'button' | 'contact' | 'document' | 'image' | 'location' | 'sticker' | 'text' | 'video' | 'interactive';
|
|
106
|
+
export interface MessageHeader {
|
|
107
|
+
type: MessageHeaderType;
|
|
108
|
+
text: string;
|
|
109
|
+
url: string;
|
|
110
|
+
mimeType: string;
|
|
111
|
+
filename: string;
|
|
112
|
+
locationName: string;
|
|
113
|
+
locationAddress: string;
|
|
114
|
+
}
|
|
115
|
+
export declare enum MessageHeaderType {
|
|
116
|
+
TEXT = 0,
|
|
117
|
+
IMAGE = 1,
|
|
118
|
+
VIDEO = 2,
|
|
119
|
+
FILE = 3,
|
|
120
|
+
LOCATION = 4
|
|
121
|
+
}
|
|
122
|
+
export interface MessageText {
|
|
123
|
+
previewUrl: boolean;
|
|
124
|
+
body: string;
|
|
125
|
+
}
|
|
126
|
+
export interface MessageAudio {
|
|
127
|
+
/** para uso en front */
|
|
128
|
+
id: string | '';
|
|
129
|
+
/** para uso en front */
|
|
130
|
+
filename: string | '';
|
|
131
|
+
/**The mime type for the video audio. */
|
|
132
|
+
mimeType: string;
|
|
133
|
+
/**The url of the audio. */
|
|
134
|
+
url: string;
|
|
135
|
+
mediaid?: string;
|
|
136
|
+
}
|
|
137
|
+
export interface MessageImage {
|
|
138
|
+
/** para uso en front */
|
|
139
|
+
id: string | '';
|
|
140
|
+
/** para uso en front */
|
|
141
|
+
filename: string | '';
|
|
142
|
+
/**image/webp */
|
|
143
|
+
mimeType: string;
|
|
144
|
+
/**The url of the image. */
|
|
145
|
+
url: string;
|
|
146
|
+
caption: string;
|
|
147
|
+
mediaid?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface MessageVideo {
|
|
150
|
+
id: string;
|
|
151
|
+
animated?: boolean;
|
|
152
|
+
/**The name for the file on the sender's device. */
|
|
153
|
+
filename: string | '';
|
|
154
|
+
/**image/webp */
|
|
155
|
+
mimeType: string;
|
|
156
|
+
/**The url of the video. */
|
|
157
|
+
url: string;
|
|
158
|
+
caption: string;
|
|
159
|
+
mediaid?: string;
|
|
160
|
+
}
|
|
161
|
+
export interface MessageCdr {
|
|
162
|
+
callerId: string;
|
|
163
|
+
trunk: string;
|
|
164
|
+
ringTime: number;
|
|
165
|
+
connectedTime: number;
|
|
166
|
+
totalTime: number;
|
|
167
|
+
calls: MessageCdrCall[];
|
|
168
|
+
}
|
|
169
|
+
export interface MessageCdrCall {
|
|
170
|
+
extension: string;
|
|
171
|
+
ringTime: number;
|
|
172
|
+
connectedTime: number;
|
|
173
|
+
status: MessageCdrCallStatus;
|
|
174
|
+
audioUrl: string;
|
|
175
|
+
}
|
|
176
|
+
export declare enum MessageCdrCallStatus {
|
|
177
|
+
ANSWERED = 1,
|
|
178
|
+
UNANSWERED = 2,
|
|
179
|
+
LOST = 3
|
|
180
|
+
}
|
|
181
|
+
export interface MessageLocation {
|
|
182
|
+
lat: string;
|
|
183
|
+
lng: string;
|
|
184
|
+
title: string;
|
|
185
|
+
description: string;
|
|
186
|
+
url: string;
|
|
187
|
+
}
|
|
188
|
+
export interface MessageDocument {
|
|
189
|
+
id: string;
|
|
190
|
+
/**The name for the file*/
|
|
191
|
+
filename: string | '';
|
|
192
|
+
/** mimetype o the file */
|
|
193
|
+
mimeType: string;
|
|
194
|
+
caption: string;
|
|
195
|
+
/**The url of the fie. */
|
|
196
|
+
url: string;
|
|
197
|
+
mediaid?: string;
|
|
198
|
+
}
|
|
199
|
+
export interface MessageReference {
|
|
200
|
+
messageId: string;
|
|
201
|
+
channelId: string;
|
|
202
|
+
externalId?: string;
|
|
203
|
+
}
|
|
204
|
+
export interface MessageReaction {
|
|
205
|
+
userId: string;
|
|
206
|
+
timestamp: Date;
|
|
207
|
+
emoji?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface MessageEmail {
|
|
210
|
+
/**Cuenta de correo electrónico asociado a Trii */
|
|
211
|
+
emailAccount: string;
|
|
212
|
+
/**Remitente del correo */
|
|
213
|
+
from: string;
|
|
214
|
+
/**Lista de destinatarios (puede ser uno o varios) */
|
|
215
|
+
to: IContactAddress[];
|
|
216
|
+
/**Lista de destinatarios en copia (opcional) */
|
|
217
|
+
cc?: IContactAddress[];
|
|
218
|
+
/**Lista de destinatarios en copia oculta (opcional) */
|
|
219
|
+
bcc?: IContactAddress[];
|
|
220
|
+
/**Asunto del correo */
|
|
221
|
+
subject: string;
|
|
222
|
+
preHeader: string;
|
|
223
|
+
/**Cuerpo del correo */
|
|
224
|
+
bodyHtml: string;
|
|
225
|
+
bodyText: string;
|
|
226
|
+
/**Lista de archivos adjuntos (opcional) */
|
|
227
|
+
attachments?: EmailDocument[];
|
|
228
|
+
/**Marca de tiempo del correo */
|
|
229
|
+
timestamp: Date;
|
|
230
|
+
/**Encabezados del correo (p. ej., {"Reply-To": "reply@example.com"}) */
|
|
231
|
+
headers?: Record<string, string>;
|
|
232
|
+
/**Indicador de si el correo se considera spam (opcional) */
|
|
233
|
+
isSpam?: boolean;
|
|
234
|
+
/**Puntuación de spam (opcional) */
|
|
235
|
+
spamScore?: number;
|
|
236
|
+
}
|
|
237
|
+
export interface EmailDocument {
|
|
238
|
+
id: string;
|
|
239
|
+
/**The name for the file*/
|
|
240
|
+
filename: string | '';
|
|
241
|
+
/** mimetype o the file */
|
|
242
|
+
mimeType: string;
|
|
243
|
+
/**The url of the fie. */
|
|
244
|
+
url: string;
|
|
245
|
+
isInline: boolean;
|
|
246
|
+
}
|
|
247
|
+
export interface MessageSticker {
|
|
248
|
+
/**The ID for the video. */
|
|
249
|
+
id: string;
|
|
250
|
+
/**The caption for the video, if provided. */
|
|
251
|
+
caption: string | '';
|
|
252
|
+
/**The name for the file on the sender's device. */
|
|
253
|
+
filename: string | '';
|
|
254
|
+
/**The mime type for the video file. */
|
|
255
|
+
mimeType: string;
|
|
256
|
+
/**The url of the video. */
|
|
257
|
+
url: string;
|
|
258
|
+
animated: boolean;
|
|
259
|
+
mediaid?: string;
|
|
260
|
+
}
|
|
261
|
+
export interface MessageInfo {
|
|
262
|
+
code: string;
|
|
263
|
+
data: MessageInfoVar;
|
|
264
|
+
}
|
|
265
|
+
export interface MessageInfoVar {
|
|
266
|
+
id?: string;
|
|
267
|
+
contactId?: string;
|
|
268
|
+
contactName?: string;
|
|
269
|
+
userId?: string;
|
|
270
|
+
userName?: string;
|
|
271
|
+
transferTo?: string;
|
|
272
|
+
transferToName?: string;
|
|
273
|
+
reassignedTo?: string;
|
|
274
|
+
reassignedToName?: string;
|
|
275
|
+
groupName?: string;
|
|
276
|
+
}
|
|
277
|
+
export interface MessageTicket {
|
|
278
|
+
}
|
|
279
|
+
export interface MessageForm {
|
|
280
|
+
url: string;
|
|
281
|
+
title?: string;
|
|
282
|
+
subTitle?: string;
|
|
283
|
+
color?: string;
|
|
284
|
+
status: MessageFormStatus;
|
|
285
|
+
responses?: MessageFormResponse[];
|
|
286
|
+
expireAt?: Date;
|
|
287
|
+
completedAt?: Date;
|
|
288
|
+
}
|
|
289
|
+
export interface MessageButton {
|
|
290
|
+
text: string;
|
|
291
|
+
url: string;
|
|
292
|
+
payload: string;
|
|
293
|
+
type: MessageButtonType;
|
|
294
|
+
}
|
|
295
|
+
export declare enum MessageButtonType {
|
|
296
|
+
TEXT = 0,
|
|
297
|
+
URL = 1
|
|
298
|
+
}
|
|
299
|
+
export interface MessageFormResponse {
|
|
300
|
+
question: string;
|
|
301
|
+
response: string;
|
|
302
|
+
}
|
|
303
|
+
export declare enum MessageFormStatus {
|
|
304
|
+
pending = 0,
|
|
305
|
+
completed = 1,
|
|
306
|
+
expired = 2
|
|
307
|
+
}
|
|
308
|
+
export interface MessagePoll {
|
|
309
|
+
pollName: string;
|
|
310
|
+
pollOptions: MessagePollOption[];
|
|
311
|
+
pollSelectableOptionsCount: number;
|
|
312
|
+
pollInvalidated: boolean;
|
|
313
|
+
}
|
|
314
|
+
export interface MessagePollOption {
|
|
315
|
+
name: string;
|
|
316
|
+
localId: string;
|
|
317
|
+
}
|
|
318
|
+
export interface MessageContact {
|
|
319
|
+
name: MessageContactName;
|
|
320
|
+
profileUrl?: string;
|
|
321
|
+
birthday?: string;
|
|
322
|
+
org?: MessageContactOrg;
|
|
323
|
+
phones?: MessageContactPhone[];
|
|
324
|
+
emails?: MessageContactEmail[];
|
|
325
|
+
addresses?: MessageContactAddress[];
|
|
326
|
+
}
|
|
327
|
+
export interface MessageContactAddress {
|
|
328
|
+
street: string;
|
|
329
|
+
city: string;
|
|
330
|
+
state: string;
|
|
331
|
+
zip: string;
|
|
332
|
+
country: string;
|
|
333
|
+
countryCode: string;
|
|
334
|
+
type: string;
|
|
335
|
+
urls: [];
|
|
336
|
+
}
|
|
337
|
+
export interface MessageContactEmail {
|
|
338
|
+
email: string;
|
|
339
|
+
type: string;
|
|
340
|
+
}
|
|
341
|
+
export interface MessageContactName {
|
|
342
|
+
formattedName: string;
|
|
343
|
+
firstName?: string;
|
|
344
|
+
lastName?: string;
|
|
345
|
+
middleName?: string;
|
|
346
|
+
}
|
|
347
|
+
export interface MessageContactOrg {
|
|
348
|
+
company: string;
|
|
349
|
+
department: string;
|
|
350
|
+
title: string;
|
|
351
|
+
}
|
|
352
|
+
export interface MessageContactPhone {
|
|
353
|
+
phone: string;
|
|
354
|
+
type: string;
|
|
355
|
+
}
|
|
356
|
+
export interface MessageContactUrl {
|
|
357
|
+
url: string;
|
|
358
|
+
type: string;
|
|
359
|
+
}
|