@wildix/xbees-connect 1.3.0 → 1.3.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.43",
3
+ "version": "1.3.1",
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": "",
@@ -478,5 +478,8 @@ class Client {
478
478
  onContactRefresh(callback) {
479
479
  return this.addEventListener(enums_1.EventType.CONTACT_REFRESH, callback);
480
480
  }
481
+ onStorageUpdated(callback) {
482
+ return this.addEventListener(enums_1.EventType.STORAGE_IS_UPDATED, callback);
483
+ }
481
484
  }
482
485
  exports.Client = Client;
@@ -15,6 +15,7 @@ var EventType;
15
15
  EventType["VISIBILITY"] = "xBeesVisibility";
16
16
  EventType["CONTACT_WEIGHT_UPDATE"] = "xBeesContactWeightUpdate";
17
17
  EventType["CONTACT_REFRESH"] = "xBeesContactRefresh";
18
+ EventType["STORAGE_IS_UPDATED"] = "xBeesStorageIsUpdated";
18
19
  })(EventType || (exports.EventType = EventType = {}));
19
20
  var ClientEventType;
20
21
  (function (ClientEventType) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.43",
3
+ "version": "1.3.1",
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": "",
@@ -472,4 +472,7 @@ export class Client {
472
472
  onContactRefresh(callback) {
473
473
  return this.addEventListener(EventType.CONTACT_REFRESH, callback);
474
474
  }
475
+ onStorageUpdated(callback) {
476
+ return this.addEventListener(EventType.STORAGE_IS_UPDATED, callback);
477
+ }
475
478
  }
@@ -12,6 +12,7 @@ export var EventType;
12
12
  EventType["VISIBILITY"] = "xBeesVisibility";
13
13
  EventType["CONTACT_WEIGHT_UPDATE"] = "xBeesContactWeightUpdate";
14
14
  EventType["CONTACT_REFRESH"] = "xBeesContactRefresh";
15
+ EventType["STORAGE_IS_UPDATED"] = "xBeesStorageIsUpdated";
15
16
  })(EventType || (EventType = {}));
16
17
  export var ClientEventType;
17
18
  (function (ClientEventType) {
@@ -112,4 +112,5 @@ export declare class Client implements ConnectClient {
112
112
  }): void;
113
113
  onContactWeightUpdate(callback: Callback<EventType.CONTACT_WEIGHT_UPDATE>): RemoveEventListener;
114
114
  onContactRefresh(callback: Callback<EventType.CONTACT_REFRESH>): RemoveEventListener;
115
+ onStorageUpdated(callback: Callback<EventType.STORAGE_IS_UPDATED>): RemoveEventListener;
115
116
  }
@@ -10,7 +10,8 @@ export declare enum EventType {
10
10
  LOGOUT = "xBeesLogout",
11
11
  VISIBILITY = "xBeesVisibility",
12
12
  CONTACT_WEIGHT_UPDATE = "xBeesContactWeightUpdate",
13
- CONTACT_REFRESH = "xBeesContactRefresh"
13
+ CONTACT_REFRESH = "xBeesContactRefresh",
14
+ STORAGE_IS_UPDATED = "xBeesStorageIsUpdated"
14
15
  }
15
16
  export declare enum ClientEventType {
16
17
  READY = "xBeesReady",
@@ -215,4 +215,8 @@ export interface ConnectClient {
215
215
  * Starts listen for the events when contact was updated in the daemon and the opened integration should be refreshed
216
216
  */
217
217
  onContactRefresh: (callback: Callback<EventType.CONTACT_REFRESH>) => RemoveEventListener;
218
+ /**
219
+ * Starts listen for the events when xbees updates the local storage and callback can consider the new data
220
+ */
221
+ onStorageUpdated: (callback: Callback<EventType.STORAGE_IS_UPDATED>) => RemoveEventListener;
218
222
  }
@@ -29,6 +29,7 @@ export type EventCallbackMap = {
29
29
  [EventType.REDIRECT_QUERY]: (query: EventPayloadMap[EventType.REDIRECT_QUERY]) => void;
30
30
  [EventType.CONTACT_WEIGHT_UPDATE]: (params: EventPayloadMap[EventType.CONTACT_WEIGHT_UPDATE]) => void;
31
31
  [EventType.CONTACT_REFRESH]: (id: EventPayloadMap[EventType.CONTACT_REFRESH]) => void;
32
+ [EventType.STORAGE_IS_UPDATED]: () => void;
32
33
  };
33
34
  export type RawMessageEvent = MessageEvent<string | Message>;
34
35
  export type ReadyExtendedProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
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": "",
@@ -45,5 +45,5 @@
45
45
  "engines": {
46
46
  "node": ">=16"
47
47
  },
48
- "gitHead": "5abdb04058b4fa69d67bd6cd20116fe7f205d53d"
48
+ "gitHead": "48c015637edde40795772b24bb89edec002f4bdc"
49
49
  }