chayns-api 1.0.57 → 1.0.58

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.
@@ -553,10 +553,18 @@ class AppWrapper {
553
553
  }
554
554
  async init() {
555
555
  this.values = this.mapOldApiToNew(await this.appCall(18));
556
- this.appCall(66, {
557
- enabled: true
558
- }, value => {
556
+ const callbackName = `chaynsApiV5Callback_${this.counter++}`;
557
+ window.disablev4AccessTokenChangeListener = true;
558
+ window[callbackName] = ({
559
+ retVal: value
560
+ }) => {
559
561
  this.mapOldApiToNew(value);
562
+ };
563
+ this.appCall(66, {
564
+ enabled: true,
565
+ callback: callbackName
566
+ }, {
567
+ awaitResult: false
560
568
  });
561
569
  return undefined;
562
570
  }
@@ -551,10 +551,19 @@ export class AppWrapper {
551
551
  }
552
552
  async init() {
553
553
  this.values = this.mapOldApiToNew(await this.appCall(18));
554
- this.appCall(66, {
555
- enabled: true
556
- }, value => {
554
+ const callbackName = `chaynsApiV5Callback_${this.counter++}`;
555
+ window.disablev4AccessTokenChangeListener = true;
556
+ window[callbackName] = _ref2 => {
557
+ let {
558
+ retVal: value
559
+ } = _ref2;
557
560
  this.mapOldApiToNew(value);
561
+ };
562
+ this.appCall(66, {
563
+ enabled: true,
564
+ callback: callbackName
565
+ }, {
566
+ awaitResult: false
558
567
  });
559
568
  return undefined;
560
569
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",