@wildix/xbees-connect 1.2.31-alpha.3 → 1.2.31-alpha.4

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.31-alpha.3",
3
+ "version": "1.2.31-alpha.4",
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": "",
@@ -49,6 +49,7 @@ class Client {
49
49
  isParentReactNativeWebView;
50
50
  iframeId;
51
51
  variant = null;
52
+ startPage = null;
52
53
  localStorageManager = LocalStorageManager_1.default.getInstance();
53
54
  constructor() {
54
55
  const params = (0, getUrlSearchParamsMap_1.getUrlSearchParamsMap)();
@@ -57,6 +58,7 @@ class Client {
57
58
  this.userEmail = params.get(enums_1.UrlParams.USER);
58
59
  this.referrer = params.get(enums_1.UrlParams.REFERRER);
59
60
  this.needAuthorize = params.has(enums_1.UrlParams.AUTHORIZE);
61
+ this.startPage = params.get(enums_1.UrlParams.START_PAGE);
60
62
  // @ts-expect-error window.ReactNativeWebView will be provided by ReactNative WebView
61
63
  this.isParentReactNativeWebView = !!window.ReactNativeWebView;
62
64
  this.worker = this.isParentReactNativeWebView ? new PostMessageControllerNative_1.default() : new PostMessageControllerWeb_1.default();
@@ -176,6 +178,9 @@ class Client {
176
178
  getReferrer() {
177
179
  return this.referrer;
178
180
  }
181
+ getStartPage() {
182
+ return this.startPage;
183
+ }
179
184
  isVisible() {
180
185
  return this.visible;
181
186
  }
@@ -17,6 +17,7 @@ class ClientParams {
17
17
  iframeId;
18
18
  variant = null;
19
19
  userExtension = null;
20
+ startPage = null;
20
21
  constructor() {
21
22
  const params = (0, getUrlSearchParamsMap_1.getUrlSearchParamsMap)();
22
23
  this.iframeId = params.get(enums_1.UrlParams.ID);
@@ -26,6 +27,7 @@ class ClientParams {
26
27
  this.userToken = params.get(enums_1.UrlParams.TOKEN);
27
28
  this.referrer = params.get(enums_1.UrlParams.REFERRER);
28
29
  this.needAuthorize = params.has(enums_1.UrlParams.AUTHORIZE);
30
+ this.startPage = params.get(enums_1.UrlParams.START_PAGE);
29
31
  }
30
32
  toString() {
31
33
  const { userToken, ...props } = this;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.31-alpha.3",
3
+ "version": "1.2.31-alpha.4",
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,6 +43,7 @@ export class Client {
43
43
  isParentReactNativeWebView;
44
44
  iframeId;
45
45
  variant = null;
46
+ startPage = null;
46
47
  localStorageManager = LocalStorageManager.getInstance();
47
48
  constructor() {
48
49
  const params = getUrlSearchParamsMap();
@@ -51,6 +52,7 @@ export class Client {
51
52
  this.userEmail = params.get(UrlParams.USER);
52
53
  this.referrer = params.get(UrlParams.REFERRER);
53
54
  this.needAuthorize = params.has(UrlParams.AUTHORIZE);
55
+ this.startPage = params.get(UrlParams.START_PAGE);
54
56
  // @ts-expect-error window.ReactNativeWebView will be provided by ReactNative WebView
55
57
  this.isParentReactNativeWebView = !!window.ReactNativeWebView;
56
58
  this.worker = this.isParentReactNativeWebView ? new PostMessageControllerNative() : new PostMessageControllerWeb();
@@ -170,6 +172,9 @@ export class Client {
170
172
  getReferrer() {
171
173
  return this.referrer;
172
174
  }
175
+ getStartPage() {
176
+ return this.startPage;
177
+ }
173
178
  isVisible() {
174
179
  return this.visible;
175
180
  }
@@ -15,6 +15,7 @@ export default class ClientParams {
15
15
  iframeId;
16
16
  variant = null;
17
17
  userExtension = null;
18
+ startPage = null;
18
19
  constructor() {
19
20
  const params = getUrlSearchParamsMap();
20
21
  this.iframeId = params.get(UrlParams.ID);
@@ -24,6 +25,7 @@ export default class ClientParams {
24
25
  this.userToken = params.get(UrlParams.TOKEN);
25
26
  this.referrer = params.get(UrlParams.REFERRER);
26
27
  this.needAuthorize = params.has(UrlParams.AUTHORIZE);
28
+ this.startPage = params.get(UrlParams.START_PAGE);
27
29
  }
28
30
  toString() {
29
31
  const { userToken, ...props } = this;
@@ -1,7 +1,7 @@
1
1
  import { Callback, ConnectClient, Contact, ContactQuery, IPayloadViewPort, LookupAndMatchContactsResolver, Message, Reject, RemoveEventListener, ResponseMessage, StorageEventCallback, SuggestContactsResolver, SupportedPlatformVariant, ToastSeverity, XBeesUser } from '../types';
2
2
  import { ReadyExtendedProps } from '../types/Event';
3
3
  import { LookupAndMatchBatchContactsResolver } from '../types/Resolver';
4
- import { ClientEventType, EventType } from './enums';
4
+ import { ClientEventType, EventType, StartPage } from './enums';
5
5
  import TechnicalSupport from './helpers/TechnicalSupport';
6
6
  /**
7
7
  * Client provides functionality of communication between xBees and integrated web applications via iFrame or ReactNative WebView
@@ -25,6 +25,7 @@ export declare class Client implements ConnectClient {
25
25
  private readonly isParentReactNativeWebView;
26
26
  private readonly iframeId;
27
27
  private readonly variant;
28
+ private readonly startPage;
28
29
  private readonly localStorageManager;
29
30
  constructor();
30
31
  private sendAsync;
@@ -44,6 +45,7 @@ export declare class Client implements ConnectClient {
44
45
  getPbxDomain(): string;
45
46
  getUserExtension(): string | null;
46
47
  getReferrer(): string;
48
+ getStartPage(): StartPage | null;
47
49
  isVisible(): boolean;
48
50
  getBackToAppUrl(): string;
49
51
  isDataOnly(): boolean;
@@ -1,4 +1,5 @@
1
1
  import { WorkVariants } from '../../types';
2
+ import { StartPage } from '../enums';
2
3
  export default class ClientParams {
3
4
  private static instance;
4
5
  static getInstance(): ClientParams;
@@ -9,6 +10,7 @@ export default class ClientParams {
9
10
  readonly iframeId: string;
10
11
  readonly variant: WorkVariants | null;
11
12
  readonly userExtension: string | null;
13
+ readonly startPage: StartPage | null;
12
14
  constructor();
13
15
  toString(): string;
14
16
  }
@@ -1,4 +1,4 @@
1
- import { ClientEventType, EventType } from '../src/enums';
1
+ import { ClientEventType, EventType, StartPage } from '../src/enums';
2
2
  import TechnicalSupport from '../src/helpers/TechnicalSupport';
3
3
  import { Callback } from './Callback';
4
4
  import { Contact, ContactQuery } from './Contact';
@@ -36,6 +36,9 @@ export interface ConnectClient {
36
36
  /**
37
37
  * Retrieves url to get back to x-bees app integration */
38
38
  getBackToAppUrl: () => string;
39
+ /**
40
+ * Retrieves start page from url */
41
+ getStartPage: () => StartPage | null;
39
42
  /**
40
43
  * Retrieves the version of xBeesConnect */
41
44
  version: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.31-alpha.3",
3
+ "version": "1.2.31-alpha.4",
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": "81cd6556050a37b209eac6d46f619b58db51bb4d"
48
+ "gitHead": "1094be80cdaec56a2b2e377c21537f58d998cc2c"
49
49
  }