chayns-api 2.2.15 → 2.2.16
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.
|
@@ -604,7 +604,7 @@ class AppWrapper {
|
|
|
604
604
|
addAnonymousAccount: async () => {
|
|
605
605
|
return this.appCall(302);
|
|
606
606
|
},
|
|
607
|
-
addAccessTokenChangeListener: async callback => {
|
|
607
|
+
addAccessTokenChangeListener: async (options, callback) => {
|
|
608
608
|
const {
|
|
609
609
|
id
|
|
610
610
|
} = (0, _apiListenerHelper.addApiListener)('accessTokenChangeListener', callback);
|
|
@@ -307,9 +307,9 @@ class FrameWrapper {
|
|
|
307
307
|
if (!this.initialized) await this.ready;
|
|
308
308
|
return this.exposedFunctions.addAnonymousAccount();
|
|
309
309
|
},
|
|
310
|
-
addAccessTokenChangeListener: async callback => {
|
|
310
|
+
addAccessTokenChangeListener: async (options, callback) => {
|
|
311
311
|
if (!this.initialized) await this.ready;
|
|
312
|
-
return this.exposedFunctions.addAccessTokenChangeListener(callback && comlink.proxy(result => callback(result)));
|
|
312
|
+
return this.exposedFunctions.addAccessTokenChangeListener(options, callback && comlink.proxy(result => callback(result)));
|
|
313
313
|
},
|
|
314
314
|
removeAccessTokenChangeListener: async id => {
|
|
315
315
|
if (!this.initialized) await this.ready;
|
|
@@ -569,7 +569,7 @@ export class AppWrapper {
|
|
|
569
569
|
addAnonymousAccount: async () => {
|
|
570
570
|
return this.appCall(302);
|
|
571
571
|
},
|
|
572
|
-
addAccessTokenChangeListener: async callback => {
|
|
572
|
+
addAccessTokenChangeListener: async (options, callback) => {
|
|
573
573
|
const {
|
|
574
574
|
id
|
|
575
575
|
} = addApiListener('accessTokenChangeListener', callback);
|
|
@@ -303,9 +303,9 @@ export class FrameWrapper {
|
|
|
303
303
|
if (!this.initialized) await this.ready;
|
|
304
304
|
return this.exposedFunctions.addAnonymousAccount();
|
|
305
305
|
},
|
|
306
|
-
addAccessTokenChangeListener: async callback => {
|
|
306
|
+
addAccessTokenChangeListener: async (options, callback) => {
|
|
307
307
|
if (!this.initialized) await this.ready;
|
|
308
|
-
return this.exposedFunctions.addAccessTokenChangeListener(callback && comlink.proxy(result => callback(result)));
|
|
308
|
+
return this.exposedFunctions.addAccessTokenChangeListener(options, callback && comlink.proxy(result => callback(result)));
|
|
309
309
|
},
|
|
310
310
|
removeAccessTokenChangeListener: async id => {
|
|
311
311
|
if (!this.initialized) await this.ready;
|
|
@@ -423,9 +423,10 @@ export interface ChaynsReactFunctions {
|
|
|
423
423
|
addDialogHostEventListener: (callback: (data: object) => void) => Promise<number>;
|
|
424
424
|
removeDialogHostEventListener: (id: number) => Promise<void>;
|
|
425
425
|
addAnonymousAccount: () => Promise<AnonymousAccountResult>;
|
|
426
|
-
addAccessTokenChangeListener: (
|
|
426
|
+
addAccessTokenChangeListener: (options: {
|
|
427
|
+
external?: boolean;
|
|
428
|
+
}, callback: (result: {
|
|
427
429
|
accessToken: string;
|
|
428
|
-
isExternal: boolean;
|
|
429
430
|
}) => void) => Promise<number>;
|
|
430
431
|
removeAccessTokenChangeListener: (id: number) => Promise<void>;
|
|
431
432
|
}
|