@tap-payments/auth-jsconnect 2.9.27-sandbox → 2.10.1-beta

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.
@@ -20,7 +20,6 @@ declare const accountService: {
20
20
  createAccount: (data: CreateAccountBody) => Promise<any>;
21
21
  expressCreateAccount: (data: ExpressCreateAccountBody) => Promise<any>;
22
22
  checkAccountAvailability: (individualId: string) => Promise<any>;
23
- checkAccountAvailabilityStatus: (individualId: string) => Promise<any>;
24
23
  checkMigrationStatus: (jobId: string) => Promise<any>;
25
24
  };
26
25
  export { accountService };
@@ -20,12 +20,6 @@ var checkAccountAvailability = function (individualId) {
20
20
  url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts")
21
21
  });
22
22
  };
23
- var checkAccountAvailabilityStatus = function (individualId) {
24
- return httpClient({
25
- method: 'get',
26
- url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts?data=status")
27
- });
28
- };
29
23
  var checkMigrationStatus = function (jobId) {
30
24
  return httpClient({
31
25
  method: 'get',
@@ -36,7 +30,6 @@ var accountService = {
36
30
  createAccount: createAccount,
37
31
  expressCreateAccount: expressCreateAccount,
38
32
  checkAccountAvailability: checkAccountAvailability,
39
- checkAccountAvailabilityStatus: checkAccountAvailabilityStatus,
40
33
  checkMigrationStatus: checkMigrationStatus
41
34
  };
42
35
  export { accountService };
@@ -91,7 +91,6 @@ declare const API: {
91
91
  createAccount: (data: CreateAccountBody) => Promise<any>;
92
92
  expressCreateAccount: (data: ExpressCreateAccountBody) => Promise<any>;
93
93
  checkAccountAvailability: (individualId: string) => Promise<any>;
94
- checkAccountAvailabilityStatus: (individualId: string) => Promise<any>;
95
94
  checkMigrationStatus: (jobId: string) => Promise<any>;
96
95
  };
97
96
  dataService: {
@@ -12,6 +12,7 @@ export declare const ENDPOINT_PATHS: {
12
12
  SANDBOX_BASE_URL: string;
13
13
  PRODUCTION_BASE_URL: string;
14
14
  DEV_BASE_URL: string;
15
+ BETA_BASE_URL: string;
15
16
  BUSINESS_COUNTRIES: string;
16
17
  COUNTRIES: string;
17
18
  IP: string;
@@ -1,6 +1,7 @@
1
1
  var SANDBOX_BASE_URL = 'https://connect-mw.sandbox.tap.company/middleware';
2
2
  var PRODUCTION_BASE_URL = 'https://connect-mw.tap.company/middleware';
3
3
  var DEV_BASE_URL = 'https://connect-mw.dev.tap.company/middleware';
4
+ var BETA_BASE_URL = 'https://connect-mw.beta.tap.company/middleware';
4
5
  var API_BUSINESS_COUNTRIES = 'https://godata.sandbox.tap.company/api/v1/business/country/list';
5
6
  var API_COUNTRIES = 'https://utilities.tap.company/api/v1/country/list';
6
7
  var CURRENCY_PATH = 'https://utilities.tap.company/api/v1/currency/iso';
@@ -69,6 +70,7 @@ export var ENDPOINT_PATHS = {
69
70
  SANDBOX_BASE_URL: SANDBOX_BASE_URL,
70
71
  PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
71
72
  DEV_BASE_URL: DEV_BASE_URL,
73
+ BETA_BASE_URL: BETA_BASE_URL,
72
74
  BUSINESS_COUNTRIES: API_BUSINESS_COUNTRIES,
73
75
  COUNTRIES: API_COUNTRIES,
74
76
  IP: IP_PATH,
@@ -1,6 +1,7 @@
1
1
  import { ScreenStepNavigation, BusinessType } from '../@types';
2
2
  export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
3
3
  export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
4
+ export declare const CONNECT_BETA_URL = "https://connect.beta.tap.company";
4
5
  export declare const CONNECT_PROD_URL = "https://connect.tap.company";
5
6
  export declare const CLIENT_ORIGIN: string;
6
7
  export declare const TAP_WEBSITE = "https://www.tap.company/";
@@ -2,6 +2,7 @@ import { BusinessType } from '../@types';
2
2
  import { CONNECT_FLOWS } from './flows';
3
3
  export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
4
4
  export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
5
+ export var CONNECT_BETA_URL = 'https://connect.beta.tap.company';
5
6
  export var CONNECT_PROD_URL = 'https://connect.tap.company';
6
7
  export var CLIENT_ORIGIN = window.location.origin;
7
8
  export var TAP_WEBSITE = 'https://www.tap.company/';
@@ -626,27 +626,19 @@ export var checkAccountAvailability = createAsyncThunk('auth/checkAccountAvailab
626
626
  isDataHasIndividualOnly = (authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length) === 1 && authConfigData.includes('individual');
627
627
  data = (_c = auth.data.responseData) === null || _c === void 0 ? void 0 : _c.authResponse;
628
628
  authId = (data || {}).id;
629
- accountData = undefined;
630
- if (!isDataHasIndividualOnly) return [3, 2];
631
- return [4, API.accountService.checkAccountAvailabilityStatus(data === null || data === void 0 ? void 0 : data.individual_id)];
629
+ return [4, API.accountService.checkAccountAvailability(data === null || data === void 0 ? void 0 : data.individual_id)];
632
630
  case 1:
633
631
  accountData = _d.sent();
634
- return [3, 4];
635
- case 2: return [4, API.accountService.checkAccountAvailability(data === null || data === void 0 ? void 0 : data.individual_id)];
636
- case 3:
637
- accountData = _d.sent();
638
- _d.label = 4;
639
- case 4:
640
632
  _b = accountData || {}, step_name = _b.step_name, brands = _b.brands, entities = _b.entities;
641
633
  brandList = brands || [];
642
634
  entityList = entities || [];
643
635
  isExistingUser = step_name === 'select_account';
644
- if (!(isExistingUser && isDataHasIndividualOnly && authId)) return [3, 6];
636
+ if (!(isExistingUser && isDataHasIndividualOnly && authId)) return [3, 3];
645
637
  return [4, thunkApi.dispatch(confirmInfo({ authId: authId }))];
646
- case 5:
638
+ case 2:
647
639
  _d.sent();
648
640
  return [2, { brandList: brandList, entityList: entityList }];
649
- case 6:
641
+ case 3:
650
642
  if (isExistingUser && authDataHasValue && brandList.length && entityList.length) {
651
643
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_AUTHENTICATION_LIST_STEP')); });
652
644
  return [2, { brandList: brandList, entityList: entityList }];
@@ -1181,6 +1181,7 @@ export var individualSlice = createSlice({
1181
1181
  state.data.individualData.isAuthorized = is_authorized;
1182
1182
  })
1183
1183
  .addCase(retrieveIndividualInfo.rejected, function (state, action) {
1184
+ state.addOrRequestDetailLoading = false;
1184
1185
  state.error = action.error.message;
1185
1186
  })
1186
1187
  .addCase(getIndividualList.pending, function (state) {
@@ -1,5 +1,5 @@
1
1
  import { axiosInstance } from '../api';
2
- import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
2
+ import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_BETA_URL } from '../constants';
3
3
  import { objectHasValues } from './object';
4
4
  export var sleep = function (milliseconds) {
5
5
  if (milliseconds === void 0) { milliseconds = 1000; }
@@ -14,7 +14,7 @@ export var dangerousMessage = function (message, callBack) {
14
14
  export var setBaseUrl = function (publicKey) {
15
15
  var isProd = publicKey.includes('pk_live');
16
16
  if (isProd) {
17
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
17
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.BETA_BASE_URL;
18
18
  return;
19
19
  }
20
20
  axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
@@ -36,7 +36,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
36
36
  window.history.replaceState({}, '', newUrl);
37
37
  };
38
38
  export var openConnect = function (pk, countryCode) {
39
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
39
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_BETA_URL : CONNECT_SANDBOX_URL);
40
40
  if (countryCode) {
41
41
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
42
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.9.27-sandbox",
3
+ "version": "2.10.1-beta",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -21,7 +21,7 @@
21
21
  "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
22
  "tsc:alias": "tsc-alias -p tsconfig.json",
23
23
  "ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
- "push": "npm publish --access public --tag sandbox"
24
+ "push": "npm publish --access public --tag beta"
25
25
  },
26
26
  "keywords": [],
27
27
  "author": {