@wildix/xbees-connect 1.1.17 → 1.1.20
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-es/package.json +1 -1
- package/dist-es/src/Client.js +14 -16
- package/dist-types/src/Client.d.ts +1 -0
- package/package.json +2 -2
package/dist-es/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"description": "This library provides easy communication between x-bees and integrated web applications",
|
|
5
5
|
"author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
|
|
6
6
|
"homepage": "",
|
package/dist-es/src/Client.js
CHANGED
|
@@ -61,6 +61,14 @@ export class Client {
|
|
|
61
61
|
iframeId: this.iframeId,
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
+
async sendAsyncErrorSafe(data) {
|
|
65
|
+
try {
|
|
66
|
+
return await this.sendAsync(data);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
console.debug('send error - type:', error);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
64
72
|
parseMessage(message) {
|
|
65
73
|
try {
|
|
66
74
|
const data = typeof message.data === 'string'
|
|
@@ -225,14 +233,9 @@ export class Client {
|
|
|
225
233
|
}
|
|
226
234
|
onSuggestContacts(callback) {
|
|
227
235
|
// send event to x-bees
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
catch (error) {
|
|
234
|
-
console.debug('send error - type:', error);
|
|
235
|
-
}
|
|
236
|
+
void this.sendAsyncErrorSafe({
|
|
237
|
+
type: ClientEventType.CONTACTS_AUTO_SUGGEST_IS_SUPPORTED,
|
|
238
|
+
});
|
|
236
239
|
return this.addEventListener(EventType.GET_CONTACTS_AUTO_SUGGEST, (query) => {
|
|
237
240
|
const resolve = (contacts) => this.sendAsync({
|
|
238
241
|
type: ClientEventType.CONTACTS_AUTO_SUGGEST,
|
|
@@ -254,14 +257,9 @@ export class Client {
|
|
|
254
257
|
}
|
|
255
258
|
onLookupAndMatchContact(callback) {
|
|
256
259
|
// send event to x-bees
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
catch (error) {
|
|
263
|
-
console.debug('send error - type:', error);
|
|
264
|
-
}
|
|
260
|
+
void this.sendAsyncErrorSafe({
|
|
261
|
+
type: ClientEventType.CONTACT_LOOK_UP_AND_MATCH_IS_SUPPORTED,
|
|
262
|
+
});
|
|
265
263
|
return this.addEventListener(EventType.GET_LOOK_UP_AND_MATCH, (query) => {
|
|
266
264
|
const resolve = (contact) => this.sendAsync({
|
|
267
265
|
type: ClientEventType.CONTACT_LOOKUP_AND_MATCH,
|
|
@@ -21,6 +21,7 @@ export declare class Client implements ConnectClient {
|
|
|
21
21
|
private readonly localStorageManager;
|
|
22
22
|
constructor();
|
|
23
23
|
private sendAsync;
|
|
24
|
+
private sendAsyncErrorSafe;
|
|
24
25
|
private parseMessage;
|
|
25
26
|
private onMessage;
|
|
26
27
|
ready(platform?: SupportedPlatformVariant | undefined): Promise<ResponseMessage>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"description": "This library provides easy communication between x-bees and integrated web applications",
|
|
5
5
|
"author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=16"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "a2b8416ab3351c9c94fe9165729692f3a60b6df8"
|
|
46
46
|
}
|