@tap-payments/auth-jsconnect 2.5.5 → 2.5.6
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/@types/app.d.ts +5 -1
- package/build/@types/redux.d.ts +1 -0
- package/build/api/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +3 -2
- package/build/api/entity.js +12 -4
- package/build/api/index.d.ts +5 -21
- package/build/components/Providers/ThemeProvider.js +1 -1
- package/build/constants/api.d.ts +2 -7
- package/build/constants/api.js +5 -15
- package/build/constants/app.js +7 -1
- package/build/features/app/auth/authStore.js +24 -21
- package/build/features/app/bank/bankStore.d.ts +13 -19
- package/build/features/app/bank/bankStore.js +183 -165
- package/build/features/app/board/boardStore.js +16 -10
- package/build/features/app/brand/brandStore.d.ts +17 -31
- package/build/features/app/brand/brandStore.js +250 -261
- package/build/features/app/business/businessStore.js +16 -16
- package/build/features/app/connect/connectStore.js +7 -7
- package/build/features/app/connectExpress/connectExpressStore.d.ts +5 -1
- package/build/features/app/connectExpress/connectExpressStore.js +64 -27
- package/build/features/app/entity/entityStore.d.ts +20 -34
- package/build/features/app/entity/entityStore.js +204 -249
- package/build/features/app/individual/individualStore.d.ts +17 -36
- package/build/features/app/individual/individualStore.js +228 -270
- package/build/features/app/password/passwordStore.d.ts +21 -25
- package/build/features/app/password/passwordStore.js +203 -220
- package/build/features/app/tax/taxStore.d.ts +13 -7
- package/build/features/app/tax/taxStore.js +168 -147
- package/build/features/auth/Auth.d.ts +0 -2
- package/build/features/auth/Auth.js +7 -7
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -1
- package/build/features/bank/Bank.js +5 -3
- package/build/features/bank/screens/BankDetails/BankDetails.js +17 -4
- package/build/features/board/Board.d.ts +2 -0
- package/build/features/board/Board.js +13 -7
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -2
- package/build/features/brand/Brand.js +5 -3
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -2
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +2 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +22 -4
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +22 -6
- package/build/features/business/Business.js +5 -3
- package/build/features/business/screens/Activities/Activities.js +9 -1
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
- package/build/features/business/screens/Customers/Customers.js +9 -1
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +2 -2
- package/build/features/connect/Connect.js +5 -4
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connectExpress/ConnectExpress.js +5 -4
- package/build/features/entity/Entity.js +5 -3
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
- package/build/features/entity/screens/EntityName/EntityName.js +31 -14
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -1
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -1
- package/build/features/featuresScreens.js +5 -0
- package/build/features/individual/Individual.js +5 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +43 -10
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/IndividualList.js +7 -0
- package/build/features/individual/screens/IndividualList/UserList.js +3 -3
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +73 -18
- package/build/features/password/Password.js +6 -4
- package/build/features/shared/Address/CountryList.d.ts +2 -2
- package/build/features/shared/Address/InputSelect.d.ts +2 -2
- package/build/features/shared/Button/FlowsButtons.js +10 -2
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/signIn/SignIn.js +15 -5
- package/build/features/tax/Tax.js +5 -3
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.js +1 -1
- package/build/hooks/useAppTheme.js +4 -3
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +2 -2
- package/package.json +1 -1
|
@@ -59,7 +59,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
|
59
59
|
import API from '../../../api';
|
|
60
60
|
import { BusinessType, FlowsTypes, DocumentPurpose, LicenseType } from '../../../@types';
|
|
61
61
|
import { BUSINESS_STEP_NAMES, EXPECTED_SALES_LIST, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_ENTITY_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
62
|
-
import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue } from '../../../utils';
|
|
62
|
+
import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue, sendCustomEventToGTM } from '../../../utils';
|
|
63
63
|
import { handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
64
64
|
export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
65
|
var payload, data, publicKey, countryIso2, boardData, brandData, isicActivityList, leadData, _a, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, list, list;
|
|
@@ -664,30 +664,24 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
|
|
|
664
664
|
});
|
|
665
665
|
});
|
|
666
666
|
export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
667
|
-
var settings, countryISO2, dataBody,
|
|
668
|
-
|
|
669
|
-
|
|
667
|
+
var settings, countryISO2, dataBody, _a, customer_base, sales, expected_customers;
|
|
668
|
+
var _b;
|
|
669
|
+
return __generator(this, function (_c) {
|
|
670
|
+
switch (_c.label) {
|
|
670
671
|
case 0:
|
|
671
672
|
settings = thunkApi.getState().settings;
|
|
672
673
|
countryISO2 = settings.data.businessCountry.iso2;
|
|
673
674
|
dataBody = {
|
|
674
|
-
page: 0
|
|
675
|
-
};
|
|
676
|
-
salesDataBody = {
|
|
677
675
|
page: 0,
|
|
678
676
|
country_code: [countryISO2]
|
|
679
677
|
};
|
|
680
|
-
return [4,
|
|
681
|
-
API.dataService.getCustomerBases(dataBody),
|
|
682
|
-
API.dataService.getExpectedSales(salesDataBody),
|
|
683
|
-
API.dataService.getExpectedCustomerSales(dataBody)
|
|
684
|
-
])];
|
|
678
|
+
return [4, API.dataService.getBrandOperations(dataBody)];
|
|
685
679
|
case 1:
|
|
686
|
-
_a =
|
|
680
|
+
_a = _c.sent(), customer_base = _a.customer_base, sales = _a.sales, expected_customers = _a.expected_customers;
|
|
687
681
|
return [2, {
|
|
688
|
-
customerBases:
|
|
689
|
-
expectedSales: (
|
|
690
|
-
expectedCustomerSales:
|
|
682
|
+
customerBases: (customer_base === null || customer_base === void 0 ? void 0 : customer_base.list) || [],
|
|
683
|
+
expectedSales: ((_b = sales === null || sales === void 0 ? void 0 : sales.list) === null || _b === void 0 ? void 0 : _b.length) ? sales.list : EXPECTED_SALES_LIST,
|
|
684
|
+
expectedCustomerSales: (expected_customers === null || expected_customers === void 0 ? void 0 : expected_customers.list) || [],
|
|
691
685
|
countryISO2: countryISO2
|
|
692
686
|
}];
|
|
693
687
|
}
|
|
@@ -759,6 +753,12 @@ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', fun
|
|
|
759
753
|
return [4, API.leadService.updateLead(payload)];
|
|
760
754
|
case 1:
|
|
761
755
|
data = _g.sent();
|
|
756
|
+
sendCustomEventToGTM({
|
|
757
|
+
event: 'Send Event',
|
|
758
|
+
event_category: 'Account Creation Flow',
|
|
759
|
+
event_action: 'Account Creation Success',
|
|
760
|
+
event_label: settings.data.businessCountry.iso2
|
|
761
|
+
});
|
|
762
762
|
board_id = data === null || data === void 0 ? void 0 : data.board_id;
|
|
763
763
|
if (!board_id) return [3, 4];
|
|
764
764
|
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
@@ -463,7 +463,7 @@ export var retrieveLead = createAsyncThunk('connect/retrieveLead', function (par
|
|
|
463
463
|
});
|
|
464
464
|
}); });
|
|
465
465
|
export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
466
|
-
var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1,
|
|
466
|
+
var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, team, err_5, brandNameBody, payload, lead, brandReqBody, brand, team, err_6;
|
|
467
467
|
var _b, _c, _d, _e, _f;
|
|
468
468
|
return __generator(this, function (_g) {
|
|
469
469
|
switch (_g.label) {
|
|
@@ -516,10 +516,10 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
516
516
|
_g.label = 4;
|
|
517
517
|
case 4:
|
|
518
518
|
_g.trys.push([4, 6, , 7]);
|
|
519
|
-
return [4, API.dataService.
|
|
519
|
+
return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
|
|
520
520
|
case 5:
|
|
521
|
-
|
|
522
|
-
brand_1.team_size_list =
|
|
521
|
+
team = (_g.sent()).team;
|
|
522
|
+
brand_1.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
|
|
523
523
|
return [3, 7];
|
|
524
524
|
case 6:
|
|
525
525
|
err_5 = _g.sent();
|
|
@@ -562,10 +562,10 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
562
562
|
_g.label = 11;
|
|
563
563
|
case 11:
|
|
564
564
|
_g.trys.push([11, 13, , 14]);
|
|
565
|
-
return [4, API.dataService.
|
|
565
|
+
return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
|
|
566
566
|
case 12:
|
|
567
|
-
|
|
568
|
-
brand.team_size_list =
|
|
567
|
+
team = (_g.sent()).team;
|
|
568
|
+
brand.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
|
|
569
569
|
return [3, 14];
|
|
570
570
|
case 13:
|
|
571
571
|
err_6 = _g.sent();
|
|
@@ -346,7 +346,11 @@ export declare const updateLeadBusinessDataAsync: import("@reduxjs/toolkit").Asy
|
|
|
346
346
|
fulfilledMeta?: unknown;
|
|
347
347
|
rejectedMeta?: unknown;
|
|
348
348
|
}>;
|
|
349
|
-
export declare const confirmInfo: import("@reduxjs/toolkit").AsyncThunk<
|
|
349
|
+
export declare const confirmInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
350
|
+
boardInfo: any;
|
|
351
|
+
boardData: any;
|
|
352
|
+
confirmData: any;
|
|
353
|
+
} | undefined, AuthenticationListFormValues & AuthMerchantFormValues, {
|
|
350
354
|
state?: unknown;
|
|
351
355
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
352
356
|
extra?: unknown;
|
|
@@ -221,24 +221,26 @@ export var retrieveAuthenticationListAsync = createAsyncThunk('connectExpress/re
|
|
|
221
221
|
export var getMerchantListAsync = createAsyncThunk('connectExpress/getMerchantListAsync', function (_a, thunkApi) {
|
|
222
222
|
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo;
|
|
223
223
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
224
|
-
var _b, settings, connectExpress, platforms, payment_provider, payload, merchants, list;
|
|
225
|
-
var _c, _d, _e, _f, _g, _h;
|
|
226
|
-
return __generator(this, function (
|
|
227
|
-
switch (
|
|
224
|
+
var _b, settings, connectExpress, leadId, platforms, payment_provider, payload, merchants, list;
|
|
225
|
+
var _c, _d, _e, _f, _g, _h, _j, _k;
|
|
226
|
+
return __generator(this, function (_l) {
|
|
227
|
+
switch (_l.label) {
|
|
228
228
|
case 0:
|
|
229
229
|
_b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
leadId = (_d = (_c = connectExpress.data.responseData) === null || _c === void 0 ? void 0 : _c.authData) === null || _d === void 0 ? void 0 : _d.lead_id;
|
|
231
|
+
platforms = (_g = (_f = (_e = connectExpress.data.responseData) === null || _e === void 0 ? void 0 : _e.leadData) === null || _f === void 0 ? void 0 : _f.platforms) !== null && _g !== void 0 ? _g : settings.data.appConfig.platforms;
|
|
232
|
+
payment_provider = (_k = (_j = (_h = connectExpress.data.responseData) === null || _h === void 0 ? void 0 : _h.leadData) === null || _j === void 0 ? void 0 : _j.payment_provider) !== null && _k !== void 0 ? _k : settings.data.appConfig.paymentProvider;
|
|
232
233
|
payload = {
|
|
233
234
|
business_entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
|
|
234
235
|
brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
|
|
236
|
+
lead_id: leadId || '',
|
|
235
237
|
create_if_not_present: true,
|
|
236
238
|
platforms: platforms,
|
|
237
239
|
payment_provider: payment_provider
|
|
238
240
|
};
|
|
239
241
|
return [4, API.entityService.getMerchantListUsingEntityId(payload)];
|
|
240
242
|
case 1:
|
|
241
|
-
merchants = (
|
|
243
|
+
merchants = (_l.sent()).merchants;
|
|
242
244
|
list = merchants || [];
|
|
243
245
|
if ((list === null || list === void 0 ? void 0 : list.length) > 1) {
|
|
244
246
|
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_AUTH_MERCHANT_LIST_STEP'));
|
|
@@ -1107,16 +1109,18 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
1107
1109
|
export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function (_a, thunkApi) {
|
|
1108
1110
|
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo;
|
|
1109
1111
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1110
|
-
var _b, connectExpress, settings, responseData, _c, postURL, redirectUrl, bi, authId, body, data, urlQueryStart;
|
|
1111
|
-
var
|
|
1112
|
-
return __generator(this, function (
|
|
1113
|
-
switch (
|
|
1112
|
+
var _b, connectExpress, settings, responseData, _c, appConfig, deviceInfo, activeScreen, postURL, redirectUrl, showBoard, bi, authId, leadId, body, data, _d, board_id, board_info_id, _e, boardInfo, boardData, urlQueryStart;
|
|
1113
|
+
var _f, _g, _h, _j, _k;
|
|
1114
|
+
return __generator(this, function (_l) {
|
|
1115
|
+
switch (_l.label) {
|
|
1114
1116
|
case 0:
|
|
1115
1117
|
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
1116
1118
|
responseData = connectExpress.data.responseData;
|
|
1117
|
-
_c = settings.data.appConfig,
|
|
1118
|
-
|
|
1119
|
-
|
|
1119
|
+
_c = settings.data, appConfig = _c.appConfig, deviceInfo = _c.deviceInfo, activeScreen = _c.activeScreen;
|
|
1120
|
+
postURL = appConfig.postURL, redirectUrl = appConfig.redirectUrl, showBoard = appConfig.showBoard;
|
|
1121
|
+
bi = deviceInfo.browser.browser_id;
|
|
1122
|
+
authId = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _f === void 0 ? void 0 : _f.auth) === null || _g === void 0 ? void 0 : _g.id;
|
|
1123
|
+
leadId = (_j = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _h === void 0 ? void 0 : _h.lead) === null || _j === void 0 ? void 0 : _j.id;
|
|
1120
1124
|
body = {
|
|
1121
1125
|
post_url: postURL || '',
|
|
1122
1126
|
authentication_id: authId,
|
|
@@ -1124,14 +1128,28 @@ export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function
|
|
|
1124
1128
|
brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
|
|
1125
1129
|
merchant_id: (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.id) || '',
|
|
1126
1130
|
entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
|
|
1127
|
-
data:
|
|
1131
|
+
data: appConfig.data || []
|
|
1128
1132
|
};
|
|
1129
1133
|
return [4, API.operatorService.confirm(body)];
|
|
1130
1134
|
case 1:
|
|
1131
|
-
data =
|
|
1132
|
-
(
|
|
1135
|
+
data = _l.sent();
|
|
1136
|
+
(_k = appConfig.onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(appConfig, activeScreen.name, data);
|
|
1137
|
+
_d = merchantInfo || {}, board_id = _d.board_id, board_info_id = _d.board_info_id;
|
|
1138
|
+
if (!(showBoard && board_id && board_info_id)) return [3, 4];
|
|
1139
|
+
return [4, Promise.all([
|
|
1140
|
+
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
1141
|
+
API.boardService.retrieveBoardDetails(board_id)
|
|
1142
|
+
])];
|
|
1143
|
+
case 2:
|
|
1144
|
+
_e = _l.sent(), boardInfo = _e[0], boardData = _e[1];
|
|
1145
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId))];
|
|
1146
|
+
case 3:
|
|
1147
|
+
_l.sent();
|
|
1148
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP'));
|
|
1149
|
+
return [2, { boardInfo: boardInfo, boardData: boardData, confirmData: data }];
|
|
1150
|
+
case 4:
|
|
1133
1151
|
if (authId) {
|
|
1134
|
-
if (
|
|
1152
|
+
if (appConfig.mode === 'popup') {
|
|
1135
1153
|
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
1136
1154
|
thunkApi.dispatch(handleOpen(false));
|
|
1137
1155
|
return [2];
|
|
@@ -1147,16 +1165,34 @@ export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function
|
|
|
1147
1165
|
});
|
|
1148
1166
|
});
|
|
1149
1167
|
export var onCloseCompleteAsync = createAsyncThunk('connectExpress/onCloseCompleteAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1150
|
-
var connectExpress,
|
|
1151
|
-
var
|
|
1152
|
-
return __generator(this, function (
|
|
1153
|
-
switch (
|
|
1168
|
+
var _a, connectExpress, settings, _b, boardData, authData, confirmData, _c, appConfig, deviceInfo, activeScreen, _d, merchant, brand, entity, authId, redirectUrl, bi, urlQueryStart;
|
|
1169
|
+
var _e, _f, _g;
|
|
1170
|
+
return __generator(this, function (_h) {
|
|
1171
|
+
switch (_h.label) {
|
|
1154
1172
|
case 0:
|
|
1155
|
-
|
|
1156
|
-
|
|
1173
|
+
_a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
|
|
1174
|
+
_b = connectExpress.data.responseData || {}, boardData = _b.boardData, authData = _b.authData, confirmData = _b.confirmData;
|
|
1175
|
+
_c = settings.data, appConfig = _c.appConfig, deviceInfo = _c.deviceInfo, activeScreen = _c.activeScreen;
|
|
1176
|
+
_d = boardData || {}, merchant = _d.merchant, brand = _d.brand, entity = _d.entity;
|
|
1177
|
+
authId = (_e = authData === null || authData === void 0 ? void 0 : authData.auth) === null || _e === void 0 ? void 0 : _e.id;
|
|
1178
|
+
redirectUrl = appConfig.redirectUrl;
|
|
1179
|
+
bi = deviceInfo.browser.browser_id;
|
|
1180
|
+
if (confirmData && authId) {
|
|
1181
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, activeScreen.name, confirmData);
|
|
1182
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
1183
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
1184
|
+
thunkApi.dispatch(handleOpen(false));
|
|
1185
|
+
return [2];
|
|
1186
|
+
}
|
|
1187
|
+
if (redirectUrl) {
|
|
1188
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
1189
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
1190
|
+
}
|
|
1191
|
+
return [2];
|
|
1192
|
+
}
|
|
1157
1193
|
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: merchant === null || merchant === void 0 ? void 0 : merchant.id, brandId: brand === null || brand === void 0 ? void 0 : brand.id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
1158
1194
|
case 1:
|
|
1159
|
-
|
|
1195
|
+
_h.sent();
|
|
1160
1196
|
return [2];
|
|
1161
1197
|
}
|
|
1162
1198
|
});
|
|
@@ -1670,10 +1706,11 @@ export var connectSlice = createSlice({
|
|
|
1670
1706
|
state.loading = true;
|
|
1671
1707
|
state.error = null;
|
|
1672
1708
|
})
|
|
1673
|
-
.addCase(confirmInfo.fulfilled, function (state) {
|
|
1709
|
+
.addCase(confirmInfo.fulfilled, function (state, action) {
|
|
1674
1710
|
state.loading = false;
|
|
1675
1711
|
state.error = null;
|
|
1676
|
-
|
|
1712
|
+
var _a = action.payload || {}, boardInfo = _a.boardInfo, boardData = _a.boardData, confirmData = _a.confirmData;
|
|
1713
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { boardInfo: boardInfo, boardData: boardData, confirmData: confirmData });
|
|
1677
1714
|
})
|
|
1678
1715
|
.addCase(confirmInfo.rejected, function (state, action) {
|
|
1679
1716
|
state.loading = false;
|
|
@@ -6,20 +6,8 @@ interface VerifyLeadTokenProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
8
|
data: any;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
user: any;
|
|
12
|
-
brand: any;
|
|
13
|
-
bank_account: any;
|
|
14
|
-
entity: any;
|
|
15
|
-
merchant: any;
|
|
16
|
-
name: any;
|
|
17
|
-
contact: any;
|
|
18
|
-
individuals: any;
|
|
19
|
-
business: any;
|
|
20
|
-
entityTypes: any;
|
|
21
|
-
notification: any;
|
|
22
|
-
};
|
|
9
|
+
entityData: any;
|
|
10
|
+
entityTypes: any;
|
|
23
11
|
token: string;
|
|
24
12
|
}, VerifyLeadTokenProps, {
|
|
25
13
|
state?: unknown;
|
|
@@ -45,20 +33,8 @@ export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
45
33
|
}>;
|
|
46
34
|
export declare const verifyEntityLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
47
35
|
data: any;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
user: any;
|
|
51
|
-
brand: any;
|
|
52
|
-
bank_account: any;
|
|
53
|
-
entity: any;
|
|
54
|
-
merchant: any;
|
|
55
|
-
name: any;
|
|
56
|
-
contact: any;
|
|
57
|
-
individuals: any;
|
|
58
|
-
business: any;
|
|
59
|
-
entityTypes: any;
|
|
60
|
-
notification: any;
|
|
61
|
-
};
|
|
36
|
+
entityData: any;
|
|
37
|
+
entityTypes: any;
|
|
62
38
|
formData: OTPFormValues;
|
|
63
39
|
}, OTPFormValues, {
|
|
64
40
|
state?: unknown;
|
|
@@ -82,9 +58,12 @@ export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
82
58
|
fulfilledMeta?: unknown;
|
|
83
59
|
rejectedMeta?: unknown;
|
|
84
60
|
}>;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
61
|
+
type RetrieveBoardProps = {
|
|
62
|
+
boardId: string;
|
|
63
|
+
individualId: string;
|
|
64
|
+
individualType: string;
|
|
65
|
+
};
|
|
66
|
+
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<any, RetrieveBoardProps, {
|
|
88
67
|
state?: unknown;
|
|
89
68
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
90
69
|
extra?: unknown;
|
|
@@ -95,7 +74,11 @@ export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk
|
|
|
95
74
|
rejectedMeta?: unknown;
|
|
96
75
|
}>;
|
|
97
76
|
export declare const updateEntityName: import("@reduxjs/toolkit").AsyncThunk<{
|
|
98
|
-
data:
|
|
77
|
+
data: {
|
|
78
|
+
entity: any;
|
|
79
|
+
documentData: any;
|
|
80
|
+
activityList: any;
|
|
81
|
+
};
|
|
99
82
|
formData: EntityNameFormValues;
|
|
100
83
|
}, AsyncThunkParams<EntityNameFormValues>, {
|
|
101
84
|
state?: unknown;
|
|
@@ -121,8 +104,11 @@ export declare const updateEntityCapital: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
121
104
|
rejectedMeta?: unknown;
|
|
122
105
|
}>;
|
|
123
106
|
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
124
|
-
|
|
125
|
-
|
|
107
|
+
data: any;
|
|
108
|
+
flows?: undefined;
|
|
109
|
+
} | {
|
|
110
|
+
data: any;
|
|
111
|
+
flows: any;
|
|
126
112
|
} | undefined, void, {
|
|
127
113
|
state?: unknown;
|
|
128
114
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|