@trii/types 2.10.417 → 2.10.419
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.
|
@@ -41,7 +41,22 @@ interface IChannel {
|
|
|
41
41
|
googleBusiness?: GoogleBusinessConfig | null;
|
|
42
42
|
rcsBusiness?: RCSConfig | null;
|
|
43
43
|
createdAt?: string | null;
|
|
44
|
+
createdBy?: string | null;
|
|
44
45
|
updatedAt?: string | null;
|
|
45
46
|
deletedAt?: string | null;
|
|
47
|
+
statusCode: channelStatus | channelStatus.UNKNOWN;
|
|
48
|
+
statusDetails: string | '';
|
|
49
|
+
statusUpdateAt?: Date | null;
|
|
46
50
|
}
|
|
47
|
-
|
|
51
|
+
declare enum channelStatus {
|
|
52
|
+
UNKNOWN = 0,
|
|
53
|
+
ACTIVE = 1,
|
|
54
|
+
INACTIVE = 2,
|
|
55
|
+
DELETED = 3,
|
|
56
|
+
ERROR = 4,
|
|
57
|
+
PROVISIONING = 5,
|
|
58
|
+
DEPROVISIONING = 6,
|
|
59
|
+
SUSPENDED = 7,
|
|
60
|
+
CONFIGURATION_PENDING = 9
|
|
61
|
+
}
|
|
62
|
+
export { IChannel, IChannelInfo, channelStatus };
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
var channelStatus;
|
|
2
|
+
(function (channelStatus) {
|
|
3
|
+
channelStatus[channelStatus["UNKNOWN"] = 0] = "UNKNOWN";
|
|
4
|
+
channelStatus[channelStatus["ACTIVE"] = 1] = "ACTIVE";
|
|
5
|
+
channelStatus[channelStatus["INACTIVE"] = 2] = "INACTIVE";
|
|
6
|
+
channelStatus[channelStatus["DELETED"] = 3] = "DELETED";
|
|
7
|
+
channelStatus[channelStatus["ERROR"] = 4] = "ERROR";
|
|
8
|
+
channelStatus[channelStatus["PROVISIONING"] = 5] = "PROVISIONING";
|
|
9
|
+
channelStatus[channelStatus["DEPROVISIONING"] = 6] = "DEPROVISIONING";
|
|
10
|
+
channelStatus[channelStatus["SUSPENDED"] = 7] = "SUSPENDED";
|
|
11
|
+
channelStatus[channelStatus["CONFIGURATION_PENDING"] = 9] = "CONFIGURATION_PENDING";
|
|
12
|
+
})(channelStatus || (channelStatus = {}));
|
|
13
|
+
export { channelStatus };
|
|
@@ -1,67 +1,6 @@
|
|
|
1
1
|
import { IContactAddress } from "../../Contacts/contacts";
|
|
2
2
|
import { UserInfo } from "../../Users/UserTrii";
|
|
3
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
|
-
note?: MessageNote;
|
|
56
|
-
reactions?: MessageReaction[];
|
|
57
|
-
messageReference?: MessageReference;
|
|
58
|
-
comment?: CommentData;
|
|
59
|
-
isLoaded: boolean;
|
|
60
|
-
isHighlighted: boolean;
|
|
61
|
-
deleted: boolean;
|
|
62
|
-
updatedAt?: Date;
|
|
63
|
-
updatedBy?: UserInfo;
|
|
64
|
-
}
|
|
65
4
|
export interface CommentData {
|
|
66
5
|
userId: string;
|
|
67
6
|
text: string;
|
|
@@ -362,3 +301,64 @@ export interface MessageContactUrl {
|
|
|
362
301
|
url: string;
|
|
363
302
|
type: string;
|
|
364
303
|
}
|
|
304
|
+
export interface IMessage {
|
|
305
|
+
id: string;
|
|
306
|
+
externalId?: string;
|
|
307
|
+
shardKey?: string;
|
|
308
|
+
/**only for Front-End */
|
|
309
|
+
idLocal?: number;
|
|
310
|
+
spaceId: string;
|
|
311
|
+
conversationId: string;
|
|
312
|
+
/**only for Front-End */
|
|
313
|
+
contactId?: string;
|
|
314
|
+
read?: boolean;
|
|
315
|
+
/**ISO8601 timestamp */
|
|
316
|
+
timestamp: Date;
|
|
317
|
+
userId: string;
|
|
318
|
+
channelInfo?: IChannelInfo;
|
|
319
|
+
/**
|
|
320
|
+
* ejemplos
|
|
321
|
+
* wa:5493584023801,
|
|
322
|
+
* email:info@trii.app,
|
|
323
|
+
* Fb:11111111111111111,
|
|
324
|
+
* Ig:22222222222222222,
|
|
325
|
+
* sms:3584023801
|
|
326
|
+
* */
|
|
327
|
+
from: string;
|
|
328
|
+
to: string;
|
|
329
|
+
remoteContactData?: MessageContactData;
|
|
330
|
+
direction: MessageDirection;
|
|
331
|
+
ack: MessageAck;
|
|
332
|
+
ackLogs: ackLog[];
|
|
333
|
+
forwarded: boolean;
|
|
334
|
+
remoteDeleted: boolean;
|
|
335
|
+
type: MessageType;
|
|
336
|
+
header?: MessageHeader;
|
|
337
|
+
footer?: string;
|
|
338
|
+
mentions: [];
|
|
339
|
+
context?: string;
|
|
340
|
+
text?: MessageText;
|
|
341
|
+
contacts?: MessageContact[];
|
|
342
|
+
audio: MessageAudio;
|
|
343
|
+
images?: MessageImage[];
|
|
344
|
+
videos?: MessageVideo[];
|
|
345
|
+
cdr?: MessageCdr;
|
|
346
|
+
locations?: MessageLocation[];
|
|
347
|
+
documents?: MessageDocument[];
|
|
348
|
+
stickers?: MessageSticker[];
|
|
349
|
+
info?: MessageInfo;
|
|
350
|
+
form?: MessageForm;
|
|
351
|
+
ticket?: MessageTicket;
|
|
352
|
+
email?: MessageEmail;
|
|
353
|
+
buttons?: MessageButton[];
|
|
354
|
+
poll?: MessagePoll;
|
|
355
|
+
note?: MessageNote;
|
|
356
|
+
reactions?: MessageReaction[];
|
|
357
|
+
messageReference?: MessageReference;
|
|
358
|
+
comment?: CommentData;
|
|
359
|
+
isLoaded: boolean;
|
|
360
|
+
isHighlighted: boolean;
|
|
361
|
+
deleted: boolean;
|
|
362
|
+
updatedAt?: Date;
|
|
363
|
+
updatedBy?: UserInfo;
|
|
364
|
+
}
|