@wildix/xbees-connect 1.2.36 → 1.2.38-alpha.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-cjs/package.json +1 -1
- package/dist-cjs/src/Client.js +15 -1
- package/dist-es/package.json +1 -1
- package/dist-es/src/Client.js +15 -1
- package/dist-types/src/Client.d.ts +9 -0
- package/package.json +2 -2
package/dist-cjs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.37",
|
|
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-cjs/src/Client.js
CHANGED
|
@@ -145,12 +145,26 @@ class Client {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Use getXBeesUserAsync instead. This method doesn't wait for the user data to be fetched.
|
|
150
|
+
*/
|
|
148
151
|
getXBeesUser() {
|
|
149
152
|
if (!this.user) {
|
|
150
153
|
this.requestXbeesUser();
|
|
151
154
|
}
|
|
152
155
|
return this.user;
|
|
153
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Asynchronously retrieves the xBees user data.
|
|
159
|
+
* This method waits for the user data to be fetched before returning.
|
|
160
|
+
* @returns Promise that resolves to the XBeesUser or null if not available
|
|
161
|
+
*/
|
|
162
|
+
async getXBeesUserAsync() {
|
|
163
|
+
if (!this.user) {
|
|
164
|
+
await this.requestXbeesUser();
|
|
165
|
+
}
|
|
166
|
+
return this.user;
|
|
167
|
+
}
|
|
154
168
|
version() {
|
|
155
169
|
return package_json_1.default.version;
|
|
156
170
|
}
|
|
@@ -186,7 +200,7 @@ class Client {
|
|
|
186
200
|
}
|
|
187
201
|
getBackToAppUrl() {
|
|
188
202
|
if (Client.getInstance().isPlatformNative()) {
|
|
189
|
-
return
|
|
203
|
+
return `${this.referrer}://integrations/${this.iframeId}`;
|
|
190
204
|
}
|
|
191
205
|
return `${this.referrer}/integrations/${this.iframeId}`;
|
|
192
206
|
}
|
package/dist-es/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.37",
|
|
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
|
@@ -139,12 +139,26 @@ export class Client {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated Use getXBeesUserAsync instead. This method doesn't wait for the user data to be fetched.
|
|
144
|
+
*/
|
|
142
145
|
getXBeesUser() {
|
|
143
146
|
if (!this.user) {
|
|
144
147
|
this.requestXbeesUser();
|
|
145
148
|
}
|
|
146
149
|
return this.user;
|
|
147
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Asynchronously retrieves the xBees user data.
|
|
153
|
+
* This method waits for the user data to be fetched before returning.
|
|
154
|
+
* @returns Promise that resolves to the XBeesUser or null if not available
|
|
155
|
+
*/
|
|
156
|
+
async getXBeesUserAsync() {
|
|
157
|
+
if (!this.user) {
|
|
158
|
+
await this.requestXbeesUser();
|
|
159
|
+
}
|
|
160
|
+
return this.user;
|
|
161
|
+
}
|
|
148
162
|
version() {
|
|
149
163
|
return packageJson.version;
|
|
150
164
|
}
|
|
@@ -180,7 +194,7 @@ export class Client {
|
|
|
180
194
|
}
|
|
181
195
|
getBackToAppUrl() {
|
|
182
196
|
if (Client.getInstance().isPlatformNative()) {
|
|
183
|
-
return
|
|
197
|
+
return `${this.referrer}://integrations/${this.iframeId}`;
|
|
184
198
|
}
|
|
185
199
|
return `${this.referrer}/integrations/${this.iframeId}`;
|
|
186
200
|
}
|
|
@@ -36,7 +36,16 @@ export declare class Client implements ConnectClient {
|
|
|
36
36
|
private sendDailyIntegrationUsageAnalytics;
|
|
37
37
|
ready(props?: SupportedPlatformVariant | ReadyExtendedProps | undefined): Promise<ResponseMessage>;
|
|
38
38
|
private requestXbeesUser;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use getXBeesUserAsync instead. This method doesn't wait for the user data to be fetched.
|
|
41
|
+
*/
|
|
39
42
|
getXBeesUser(): XBeesUser | null;
|
|
43
|
+
/**
|
|
44
|
+
* Asynchronously retrieves the xBees user data.
|
|
45
|
+
* This method waits for the user data to be fetched before returning.
|
|
46
|
+
* @returns Promise that resolves to the XBeesUser or null if not available
|
|
47
|
+
*/
|
|
48
|
+
getXBeesUserAsync(): Promise<XBeesUser | null>;
|
|
40
49
|
version(): string;
|
|
41
50
|
isPlatformNative(): boolean;
|
|
42
51
|
isPlatformWeb(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.38-alpha.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": "",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=16"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9000549ed3a3460087d2873156c46243619e2300"
|
|
49
49
|
}
|