@tap-payments/auth-jsconnect 2.8.42-test → 2.8.45-sandbox
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/build/constants/app.d.ts +1 -0
- package/build/constants/app.js +76 -3
- package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
- package/build/features/app/connectExpress/connectExpressStore.js +98 -47
- package/build/features/auth/Auth.js +5 -1
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/bank/Bank.js +3 -1
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/board/Board.js +8 -4
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/brand/Brand.js +3 -1
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/business/Business.js +9 -4
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +22 -20
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/entity/Entity.js +3 -1
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/featuresScreens.js +67 -7
- package/build/features/individual/Individual.js +3 -1
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/password/Password.js +3 -1
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/signIn/SignIn.js +12 -3
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.js +3 -1
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/hooks/useVerifyToken.d.ts +3 -1
- package/build/hooks/useVerifyToken.js +9 -4
- package/build/utils/common.js +3 -3
- package/package.json +2 -2
package/build/constants/app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScreenStepNavigation, BusinessType } from '../@types';
|
|
2
2
|
export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
|
|
3
|
+
export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
|
|
3
4
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
4
5
|
export declare const CLIENT_ORIGIN: string;
|
|
5
6
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
package/build/constants/app.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BusinessType } from '../@types';
|
|
2
2
|
export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
|
|
3
|
+
export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
|
|
3
4
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
4
5
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
5
6
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -112,6 +113,12 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
112
113
|
prev: '',
|
|
113
114
|
order: 1
|
|
114
115
|
},
|
|
116
|
+
{
|
|
117
|
+
name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
|
|
118
|
+
next: '',
|
|
119
|
+
prev: '',
|
|
120
|
+
order: 1
|
|
121
|
+
},
|
|
115
122
|
{
|
|
116
123
|
name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
|
|
117
124
|
next: [
|
|
@@ -196,21 +203,27 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
196
203
|
},
|
|
197
204
|
{
|
|
198
205
|
name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
199
|
-
next: '
|
|
206
|
+
next: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
200
207
|
prev: '',
|
|
201
208
|
order: 7
|
|
202
209
|
},
|
|
210
|
+
{
|
|
211
|
+
name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
212
|
+
next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
213
|
+
prev: '',
|
|
214
|
+
order: 8
|
|
215
|
+
},
|
|
203
216
|
{
|
|
204
217
|
name: 'CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP',
|
|
205
218
|
next: '',
|
|
206
219
|
prev: '',
|
|
207
|
-
order:
|
|
220
|
+
order: 9
|
|
208
221
|
},
|
|
209
222
|
{
|
|
210
223
|
name: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
211
224
|
next: '',
|
|
212
225
|
prev: '',
|
|
213
|
-
order:
|
|
226
|
+
order: 9
|
|
214
227
|
}
|
|
215
228
|
];
|
|
216
229
|
export var AUTH_SCREENS_NAVIGATION = [
|
|
@@ -250,6 +263,12 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
250
263
|
prev: '',
|
|
251
264
|
order: 1
|
|
252
265
|
},
|
|
266
|
+
{
|
|
267
|
+
name: 'AUTH_OPERATOR_ERROR_STEP',
|
|
268
|
+
next: '',
|
|
269
|
+
prev: '',
|
|
270
|
+
order: 1
|
|
271
|
+
},
|
|
253
272
|
{
|
|
254
273
|
name: 'AUTH_OTP_STEP',
|
|
255
274
|
next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_EMAIL_SENT_STEP', 'AUTH_MIGRATING_DATA_STEP'],
|
|
@@ -333,6 +352,12 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
333
352
|
prev: '',
|
|
334
353
|
order: 1
|
|
335
354
|
},
|
|
355
|
+
{
|
|
356
|
+
name: 'BUSINESS_OPERATOR_ERROR_STEP',
|
|
357
|
+
next: '',
|
|
358
|
+
prev: '',
|
|
359
|
+
order: 1
|
|
360
|
+
},
|
|
336
361
|
{
|
|
337
362
|
name: 'BUSINESS_CIVIL_ID_STEP',
|
|
338
363
|
next: 'BUSINESS_VERIFY_PACI_STEP',
|
|
@@ -431,6 +456,12 @@ export var INDIVIDUAL_SCREENS_NAVIGATION = [
|
|
|
431
456
|
prev: '',
|
|
432
457
|
order: 1
|
|
433
458
|
},
|
|
459
|
+
{
|
|
460
|
+
name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
461
|
+
next: '',
|
|
462
|
+
prev: '',
|
|
463
|
+
order: 1
|
|
464
|
+
},
|
|
434
465
|
{
|
|
435
466
|
name: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
|
|
436
467
|
next: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
@@ -475,6 +506,12 @@ export var PASSWORD_SCREENS_NAVIGATION = [
|
|
|
475
506
|
prev: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
476
507
|
order: 1
|
|
477
508
|
},
|
|
509
|
+
{
|
|
510
|
+
name: 'PASSWORD_OPERATOR_ERROR_STEP',
|
|
511
|
+
next: '',
|
|
512
|
+
prev: '',
|
|
513
|
+
order: 1
|
|
514
|
+
},
|
|
478
515
|
{
|
|
479
516
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
480
517
|
next: ['PASSWORD_SUCCESS_STEP', 'PASSWORD_RESET_PASSWORD_OTP_STEP'],
|
|
@@ -519,6 +556,12 @@ export var BANK_SCREENS_NAVIGATION = [
|
|
|
519
556
|
prev: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
520
557
|
order: 1
|
|
521
558
|
},
|
|
559
|
+
{
|
|
560
|
+
name: 'BANK_OPERATOR_ERROR_STEP',
|
|
561
|
+
next: '',
|
|
562
|
+
prev: '',
|
|
563
|
+
order: 1
|
|
564
|
+
},
|
|
522
565
|
{
|
|
523
566
|
name: 'BANK_BANK_DETAILS_STEP',
|
|
524
567
|
next: 'BANK_DETAILS_SUCCESS_STEP',
|
|
@@ -551,6 +594,12 @@ export var BOARD_SCREENS_NAVIGATION = [
|
|
|
551
594
|
prev: '',
|
|
552
595
|
order: 1
|
|
553
596
|
},
|
|
597
|
+
{
|
|
598
|
+
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
599
|
+
next: '',
|
|
600
|
+
prev: '',
|
|
601
|
+
order: 1
|
|
602
|
+
},
|
|
554
603
|
{
|
|
555
604
|
name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
556
605
|
next: 'BOARD_RESET_PASSWORD_SUCCESS',
|
|
@@ -577,6 +626,12 @@ export var TAX_SCREENS_NAVIGATION = [
|
|
|
577
626
|
prev: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
578
627
|
order: 1
|
|
579
628
|
},
|
|
629
|
+
{
|
|
630
|
+
name: 'TAX_OPERATOR_ERROR_STEP',
|
|
631
|
+
next: '',
|
|
632
|
+
prev: '',
|
|
633
|
+
order: 1
|
|
634
|
+
},
|
|
580
635
|
{
|
|
581
636
|
name: 'TAX_TAX_DETAILS_STEP',
|
|
582
637
|
next: 'TAX_DETAILS_SUCCESS_STEP',
|
|
@@ -615,6 +670,12 @@ export var SigIn_SCREENS_NAVIGATION = [
|
|
|
615
670
|
prev: 'SIGIN_MOBILE_STEP',
|
|
616
671
|
order: 1
|
|
617
672
|
},
|
|
673
|
+
{
|
|
674
|
+
name: 'SIGIN_OPERATOR_ERROR_STEP',
|
|
675
|
+
next: '',
|
|
676
|
+
prev: '',
|
|
677
|
+
order: 1
|
|
678
|
+
},
|
|
618
679
|
{
|
|
619
680
|
name: 'SIGIN_PASSWORD_STEP',
|
|
620
681
|
next: 'SIGIN_OTP_STEP',
|
|
@@ -641,6 +702,12 @@ export var ENTITY_SCREENS_NAVIGATION = [
|
|
|
641
702
|
prev: '',
|
|
642
703
|
order: 1
|
|
643
704
|
},
|
|
705
|
+
{
|
|
706
|
+
name: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
707
|
+
next: '',
|
|
708
|
+
prev: '',
|
|
709
|
+
order: 1
|
|
710
|
+
},
|
|
644
711
|
{
|
|
645
712
|
name: 'ENTITY_NAME_STEP',
|
|
646
713
|
next: 'ENTITY_CAPITAL_STEP',
|
|
@@ -685,6 +752,12 @@ export var BRAND_SCREENS_NAVIGATION = [
|
|
|
685
752
|
prev: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
686
753
|
order: 1
|
|
687
754
|
},
|
|
755
|
+
{
|
|
756
|
+
name: 'BRAND_OPERATOR_ERROR_STEP',
|
|
757
|
+
next: '',
|
|
758
|
+
prev: '',
|
|
759
|
+
order: 1
|
|
760
|
+
},
|
|
688
761
|
{
|
|
689
762
|
name: 'BRAND_INFO_STEP',
|
|
690
763
|
next: 'BRAND_SEGMENT_INFO_STEP',
|
|
@@ -278,14 +278,23 @@ export declare const checkBrandNameAvailabilityAsync: import("@reduxjs/toolkit")
|
|
|
278
278
|
rejectedMeta?: unknown;
|
|
279
279
|
}>;
|
|
280
280
|
export declare const createAccountAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
281
|
+
accountData: any;
|
|
282
|
+
} | undefined, {
|
|
283
|
+
isRetry: boolean;
|
|
284
|
+
}, {
|
|
285
|
+
state?: unknown;
|
|
286
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
287
|
+
extra?: unknown;
|
|
288
|
+
rejectValue?: unknown;
|
|
289
|
+
serializedErrorType?: unknown;
|
|
290
|
+
pendingMeta?: unknown;
|
|
291
|
+
fulfilledMeta?: unknown;
|
|
292
|
+
rejectedMeta?: unknown;
|
|
293
|
+
}>;
|
|
294
|
+
export declare const retrieveDetailsAfterCreateAccountAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
281
295
|
boardInfo: any;
|
|
282
296
|
boardData: any;
|
|
283
|
-
|
|
284
|
-
} | {
|
|
285
|
-
account: any;
|
|
286
|
-
boardInfo?: undefined;
|
|
287
|
-
boardData?: undefined;
|
|
288
|
-
} | undefined, void, {
|
|
297
|
+
}, void, {
|
|
289
298
|
state?: unknown;
|
|
290
299
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
291
300
|
extra?: unknown;
|
|
@@ -870,62 +870,100 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
872
|
});
|
|
873
|
-
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (
|
|
874
|
-
var
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
873
|
+
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_a, thunkApi) {
|
|
874
|
+
var isRetry = _a.isRetry;
|
|
875
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
876
|
+
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, urlQueryStart;
|
|
877
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
878
|
+
return __generator(this, function (_v) {
|
|
879
|
+
switch (_v.label) {
|
|
880
|
+
case 0:
|
|
881
|
+
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
882
|
+
responseData = connectExpress.data.responseData;
|
|
883
|
+
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode, showBoard = _c.showBoard;
|
|
884
|
+
platforms = (_e = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _d === void 0 ? void 0 : _d.platforms) !== null && _e !== void 0 ? _e : settings.data.appConfig.platforms;
|
|
885
|
+
payment_provider = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _f === void 0 ? void 0 : _f.payment_provider) !== null && _g !== void 0 ? _g : settings.data.appConfig.paymentProvider;
|
|
886
|
+
leadId = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _h === void 0 ? void 0 : _h.id;
|
|
887
|
+
authId = (_k = (_j = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _j === void 0 ? void 0 : _j.auth) === null || _k === void 0 ? void 0 : _k.id;
|
|
888
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
889
|
+
accountData = undefined;
|
|
890
|
+
if (!isRetry) return [3, 2];
|
|
891
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
892
|
+
case 1:
|
|
893
|
+
data = (_v.sent()).data;
|
|
894
|
+
if (data === null || data === void 0 ? void 0 : data.board_id) {
|
|
895
|
+
leadData = data;
|
|
896
|
+
accountData = data;
|
|
897
|
+
}
|
|
898
|
+
_v.label = 2;
|
|
899
|
+
case 2:
|
|
900
|
+
body = {
|
|
901
|
+
lead_id: leadId,
|
|
902
|
+
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
903
|
+
platforms: platforms,
|
|
904
|
+
payment_provider: payment_provider
|
|
905
|
+
};
|
|
906
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 4];
|
|
907
|
+
return [4, API.accountService.expressCreateAccount(body)];
|
|
908
|
+
case 3:
|
|
909
|
+
accountData = _v.sent();
|
|
910
|
+
_v.label = 4;
|
|
911
|
+
case 4:
|
|
912
|
+
(_m = (_l = settings.data.appConfig).onCreated) === null || _m === void 0 ? void 0 : _m.call(_l, accountData);
|
|
913
|
+
(_p = (_o = settings.data.appConfig).onFlowCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, accountData);
|
|
914
|
+
(_r = (_q = settings.data.appConfig).onStepCompleted) === null || _r === void 0 ? void 0 : _r.call(_q, settings.data.activeScreen.name, accountData);
|
|
915
|
+
if (showBoard) {
|
|
916
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
917
|
+
return [2, { accountData: accountData }];
|
|
918
|
+
}
|
|
919
|
+
if (!(scope === SCOPE_AUTH)) return [3, 8];
|
|
920
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 6];
|
|
921
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
922
|
+
case 5:
|
|
923
|
+
leadData = _v.sent();
|
|
924
|
+
_v.label = 6;
|
|
925
|
+
case 6: return [4, thunkApi.dispatch(onCloseComplete({ merchantId: (_s = leadData === null || leadData === void 0 ? void 0 : leadData.merchant) === null || _s === void 0 ? void 0 : _s.id, brandId: (_t = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _t === void 0 ? void 0 : _t.id, entityId: (_u = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _u === void 0 ? void 0 : _u.id }))];
|
|
926
|
+
case 7:
|
|
927
|
+
_v.sent();
|
|
928
|
+
return [2, { accountData: accountData }];
|
|
929
|
+
case 8:
|
|
930
|
+
if (redirectUrl && mode === 'page') {
|
|
931
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
932
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
933
|
+
return [2, { accountData: accountData }];
|
|
934
|
+
}
|
|
935
|
+
thunkApi.dispatch(handleOpen(false));
|
|
936
|
+
return [2];
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
});
|
|
940
|
+
});
|
|
941
|
+
export var retrieveDetailsAfterCreateAccountAsync = createAsyncThunk('connectExpress/retrieveDetailsAfterCreateAccountAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
942
|
+
var connectExpress, _a, accountData, leadData, leadResData, data, board_id, board_info_id, _b, boardInfo, boardData;
|
|
943
|
+
var _c, _d;
|
|
944
|
+
return __generator(this, function (_e) {
|
|
945
|
+
switch (_e.label) {
|
|
878
946
|
case 0:
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
authId = (_j = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _h === void 0 ? void 0 : _h.auth) === null || _j === void 0 ? void 0 : _j.id;
|
|
885
|
-
bi = settings.data.deviceInfo.browser.browser_id;
|
|
886
|
-
body = {
|
|
887
|
-
lead_id: responseData === null || responseData === void 0 ? void 0 : responseData.leadData.id,
|
|
888
|
-
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
889
|
-
platforms: platforms,
|
|
890
|
-
payment_provider: payment_provider
|
|
891
|
-
};
|
|
892
|
-
return [4, API.accountService.expressCreateAccount(body)];
|
|
947
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
948
|
+
_a = connectExpress.data.responseData || {}, accountData = _a.accountData, leadData = _a.leadData;
|
|
949
|
+
leadResData = undefined;
|
|
950
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 2];
|
|
951
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadData === null || leadData === void 0 ? void 0 : leadData.id)).unwrap()];
|
|
893
952
|
case 1:
|
|
894
|
-
data =
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
(_q = (_p = settings.data.appConfig).onStepCompleted) === null || _q === void 0 ? void 0 : _q.call(_p, settings.data.activeScreen.name, data);
|
|
898
|
-
if (!showBoard) return [3, 4];
|
|
899
|
-
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
953
|
+
data = (_e.sent()).data;
|
|
954
|
+
leadResData = data;
|
|
955
|
+
_e.label = 2;
|
|
900
956
|
case 2:
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
board_info_id = (_s = data.board_info_id) !== null && _s !== void 0 ? _s : leadData.board_info_id;
|
|
957
|
+
board_id = (_c = accountData === null || accountData === void 0 ? void 0 : accountData.board_id) !== null && _c !== void 0 ? _c : leadResData === null || leadResData === void 0 ? void 0 : leadResData.board_id;
|
|
958
|
+
board_info_id = (_d = accountData === null || accountData === void 0 ? void 0 : accountData.board_info_id) !== null && _d !== void 0 ? _d : leadResData === null || leadResData === void 0 ? void 0 : leadResData.board_info_id;
|
|
904
959
|
return [4, Promise.all([
|
|
905
960
|
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
906
961
|
API.boardService.retrieveBoardDetails(board_id)
|
|
907
962
|
])];
|
|
908
963
|
case 3:
|
|
909
|
-
|
|
964
|
+
_b = _e.sent(), boardInfo = _b[0], boardData = _b[1];
|
|
910
965
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
911
|
-
return [2, { boardInfo: boardInfo, boardData: boardData
|
|
912
|
-
case 4:
|
|
913
|
-
if (!(scope === SCOPE_AUTH)) return [3, 7];
|
|
914
|
-
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
915
|
-
case 5:
|
|
916
|
-
leadData = (_w.sent()).data;
|
|
917
|
-
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: (_t = data === null || data === void 0 ? void 0 : data.merchant) === null || _t === void 0 ? void 0 : _t.id, brandId: (_u = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _u === void 0 ? void 0 : _u.id, entityId: (_v = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _v === void 0 ? void 0 : _v.id }))];
|
|
918
|
-
case 6:
|
|
919
|
-
_w.sent();
|
|
920
|
-
return [2, { account: data }];
|
|
921
|
-
case 7:
|
|
922
|
-
if (redirectUrl && mode === 'page') {
|
|
923
|
-
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
924
|
-
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
925
|
-
return [2, { account: data }];
|
|
926
|
-
}
|
|
927
|
-
thunkApi.dispatch(handleOpen(false));
|
|
928
|
-
return [2];
|
|
966
|
+
return [2, { boardInfo: boardInfo, boardData: boardData }];
|
|
929
967
|
}
|
|
930
968
|
});
|
|
931
969
|
}); });
|
|
@@ -1567,6 +1605,19 @@ export var connectSlice = createSlice({
|
|
|
1567
1605
|
.addCase(createAccountAsync.rejected, function (state, action) {
|
|
1568
1606
|
state.loading = false;
|
|
1569
1607
|
state.error = action.error.message;
|
|
1608
|
+
})
|
|
1609
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.pending, function (state) {
|
|
1610
|
+
state.loading = true;
|
|
1611
|
+
state.error = null;
|
|
1612
|
+
})
|
|
1613
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.fulfilled, function (state, action) {
|
|
1614
|
+
state.loading = false;
|
|
1615
|
+
state.error = null;
|
|
1616
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), action.payload);
|
|
1617
|
+
})
|
|
1618
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.rejected, function (state, action) {
|
|
1619
|
+
state.loading = false;
|
|
1620
|
+
state.error = action.error.message;
|
|
1570
1621
|
})
|
|
1571
1622
|
.addCase(getMerchantListAsync.pending, function (state) {
|
|
1572
1623
|
state.loading = true;
|
|
@@ -100,8 +100,12 @@ var Auth = memo(function (_a) {
|
|
|
100
100
|
var isOtherThanKWOrSACountry = React.useMemo(function () { var _a; return isOtherThanKWOrSA((_a = settingData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [settingData.businessCountry]);
|
|
101
101
|
React.useEffect(function () {
|
|
102
102
|
var _a, _b;
|
|
103
|
-
if (settingLoading || !props.open
|
|
103
|
+
if (settingLoading || !props.open)
|
|
104
104
|
return;
|
|
105
|
+
if (!settingData.isValidOperator) {
|
|
106
|
+
dispatch(handleCurrentActiveScreen('AUTH_OPERATOR_ERROR_STEP'));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
105
109
|
if (leadId) {
|
|
106
110
|
dispatch(retrieveLeadIdentityByIdAsync(leadId));
|
|
107
111
|
return;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -56,7 +56,9 @@ var Bank = memo(function (_a) {
|
|
|
56
56
|
open: open,
|
|
57
57
|
mode: props.mode,
|
|
58
58
|
internalToken: verifyToken,
|
|
59
|
-
settingLoading: settingLoading
|
|
59
|
+
settingLoading: settingLoading,
|
|
60
|
+
operatorErrorScreenName: 'BANK_OPERATOR_ERROR_STEP',
|
|
61
|
+
isValidOperator: data.isValidOperator
|
|
60
62
|
});
|
|
61
63
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
62
64
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, loaderColor: loaderColor, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -51,11 +51,15 @@ var Board = memo(function (_a) {
|
|
|
51
51
|
});
|
|
52
52
|
}, []);
|
|
53
53
|
React.useEffect(function () {
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
if (settingLoading || !props.open)
|
|
55
|
+
return;
|
|
56
|
+
if (!data.isValidOperator) {
|
|
57
|
+
dispatch(handleCurrentActiveScreen('BOARD_OPERATOR_ERROR_STEP'));
|
|
58
|
+
return;
|
|
58
59
|
}
|
|
60
|
+
dispatch(createVerifyTokenBy(boardId));
|
|
61
|
+
if (props.mode === 'content')
|
|
62
|
+
dispatch(handleCurrentActiveScreen('BOARD_SUCCESS_FLOWS_BUTTONS_STEP'));
|
|
59
63
|
}, [data.isValidOperator, settingLoading]);
|
|
60
64
|
var initialLoading = settingLoading || customLoading;
|
|
61
65
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: !isTapDomain(props.merchantDomain), loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: !isTapDomain(props.merchantDomain) }, { children: boardFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -56,7 +56,9 @@ var Brand = memo(function (_a) {
|
|
|
56
56
|
open: open,
|
|
57
57
|
mode: props.mode,
|
|
58
58
|
internalToken: verifyToken,
|
|
59
|
-
settingLoading: settingLoading
|
|
59
|
+
settingLoading: settingLoading,
|
|
60
|
+
operatorErrorScreenName: 'BRAND_OPERATOR_ERROR_STEP',
|
|
61
|
+
isValidOperator: data.isValidOperator
|
|
60
62
|
});
|
|
61
63
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
62
64
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: brandFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
14
|
import { createRoot } from 'react-dom/client';
|
|
15
15
|
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
16
|
-
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
|
+
import { handleCurrentActiveScreen, handleLanguage, settingsSelector } from '../../app/settings';
|
|
17
17
|
import { FeatureContainer } from '../shared/Containers';
|
|
18
18
|
import { businessSelector, verifyLeadToken } from '../app/business/businessStore';
|
|
19
19
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
@@ -46,9 +46,14 @@ var Business = memo(function (props) {
|
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
48
|
useEffect(function () {
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
if (settingLoading || !open)
|
|
50
|
+
return;
|
|
51
|
+
if (!data.isValidOperator) {
|
|
52
|
+
dispatch(handleCurrentActiveScreen('BUSINESS_OPERATOR_ERROR_STEP'));
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
verifyToken();
|
|
56
|
+
}, [data.isValidOperator, settingLoading]);
|
|
52
57
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: businessFeatureScreens.map(function (_a, index) {
|
|
53
58
|
var Element = _a.element, name = _a.name;
|
|
54
59
|
var isActive = activeScreen.name === name;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import GenericError from '
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
5
|
var OperatorError = function (_a) {
|
|
6
6
|
var t = useTranslation().t;
|
|
7
7
|
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|