@wildix/xbees-connect 1.3.7 → 1.3.8

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.3.6",
3
+ "version": "1.3.8",
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": "",
@@ -48,6 +48,7 @@ class Client {
48
48
  needAuthorize;
49
49
  isParentReactNativeWebView;
50
50
  iframeId;
51
+ integrationId;
51
52
  variant = null;
52
53
  startPage = null;
53
54
  product = null;
@@ -61,6 +62,7 @@ class Client {
61
62
  this.needAuthorize = params.has(enums_1.UrlParams.AUTHORIZE);
62
63
  this.startPage = params.get(enums_1.UrlParams.START_PAGE);
63
64
  this.product = params.get(enums_1.UrlParams.PRODUCT);
65
+ this.integrationId = params.get(enums_1.UrlParams.ID)?.split('-')[0] ?? '';
64
66
  // @ts-expect-error window.ReactNativeWebView will be provided by ReactNative WebView
65
67
  this.isParentReactNativeWebView = !!window.ReactNativeWebView;
66
68
  this.worker = this.isParentReactNativeWebView ? new PostMessageControllerNative_1.default() : new PostMessageControllerWeb_1.default();
@@ -252,6 +254,9 @@ class Client {
252
254
  getTheme() {
253
255
  return this.sendAsync({ type: enums_1.ClientEventType.THEME });
254
256
  }
257
+ getIntegrationId() {
258
+ return this.integrationId;
259
+ }
255
260
  startCall(phoneNumber) {
256
261
  return this.sendAsync({
257
262
  type: enums_1.ClientEventType.START_CALL,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
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,6 +42,7 @@ export class Client {
42
42
  needAuthorize;
43
43
  isParentReactNativeWebView;
44
44
  iframeId;
45
+ integrationId;
45
46
  variant = null;
46
47
  startPage = null;
47
48
  product = null;
@@ -55,6 +56,7 @@ export class Client {
55
56
  this.needAuthorize = params.has(UrlParams.AUTHORIZE);
56
57
  this.startPage = params.get(UrlParams.START_PAGE);
57
58
  this.product = params.get(UrlParams.PRODUCT);
59
+ this.integrationId = params.get(UrlParams.ID)?.split('-')[0] ?? '';
58
60
  // @ts-expect-error window.ReactNativeWebView will be provided by ReactNative WebView
59
61
  this.isParentReactNativeWebView = !!window.ReactNativeWebView;
60
62
  this.worker = this.isParentReactNativeWebView ? new PostMessageControllerNative() : new PostMessageControllerWeb();
@@ -246,6 +248,9 @@ export class Client {
246
248
  getTheme() {
247
249
  return this.sendAsync({ type: ClientEventType.THEME });
248
250
  }
251
+ getIntegrationId() {
252
+ return this.integrationId;
253
+ }
249
254
  startCall(phoneNumber) {
250
255
  return this.sendAsync({
251
256
  type: ClientEventType.START_CALL,
@@ -25,6 +25,7 @@ export declare class Client implements ConnectClient {
25
25
  private readonly needAuthorize;
26
26
  private readonly isParentReactNativeWebView;
27
27
  private readonly iframeId;
28
+ private readonly integrationId;
28
29
  private readonly variant;
29
30
  private readonly startPage;
30
31
  private readonly product;
@@ -73,6 +74,7 @@ export declare class Client implements ConnectClient {
73
74
  contactMatchUpdated(query: ContactQuery, contact: Contact): Promise<ResponseMessage<ClientEventType.CONTACT_MATCH_UPDATE>>;
74
75
  getThemeMode(): Promise<Message<ClientEventType.THEME_MODE>>;
75
76
  getTheme(): Promise<Message<ClientEventType.THEME>>;
77
+ getIntegrationId(): string;
76
78
  startCall(phoneNumber: string): Promise<Message<ClientEventType.START_CALL>>;
77
79
  reboot(): Promise<ResponseMessage>;
78
80
  setViewport(payload: IPayloadViewPort): Promise<ResponseMessage>;
@@ -43,6 +43,9 @@ export interface ConnectClient {
43
43
  /**
44
44
  * Retrieves the product type from which the integration is opened */
45
45
  getProduct: () => Product | null;
46
+ /**
47
+ * Retrieves the integration id from url */
48
+ getIntegrationId: () => string;
46
49
  /**
47
50
  * Retrieves the version of xBeesConnect */
48
51
  version: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
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": "",