@expressms/smartapp-sdk 1.8.0-alpha.2 → 1.8.1
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.
|
@@ -42,7 +42,78 @@ export declare enum ERROR_CODES {
|
|
|
42
42
|
NO_BRIDGE = "no_bridge",
|
|
43
43
|
SUBSCRIPTION_NOT_FOUND = "subscription_not_found"
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export interface InitialData {
|
|
46
|
+
initiator: string;
|
|
47
|
+
meta?: object | string;
|
|
48
|
+
}
|
|
49
|
+
export interface InitialDataEmail extends InitialData {
|
|
50
|
+
initiator: 'email_link';
|
|
51
|
+
meta: {
|
|
52
|
+
email: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface InitialDataProfileAction extends InitialData {
|
|
56
|
+
initiator: 'profile_action';
|
|
57
|
+
meta: {
|
|
58
|
+
action: string;
|
|
59
|
+
profile: {
|
|
60
|
+
user_huid: string;
|
|
61
|
+
name: string;
|
|
62
|
+
avatar?: string;
|
|
63
|
+
avatar_preview?: string;
|
|
64
|
+
company?: string;
|
|
65
|
+
company_position?: string;
|
|
66
|
+
department?: string;
|
|
67
|
+
office?: string;
|
|
68
|
+
manager?: string;
|
|
69
|
+
manager_huid?: string;
|
|
70
|
+
email?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
other_phone?: string;
|
|
73
|
+
ip_phone?: string;
|
|
74
|
+
other_ip_phone?: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface InitialDataPush extends InitialData {
|
|
79
|
+
initiator: 'push';
|
|
80
|
+
meta?: object;
|
|
81
|
+
}
|
|
82
|
+
export interface InitialDataDeeplink extends InitialData {
|
|
83
|
+
initiator: 'deeplink';
|
|
84
|
+
meta?: object;
|
|
85
|
+
}
|
|
86
|
+
export type MentionDataType = {
|
|
87
|
+
mentionType: 'user' | 'contact' | 'chat' | 'channel' | 'all';
|
|
88
|
+
mentionId: string;
|
|
89
|
+
mentionData: {
|
|
90
|
+
connType: 'cts' | 'rts' | 'hybrid';
|
|
91
|
+
userHuid?: string;
|
|
92
|
+
name: string;
|
|
93
|
+
groupChatId?: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export interface InitialDataMenuAction extends InitialData {
|
|
97
|
+
initiator: 'menu_action';
|
|
98
|
+
meta: {
|
|
99
|
+
action: string;
|
|
100
|
+
sender: {
|
|
101
|
+
user_huid: string;
|
|
102
|
+
name: string;
|
|
103
|
+
avatar?: string;
|
|
104
|
+
avatar_preview?: string;
|
|
105
|
+
company?: string;
|
|
106
|
+
company_position?: string;
|
|
107
|
+
email?: string;
|
|
108
|
+
};
|
|
109
|
+
message: {
|
|
110
|
+
body: string;
|
|
111
|
+
timestamp: number;
|
|
112
|
+
mentions: Array<MentionDataType>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export type ReadyEventResponse = {
|
|
46
117
|
ref: string;
|
|
47
118
|
status: STATUS.SUCCESS;
|
|
48
119
|
payload: {
|
|
@@ -50,8 +121,9 @@ export type ReadyEventResponse = ({
|
|
|
50
121
|
isMain?: boolean;
|
|
51
122
|
type: string;
|
|
52
123
|
openSmartAppMeta?: object;
|
|
124
|
+
initialData?: InitialDataEmail | InitialDataProfileAction | InitialDataPush | InitialDataDeeplink | InitialDataMenuAction;
|
|
53
125
|
};
|
|
54
|
-
}
|
|
126
|
+
} | undefined;
|
|
55
127
|
export interface File {
|
|
56
128
|
type: string | null;
|
|
57
129
|
file: string;
|
|
@@ -47,4 +47,4 @@ var ERROR_CODES;
|
|
|
47
47
|
ERROR_CODES["NO_BRIDGE"] = "no_bridge";
|
|
48
48
|
ERROR_CODES["SUBSCRIPTION_NOT_FOUND"] = "subscription_not_found";
|
|
49
49
|
})(ERROR_CODES = exports.ERROR_CODES || (exports.ERROR_CODES = {}));
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|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BRUQsSUFBWSxNQUdYO0FBSEQsV0FBWSxNQUFNO0lBQ2hCLDZCQUFtQixDQUFBO0lBQ25CLHlCQUFlLENBQUE7QUFDakIsQ0FBQyxFQUhXLE1BQU0sR0FBTixjQUFNLEtBQU4sY0FBTSxRQUdqQjtBQUVELElBQVksV0FHWDtBQUhELFdBQVksV0FBVztJQUNyQixzQ0FBdUIsQ0FBQTtJQUN2QixnRUFBaUQsQ0FBQTtBQUNuRCxDQUFDLEVBSFcsV0FBVyxHQUFYLG1CQUFXLEtBQVgsbUJBQVcsUUFHdEIifQ==
|
|
@@ -42,7 +42,78 @@ export declare enum ERROR_CODES {
|
|
|
42
42
|
NO_BRIDGE = "no_bridge",
|
|
43
43
|
SUBSCRIPTION_NOT_FOUND = "subscription_not_found"
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export interface InitialData {
|
|
46
|
+
initiator: string;
|
|
47
|
+
meta?: object | string;
|
|
48
|
+
}
|
|
49
|
+
export interface InitialDataEmail extends InitialData {
|
|
50
|
+
initiator: 'email_link';
|
|
51
|
+
meta: {
|
|
52
|
+
email: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface InitialDataProfileAction extends InitialData {
|
|
56
|
+
initiator: 'profile_action';
|
|
57
|
+
meta: {
|
|
58
|
+
action: string;
|
|
59
|
+
profile: {
|
|
60
|
+
user_huid: string;
|
|
61
|
+
name: string;
|
|
62
|
+
avatar?: string;
|
|
63
|
+
avatar_preview?: string;
|
|
64
|
+
company?: string;
|
|
65
|
+
company_position?: string;
|
|
66
|
+
department?: string;
|
|
67
|
+
office?: string;
|
|
68
|
+
manager?: string;
|
|
69
|
+
manager_huid?: string;
|
|
70
|
+
email?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
other_phone?: string;
|
|
73
|
+
ip_phone?: string;
|
|
74
|
+
other_ip_phone?: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface InitialDataPush extends InitialData {
|
|
79
|
+
initiator: 'push';
|
|
80
|
+
meta?: object;
|
|
81
|
+
}
|
|
82
|
+
export interface InitialDataDeeplink extends InitialData {
|
|
83
|
+
initiator: 'deeplink';
|
|
84
|
+
meta?: object;
|
|
85
|
+
}
|
|
86
|
+
export type MentionDataType = {
|
|
87
|
+
mentionType: 'user' | 'contact' | 'chat' | 'channel' | 'all';
|
|
88
|
+
mentionId: string;
|
|
89
|
+
mentionData: {
|
|
90
|
+
connType: 'cts' | 'rts' | 'hybrid';
|
|
91
|
+
userHuid?: string;
|
|
92
|
+
name: string;
|
|
93
|
+
groupChatId?: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export interface InitialDataMenuAction extends InitialData {
|
|
97
|
+
initiator: 'menu_action';
|
|
98
|
+
meta: {
|
|
99
|
+
action: string;
|
|
100
|
+
sender: {
|
|
101
|
+
user_huid: string;
|
|
102
|
+
name: string;
|
|
103
|
+
avatar?: string;
|
|
104
|
+
avatar_preview?: string;
|
|
105
|
+
company?: string;
|
|
106
|
+
company_position?: string;
|
|
107
|
+
email?: string;
|
|
108
|
+
};
|
|
109
|
+
message: {
|
|
110
|
+
body: string;
|
|
111
|
+
timestamp: number;
|
|
112
|
+
mentions: Array<MentionDataType>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export type ReadyEventResponse = {
|
|
46
117
|
ref: string;
|
|
47
118
|
status: STATUS.SUCCESS;
|
|
48
119
|
payload: {
|
|
@@ -50,8 +121,9 @@ export type ReadyEventResponse = ({
|
|
|
50
121
|
isMain?: boolean;
|
|
51
122
|
type: string;
|
|
52
123
|
openSmartAppMeta?: object;
|
|
124
|
+
initialData?: InitialDataEmail | InitialDataProfileAction | InitialDataPush | InitialDataDeeplink | InitialDataMenuAction;
|
|
53
125
|
};
|
|
54
|
-
}
|
|
126
|
+
} | undefined;
|
|
55
127
|
export interface File {
|
|
56
128
|
type: string | null;
|
|
57
129
|
file: string;
|
|
@@ -44,4 +44,4 @@ export var ERROR_CODES;
|
|
|
44
44
|
ERROR_CODES["NO_BRIDGE"] = "no_bridge";
|
|
45
45
|
ERROR_CODES["SUBSCRIPTION_NOT_FOUND"] = "subscription_not_found";
|
|
46
46
|
})(ERROR_CODES || (ERROR_CODES = {}));
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJpZGdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3R5cGVzL2JyaWRnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxNQUFNLENBQU4sSUFBWSxPQWtDWDtBQWxDRCxXQUFZLE9BQU87SUFDakIsMEJBQWUsQ0FBQTtJQUNmLDhDQUFtQyxDQUFBO0lBQ25DLHdDQUE2QixDQUFBO0lBQzdCLHdDQUE2QixDQUFBO0lBQzdCLHNDQUEyQixDQUFBO0lBQzNCLHNDQUEyQixDQUFBO0lBQzNCLHdEQUE2QyxDQUFBO0lBQzdDLHdDQUE2QixDQUFBO0lBQzdCLHdDQUE2QixDQUFBO0lBQzdCLDRDQUFpQyxDQUFBO0lBQ2pDLHdEQUE2QyxDQUFBO0lBQzdDLGtDQUF1QixDQUFBO0lBQ3ZCLG9FQUF5RCxDQUFBO0lBQ3pELGdEQUFxQyxDQUFBO0lBQ3JDLDhDQUFtQyxDQUFBO0lBQ25DLGtEQUF1QyxDQUFBO0lBQ3ZDLGdEQUFxQyxDQUFBO0lBQ3JDLHdEQUE2QyxDQUFBO0lBQzdDLDhDQUFtQyxDQUFBO0lBQ25DLGtDQUF1QixDQUFBO0lBQ3ZCLDhEQUFtRCxDQUFBO0lBQ25ELGtFQUF1RCxDQUFBO0lBQ3ZELDBEQUErQyxDQUFBO0lBQy9DLDhDQUFtQyxDQUFBO0lBQ25DLGtEQUF1QyxDQUFBO0lBQ3ZDLG9EQUF5QyxDQUFBO0lBQ3pDLG9EQUF5QyxDQUFBO0lBQ3pDLDBEQUErQyxDQUFBO0lBQy9DLHdEQUE2QyxDQUFBO0lBQzdDLDhDQUFtQyxDQUFBO0lBQ25DLDREQUFpRCxDQUFBO0lBQ2pELG9EQUF5QyxDQUFBO0lBQ3pDLDhDQUFtQyxDQUFBO0FBQ3JDLENBQUMsRUFsQ1csT0FBTyxLQUFQLE9BQU8sUUFrQ2xCO0FBRUQsTUFBTSxDQUFOLElBQVksTUFHWDtBQUhELFdBQVksTUFBTTtJQUNoQiw2QkFBbUIsQ0FBQTtJQUNuQix5QkFBZSxDQUFBO0FBQ2pCLENBQUMsRUFIVyxNQUFNLEtBQU4sTUFBTSxRQUdqQjtBQUVELE1BQU0sQ0FBTixJQUFZLFdBR1g7QUFIRCxXQUFZLFdBQVc7SUFDckIsc0NBQXVCLENBQUE7SUFDdkIsZ0VBQWlELENBQUE7QUFDbkQsQ0FBQyxFQUhXLFdBQVcsS0FBWCxXQUFXLFFBR3RCIn0=
|
package/build/umd/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressms/smartapp-sdk",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Smartapp SDK",
|
|
5
5
|
"main": "build/main/index.js",
|
|
6
6
|
"typings": "build/main/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typescript": "^4.9.5"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@expressms/smartapp-bridge": "1.3.0
|
|
41
|
+
"@expressms/smartapp-bridge": "1.3.0"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"build/main",
|