@tap-payments/auth-jsconnect 2.8.51-development → 2.8.52-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.
- package/build/@types/app.d.ts +0 -1
- package/build/@types/form.d.ts +0 -1
- package/build/@types/redux.d.ts +0 -1
- package/build/api/axios.js +1 -2
- package/build/api/entity.d.ts +2 -2
- package/build/api/entity.js +4 -12
- package/build/api/index.d.ts +2 -2
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +2 -0
- package/build/constants/app.js +2 -0
- package/build/features/app/auth/authStore.js +23 -2
- package/build/features/app/bank/bankStore.d.ts +18 -13
- package/build/features/app/bank/bankStore.js +165 -184
- package/build/features/app/board/boardStore.js +30 -52
- package/build/features/app/brand/brandStore.d.ts +33 -16
- package/build/features/app/brand/brandStore.js +242 -239
- package/build/features/app/business/businessStore.d.ts +5 -0
- package/build/features/app/business/businessStore.js +87 -76
- package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -15
- package/build/features/app/connectExpress/connectExpressStore.js +68 -107
- package/build/features/app/entity/entityStore.d.ts +36 -20
- package/build/features/app/entity/entityStore.js +246 -196
- package/build/features/app/individual/individualStore.d.ts +38 -22
- package/build/features/app/individual/individualStore.js +266 -263
- package/build/features/app/password/passwordStore.d.ts +23 -40
- package/build/features/app/password/passwordStore.js +233 -226
- package/build/features/app/tax/taxStore.d.ts +7 -13
- package/build/features/app/tax/taxStore.js +147 -168
- package/build/features/auth/Auth.js +5 -1
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -13
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +26 -4
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/auth/screens/OTP/OTP.js +6 -1
- package/build/features/auth/screens/OTP/OTPInput.js +11 -0
- package/build/features/bank/Bank.d.ts +0 -1
- package/build/features/bank/Bank.js +4 -7
- package/build/features/bank/screens/BankDetails/BankDetails.js +5 -18
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +5 -5
- package/build/features/board/Board.js +4 -8
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -3
- package/build/features/brand/Brand.d.ts +0 -1
- package/build/features/brand/Brand.js +4 -7
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +35 -8
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -49
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +18 -5
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +7 -2
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -23
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +7 -23
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/Verify/Verify.js +1 -1
- package/build/features/business/Business.js +4 -9
- package/build/features/business/screens/Activities/Activities.js +3 -12
- 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/BusinessType/BusinessType.js +2 -10
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +26 -4
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +36 -9
- package/build/features/business/screens/Customers/Customers.js +3 -12
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +18 -5
- package/build/features/business/screens/IDBOD/IDBOD.js +2 -10
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -14
- package/build/features/business/screens/Verify/Verify.js +3 -13
- package/build/features/connect/Connect.js +4 -5
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +2 -9
- package/build/features/connect/screens/CivilID/CivilID.js +7 -2
- package/build/features/connect/screens/Individual/Email.js +1 -3
- package/build/features/connect/screens/Individual/Individual.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +8 -11
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +18 -5
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -5
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +1 -6
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +0 -10
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/connectExpress/screens/CivilID/CivilID.js +7 -2
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +9 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +26 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +7 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +9 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +24 -14
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +8 -7
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +7 -5
- package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -9
- package/build/features/connectExpress/screens/NID/NID.js +7 -2
- package/build/features/connectExpress/screens/NID/TAC.d.ts +7 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +6 -1
- package/build/features/connectExpress/screens/OTP/OTPInput.js +11 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/Entity.d.ts +0 -1
- package/build/features/entity/Entity.js +4 -7
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -8
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +4 -8
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -34
- package/build/features/entity/screens/EntityName/EntityName.js +15 -32
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +35 -8
- 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/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/Verify/Verify.js +1 -1
- package/build/features/featuresScreens.js +7 -67
- package/build/features/individual/Individual.d.ts +0 -1
- package/build/features/individual/Individual.js +4 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -54
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +26 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -3
- package/build/features/individual/screens/IndividualList/Email.js +2 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/IndividualList.js +5 -18
- package/build/features/individual/screens/IndividualList/UserList.js +9 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +26 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -76
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +1 -1
- package/build/features/password/Password.d.ts +0 -1
- package/build/features/password/Password.js +28 -75
- package/build/features/password/screens/CreatePassword/CreatePassword.js +4 -8
- package/build/features/password/screens/OTP/OTP.js +1 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +5 -5
- package/build/features/shared/Address/CountryList.d.ts +23 -7
- package/build/features/shared/Address/InputSelect.d.ts +23 -7
- package/build/features/shared/Button/FlowsButtons.js +3 -13
- package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -5
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -3
- package/build/features/shared/UploadFile/FileUpload.d.ts +7 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +7 -2
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +7 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +7 -2
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +7 -2
- package/build/features/signIn/SignIn.js +3 -12
- package/build/features/tax/Tax.d.ts +0 -1
- package/build/features/tax/Tax.js +4 -7
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -7
- package/build/features/tax/screens/Verify/Verify.js +5 -5
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/useVerifyToken.d.ts +2 -5
- package/build/hooks/useVerifyToken.js +5 -10
- package/build/utils/common.js +4 -4
- package/build/utils/locale.js +1 -2
- package/build/utils/string.d.ts +2 -5
- package/build/utils/string.js +5 -34
- package/package.json +2 -2
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/bank/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/bank/screens/OperatorError/index.d.ts +0 -3
- package/build/features/bank/screens/OperatorError/index.js +0 -2
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/board/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/board/screens/OperatorError/index.d.ts +0 -3
- package/build/features/board/screens/OperatorError/index.js +0 -2
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/brand/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/brand/screens/OperatorError/index.d.ts +0 -3
- package/build/features/brand/screens/OperatorError/index.js +0 -2
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/business/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/business/screens/OperatorError/index.d.ts +0 -3
- package/build/features/business/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -9
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +0 -3
- package/build/features/connectExpress/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -5
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +0 -34
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/entity/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/entity/screens/OperatorError/index.d.ts +0 -3
- package/build/features/entity/screens/OperatorError/index.js +0 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -14
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/individual/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/individual/screens/OperatorError/index.d.ts +0 -3
- package/build/features/individual/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/password/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/password/screens/OperatorError/index.d.ts +0 -3
- package/build/features/password/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -4
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +0 -10
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/password/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/signIn/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/signIn/screens/OperatorError/index.d.ts +0 -3
- package/build/features/signIn/screens/OperatorError/index.js +0 -2
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/tax/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/tax/screens/OperatorError/index.d.ts +0 -3
- package/build/features/tax/screens/OperatorError/index.js +0 -2
- package/build/hooks/useFormDirtyCheck.d.ts +0 -10
- package/build/hooks/useFormDirtyCheck.js +0 -66
|
@@ -61,7 +61,7 @@ import { FlowsTypes, AuthForType, BusinessType, LicenseType } from '../../../@ty
|
|
|
61
61
|
import API from '../../../api';
|
|
62
62
|
import { ADD_NEW_ENTITY, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
|
-
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../utils';
|
|
64
|
+
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension } from '../../../utils';
|
|
65
65
|
export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateBusinessCountryAsync', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
66
|
var connectExpress, payload, data;
|
|
67
67
|
return __generator(this, function (_a) {
|
|
@@ -447,6 +447,11 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
447
447
|
return [4, API.authService.verifyExpressAuth(payload)];
|
|
448
448
|
case 1:
|
|
449
449
|
data = _h.sent();
|
|
450
|
+
sendCustomEventToGTM({
|
|
451
|
+
event: 'Send Event',
|
|
452
|
+
event_category: 'User Registration Flow',
|
|
453
|
+
event_action: 'First OTP Success'
|
|
454
|
+
});
|
|
450
455
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
451
456
|
authId = data.auth.id;
|
|
452
457
|
thunkApi.dispatch(storeAuthId(authId));
|
|
@@ -514,6 +519,11 @@ export var verifyNIDOtpAsync = createAsyncThunk('connectExpress/verifyNIDOtpAsyn
|
|
|
514
519
|
return [4, API.authService.verifyExpressAuth(payload)];
|
|
515
520
|
case 1:
|
|
516
521
|
data = _h.sent();
|
|
522
|
+
sendCustomEventToGTM({
|
|
523
|
+
event: 'Send Event',
|
|
524
|
+
event_category: 'User Registration Flow',
|
|
525
|
+
event_action: 'First OTP Success'
|
|
526
|
+
});
|
|
517
527
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
518
528
|
authId = data.auth.id;
|
|
519
529
|
thunkApi.dispatch(storeAuthId(authId));
|
|
@@ -757,6 +767,11 @@ export var verifyNIDOtpLeadIdentityAsync = createAsyncThunk('connectExpress/veri
|
|
|
757
767
|
return [4, API.authService.verifyExpressLeadIdentity(payload)];
|
|
758
768
|
case 1:
|
|
759
769
|
data = _e.sent();
|
|
770
|
+
sendCustomEventToGTM({
|
|
771
|
+
event: 'Send Event',
|
|
772
|
+
event_category: 'User Registration Flow',
|
|
773
|
+
event_action: 'Absher OTP Success'
|
|
774
|
+
});
|
|
760
775
|
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
761
776
|
case 2:
|
|
762
777
|
_e.sent();
|
|
@@ -870,107 +885,65 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
870
885
|
});
|
|
871
886
|
});
|
|
872
887
|
});
|
|
873
|
-
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (
|
|
874
|
-
var
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
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
|
-
sendCustomEventToGTM({
|
|
913
|
-
event: 'Send Event',
|
|
914
|
-
event_category: 'User Registration Flow',
|
|
915
|
-
event_action: 'Registration Completed',
|
|
916
|
-
event_label: 'Product Type',
|
|
917
|
-
event_value: leadId
|
|
918
|
-
});
|
|
919
|
-
(_m = (_l = settings.data.appConfig).onCreated) === null || _m === void 0 ? void 0 : _m.call(_l, accountData);
|
|
920
|
-
(_p = (_o = settings.data.appConfig).onFlowCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, accountData);
|
|
921
|
-
(_r = (_q = settings.data.appConfig).onStepCompleted) === null || _r === void 0 ? void 0 : _r.call(_q, settings.data.activeScreen.name, accountData);
|
|
922
|
-
if (showBoard) {
|
|
923
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
924
|
-
return [2, { accountData: accountData }];
|
|
925
|
-
}
|
|
926
|
-
if (!(scope === SCOPE_AUTH)) return [3, 8];
|
|
927
|
-
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 6];
|
|
928
|
-
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
929
|
-
case 5:
|
|
930
|
-
leadData = _v.sent();
|
|
931
|
-
_v.label = 6;
|
|
932
|
-
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 }))];
|
|
933
|
-
case 7:
|
|
934
|
-
_v.sent();
|
|
935
|
-
return [2, { accountData: accountData }];
|
|
936
|
-
case 8:
|
|
937
|
-
if (redirectUrl && mode === 'page') {
|
|
938
|
-
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
939
|
-
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
940
|
-
return [2, { accountData: accountData }];
|
|
941
|
-
}
|
|
942
|
-
thunkApi.dispatch(handleOpen(false));
|
|
943
|
-
return [2];
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
});
|
|
947
|
-
});
|
|
948
|
-
export var retrieveDetailsAfterCreateAccountAsync = createAsyncThunk('connectExpress/retrieveDetailsAfterCreateAccountAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
949
|
-
var connectExpress, _a, accountData, leadData, leadResData, data, board_id, board_info_id, _b, boardInfo, boardData;
|
|
950
|
-
var _c, _d;
|
|
951
|
-
return __generator(this, function (_e) {
|
|
952
|
-
switch (_e.label) {
|
|
888
|
+
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
889
|
+
var _a, connectExpress, settings, responseData, _b, postURL, scope, redirectUrl, mode, showBoard, platforms, payment_provider, authId, bi, leadId, body, data, leadData, board_id, board_info_id, _c, boardInfo, boardData, urlQueryStart;
|
|
890
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
891
|
+
return __generator(this, function (_t) {
|
|
892
|
+
switch (_t.label) {
|
|
953
893
|
case 0:
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
894
|
+
_a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
|
|
895
|
+
responseData = connectExpress.data.responseData;
|
|
896
|
+
_b = settings.data.appConfig, postURL = _b.postURL, scope = _b.scope, redirectUrl = _b.redirectUrl, mode = _b.mode, showBoard = _b.showBoard;
|
|
897
|
+
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;
|
|
898
|
+
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;
|
|
899
|
+
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;
|
|
900
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
901
|
+
leadId = responseData === null || responseData === void 0 ? void 0 : responseData.leadData.id;
|
|
902
|
+
body = {
|
|
903
|
+
lead_id: leadId,
|
|
904
|
+
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
905
|
+
platforms: platforms,
|
|
906
|
+
payment_provider: payment_provider
|
|
907
|
+
};
|
|
908
|
+
return [4, API.accountService.expressCreateAccount(body)];
|
|
959
909
|
case 1:
|
|
960
|
-
data =
|
|
961
|
-
|
|
962
|
-
|
|
910
|
+
data = _t.sent();
|
|
911
|
+
sendCustomEventToGTM({
|
|
912
|
+
event: 'Send Event',
|
|
913
|
+
event_category: 'User Registration Flow',
|
|
914
|
+
event_action: 'Registration Completed',
|
|
915
|
+
event_label: 'Product Type',
|
|
916
|
+
event_value: leadId
|
|
917
|
+
});
|
|
918
|
+
sendCustomDimension({
|
|
919
|
+
event: 'PageView',
|
|
920
|
+
lead_ID: leadId
|
|
921
|
+
});
|
|
922
|
+
(_l = (_k = settings.data.appConfig).onCreated) === null || _l === void 0 ? void 0 : _l.call(_k, data);
|
|
923
|
+
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, data);
|
|
924
|
+
(_q = (_p = settings.data.appConfig).onStepCompleted) === null || _q === void 0 ? void 0 : _q.call(_p, settings.data.activeScreen.name, data);
|
|
925
|
+
if (!showBoard) return [3, 4];
|
|
926
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
963
927
|
case 2:
|
|
964
|
-
|
|
965
|
-
|
|
928
|
+
leadData = (_t.sent()).data;
|
|
929
|
+
board_id = (_r = data.board_id) !== null && _r !== void 0 ? _r : leadData.board_id;
|
|
930
|
+
board_info_id = (_s = data.board_info_id) !== null && _s !== void 0 ? _s : leadData.board_info_id;
|
|
966
931
|
return [4, Promise.all([
|
|
967
932
|
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
968
933
|
API.boardService.retrieveBoardDetails(board_id)
|
|
969
934
|
])];
|
|
970
935
|
case 3:
|
|
971
|
-
|
|
936
|
+
_c = _t.sent(), boardInfo = _c[0], boardData = _c[1];
|
|
972
937
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
973
|
-
return [2, { boardInfo: boardInfo, boardData: boardData }];
|
|
938
|
+
return [2, { boardInfo: boardInfo, boardData: boardData, account: data }];
|
|
939
|
+
case 4:
|
|
940
|
+
if (redirectUrl && mode === 'page') {
|
|
941
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
942
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
943
|
+
return [2, { account: data }];
|
|
944
|
+
}
|
|
945
|
+
thunkApi.dispatch(handleOpen(false));
|
|
946
|
+
return [2];
|
|
974
947
|
}
|
|
975
948
|
});
|
|
976
949
|
}); });
|
|
@@ -993,7 +966,8 @@ export var createEntity = createAsyncThunk('connectExpress/createEntity', functi
|
|
|
993
966
|
number: licenseNumber || '',
|
|
994
967
|
type: licenseType || ''
|
|
995
968
|
},
|
|
996
|
-
country: (_a = settings.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2
|
|
969
|
+
country: (_a = settings.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2,
|
|
970
|
+
is_licensed: undefined
|
|
997
971
|
}
|
|
998
972
|
};
|
|
999
973
|
return [4, API.entityService.createEntity(body)];
|
|
@@ -1612,19 +1586,6 @@ export var connectSlice = createSlice({
|
|
|
1612
1586
|
.addCase(createAccountAsync.rejected, function (state, action) {
|
|
1613
1587
|
state.loading = false;
|
|
1614
1588
|
state.error = action.error.message;
|
|
1615
|
-
})
|
|
1616
|
-
.addCase(retrieveDetailsAfterCreateAccountAsync.pending, function (state) {
|
|
1617
|
-
state.loading = true;
|
|
1618
|
-
state.error = null;
|
|
1619
|
-
})
|
|
1620
|
-
.addCase(retrieveDetailsAfterCreateAccountAsync.fulfilled, function (state, action) {
|
|
1621
|
-
state.loading = false;
|
|
1622
|
-
state.error = null;
|
|
1623
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), action.payload);
|
|
1624
|
-
})
|
|
1625
|
-
.addCase(retrieveDetailsAfterCreateAccountAsync.rejected, function (state, action) {
|
|
1626
|
-
state.loading = false;
|
|
1627
|
-
state.error = action.error.message;
|
|
1628
1589
|
})
|
|
1629
1590
|
.addCase(getMerchantListAsync.pending, function (state) {
|
|
1630
1591
|
state.loading = true;
|
|
@@ -6,8 +6,20 @@ interface VerifyLeadTokenProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
8
|
data: any;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
individualData: any;
|
|
10
|
+
boardResponse: {
|
|
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
|
+
};
|
|
11
23
|
token: string;
|
|
12
24
|
}, VerifyLeadTokenProps, {
|
|
13
25
|
state?: unknown;
|
|
@@ -33,8 +45,20 @@ export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
33
45
|
}>;
|
|
34
46
|
export declare const verifyEntityLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
35
47
|
data: any;
|
|
36
|
-
|
|
37
|
-
|
|
48
|
+
individualData: any;
|
|
49
|
+
boardResponse: {
|
|
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
|
+
};
|
|
38
62
|
formData: OTPFormValues;
|
|
39
63
|
}, OTPFormValues, {
|
|
40
64
|
state?: unknown;
|
|
@@ -58,12 +82,9 @@ export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
58
82
|
fulfilledMeta?: unknown;
|
|
59
83
|
rejectedMeta?: unknown;
|
|
60
84
|
}>;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
individualType: string;
|
|
65
|
-
};
|
|
66
|
-
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<any, RetrieveBoardProps, {
|
|
85
|
+
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
|
|
86
|
+
data: any;
|
|
87
|
+
}, string, {
|
|
67
88
|
state?: unknown;
|
|
68
89
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
69
90
|
extra?: unknown;
|
|
@@ -74,12 +95,9 @@ export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk
|
|
|
74
95
|
rejectedMeta?: unknown;
|
|
75
96
|
}>;
|
|
76
97
|
export declare const updateEntityName: import("@reduxjs/toolkit").AsyncThunk<{
|
|
77
|
-
data:
|
|
78
|
-
entity: any;
|
|
79
|
-
documentData: any;
|
|
80
|
-
activityList: any;
|
|
81
|
-
};
|
|
98
|
+
data: any;
|
|
82
99
|
formData: EntityNameFormValues;
|
|
100
|
+
currencyData: any;
|
|
83
101
|
}, AsyncThunkParams<EntityNameFormValues>, {
|
|
84
102
|
state?: unknown;
|
|
85
103
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -104,11 +122,8 @@ export declare const updateEntityCapital: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
104
122
|
rejectedMeta?: unknown;
|
|
105
123
|
}>;
|
|
106
124
|
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
} | {
|
|
110
|
-
data: any;
|
|
111
|
-
flows: any;
|
|
125
|
+
response: any;
|
|
126
|
+
formData: void;
|
|
112
127
|
} | undefined, void, {
|
|
113
128
|
state?: unknown;
|
|
114
129
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -138,6 +153,7 @@ export interface EntityData {
|
|
|
138
153
|
entityNameData: EntityNameFormValues & ResponseData;
|
|
139
154
|
entityCapitalData: EntityCapitalFormValues & ResponseData;
|
|
140
155
|
flowName: FlowsTypes;
|
|
156
|
+
currency: string;
|
|
141
157
|
}
|
|
142
158
|
export interface EntityState extends SharedState<EntityData> {
|
|
143
159
|
customLoading?: boolean;
|