@tap-payments/auth-jsconnect 2.9.38-development → 2.9.39-development

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.
@@ -285,6 +285,17 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
285
285
  prev: '',
286
286
  order: 8
287
287
  },
288
+ {
289
+ name: 'CONNECT_EXPRESS_GENERIC_PREPARING_DATA_STEP',
290
+ next: [
291
+ 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
292
+ 'CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP',
293
+ 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
294
+ 'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
295
+ ],
296
+ prev: '',
297
+ order: 9
298
+ },
288
299
  {
289
300
  name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
290
301
  next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
@@ -186,34 +186,29 @@ export var retrieveEntityListAsync = createAsyncThunk('connectExpress/retrieveEn
186
186
  export var retrieveAuthenticationListAsync = createAsyncThunk('connectExpress/retrieveAuthenticationListAsync', function (_a) {
187
187
  var individualId = _a.individualId;
188
188
  return __awaiter(void 0, void 0, void 0, function () {
189
- var brandList, entityList, brands, err_1, list, err_2;
190
- return __generator(this, function (_b) {
191
- switch (_b.label) {
189
+ var brandList, entityList, _b, brandResponse, entityResponse, err_1;
190
+ return __generator(this, function (_c) {
191
+ switch (_c.label) {
192
192
  case 0:
193
193
  brandList = undefined;
194
194
  entityList = undefined;
195
- _b.label = 1;
195
+ _c.label = 1;
196
196
  case 1:
197
- _b.trys.push([1, 3, , 4]);
198
- return [4, API.brandService.getBrandList({ individual_id: individualId })];
197
+ _c.trys.push([1, 3, , 4]);
198
+ return [4, Promise.all([
199
+ API.brandService.getBrandList({ individual_id: individualId }),
200
+ API.entityService.getEntityListUsingIndividualId(individualId)
201
+ ])];
199
202
  case 2:
200
- brands = (_b.sent()).brands;
201
- brandList = brands;
203
+ _b = _c.sent(), brandResponse = _b[0], entityResponse = _b[1];
204
+ brandList = brandResponse.brands;
205
+ entityList = entityResponse.list;
202
206
  return [3, 4];
203
207
  case 3:
204
- err_1 = _b.sent();
208
+ err_1 = _c.sent();
209
+ console.error('Error fetching data:', err_1);
205
210
  return [3, 4];
206
- case 4:
207
- _b.trys.push([4, 6, , 7]);
208
- return [4, API.entityService.getEntityListUsingIndividualId(individualId)];
209
- case 5:
210
- list = (_b.sent()).list;
211
- entityList = list;
212
- return [3, 7];
213
- case 6:
214
- err_2 = _b.sent();
215
- return [3, 7];
216
- case 7: return [2, { brandList: brandList || [], entityList: entityList || [] }];
211
+ case 4: return [2, { brandList: brandList || [], entityList: entityList || [] }];
217
212
  }
218
213
  });
219
214
  });
@@ -390,6 +385,7 @@ export var verifyNafathAsync = createAsyncThunk('connectExpress/verifyNafathAsyn
390
385
  return [2, { data: data }];
391
386
  }
392
387
  if (!isSuccess) return [3, 9];
388
+ thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_GENERIC_PREPARING_DATA_STEP'));
393
389
  authId = (_j = data.auth) === null || _j === void 0 ? void 0 : _j.id;
394
390
  leadId = (_k = data.auth) === null || _k === void 0 ? void 0 : _k.lead_id;
395
391
  thunkApi.dispatch(storeAuthId(authId));
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const GenericPrepareDataLoading: () => JSX.Element;
3
+ export default GenericPrepareDataLoading;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useAppSelector } from '../../../../hooks';
3
+ import DataLoading from '../../../shared/DataLoading';
4
+ import { connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
5
+ var GenericPrepareDataLoading = function () {
6
+ var error = useAppSelector(connectExpressSelector).error;
7
+ return _jsx(DataLoading, { error: error });
8
+ };
9
+ export default GenericPrepareDataLoading;
@@ -0,0 +1,2 @@
1
+ import GenericPrepareDataLoading from './GenericPrepareDataLoading';
2
+ export default GenericPrepareDataLoading;
@@ -0,0 +1,2 @@
1
+ import GenericPrepareDataLoading from './GenericPrepareDataLoading';
2
+ export default GenericPrepareDataLoading;
@@ -30,6 +30,7 @@ import ConnectExpressCollectBusinessScreen from './connectExpress/screens/Collec
30
30
  import ConnectExpressVerifyAuthMobileOtpScreen from './connectExpress/screens/VerifyMobileAuthOTP';
31
31
  import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
32
32
  import ConnectExpressPreparingDataLoaderScreen from './connectExpress/screens/PrepareDataLoading';
33
+ import ConnectExpressGenericPreparingDataLoaderScreen from './connectExpress/screens/GenericPrepareDataLoading';
33
34
  import ConnectExpressSuccessFlowButtonsScreen from './connectExpress/screens/SuccessWithFlowButtons';
34
35
  import ConnectExpressAccountAlreadyCreatedScreen from './connectExpress/screens/AccountAlreadyCreated';
35
36
  import ConnectExpressAuthenticationListScreen from './connectExpress/screens/AuthenticationList';
@@ -294,6 +295,10 @@ export var connectExpressFeatureScreens = [
294
295
  {
295
296
  name: 'COLLECT_MOBILE_OWNERSHIP',
296
297
  element: ConnectExpressCollectMobileOwnership
298
+ },
299
+ {
300
+ name: 'CONNECT_EXPRESS_GENERIC_PREPARING_DATA_STEP',
301
+ element: ConnectExpressGenericPreparingDataLoaderScreen
297
302
  }
298
303
  ];
299
304
  export var authFeatureScreens = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.9.38-development",
3
+ "version": "2.9.39-development",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -112,8 +112,7 @@
112
112
  "lint-staged": {
113
113
  "src/**/*.{ts,tsx,json,js,jsx}": [
114
114
  "yarn run prettier:fix",
115
- "yarn run lint",
116
- "git add ."
115
+ "yarn run lint"
117
116
  ]
118
117
  },
119
118
  "browserslist": {