@trii/types 2.10.132 → 2.10.134
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.
|
@@ -2,6 +2,8 @@ import { UserInfo } from "../../Users/UserTrii";
|
|
|
2
2
|
import { IChannelInfo } from "../Channels/Channel";
|
|
3
3
|
export interface IMessage {
|
|
4
4
|
id: string;
|
|
5
|
+
spaceId: string;
|
|
6
|
+
conversationId: string;
|
|
5
7
|
/**ISO8601 timestamp */
|
|
6
8
|
timestamp: Date;
|
|
7
9
|
author: UserInfo;
|
|
@@ -10,18 +12,23 @@ export interface IMessage {
|
|
|
10
12
|
to: string;
|
|
11
13
|
mentions: [];
|
|
12
14
|
ack: MessageAck;
|
|
15
|
+
forwarded: boolean;
|
|
13
16
|
type: MessageType;
|
|
17
|
+
header: string;
|
|
18
|
+
footer: string;
|
|
14
19
|
context?: string;
|
|
15
20
|
text?: MessageText;
|
|
16
21
|
contacts?: MessageContact[];
|
|
17
22
|
audios?: MessageAudio[];
|
|
18
23
|
images?: MessageImage[];
|
|
19
24
|
videos?: MessageVideo[];
|
|
25
|
+
cdr: MessageCdr;
|
|
26
|
+
location?: MessageLocation[];
|
|
20
27
|
documents?: MessageDocument[];
|
|
21
28
|
stickers?: MessageSticker[];
|
|
22
29
|
info?: MessageInfo;
|
|
23
30
|
form?: MessageForm;
|
|
24
|
-
email?:
|
|
31
|
+
email?: MessageEmail;
|
|
25
32
|
buttons?: [];
|
|
26
33
|
reactions?: [];
|
|
27
34
|
deleted: boolean;
|
|
@@ -37,19 +44,14 @@ export declare enum MessageAck {
|
|
|
37
44
|
ACK_PLAYED = 5
|
|
38
45
|
}
|
|
39
46
|
export declare enum MessageType {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
CDR_PBX = 9,
|
|
49
|
-
CALL = 10,
|
|
50
|
-
COMMENT = 11,
|
|
51
|
-
NOTIFICATION_NEW_CONVERSATION = 12,
|
|
52
|
-
N2B = 13
|
|
47
|
+
CHAT = 0,
|
|
48
|
+
CHAT_EXTERNAL = 1,
|
|
49
|
+
NOTE = 0,
|
|
50
|
+
CDR_PBX = 1,
|
|
51
|
+
CALL = 2,
|
|
52
|
+
COMMENT = 3,
|
|
53
|
+
NOTIFICATION_NEW_CONVERSATION = 4,
|
|
54
|
+
N2B = 5
|
|
53
55
|
}
|
|
54
56
|
export declare type MessageType2 = 'audio' | 'button' | 'contact' | 'document' | 'image' | 'location' | 'sticker' | 'text' | 'video' | 'interactive';
|
|
55
57
|
export interface MessageText {
|
|
@@ -57,6 +59,10 @@ export interface MessageText {
|
|
|
57
59
|
body: string;
|
|
58
60
|
}
|
|
59
61
|
export interface MessageAudio {
|
|
62
|
+
/**The mime type for the video file. */
|
|
63
|
+
mymeType: string;
|
|
64
|
+
/**The url of the audio. */
|
|
65
|
+
url: string;
|
|
60
66
|
}
|
|
61
67
|
export interface MessageImage {
|
|
62
68
|
}
|
|
@@ -70,6 +76,33 @@ export interface MessageVideo {
|
|
|
70
76
|
/**The url of the video. */
|
|
71
77
|
url: string;
|
|
72
78
|
}
|
|
79
|
+
export interface MessageCdr {
|
|
80
|
+
callerId: string;
|
|
81
|
+
trunk: string;
|
|
82
|
+
ringTime: number;
|
|
83
|
+
connectedTime: number;
|
|
84
|
+
totalTime: number;
|
|
85
|
+
calls: MessageCdrCall[];
|
|
86
|
+
}
|
|
87
|
+
export interface MessageCdrCall {
|
|
88
|
+
extension: string;
|
|
89
|
+
ringTime: number;
|
|
90
|
+
connectedTime: number;
|
|
91
|
+
status: MessageCdrCallStatus;
|
|
92
|
+
audioUrl: string;
|
|
93
|
+
}
|
|
94
|
+
export declare enum MessageCdrCallStatus {
|
|
95
|
+
ANSWERED = 1,
|
|
96
|
+
UNANSWERED = 2,
|
|
97
|
+
LOST = 3
|
|
98
|
+
}
|
|
99
|
+
export interface MessageLocation {
|
|
100
|
+
lat: string;
|
|
101
|
+
lng: string;
|
|
102
|
+
title: string;
|
|
103
|
+
description: string;
|
|
104
|
+
url: string;
|
|
105
|
+
}
|
|
73
106
|
export interface MessageDocument {
|
|
74
107
|
}
|
|
75
108
|
export interface MessageEmail {
|
|
@@ -9,17 +9,18 @@ export var MessageAck;
|
|
|
9
9
|
})(MessageAck || (MessageAck = {}));
|
|
10
10
|
export var MessageType;
|
|
11
11
|
(function (MessageType) {
|
|
12
|
-
MessageType[MessageType["
|
|
13
|
-
MessageType[MessageType["
|
|
14
|
-
MessageType[MessageType["
|
|
15
|
-
MessageType[MessageType["
|
|
16
|
-
MessageType[MessageType["
|
|
17
|
-
MessageType[MessageType["
|
|
18
|
-
MessageType[MessageType["
|
|
19
|
-
MessageType[MessageType["
|
|
20
|
-
MessageType[MessageType["CDR_PBX"] = 9] = "CDR_PBX";
|
|
21
|
-
MessageType[MessageType["CALL"] = 10] = "CALL";
|
|
22
|
-
MessageType[MessageType["COMMENT"] = 11] = "COMMENT";
|
|
23
|
-
MessageType[MessageType["NOTIFICATION_NEW_CONVERSATION"] = 12] = "NOTIFICATION_NEW_CONVERSATION";
|
|
24
|
-
MessageType[MessageType["N2B"] = 13] = "N2B";
|
|
12
|
+
MessageType[MessageType["CHAT"] = 0] = "CHAT";
|
|
13
|
+
MessageType[MessageType["CHAT_EXTERNAL"] = 1] = "CHAT_EXTERNAL";
|
|
14
|
+
MessageType[MessageType["NOTE"] = 0] = "NOTE";
|
|
15
|
+
MessageType[MessageType["CDR_PBX"] = 1] = "CDR_PBX";
|
|
16
|
+
MessageType[MessageType["CALL"] = 2] = "CALL";
|
|
17
|
+
MessageType[MessageType["COMMENT"] = 3] = "COMMENT";
|
|
18
|
+
MessageType[MessageType["NOTIFICATION_NEW_CONVERSATION"] = 4] = "NOTIFICATION_NEW_CONVERSATION";
|
|
19
|
+
MessageType[MessageType["N2B"] = 5] = "N2B";
|
|
25
20
|
})(MessageType || (MessageType = {}));
|
|
21
|
+
export var MessageCdrCallStatus;
|
|
22
|
+
(function (MessageCdrCallStatus) {
|
|
23
|
+
MessageCdrCallStatus[MessageCdrCallStatus["ANSWERED"] = 1] = "ANSWERED";
|
|
24
|
+
MessageCdrCallStatus[MessageCdrCallStatus["UNANSWERED"] = 2] = "UNANSWERED";
|
|
25
|
+
MessageCdrCallStatus[MessageCdrCallStatus["LOST"] = 3] = "LOST";
|
|
26
|
+
})(MessageCdrCallStatus || (MessageCdrCallStatus = {}));
|
|
@@ -1,113 +1,88 @@
|
|
|
1
1
|
export interface IContactInfo {
|
|
2
2
|
id: number;
|
|
3
3
|
name: string;
|
|
4
|
-
imageUrl
|
|
4
|
+
imageUrl?: string;
|
|
5
|
+
businessName?: IBusinessInfo;
|
|
6
|
+
phone?: string;
|
|
7
|
+
email?: string;
|
|
5
8
|
}
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
export interface IBusinessInfo {
|
|
10
|
+
id: number;
|
|
8
11
|
name: string;
|
|
9
|
-
|
|
12
|
+
imageUrl?: string;
|
|
13
|
+
phone?: string;
|
|
14
|
+
email?: string;
|
|
10
15
|
}
|
|
11
|
-
export
|
|
16
|
+
export interface IBusiness {
|
|
12
17
|
id: number;
|
|
13
18
|
name: string;
|
|
19
|
+
imageUrl: string;
|
|
14
20
|
properties: Property[];
|
|
15
|
-
|
|
21
|
+
members: IContactInfo[];
|
|
16
22
|
}
|
|
17
23
|
export interface IContact {
|
|
18
24
|
id: number;
|
|
19
25
|
name: string;
|
|
26
|
+
imageUrl: string;
|
|
27
|
+
business: IBusiness[];
|
|
28
|
+
phone: string;
|
|
29
|
+
phones: [];
|
|
30
|
+
email: string;
|
|
31
|
+
emails: [];
|
|
32
|
+
im: string;
|
|
33
|
+
ims: [];
|
|
34
|
+
properties: Property[];
|
|
35
|
+
createdAt?: string | null;
|
|
36
|
+
createdBy?: string | null;
|
|
37
|
+
updatedAt?: string | null;
|
|
38
|
+
deletedAt?: string | null;
|
|
20
39
|
}
|
|
21
|
-
export
|
|
22
|
-
Text = 0,
|
|
23
|
-
LongText = 1,
|
|
24
|
-
Number = 2,
|
|
25
|
-
Currency = 3,
|
|
26
|
-
Options = 4,
|
|
27
|
-
Time = 5,
|
|
28
|
-
Date = 6,
|
|
29
|
-
TimeRange = 7,
|
|
30
|
-
DateRange = 8,
|
|
31
|
-
Address = 11
|
|
32
|
-
}
|
|
33
|
-
export declare enum ContactField_numbertype {
|
|
34
|
-
Integer = 1,
|
|
35
|
-
Decimal = 2,
|
|
36
|
-
Currency = 3,
|
|
37
|
-
Accounting = 4
|
|
38
|
-
}
|
|
39
|
-
export declare class ContactField implements IContactField {
|
|
40
|
-
props: IContactField;
|
|
41
|
-
id: number;
|
|
42
|
-
name: string;
|
|
40
|
+
export interface Property {
|
|
43
41
|
nameKey: string;
|
|
44
42
|
type: ContactField_type;
|
|
45
|
-
|
|
46
|
-
options: string[];
|
|
47
|
-
order: number;
|
|
48
|
-
isSearchKey: boolean;
|
|
49
|
-
isImportKey: boolean;
|
|
50
|
-
isDefault: boolean;
|
|
51
|
-
readOnly: boolean;
|
|
52
|
-
hide: boolean;
|
|
53
|
-
useMask: boolean;
|
|
54
|
-
constructor(props: IContactField);
|
|
43
|
+
value: any;
|
|
55
44
|
}
|
|
56
45
|
export interface IContactField {
|
|
57
46
|
id: number;
|
|
58
47
|
name: string;
|
|
59
48
|
nameKey: string;
|
|
60
49
|
type: ContactField_type;
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
typeNumberDecimalsCount: number | 0;
|
|
51
|
+
typeOptions: string[];
|
|
63
52
|
order: number;
|
|
53
|
+
forContact: boolean;
|
|
54
|
+
forBusiness: boolean;
|
|
55
|
+
isDefault: boolean;
|
|
64
56
|
isSearchKey: boolean;
|
|
65
57
|
isImportKey: boolean;
|
|
66
|
-
isDefault: boolean;
|
|
67
58
|
readOnly: boolean;
|
|
68
59
|
hide: boolean;
|
|
69
60
|
useMask: boolean;
|
|
61
|
+
createdAt?: string | null;
|
|
62
|
+
createdBy?: string | null;
|
|
63
|
+
deleted: boolean;
|
|
64
|
+
deletedAt?: string | null;
|
|
70
65
|
}
|
|
71
|
-
export
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
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
|
|
81
80
|
}
|
|
82
81
|
export interface ISubscription {
|
|
83
82
|
id: number;
|
|
84
83
|
name: string;
|
|
85
84
|
details: string;
|
|
86
85
|
}
|
|
87
|
-
export declare class IntegrationButton implements IIntegrationButton {
|
|
88
|
-
props: IIntegrationButton;
|
|
89
|
-
id: number;
|
|
90
|
-
name: string;
|
|
91
|
-
enabled: boolean;
|
|
92
|
-
icon_class: string;
|
|
93
|
-
icon_color: string;
|
|
94
|
-
api_method: IntegrationButton_method;
|
|
95
|
-
api_url: string;
|
|
96
|
-
api_AuthType: string;
|
|
97
|
-
api_Auth_username: string;
|
|
98
|
-
api_Auth_password: string;
|
|
99
|
-
api_Auth_token: string;
|
|
100
|
-
api_Auth_token_url: string;
|
|
101
|
-
api_Auth_token_body: string;
|
|
102
|
-
api_Auth_APIkey_Key: string;
|
|
103
|
-
api_Auth_APIkey_Value: string;
|
|
104
|
-
api_Auth_APIkey_Addto: string;
|
|
105
|
-
api_contenttype: string;
|
|
106
|
-
api_body: string;
|
|
107
|
-
api_formatosalida: IntegrationButton_format;
|
|
108
|
-
api_Template: string;
|
|
109
|
-
constructor(props: IIntegrationButton);
|
|
110
|
-
}
|
|
111
86
|
export interface IIntegrationButton {
|
|
112
87
|
id: number;
|
|
113
88
|
name: string;
|
|
@@ -150,4 +125,3 @@ export declare class GoogleAccountInfo {
|
|
|
150
125
|
email: string;
|
|
151
126
|
imageUrl: string;
|
|
152
127
|
}
|
|
153
|
-
export {};
|
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
class Property {
|
|
2
|
-
constructor(name, value) {
|
|
3
|
-
this.name = name;
|
|
4
|
-
this.value = value;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export class Contact {
|
|
8
|
-
constructor(name, properties) {
|
|
9
|
-
this.name = name;
|
|
10
|
-
this.properties = properties;
|
|
11
|
-
properties.forEach((p, index) => {
|
|
12
|
-
this[p.name] = (value) => {
|
|
13
|
-
if (value) {
|
|
14
|
-
this.properties[index].value = value;
|
|
15
|
-
}
|
|
16
|
-
return this.properties[index].value;
|
|
17
|
-
};
|
|
18
|
-
}, this);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
1
|
export var ContactField_type;
|
|
22
2
|
(function (ContactField_type) {
|
|
23
3
|
ContactField_type[ContactField_type["Text"] = 0] = "Text";
|
|
24
4
|
ContactField_type[ContactField_type["LongText"] = 1] = "LongText";
|
|
25
|
-
ContactField_type[ContactField_type["Number"] = 2] = "Number";
|
|
26
5
|
ContactField_type[ContactField_type["Currency"] = 3] = "Currency";
|
|
27
6
|
ContactField_type[ContactField_type["Options"] = 4] = "Options";
|
|
28
7
|
ContactField_type[ContactField_type["Time"] = 5] = "Time";
|
|
@@ -30,65 +9,11 @@ export var ContactField_type;
|
|
|
30
9
|
ContactField_type[ContactField_type["TimeRange"] = 7] = "TimeRange";
|
|
31
10
|
ContactField_type[ContactField_type["DateRange"] = 8] = "DateRange";
|
|
32
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";
|
|
33
16
|
})(ContactField_type || (ContactField_type = {}));
|
|
34
|
-
export var ContactField_numbertype;
|
|
35
|
-
(function (ContactField_numbertype) {
|
|
36
|
-
ContactField_numbertype[ContactField_numbertype["Integer"] = 1] = "Integer";
|
|
37
|
-
ContactField_numbertype[ContactField_numbertype["Decimal"] = 2] = "Decimal";
|
|
38
|
-
ContactField_numbertype[ContactField_numbertype["Currency"] = 3] = "Currency";
|
|
39
|
-
ContactField_numbertype[ContactField_numbertype["Accounting"] = 4] = "Accounting";
|
|
40
|
-
})(ContactField_numbertype || (ContactField_numbertype = {}));
|
|
41
|
-
export class ContactField {
|
|
42
|
-
constructor(props) {
|
|
43
|
-
this.props = props;
|
|
44
|
-
this.id = props.id;
|
|
45
|
-
this.name = props.name;
|
|
46
|
-
this.nameKey = props.nameKey;
|
|
47
|
-
this.type = props.type;
|
|
48
|
-
this.number = props.number;
|
|
49
|
-
this.options = props.options;
|
|
50
|
-
this.order = props.order;
|
|
51
|
-
this.isSearchKey = props.isSearchKey;
|
|
52
|
-
this.isImportKey = props.isImportKey;
|
|
53
|
-
this.isDefault = props.isDefault;
|
|
54
|
-
this.readOnly = props.readOnly;
|
|
55
|
-
this.hide = props.hide;
|
|
56
|
-
this.useMask = props.useMask;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
export class Subscription {
|
|
60
|
-
constructor(props) {
|
|
61
|
-
this.props = props;
|
|
62
|
-
this.id = props.id;
|
|
63
|
-
this.name = props.name;
|
|
64
|
-
this.details = props.details;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
export class IntegrationButton {
|
|
68
|
-
constructor(props) {
|
|
69
|
-
this.props = props;
|
|
70
|
-
this.id = props.id;
|
|
71
|
-
this.name = props.name;
|
|
72
|
-
this.enabled = props.enabled;
|
|
73
|
-
this.icon_class = props.icon_class;
|
|
74
|
-
this.icon_color = props.icon_color;
|
|
75
|
-
this.api_method = props.api_method;
|
|
76
|
-
this.api_url = props.api_url;
|
|
77
|
-
this.api_AuthType = props.api_AuthType;
|
|
78
|
-
this.api_Auth_username = props.api_Auth_username;
|
|
79
|
-
this.api_Auth_password = props.api_Auth_password;
|
|
80
|
-
this.api_Auth_token = props.api_Auth_token;
|
|
81
|
-
this.api_Auth_token_url = props.api_Auth_token_url;
|
|
82
|
-
this.api_Auth_token_body = props.api_Auth_token_body;
|
|
83
|
-
this.api_Auth_APIkey_Key = props.api_Auth_APIkey_Key;
|
|
84
|
-
this.api_Auth_APIkey_Value = props.api_Auth_APIkey_Value;
|
|
85
|
-
this.api_Auth_APIkey_Addto = props.api_Auth_APIkey_Addto;
|
|
86
|
-
this.api_contenttype = props.api_contenttype;
|
|
87
|
-
this.api_body = props.api_body;
|
|
88
|
-
this.api_formatosalida = props.api_formatosalida;
|
|
89
|
-
this.api_Template = props.api_Template;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
17
|
export var IntegrationButton_method;
|
|
93
18
|
(function (IntegrationButton_method) {
|
|
94
19
|
IntegrationButton_method[IntegrationButton_method["GET"] = 1] = "GET";
|