@wildix/xbees-connect 1.1.3 → 1.1.4-y.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
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
|
@@ -116,6 +116,12 @@ export class Client {
|
|
|
116
116
|
getUserEmail() {
|
|
117
117
|
return this.userEmail;
|
|
118
118
|
}
|
|
119
|
+
getReferrer() {
|
|
120
|
+
return this.referrer;
|
|
121
|
+
}
|
|
122
|
+
getBackToAppUrl() {
|
|
123
|
+
return `${this.referrer}/integrations/${this.iframeId}`;
|
|
124
|
+
}
|
|
119
125
|
isDataOnly() {
|
|
120
126
|
return this.variant === 'no-ui' || this.variant === 'daemon';
|
|
121
127
|
}
|
|
@@ -37,8 +37,7 @@ class LocalStorageManager {
|
|
|
37
37
|
return '';
|
|
38
38
|
}
|
|
39
39
|
shouldUseIntegrationKey() {
|
|
40
|
-
return
|
|
41
|
-
window.location.pathname.endsWith('/index.html'));
|
|
40
|
+
return window.location.host.endsWith('integrations.x-bees.com');
|
|
42
41
|
}
|
|
43
42
|
save(key, value) {
|
|
44
43
|
// Save data to localStorage
|
|
@@ -29,6 +29,8 @@ export declare class Client implements ConnectClient {
|
|
|
29
29
|
isPlatformWeb(): boolean;
|
|
30
30
|
getUserPbxToken(): string;
|
|
31
31
|
getUserEmail(): string;
|
|
32
|
+
getReferrer(): string;
|
|
33
|
+
getBackToAppUrl(): string;
|
|
32
34
|
isDataOnly(): boolean;
|
|
33
35
|
isSetupDialog(): boolean;
|
|
34
36
|
showsUi(): boolean;
|
|
@@ -110,6 +110,12 @@ export interface ConnectClient {
|
|
|
110
110
|
/**
|
|
111
111
|
* Retrieves current user's email */
|
|
112
112
|
getUserEmail: () => string;
|
|
113
|
+
/**
|
|
114
|
+
* Retrieves url for x-bees app which uses integration */
|
|
115
|
+
getReferrer: () => string;
|
|
116
|
+
/**
|
|
117
|
+
* Retrieves url to get back to x-bees app integration */
|
|
118
|
+
getBackToAppUrl: () => string;
|
|
113
119
|
/**
|
|
114
120
|
* Retrieves the version of xBeesConnect */
|
|
115
121
|
version: () => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4-y.0",
|
|
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": "25634a49d107ae0911bcd1d41ad29e292db2f4e1"
|
|
46
46
|
}
|