wallaby-cash 2.0.1 → 2.0.2

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/base.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { WallabyConfig, RequestOptions, RequestRoute, WallabyConfigOptions } from './types';
1
+ import { AuthType, WallabyConfig, RequestOptions, RequestRoute, WallabyConfigOptions } from './types';
2
2
  import { StorageService } from './lib/utils/storage.service';
3
3
  import { LocalStorage } from './types/storage';
4
4
  import { LockManagerService } from './helpers/lock-manager.service';
package/dist/index.cjs.js CHANGED
@@ -6961,10 +6961,10 @@ class Base {
6961
6961
  }
6962
6962
  this.clientAuthToken = token;
6963
6963
  if (userIsMfaVerified(token)) {
6964
- this.deviceAuthType = AuthType.Password;
6964
+ this.deviceAuthType = exports.AuthType.Password;
6965
6965
  }
6966
6966
  else {
6967
- this.deviceAuthType = AuthType.Passkey;
6967
+ this.deviceAuthType = exports.AuthType.Passkey;
6968
6968
  }
6969
6969
  }
6970
6970
  /**
@@ -7018,7 +7018,7 @@ class Base {
7018
7018
  * @returns Promise of <T> where T is the type of the response.
7019
7019
  */
7020
7020
  async request(route, options) {
7021
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
7021
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
7022
7022
  try {
7023
7023
  let url;
7024
7024
  if (typeof route.fullPath !== 'string') {
@@ -7059,7 +7059,7 @@ class Base {
7059
7059
  }
7060
7060
  catch (error) {
7061
7061
  if (error instanceof axios.AxiosError) {
7062
- logger.error('SDK::Base::RequestMethod.Get::AxiosError', (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data);
7062
+ logger.error('SDK::Base::RequestMethod.Get::AxiosError', (_b = error.response) === null || _b === void 0 ? void 0 : _b.data);
7063
7063
  return Promise.reject((_c = error.response) === null || _c === void 0 ? void 0 : _c.data);
7064
7064
  }
7065
7065
  return Promise.reject(error === null || error === void 0 ? void 0 : error.message);
@@ -7072,11 +7072,11 @@ class Base {
7072
7072
  }
7073
7073
  catch (error) {
7074
7074
  if (error instanceof axios.AxiosError) {
7075
- logger.error('SDK::Base::RequestMethod.Post::AxiosError', (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data);
7076
- if (((_e = error === null || error === void 0 ? void 0 : error.response) === null || _e === void 0 ? void 0 : _e.data.errorCode) && ((_f = error === null || error === void 0 ? void 0 : error.response) === null || _f === void 0 ? void 0 : _f.data.errorCode) === exports.ErrorResponseCodes.user_already_exists) {
7077
- return (_g = error === null || error === void 0 ? void 0 : error.response) === null || _g === void 0 ? void 0 : _g.data;
7075
+ logger.error('SDK::Base::RequestMethod.Post::AxiosError', (_d = error.response) === null || _d === void 0 ? void 0 : _d.data);
7076
+ if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.data.errorCode) && error.response.data.errorCode === exports.ErrorResponseCodes.user_already_exists) {
7077
+ return error.response.data;
7078
7078
  }
7079
- if (((_h = error.response) === null || _h === void 0 ? void 0 : _h.data.errorCode) && error.response.data.errorCode === exports.ErrorResponseCodes.user_already_exists) {
7079
+ if (((_f = error.response) === null || _f === void 0 ? void 0 : _f.data.errorCode) && error.response.data.errorCode === exports.ErrorResponseCodes.user_already_exists) {
7080
7080
  return error.response.data;
7081
7081
  }
7082
7082
  return Promise.reject(error.message);
@@ -7092,8 +7092,8 @@ class Base {
7092
7092
  }
7093
7093
  catch (error) {
7094
7094
  if (error instanceof axios.AxiosError) {
7095
- logger.error('SDK::Base::RequestMethod.Put::error', (_j = error.response) === null || _j === void 0 ? void 0 : _j.data);
7096
- return Promise.reject((_k = error.response) === null || _k === void 0 ? void 0 : _k.data);
7095
+ logger.error('SDK::Base::RequestMethod.Put::error', (_g = error.response) === null || _g === void 0 ? void 0 : _g.data);
7096
+ return Promise.reject((_h = error.response) === null || _h === void 0 ? void 0 : _h.data);
7097
7097
  }
7098
7098
  return Promise.reject(error === null || error === void 0 ? void 0 : error.message);
7099
7099
  }
@@ -7105,8 +7105,8 @@ class Base {
7105
7105
  }
7106
7106
  catch (error) {
7107
7107
  if (error instanceof axios.AxiosError) {
7108
- logger.error('SDK::Base::RequestMethod.Put::AxiosError', (_l = error === null || error === void 0 ? void 0 : error.response) === null || _l === void 0 ? void 0 : _l.data);
7109
- return Promise.reject((_m = error.response) === null || _m === void 0 ? void 0 : _m.data);
7108
+ logger.error('SDK::Base::RequestMethod.Put::AxiosError', (_j = error.response) === null || _j === void 0 ? void 0 : _j.data);
7109
+ return Promise.reject((_k = error.response) === null || _k === void 0 ? void 0 : _k.data);
7110
7110
  }
7111
7111
  return Promise.reject(error === null || error === void 0 ? void 0 : error.message);
7112
7112
  }