@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.
@@ -0,0 +1,5 @@
1
+ export interface IMediaFile {
2
+ id: string;
3
+ name: string;
4
+ url: string;
5
+ }
@@ -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: string;
18
- footer: string;
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: MessageCdr;
26
- location?: MessageLocation[];
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
- ACK_ERROR = 0,
40
- ACK_PENDING = 1,
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["ACK_ERROR"] = 0] = "ACK_ERROR";
4
- MessageAck[MessageAck["ACK_PENDING"] = 1] = "ACK_PENDING";
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 +1,2 @@
1
1
  export * from "./Message";
2
+ export * from "./MediaFile";
@@ -1 +1,2 @@
1
1
  export * from "./Message";
2
+ export * from "./MediaFile";
@@ -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
- Text = 0,
68
- LongText = 1,
69
- Currency = 3,
70
- Options = 4,
71
- Time = 5,
72
- Date = 6,
73
- TimeRange = 7,
74
- DateRange = 8,
75
- Address = 11,
76
- Number_Integer = 21,
77
- Number_Decimal = 22,
78
- Number_Currency = 23,
79
- Number_Accounting = 24
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["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";
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/types",
3
- "version": "2.10.136",
3
+ "version": "2.10.138",
4
4
  "description": "Types definitions for Trii projects - ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",