zmp-sdk 2.14.2 → 2.14.3

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.
@@ -34674,38 +34674,51 @@
34674
34674
  'default': zlib$1
34675
34675
  });
34676
34676
 
34677
- var name = "axios";
34678
- var version$1 = "0.21.1";
34679
- var description = "Promise based HTTP client for the browser and node.js";
34680
- var main = "index.js";
34681
- var scripts = {
34682
- test: "grunt test && bundlesize",
34683
- start: "node ./sandbox/server.js",
34684
- build: "NODE_ENV=production grunt build",
34685
- preversion: "npm test",
34686
- version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
34687
- postversion: "git push && git push --tags",
34688
- examples: "node ./examples/server.js",
34689
- coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
34690
- fix: "eslint --fix lib/**/*.js"
34677
+ var _from = "axios@0.21.1";
34678
+ var _id = "axios@0.21.1";
34679
+ var _inBundle = false;
34680
+ var _integrity = "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==";
34681
+ var _location = "/zmp-sdk/axios";
34682
+ var _phantomChildren = {
34691
34683
  };
34692
- var repository = {
34693
- type: "git",
34694
- url: "https://github.com/axios/axios.git"
34684
+ var _requested = {
34685
+ type: "version",
34686
+ registry: true,
34687
+ raw: "axios@0.21.1",
34688
+ name: "axios",
34689
+ escapedName: "axios",
34690
+ rawSpec: "0.21.1",
34691
+ saveSpec: null,
34692
+ fetchSpec: "0.21.1"
34695
34693
  };
34696
- var keywords = [
34697
- "xhr",
34698
- "http",
34699
- "ajax",
34700
- "promise",
34701
- "node"
34694
+ var _requiredBy = [
34695
+ "/zmp-sdk"
34702
34696
  ];
34703
- var author = "Matt Zabriskie";
34704
- var license = "MIT";
34697
+ var _resolved = "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz";
34698
+ var _shasum = "22563481962f4d6bde9a76d516ef0e5d3c09b2b8";
34699
+ var _spec = "axios@0.21.1";
34700
+ var _where = "/Users/nguyentuankiet/Work/Zalo/Projects/ZaloMiniProgram/TestNewFunction";
34701
+ var author = {
34702
+ name: "Matt Zabriskie"
34703
+ };
34704
+ var browser = {
34705
+ "./lib/adapters/http.js": "./lib/adapters/xhr.js"
34706
+ };
34705
34707
  var bugs = {
34706
34708
  url: "https://github.com/axios/axios/issues"
34707
34709
  };
34708
- var homepage = "https://github.com/axios/axios";
34710
+ var bundleDependencies = false;
34711
+ var bundlesize = [
34712
+ {
34713
+ path: "./dist/axios.min.js",
34714
+ threshold: "5kB"
34715
+ }
34716
+ ];
34717
+ var dependencies = {
34718
+ "follow-redirects": "^1.10.0"
34719
+ };
34720
+ var deprecated = false;
34721
+ var description = "Promise based HTTP client for the browser and node.js";
34709
34722
  var devDependencies = {
34710
34723
  bundlesize: "^0.17.0",
34711
34724
  coveralls: "^3.0.0",
@@ -34743,62 +34756,105 @@
34743
34756
  webpack: "^1.13.1",
34744
34757
  "webpack-dev-server": "^1.14.1"
34745
34758
  };
34746
- var browser = {
34747
- "./lib/adapters/http.js": "./lib/adapters/xhr.js"
34748
- };
34759
+ var homepage = "https://github.com/axios/axios";
34749
34760
  var jsdelivr = "dist/axios.min.js";
34750
- var unpkg = "dist/axios.min.js";
34751
- var typings = "./index.d.ts";
34752
- var dependencies = {
34753
- "follow-redirects": "^1.10.0"
34754
- };
34755
- var bundlesize = [
34756
- {
34757
- path: "./dist/axios.min.js",
34758
- threshold: "5kB"
34759
- }
34761
+ var keywords = [
34762
+ "xhr",
34763
+ "http",
34764
+ "ajax",
34765
+ "promise",
34766
+ "node"
34760
34767
  ];
34768
+ var license = "MIT";
34769
+ var main = "index.js";
34770
+ var name = "axios";
34771
+ var repository = {
34772
+ type: "git",
34773
+ url: "git+https://github.com/axios/axios.git"
34774
+ };
34775
+ var scripts = {
34776
+ build: "NODE_ENV=production grunt build",
34777
+ coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
34778
+ examples: "node ./examples/server.js",
34779
+ fix: "eslint --fix lib/**/*.js",
34780
+ postversion: "git push && git push --tags",
34781
+ preversion: "npm test",
34782
+ start: "node ./sandbox/server.js",
34783
+ test: "grunt test && bundlesize",
34784
+ version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
34785
+ };
34786
+ var typings = "./index.d.ts";
34787
+ var unpkg = "dist/axios.min.js";
34788
+ var version$1 = "0.21.1";
34761
34789
  var _package = {
34762
- name: name,
34763
- version: version$1,
34764
- description: description,
34765
- main: main,
34766
- scripts: scripts,
34767
- repository: repository,
34768
- keywords: keywords,
34790
+ _from: _from,
34791
+ _id: _id,
34792
+ _inBundle: _inBundle,
34793
+ _integrity: _integrity,
34794
+ _location: _location,
34795
+ _phantomChildren: _phantomChildren,
34796
+ _requested: _requested,
34797
+ _requiredBy: _requiredBy,
34798
+ _resolved: _resolved,
34799
+ _shasum: _shasum,
34800
+ _spec: _spec,
34801
+ _where: _where,
34769
34802
  author: author,
34770
- license: license,
34803
+ browser: browser,
34771
34804
  bugs: bugs,
34772
- homepage: homepage,
34805
+ bundleDependencies: bundleDependencies,
34806
+ bundlesize: bundlesize,
34807
+ dependencies: dependencies,
34808
+ deprecated: deprecated,
34809
+ description: description,
34773
34810
  devDependencies: devDependencies,
34774
- browser: browser,
34811
+ homepage: homepage,
34775
34812
  jsdelivr: jsdelivr,
34776
- unpkg: unpkg,
34813
+ keywords: keywords,
34814
+ license: license,
34815
+ main: main,
34816
+ name: name,
34817
+ repository: repository,
34818
+ scripts: scripts,
34777
34819
  typings: typings,
34778
- dependencies: dependencies,
34779
- bundlesize: bundlesize
34820
+ unpkg: unpkg,
34821
+ version: version$1
34780
34822
  };
34781
34823
 
34782
34824
  var _package$1 = /*#__PURE__*/Object.freeze({
34783
34825
  __proto__: null,
34784
- name: name,
34785
- version: version$1,
34786
- description: description,
34787
- main: main,
34788
- scripts: scripts,
34789
- repository: repository,
34790
- keywords: keywords,
34826
+ _from: _from,
34827
+ _id: _id,
34828
+ _inBundle: _inBundle,
34829
+ _integrity: _integrity,
34830
+ _location: _location,
34831
+ _phantomChildren: _phantomChildren,
34832
+ _requested: _requested,
34833
+ _requiredBy: _requiredBy,
34834
+ _resolved: _resolved,
34835
+ _shasum: _shasum,
34836
+ _spec: _spec,
34837
+ _where: _where,
34791
34838
  author: author,
34792
- license: license,
34839
+ browser: browser,
34793
34840
  bugs: bugs,
34794
- homepage: homepage,
34841
+ bundleDependencies: bundleDependencies,
34842
+ bundlesize: bundlesize,
34843
+ dependencies: dependencies,
34844
+ deprecated: deprecated,
34845
+ description: description,
34795
34846
  devDependencies: devDependencies,
34796
- browser: browser,
34847
+ homepage: homepage,
34797
34848
  jsdelivr: jsdelivr,
34798
- unpkg: unpkg,
34849
+ keywords: keywords,
34850
+ license: license,
34851
+ main: main,
34852
+ name: name,
34853
+ repository: repository,
34854
+ scripts: scripts,
34799
34855
  typings: typings,
34800
- dependencies: dependencies,
34801
- bundlesize: bundlesize,
34856
+ unpkg: unpkg,
34857
+ version: version$1,
34802
34858
  'default': _package
34803
34859
  });
34804
34860
 
@@ -36098,6 +36154,16 @@
36098
36154
  }
36099
36155
  }
36100
36156
  catch (error) {
36157
+ if ((error === null || error === void 0 ? void 0 : error.code) === RESPONSE_CODE.UNAUTHORIZED ||
36158
+ (error === null || error === void 0 ? void 0 : error.code) === RESPONSE_CODE.FORBIDDEN) {
36159
+ let loggedIn = false;
36160
+ if (this instanceof SDKCreator) {
36161
+ loggedIn = this.getLoginStatus();
36162
+ }
36163
+ if (!loggedIn) {
36164
+ error = new CommonError(RESPONSE_CODE.UNAUTHORIZED, MESSAGES.LOGIN_REQUIRED);
36165
+ }
36166
+ }
36101
36167
  const { handler } = catchDecoratorStore;
36102
36168
  const errorParsed = handler.call(null, propertyName, error, this);
36103
36169
  window.zmpSentry && window.zmpSentry.throwError(errorParsed.toString());
@@ -36120,6 +36186,16 @@
36120
36186
  return fn.apply(this, args);
36121
36187
  }
36122
36188
  catch (error) {
36189
+ if ((error === null || error === void 0 ? void 0 : error.code) === RESPONSE_CODE.UNAUTHORIZED ||
36190
+ (error === null || error === void 0 ? void 0 : error.code) === RESPONSE_CODE.FORBIDDEN) {
36191
+ let loggedIn = false;
36192
+ if (this instanceof SDKCreator) {
36193
+ loggedIn = this.getLoginStatus();
36194
+ }
36195
+ if (!loggedIn) {
36196
+ error = new CommonError(RESPONSE_CODE.UNAUTHORIZED, MESSAGES.LOGIN_REQUIRED);
36197
+ }
36198
+ }
36123
36199
  const { handler } = catchDecoratorStore;
36124
36200
  if (!lodash.isNull(handler) && lodash.isFunction(handler)) {
36125
36201
  handler.call(null, key, error, this);
@@ -36148,31 +36224,71 @@
36148
36224
  }
36149
36225
  callNative(action, data, option) {
36150
36226
  return new Promise((resolve, reject) => {
36151
- const fn = (cb) => {
36152
- if (cb && cb.error_code >= 0 && cb.action == action) {
36153
- resolve(cb.data || {});
36154
- if (option === null || option === void 0 ? void 0 : option.callback) {
36155
- option.callback(cb, null);
36156
- }
36157
- }
36158
- else if (cb && cb.error_code < 0) {
36227
+ const fn = (cb) => __awaiter(this, void 0, void 0, function* () {
36228
+ try {
36159
36229
  const error = new NativeError(cb.error_code, `${cb.action}: ${cb.error_message}`);
36160
- try {
36161
- window.zmpSentry &&
36162
- window.zmpSentry.captureMessage(`${action}: call native fail`, {
36163
- extra: {
36164
- data: data,
36165
- rs: cb
36230
+ if (cb.action === action) {
36231
+ if (option === null || option === void 0 ? void 0 : option.callback) {
36232
+ const res = yield option.callback(cb, error);
36233
+ resolve(res);
36234
+ }
36235
+ else {
36236
+ if (cb && cb.error_code >= 0) {
36237
+ resolve(cb.data || {});
36238
+ }
36239
+ else if (cb && cb.error_code < 0) {
36240
+ try {
36241
+ window.zmpSentry &&
36242
+ window.zmpSentry.captureMessage(`${action}: call native fail`, {
36243
+ extra: {
36244
+ data: data,
36245
+ rs: cb
36246
+ }
36247
+ });
36166
36248
  }
36167
- });
36249
+ catch (error) { }
36250
+ reject(error);
36251
+ }
36252
+ }
36168
36253
  }
36169
- catch (error) { }
36254
+ }
36255
+ catch (error) {
36170
36256
  reject(error);
36171
- if (option === null || option === void 0 ? void 0 : option.callback) {
36172
- option.callback(cb, error);
36173
- }
36174
36257
  }
36175
- };
36258
+ // if (cb && cb.error_code >= 0 && cb.action == action) {
36259
+ // resolve(cb.data || {});
36260
+ // if (option?.callback) {
36261
+ // try {
36262
+ // await option.callback(cb, null);
36263
+ // } catch (error) {
36264
+ // reject(error);
36265
+ // }
36266
+ // }
36267
+ // } else if (cb && cb.error_code < 0) {
36268
+ // const error = new NativeError(
36269
+ // cb.error_code,
36270
+ // `${cb.action}: ${cb.error_message}`
36271
+ // );
36272
+ // try {
36273
+ // window.zmpSentry &&
36274
+ // window.zmpSentry.captureMessage(`${action}: call native fail`, {
36275
+ // extra: {
36276
+ // data: data,
36277
+ // rs: cb
36278
+ // }
36279
+ // });
36280
+ // } catch (error) {}
36281
+ // if (option?.callback) {
36282
+ // try {
36283
+ // await option.callback(cb, error);
36284
+ // } catch (error) {
36285
+ // reject(error);
36286
+ // }
36287
+ // } else {
36288
+ // reject(error);
36289
+ // }
36290
+ // }
36291
+ });
36176
36292
  __classPrivateFieldGet(this, _ZJSBridgeProvider_bridge).jsCall(action, data, fn, option === null || option === void 0 ? void 0 : option.isMultiCallback, option === null || option === void 0 ? void 0 : option.nRetry, option === null || option === void 0 ? void 0 : option.haveTimeout);
36177
36293
  });
36178
36294
  }
@@ -36188,7 +36304,7 @@
36188
36304
  }
36189
36305
  };
36190
36306
 
36191
- var version = "2.14.2";
36307
+ var version = "2.14.3";
36192
36308
 
36193
36309
  class Basics {
36194
36310
  /**
@@ -37694,17 +37810,18 @@
37694
37810
  *
37695
37811
  */
37696
37812
  static getPhoneNumber(object) {
37697
- return new Promise((resolve, reject) => {
37698
- this.callNative(ACTION.MP_GET_NUMBER, {}, {
37813
+ return __awaiter(this, void 0, void 0, function* () {
37814
+ return yield this.callNative(ACTION.MP_GET_NUMBER, {}, {
37699
37815
  isMultiCallback: true,
37700
37816
  callback: (nativeData, error) => {
37701
- if (error)
37702
- reject(error);
37703
37817
  if (nativeData.error_code === 0) {
37704
37818
  const res = {
37705
37819
  number: nativeData.data
37706
37820
  };
37707
- resolve(res);
37821
+ return Promise.resolve(res);
37822
+ }
37823
+ else {
37824
+ return Promise.reject(error);
37708
37825
  }
37709
37826
  }
37710
37827
  });
@@ -37785,16 +37902,14 @@
37785
37902
  *
37786
37903
  */
37787
37904
  static getLocation(object) {
37788
- return new Promise((resolve, reject) => {
37789
- this.callNative(ACTION.GET_LOCATION, {
37905
+ return __awaiter(this, void 0, void 0, function* () {
37906
+ return yield this.callNative(ACTION.GET_LOCATION, {
37790
37907
  silent_request: false,
37791
37908
  permission_description: 'Cho phép Zalo truy cập vào vị trí của thiết bị này?'
37792
37909
  }, {
37793
37910
  isMultiCallback: true,
37794
37911
  haveTimeout: false,
37795
37912
  callback: (nativeData, error) => {
37796
- if (error)
37797
- reject(error);
37798
37913
  if (nativeData.error_code === 0) {
37799
37914
  const data = nativeData.data;
37800
37915
  const res = {
@@ -37807,7 +37922,10 @@
37807
37922
  /** provider */
37808
37923
  provider: data.provider
37809
37924
  };
37810
- resolve(res);
37925
+ return Promise.resolve(res);
37926
+ }
37927
+ else {
37928
+ return Promise.reject(error);
37811
37929
  }
37812
37930
  }
37813
37931
  });
@@ -37842,17 +37960,17 @@
37842
37960
  *
37843
37961
  */
37844
37962
  static requestCameraPermission(object) {
37845
- return new Promise((resolve, reject) => {
37846
- this.callNative(ACTION.REQUEST_PERMISSION_CAMERA, {}, {
37963
+ return __awaiter(this, void 0, void 0, function* () {
37964
+ return yield this.callNative(ACTION.REQUEST_PERMISSION_CAMERA, {}, {
37847
37965
  callback: (nativeData, error) => {
37848
37966
  if (nativeData.error_code === -2 || nativeData.error_code >= 0) {
37849
- resolve({
37967
+ return Promise.resolve({
37850
37968
  userAllow: nativeData.error_code === -2 ? false : true,
37851
37969
  message: nativeData.error_message
37852
37970
  });
37853
37971
  }
37854
37972
  else {
37855
- reject(error);
37973
+ return Promise.reject(error);
37856
37974
  }
37857
37975
  }
37858
37976
  });
@@ -38146,7 +38264,7 @@
38146
38264
  }
38147
38265
  }
38148
38266
 
38149
- var _ZaloMiniProgramSDK_zAppId, _ZaloMiniProgramSDK_appId, _ZaloMiniProgramSDK_appConfig, _ZaloMiniProgramSDK_zOAuth, _ZaloMiniProgramSDK_accessToken, _ZaloMiniProgramSDK_cache, _ZaloMiniProgramSDK_configWindow, _ZaloMiniProgramSDK_configApp, _ZaloMiniProgramSDK_callJump, _ZaloMiniProgramSDK_setNavigationBarRightButton;
38267
+ var _ZaloMiniProgramSDK_zAppId, _ZaloMiniProgramSDK_appId, _ZaloMiniProgramSDK_appConfig, _ZaloMiniProgramSDK_zOAuth, _ZaloMiniProgramSDK_accessToken, _ZaloMiniProgramSDK_cache, _ZaloMiniProgramSDK_loggedIn, _ZaloMiniProgramSDK_configWindow, _ZaloMiniProgramSDK_configApp, _ZaloMiniProgramSDK_callJump, _ZaloMiniProgramSDK_setNavigationBarRightButton;
38150
38268
  class ZaloMiniProgramSDK extends ZJSBridgeProvider {
38151
38269
  constructor() {
38152
38270
  super();
@@ -38160,6 +38278,7 @@
38160
38278
  getToken: 0
38161
38279
  }
38162
38280
  });
38281
+ _ZaloMiniProgramSDK_loggedIn.set(this, false);
38163
38282
  this.events = ZMPEEmitter.getInstance();
38164
38283
  _ZaloMiniProgramSDK_configWindow.set(this, () => {
38165
38284
  const appConfig = __classPrivateFieldGet(this, _ZaloMiniProgramSDK_appConfig).app || null;
@@ -38289,6 +38408,9 @@
38289
38408
  }
38290
38409
  return ZaloMiniProgramSDK.instance;
38291
38410
  }
38411
+ getLoginStatus() {
38412
+ return __classPrivateFieldGet(this, _ZaloMiniProgramSDK_loggedIn);
38413
+ }
38292
38414
  getAppId() {
38293
38415
  return __classPrivateFieldGet(this, _ZaloMiniProgramSDK_appId);
38294
38416
  }
@@ -38327,11 +38449,13 @@
38327
38449
  if (!__classPrivateFieldGet(this, _ZaloMiniProgramSDK_cache).timer.getToken) {
38328
38450
  __classPrivateFieldGet(this, _ZaloMiniProgramSDK_cache).timer.getToken = window.setInterval(runTimer, expiredIn);
38329
38451
  }
38452
+ __classPrivateFieldSet(this, _ZaloMiniProgramSDK_loggedIn, true);
38330
38453
  this.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
38331
38454
  window.ZJSBridge.setZAccSession &&
38332
38455
  window.ZJSBridge.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
38333
38456
  return __classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken);
38334
38457
  }
38458
+ __classPrivateFieldSet(this, _ZaloMiniProgramSDK_loggedIn, false);
38335
38459
  return null;
38336
38460
  });
38337
38461
  });
@@ -38350,9 +38474,9 @@
38350
38474
  });
38351
38475
  }
38352
38476
  }
38353
- _ZaloMiniProgramSDK_zAppId = new WeakMap(), _ZaloMiniProgramSDK_appId = new WeakMap(), _ZaloMiniProgramSDK_appConfig = new WeakMap(), _ZaloMiniProgramSDK_zOAuth = new WeakMap(), _ZaloMiniProgramSDK_accessToken = new WeakMap(), _ZaloMiniProgramSDK_cache = new WeakMap(), _ZaloMiniProgramSDK_configWindow = new WeakMap(), _ZaloMiniProgramSDK_configApp = new WeakMap(), _ZaloMiniProgramSDK_callJump = new WeakMap(), _ZaloMiniProgramSDK_setNavigationBarRightButton = new WeakMap();
38477
+ _ZaloMiniProgramSDK_zAppId = new WeakMap(), _ZaloMiniProgramSDK_appId = new WeakMap(), _ZaloMiniProgramSDK_appConfig = new WeakMap(), _ZaloMiniProgramSDK_zOAuth = new WeakMap(), _ZaloMiniProgramSDK_accessToken = new WeakMap(), _ZaloMiniProgramSDK_cache = new WeakMap(), _ZaloMiniProgramSDK_loggedIn = new WeakMap(), _ZaloMiniProgramSDK_configWindow = new WeakMap(), _ZaloMiniProgramSDK_configApp = new WeakMap(), _ZaloMiniProgramSDK_callJump = new WeakMap(), _ZaloMiniProgramSDK_setNavigationBarRightButton = new WeakMap();
38354
38478
 
38355
- var _MockSDK_appId, _MockSDK_appConfig, _MockSDK_zOAuth, _MockSDK_accessToken, _MockSDK_cache;
38479
+ var _MockSDK_appId, _MockSDK_appConfig, _MockSDK_zOAuth, _MockSDK_accessToken, _MockSDK_cache, _MockSDK_loggedId;
38356
38480
  class MockSDK {
38357
38481
  constructor() {
38358
38482
  _MockSDK_appId.set(this, window.zAppID);
@@ -38364,10 +38488,15 @@
38364
38488
  getToken: 0
38365
38489
  }
38366
38490
  });
38491
+ _MockSDK_loggedId.set(this, false);
38492
+ this.getLoginStatus = () => {
38493
+ return __classPrivateFieldGet(this, _MockSDK_loggedId);
38494
+ };
38367
38495
  this.getAppId = () => {
38368
38496
  return __classPrivateFieldGet(this, _MockSDK_appId);
38369
38497
  };
38370
38498
  this.login = () => {
38499
+ __classPrivateFieldSet(this, _MockSDK_loggedId, true);
38371
38500
  return Promise.resolve(__classPrivateFieldGet(this, _MockSDK_zOAuth));
38372
38501
  };
38373
38502
  this.getAccessToken = () => {
@@ -38413,7 +38542,7 @@
38413
38542
  return yield storage.clearStorage();
38414
38543
  });
38415
38544
  this.getUserInfo = () => {
38416
- console.warn("birthday and gender are deprecated");
38545
+ console.warn('birthday and gender are deprecated');
38417
38546
  return Promise.resolve({
38418
38547
  userInfo: {
38419
38548
  id: '3368637342326461234',
@@ -38662,7 +38791,7 @@
38662
38791
  throw new Error('Method not implemented.');
38663
38792
  }
38664
38793
  }
38665
- _MockSDK_appId = new WeakMap(), _MockSDK_appConfig = new WeakMap(), _MockSDK_zOAuth = new WeakMap(), _MockSDK_accessToken = new WeakMap(), _MockSDK_cache = new WeakMap();
38794
+ _MockSDK_appId = new WeakMap(), _MockSDK_appConfig = new WeakMap(), _MockSDK_zOAuth = new WeakMap(), _MockSDK_accessToken = new WeakMap(), _MockSDK_cache = new WeakMap(), _MockSDK_loggedId = new WeakMap();
38666
38795
 
38667
38796
  /*! *****************************************************************************
38668
38797
  Copyright (C) Microsoft. All rights reserved.
@@ -39903,7 +40032,6 @@
39903
40032
  _SDKCreator_sdkManager.set(this, void 0);
39904
40033
  __classPrivateFieldSet(this, _SDKCreator_sdkManager, this.getInstance());
39905
40034
  this.events.addListener = (event, fn, context) => {
39906
- console.log(123123);
39907
40035
  const stringifyEventName = event;
39908
40036
  return this.events.addListener(Events[stringifyEventName], fn, context);
39909
40037
  };
@@ -39928,6 +40056,9 @@
39928
40056
  return yield __classPrivateFieldGet(this, _SDKCreator_sdkManager).login(object);
39929
40057
  });
39930
40058
  }
40059
+ getLoginStatus() {
40060
+ return __classPrivateFieldGet(this, _SDKCreator_sdkManager).getLoginStatus();
40061
+ }
39931
40062
  /**
39932
40063
  * Get Access Token.
39933
40064
  *
@@ -40300,13 +40431,18 @@
40300
40431
  });
40301
40432
  }
40302
40433
  getPhoneNumber(object) {
40303
- return __classPrivateFieldGet(this, _SDKCreator_sdkManager).getPhoneNumber();
40434
+ return __awaiter(this, void 0, void 0, function* () {
40435
+ return yield __classPrivateFieldGet(this, _SDKCreator_sdkManager).getPhoneNumber();
40436
+ });
40304
40437
  }
40305
40438
  }
40306
40439
  _SDKCreator_sdkManager = new WeakMap();
40307
40440
  __decorate([
40308
40441
  handleError
40309
40442
  ], SDKCreator.prototype, "login", null);
40443
+ __decorate([
40444
+ handleErrorSync
40445
+ ], SDKCreator.prototype, "getLoginStatus", null);
40310
40446
  __decorate([
40311
40447
  handleError
40312
40448
  ], SDKCreator.prototype, "getAccessToken", null);