@trii/types 2.10.136 → 2.10.138
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/Common/Messages/MediaFile.d.ts +5 -0
- package/dist/Common/Messages/MediaFile.js +1 -0
- package/dist/Common/Messages/Message.d.ts +27 -6
- package/dist/Common/Messages/Message.js +8 -2
- package/dist/Common/Messages/index.d.ts +1 -0
- package/dist/Common/Messages/index.js +1 -0
- package/dist/Contacts/contacts.d.ts +39 -16
- package/dist/Contacts/contacts.js +13 -13
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,7 @@ export interface IMessage {
|
|
|
4
4
|
id: string;
|
|
5
5
|
spaceId: string;
|
|
6
6
|
conversationId: string;
|
|
7
|
+
externalId?: string;
|
|
7
8
|
/**ISO8601 timestamp */
|
|
8
9
|
timestamp: Date;
|
|
9
10
|
author: UserInfo;
|
|
@@ -11,33 +12,42 @@ export interface IMessage {
|
|
|
11
12
|
from: string;
|
|
12
13
|
to: string;
|
|
13
14
|
mentions: [];
|
|
15
|
+
direction: MessageDirection;
|
|
14
16
|
ack: MessageAck;
|
|
15
17
|
forwarded: boolean;
|
|
18
|
+
remoteDeleted: boolean;
|
|
16
19
|
type: MessageType;
|
|
17
|
-
header
|
|
18
|
-
footer
|
|
20
|
+
header?: string;
|
|
21
|
+
footer?: string;
|
|
19
22
|
context?: string;
|
|
20
23
|
text?: MessageText;
|
|
21
24
|
contacts?: MessageContact[];
|
|
22
25
|
audios?: MessageAudio[];
|
|
23
26
|
images?: MessageImage[];
|
|
24
27
|
videos?: MessageVideo[];
|
|
25
|
-
cdr
|
|
26
|
-
|
|
28
|
+
cdr?: MessageCdr;
|
|
29
|
+
locations?: MessageLocation[];
|
|
27
30
|
documents?: MessageDocument[];
|
|
28
31
|
stickers?: MessageSticker[];
|
|
29
32
|
info?: MessageInfo;
|
|
30
33
|
form?: MessageForm;
|
|
34
|
+
ticket?: MessageTicket;
|
|
31
35
|
email?: MessageEmail;
|
|
32
36
|
buttons?: [];
|
|
33
37
|
reactions?: [];
|
|
38
|
+
messageReference: MessageReference;
|
|
34
39
|
deleted: boolean;
|
|
35
40
|
updatedAt?: Date;
|
|
36
41
|
updatedBy?: UserInfo;
|
|
37
42
|
}
|
|
43
|
+
export declare enum MessageDirection {
|
|
44
|
+
IN = 1,
|
|
45
|
+
OUT = 2
|
|
46
|
+
}
|
|
38
47
|
export declare enum MessageAck {
|
|
39
|
-
|
|
40
|
-
|
|
48
|
+
ACK_PENDING = -1,
|
|
49
|
+
ACK_NONE = 0,
|
|
50
|
+
ACK_ERROR = 1,
|
|
41
51
|
ACK_SERVER = 2,
|
|
42
52
|
ACK_DEVICE = 3,
|
|
43
53
|
ACK_READ = 4,
|
|
@@ -65,6 +75,11 @@ export interface MessageAudio {
|
|
|
65
75
|
url: string;
|
|
66
76
|
}
|
|
67
77
|
export interface MessageImage {
|
|
78
|
+
/**image/webp */
|
|
79
|
+
mimeType: string;
|
|
80
|
+
/**The url of the video. */
|
|
81
|
+
url: string;
|
|
82
|
+
caption: string;
|
|
68
83
|
}
|
|
69
84
|
export interface MessageVideo {
|
|
70
85
|
id: string;
|
|
@@ -105,6 +120,10 @@ export interface MessageLocation {
|
|
|
105
120
|
}
|
|
106
121
|
export interface MessageDocument {
|
|
107
122
|
}
|
|
123
|
+
export interface MessageReference {
|
|
124
|
+
messageId: string;
|
|
125
|
+
channelId: string;
|
|
126
|
+
}
|
|
108
127
|
export interface MessageEmail {
|
|
109
128
|
}
|
|
110
129
|
export interface MessageSticker {
|
|
@@ -121,6 +140,8 @@ export interface MessageSticker {
|
|
|
121
140
|
}
|
|
122
141
|
export interface MessageInfo {
|
|
123
142
|
}
|
|
143
|
+
export interface MessageTicket {
|
|
144
|
+
}
|
|
124
145
|
export interface MessageForm {
|
|
125
146
|
}
|
|
126
147
|
export interface MessageContact {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
export var MessageDirection;
|
|
2
|
+
(function (MessageDirection) {
|
|
3
|
+
MessageDirection[MessageDirection["IN"] = 1] = "IN";
|
|
4
|
+
MessageDirection[MessageDirection["OUT"] = 2] = "OUT";
|
|
5
|
+
})(MessageDirection || (MessageDirection = {}));
|
|
1
6
|
export var MessageAck;
|
|
2
7
|
(function (MessageAck) {
|
|
3
|
-
MessageAck[MessageAck["
|
|
4
|
-
MessageAck[MessageAck["
|
|
8
|
+
MessageAck[MessageAck["ACK_PENDING"] = -1] = "ACK_PENDING";
|
|
9
|
+
MessageAck[MessageAck["ACK_NONE"] = 0] = "ACK_NONE";
|
|
10
|
+
MessageAck[MessageAck["ACK_ERROR"] = 1] = "ACK_ERROR";
|
|
5
11
|
MessageAck[MessageAck["ACK_SERVER"] = 2] = "ACK_SERVER";
|
|
6
12
|
MessageAck[MessageAck["ACK_DEVICE"] = 3] = "ACK_DEVICE";
|
|
7
13
|
MessageAck[MessageAck["ACK_READ"] = 4] = "ACK_READ";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Common } from "../index";
|
|
1
2
|
export interface IContactInfo {
|
|
2
3
|
id: number;
|
|
3
4
|
name: string;
|
|
@@ -26,11 +27,11 @@ export interface IContact {
|
|
|
26
27
|
imageUrl: string;
|
|
27
28
|
business: IBusiness[];
|
|
28
29
|
phone: string;
|
|
29
|
-
phones: [];
|
|
30
|
+
phones: IContactAddress[];
|
|
30
31
|
email: string;
|
|
31
|
-
emails: [];
|
|
32
|
+
emails: IContactAddress[];
|
|
32
33
|
im: string;
|
|
33
|
-
ims: [];
|
|
34
|
+
ims: IContactAddress[];
|
|
34
35
|
properties: Property[];
|
|
35
36
|
createdAt?: string | null;
|
|
36
37
|
createdBy?: string | null;
|
|
@@ -64,19 +65,41 @@ export interface IContactField {
|
|
|
64
65
|
deletedAt?: string | null;
|
|
65
66
|
}
|
|
66
67
|
export declare enum ContactField_type {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
TEXT = 0,
|
|
69
|
+
LONGTEXT = 1,
|
|
70
|
+
CURRENCY = 3,
|
|
71
|
+
OPTIONS = 4,
|
|
72
|
+
TIME = 5,
|
|
73
|
+
DATE = 6,
|
|
74
|
+
TIMERANGE = 7,
|
|
75
|
+
DATERANGE = 8,
|
|
76
|
+
ADDRESS = 11,
|
|
77
|
+
NUMBER_INTEGER = 21,
|
|
78
|
+
NUMBER_DECIMAL = 22,
|
|
79
|
+
NUMBER_CURRENCY = 23,
|
|
80
|
+
NUMBER_ACCOUNTING = 24
|
|
81
|
+
}
|
|
82
|
+
export interface IContactAddress {
|
|
83
|
+
id: string;
|
|
84
|
+
channelType: Common.Channels.ChannelType;
|
|
85
|
+
channelId?: string;
|
|
86
|
+
address: string;
|
|
87
|
+
profileName: string;
|
|
88
|
+
profileUrl: string;
|
|
89
|
+
telInfo?: IContactTelInfo;
|
|
90
|
+
note: string;
|
|
91
|
+
isVerified: boolean;
|
|
92
|
+
isFavorite: boolean;
|
|
93
|
+
dateLastMsgIn?: Date;
|
|
94
|
+
dateLastMsgOut?: Date;
|
|
95
|
+
createdAt: Date;
|
|
96
|
+
}
|
|
97
|
+
export interface IContactTelInfo {
|
|
98
|
+
isMobile: boolean;
|
|
99
|
+
country: string;
|
|
100
|
+
countryName: string;
|
|
101
|
+
state: string;
|
|
102
|
+
stateName: string;
|
|
80
103
|
}
|
|
81
104
|
export interface ISubscription {
|
|
82
105
|
id: number;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export var ContactField_type;
|
|
2
2
|
(function (ContactField_type) {
|
|
3
|
-
ContactField_type[ContactField_type["
|
|
4
|
-
ContactField_type[ContactField_type["
|
|
5
|
-
ContactField_type[ContactField_type["
|
|
6
|
-
ContactField_type[ContactField_type["
|
|
7
|
-
ContactField_type[ContactField_type["
|
|
8
|
-
ContactField_type[ContactField_type["
|
|
9
|
-
ContactField_type[ContactField_type["
|
|
10
|
-
ContactField_type[ContactField_type["
|
|
11
|
-
ContactField_type[ContactField_type["
|
|
12
|
-
ContactField_type[ContactField_type["
|
|
13
|
-
ContactField_type[ContactField_type["
|
|
14
|
-
ContactField_type[ContactField_type["
|
|
15
|
-
ContactField_type[ContactField_type["
|
|
3
|
+
ContactField_type[ContactField_type["TEXT"] = 0] = "TEXT";
|
|
4
|
+
ContactField_type[ContactField_type["LONGTEXT"] = 1] = "LONGTEXT";
|
|
5
|
+
ContactField_type[ContactField_type["CURRENCY"] = 3] = "CURRENCY";
|
|
6
|
+
ContactField_type[ContactField_type["OPTIONS"] = 4] = "OPTIONS";
|
|
7
|
+
ContactField_type[ContactField_type["TIME"] = 5] = "TIME";
|
|
8
|
+
ContactField_type[ContactField_type["DATE"] = 6] = "DATE";
|
|
9
|
+
ContactField_type[ContactField_type["TIMERANGE"] = 7] = "TIMERANGE";
|
|
10
|
+
ContactField_type[ContactField_type["DATERANGE"] = 8] = "DATERANGE";
|
|
11
|
+
ContactField_type[ContactField_type["ADDRESS"] = 11] = "ADDRESS";
|
|
12
|
+
ContactField_type[ContactField_type["NUMBER_INTEGER"] = 21] = "NUMBER_INTEGER";
|
|
13
|
+
ContactField_type[ContactField_type["NUMBER_DECIMAL"] = 22] = "NUMBER_DECIMAL";
|
|
14
|
+
ContactField_type[ContactField_type["NUMBER_CURRENCY"] = 23] = "NUMBER_CURRENCY";
|
|
15
|
+
ContactField_type[ContactField_type["NUMBER_ACCOUNTING"] = 24] = "NUMBER_ACCOUNTING";
|
|
16
16
|
})(ContactField_type || (ContactField_type = {}));
|
|
17
17
|
export var IntegrationButton_method;
|
|
18
18
|
(function (IntegrationButton_method) {
|