@wildix/xbees-connect 1.2.20 → 1.2.21

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.19",
3
+ "version": "1.2.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": "",
@@ -345,7 +345,7 @@ class Client {
345
345
  }
346
346
  saveToStorage(key, value, sendToXbees = false) {
347
347
  this.localStorageManager.save(key, value);
348
- sendToXbees && this.sendToXbeesStorage(key, value);
348
+ sendToXbees && this.saveInXbeesStorage(key, value);
349
349
  }
350
350
  deleteFromStorage(key) {
351
351
  this.localStorageManager.delete(key);
@@ -378,7 +378,7 @@ class Client {
378
378
  onVisibilityChange(callback) {
379
379
  return this.addEventListener(enums_1.EventType.VISIBILITY, callback);
380
380
  }
381
- sendToXbeesStorage(key, value) {
381
+ saveInXbeesStorage(key, value) {
382
382
  void this.sendAsync({
383
383
  type: enums_1.ClientEventType.SAVE_TO_STORAGE,
384
384
  payload: {
@@ -387,9 +387,9 @@ class Client {
387
387
  },
388
388
  });
389
389
  }
390
- requestFromXbeesStorage(key) {
390
+ getFromXbeesStorage(key) {
391
391
  return this.sendAsync({
392
- type: enums_1.ClientEventType.REQUEST_FROM_STORAGE,
392
+ type: enums_1.ClientEventType.GET_FROM_STORAGE,
393
393
  payload: { key },
394
394
  });
395
395
  }
@@ -41,7 +41,7 @@ var ClientEventType;
41
41
  ClientEventType["SEND_TECHNICAL_SUPPORT_INFORMATION"] = "xBeesSendTechInfo";
42
42
  ClientEventType["USER"] = "xBeesUser";
43
43
  ClientEventType["SAVE_TO_STORAGE"] = "xBeesSaveToStorage";
44
- ClientEventType["REQUEST_FROM_STORAGE"] = "xBeesRequestFromStorage";
44
+ ClientEventType["GET_FROM_STORAGE"] = "xBeesRequestFromStorage";
45
45
  ClientEventType["REMOVE_FROM_STORAGE"] = "xBeesRemoveFromStorage";
46
46
  ClientEventType["AVAILABLE_CONTACT"] = "xBeesAvailableContact";
47
47
  })(ClientEventType || (exports.ClientEventType = ClientEventType = {}));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.19",
3
+ "version": "1.2.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": "",
@@ -339,7 +339,7 @@ export class Client {
339
339
  }
340
340
  saveToStorage(key, value, sendToXbees = false) {
341
341
  this.localStorageManager.save(key, value);
342
- sendToXbees && this.sendToXbeesStorage(key, value);
342
+ sendToXbees && this.saveInXbeesStorage(key, value);
343
343
  }
344
344
  deleteFromStorage(key) {
345
345
  this.localStorageManager.delete(key);
@@ -372,7 +372,7 @@ export class Client {
372
372
  onVisibilityChange(callback) {
373
373
  return this.addEventListener(EventType.VISIBILITY, callback);
374
374
  }
375
- sendToXbeesStorage(key, value) {
375
+ saveInXbeesStorage(key, value) {
376
376
  void this.sendAsync({
377
377
  type: ClientEventType.SAVE_TO_STORAGE,
378
378
  payload: {
@@ -381,9 +381,9 @@ export class Client {
381
381
  },
382
382
  });
383
383
  }
384
- requestFromXbeesStorage(key) {
384
+ getFromXbeesStorage(key) {
385
385
  return this.sendAsync({
386
- type: ClientEventType.REQUEST_FROM_STORAGE,
386
+ type: ClientEventType.GET_FROM_STORAGE,
387
387
  payload: { key },
388
388
  });
389
389
  }
@@ -38,7 +38,7 @@ export var ClientEventType;
38
38
  ClientEventType["SEND_TECHNICAL_SUPPORT_INFORMATION"] = "xBeesSendTechInfo";
39
39
  ClientEventType["USER"] = "xBeesUser";
40
40
  ClientEventType["SAVE_TO_STORAGE"] = "xBeesSaveToStorage";
41
- ClientEventType["REQUEST_FROM_STORAGE"] = "xBeesRequestFromStorage";
41
+ ClientEventType["GET_FROM_STORAGE"] = "xBeesRequestFromStorage";
42
42
  ClientEventType["REMOVE_FROM_STORAGE"] = "xBeesRemoveFromStorage";
43
43
  ClientEventType["AVAILABLE_CONTACT"] = "xBeesAvailableContact";
44
44
  })(ClientEventType || (ClientEventType = {}));
@@ -84,7 +84,7 @@ export declare class Client implements ConnectClient {
84
84
  setIntegrationStorageKey(integrationKey: string): void;
85
85
  getTechnicalSupport(): TechnicalSupport;
86
86
  onVisibilityChange(callback: Callback<EventType.VISIBILITY>): RemoveEventListener;
87
- sendToXbeesStorage<SavingType>(key: string, value: SavingType): void;
88
- requestFromXbeesStorage(key: string): Promise<ResponseMessage<ClientEventType.REQUEST_FROM_STORAGE>>;
87
+ saveInXbeesStorage<SavingType>(key: string, value: SavingType): void;
88
+ getFromXbeesStorage(key: string): Promise<ResponseMessage<ClientEventType.GET_FROM_STORAGE>>;
89
89
  removeFromXbeesStorage(key: string): void;
90
90
  }
@@ -36,7 +36,7 @@ export declare enum ClientEventType {
36
36
  SEND_TECHNICAL_SUPPORT_INFORMATION = "xBeesSendTechInfo",
37
37
  USER = "xBeesUser",
38
38
  SAVE_TO_STORAGE = "xBeesSaveToStorage",
39
- REQUEST_FROM_STORAGE = "xBeesRequestFromStorage",
39
+ GET_FROM_STORAGE = "xBeesRequestFromStorage",
40
40
  REMOVE_FROM_STORAGE = "xBeesRemoveFromStorage",
41
41
  AVAILABLE_CONTACT = "xBeesAvailableContact"
42
42
  }
@@ -173,10 +173,10 @@ export interface ConnectClient {
173
173
  onVisibilityChange: (callback: Callback<EventType.VISIBILITY>) => RemoveEventListener;
174
174
  /**
175
175
  * Send data to save in x-bees storage */
176
- sendToXbeesStorage: (key: string, value: string) => void;
176
+ saveInXbeesStorage: (key: string, value: string) => void;
177
177
  /**
178
178
  * Request stored data from x-bees storage */
179
- requestFromXbeesStorage: (key: string) => Promise<ResponseMessage<ClientEventType.REQUEST_FROM_STORAGE>>;
179
+ getFromXbeesStorage: (key: string) => Promise<ResponseMessage<ClientEventType.GET_FROM_STORAGE>>;
180
180
  /**
181
181
  * Remove data from x-bees storage */
182
182
  removeFromXbeesStorage: (key: string) => void;
@@ -2,10 +2,10 @@ import { ClientEventType, EventType } from '../src/enums';
2
2
  import { AvailableContactData } from './AvailableContactData';
3
3
  import { ContactQuery } from './Contact';
4
4
  import { Message, MessageType } from './Message';
5
- import { IPayloadAutoSuggestResult, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContextResult, IPayloadConversationResult, IPayloadRequestFromStorage, IPayloadSendAnalytics, IPayloadSentToStorage, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort } from './Payload';
5
+ import { IPayloadAutoSuggestResult, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContextResult, IPayloadConversationResult, IPayloadGetFromStorage, IPayloadSaveToStorage, IPayloadSendAnalytics, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort } from './Payload';
6
6
  import { SupportedPlatformVariant } from './Platform';
7
7
  import { XBeesUser } from './XBeesUser';
8
- export type EventPayload<T extends MessageType> = T extends EventType.GET_CONTACTS_AUTO_SUGGEST ? string : T extends ClientEventType.CONTACTS_AUTO_SUGGEST ? IPayloadAutoSuggestResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH | ClientEventType.CONTACT_CREATE_OR_UPDATE | ClientEventType.CONTACT_MATCH_UPDATE ? IPayloadContactMatchResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH_NOT_FOUND ? IPayloadContactMatchResultNotFound : T extends ClientEventType.CONTEXT ? IPayloadContextResult : T extends ClientEventType.CURRENT_CONTACT ? IPayloadContactResult : T extends ClientEventType.CURRENT_CONVERSATION ? IPayloadConversationResult : T extends EventType.ADD_CALL ? IPayloadCallStartedInfo : T extends ClientEventType.START_CALL ? IPayloadCallStart : T extends ClientEventType.READY ? IPayloadVersion : T extends ClientEventType.VIEW_PORT ? IPayloadViewPort : T extends ClientEventType.THEME ? IPayloadThemeChange : T extends EventType.USE_THEME ? IPayloadThemeChange : T extends ClientEventType.TOAST ? IPayloadToast : T extends ClientEventType.SEND_ANALYTICS ? IPayloadSendAnalytics : T extends ClientEventType.SEND_TECHNICAL_SUPPORT_INFORMATION ? IPayloadTechSupport : T extends EventType.PBX_TOKEN ? string : T extends ClientEventType.TOKEN ? string : T extends ClientEventType.TO_CLIPBOARD ? string : T extends EventType.GET_LOOK_UP_AND_MATCH ? ContactQuery : T extends EventType.VISIBILITY ? boolean : T extends ClientEventType.USER ? XBeesUser : T extends ClientEventType.SAVE_TO_STORAGE ? IPayloadSentToStorage : T extends ClientEventType.REQUEST_FROM_STORAGE ? IPayloadRequestFromStorage : T extends ClientEventType.REMOVE_FROM_STORAGE ? IPayloadRequestFromStorage : T extends ClientEventType.AVAILABLE_CONTACT ? AvailableContactData | null : never;
8
+ export type EventPayload<T extends MessageType> = T extends EventType.GET_CONTACTS_AUTO_SUGGEST ? string : T extends ClientEventType.CONTACTS_AUTO_SUGGEST ? IPayloadAutoSuggestResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH | ClientEventType.CONTACT_CREATE_OR_UPDATE | ClientEventType.CONTACT_MATCH_UPDATE ? IPayloadContactMatchResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH_NOT_FOUND ? IPayloadContactMatchResultNotFound : T extends ClientEventType.CONTEXT ? IPayloadContextResult : T extends ClientEventType.CURRENT_CONTACT ? IPayloadContactResult : T extends ClientEventType.CURRENT_CONVERSATION ? IPayloadConversationResult : T extends EventType.ADD_CALL ? IPayloadCallStartedInfo : T extends ClientEventType.START_CALL ? IPayloadCallStart : T extends ClientEventType.READY ? IPayloadVersion : T extends ClientEventType.VIEW_PORT ? IPayloadViewPort : T extends ClientEventType.THEME ? IPayloadThemeChange : T extends EventType.USE_THEME ? IPayloadThemeChange : T extends ClientEventType.TOAST ? IPayloadToast : T extends ClientEventType.SEND_ANALYTICS ? IPayloadSendAnalytics : T extends ClientEventType.SEND_TECHNICAL_SUPPORT_INFORMATION ? IPayloadTechSupport : T extends EventType.PBX_TOKEN ? string : T extends ClientEventType.TOKEN ? string : T extends ClientEventType.TO_CLIPBOARD ? string : T extends EventType.GET_LOOK_UP_AND_MATCH ? ContactQuery : T extends EventType.VISIBILITY ? boolean : T extends ClientEventType.USER ? XBeesUser : T extends ClientEventType.SAVE_TO_STORAGE ? IPayloadSaveToStorage : T extends ClientEventType.GET_FROM_STORAGE ? IPayloadGetFromStorage : T extends ClientEventType.REMOVE_FROM_STORAGE ? IPayloadGetFromStorage : T extends ClientEventType.AVAILABLE_CONTACT ? AvailableContactData | null : never;
9
9
  export type EventPayloadMap = {
10
10
  [EventType.GET_CONTACTS_AUTO_SUGGEST]: string;
11
11
  [EventType.GET_LOOK_UP_AND_MATCH]: ContactQuery;
@@ -54,11 +54,11 @@ export interface IPayloadSendAnalytics {
54
54
  eventName: string;
55
55
  params?: Record<string, string>;
56
56
  }
57
- export interface IPayloadSentToStorage {
57
+ export interface IPayloadSaveToStorage {
58
58
  key: string;
59
59
  value: string;
60
60
  }
61
- export interface IPayloadRequestFromStorage {
61
+ export interface IPayloadGetFromStorage {
62
62
  key: string;
63
63
  }
64
64
  export interface IPayloadTechSupport {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.20",
3
+ "version": "1.2.21",
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": "",
@@ -43,5 +43,5 @@
43
43
  "engines": {
44
44
  "node": ">=16"
45
45
  },
46
- "gitHead": "d536c20b5bd3d2da698c69dc2ef6e2883a5cf057"
46
+ "gitHead": "4128033f1d6e4deaa7315d5f5e680c840616cebf"
47
47
  }