@tap-payments/auth-jsconnect 1.0.90-test → 1.0.94-test
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/README.md +58 -52
- package/build/@types/app.d.ts +9 -0
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +2 -0
- package/build/api/account.js +1 -1
- package/build/api/auth.js +1 -1
- package/build/api/availabilityServices.js +1 -1
- package/build/api/axios.d.ts +2 -0
- package/build/api/axios.js +4 -2
- package/build/api/country.js +1 -1
- package/build/api/data.js +1 -1
- package/build/api/entity.js +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/individual.js +1 -1
- package/build/api/ip.js +1 -1
- package/build/api/lead.js +1 -1
- package/build/api/operator.js +1 -1
- package/build/app/rootReducer.d.ts +6 -7
- package/build/app/rootReducer.js +7 -9
- package/build/app/settings.d.ts +9 -3
- package/build/app/settings.js +42 -6
- package/build/app/store.d.ts +0 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/AnimationFlow/Dialog.js +2 -2
- package/build/components/AnimationFlow/Loader.js +1 -1
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/DatePicker/customStyle.css +86 -0
- package/build/components/Footer/Footer.d.ts +0 -2
- package/build/components/Footer/Footer.js +3 -4
- package/build/components/Input/Input.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
- package/build/constants/app.d.ts +1 -2
- package/build/constants/app.js +1 -9
- package/build/features/app/bank/bankStore.d.ts +6 -2
- package/build/features/app/bank/bankStore.js +42 -5
- package/build/features/app/business/businessStore.d.ts +8 -10
- package/build/features/app/business/businessStore.js +42 -44
- package/build/features/app/connect/connectStore.d.ts +3 -8
- package/build/features/app/connect/connectStore.js +27 -61
- package/build/features/app/individual/individualStore.d.ts +7 -8
- package/build/features/app/individual/individualStore.js +53 -48
- package/build/features/app/password/passwordStore.d.ts +6 -2
- package/build/features/app/password/passwordStore.js +41 -5
- package/build/features/app/tax/taxStore.d.ts +6 -2
- package/build/features/app/tax/taxStore.js +43 -6
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +13 -12
- package/build/features/bank/screens/BankDetails/BankDetails.js +10 -9
- package/build/features/bank/screens/BankDetails/BankName.js +8 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +67 -0
- package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
- package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/validation.js +3 -2
- package/build/features/bank/screens/Success/Success.js +3 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/bank/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/bank/screens/Verify/OTPInput.js +8 -3
- package/build/features/bank/screens/Verify/Verify.js +12 -11
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +13 -15
- package/build/features/business/screens/Activities/Activities.js +7 -7
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +7 -7
- package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
- package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +6 -6
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +8 -8
- package/build/features/business/screens/Customers/Customers.js +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -6
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -7
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +2 -2
- package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
- package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +5 -5
- package/build/features/business/screens/IDBOD/ID.js +6 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
- package/build/features/business/screens/OTP/OTP.js +9 -9
- package/build/features/business/screens/OTP/OTPInput.js +4 -4
- package/build/features/business/screens/Success/Success.js +3 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -9
- package/build/features/business/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/business/screens/Verify/OTPInput.js +8 -3
- package/build/features/business/screens/Verify/Verify.js +12 -11
- package/build/features/connect/Connect.d.ts +1 -1
- package/build/features/connect/Connect.js +14 -16
- package/build/features/connect/screens/Individual/Email.js +7 -7
- package/build/features/connect/screens/Individual/Individual.js +9 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
- package/build/features/connect/screens/Individual/Name.js +6 -6
- package/build/features/connect/screens/Individual/validation.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -8
- package/build/features/connect/screens/Merchant/BrandName.js +12 -11
- package/build/features/connect/screens/Merchant/Merchant.js +7 -7
- package/build/features/connect/screens/Merchant/SocialMedia.js +9 -9
- package/build/features/connect/screens/Merchant/TAC.js +7 -7
- package/build/features/connect/screens/Merchant/validation.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +10 -10
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/connect/screens/Mobile/Title.js +2 -2
- package/build/features/connect/screens/NID/DOB.js +5 -5
- package/build/features/connect/screens/NID/IDNumber.js +8 -8
- package/build/features/connect/screens/NID/NID.js +9 -9
- package/build/features/connect/screens/OTP/OTP.js +9 -9
- package/build/features/connect/screens/OTP/OTPInput.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.js +3 -3
- package/build/features/featuresScreens.d.ts +1 -2
- package/build/features/featuresScreens.js +30 -37
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +13 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +11 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
- package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
- package/build/features/individual/screens/Success/Success.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/individual/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/individual/screens/Verify/OTPInput.js +8 -3
- package/build/features/individual/screens/Verify/Verify.js +12 -11
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +13 -12
- package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
- package/build/features/password/screens/CreatePassword/CreatePassword.js +7 -7
- package/build/features/password/screens/CreatePassword/Password.js +6 -6
- package/build/features/password/screens/Success/Success.js +3 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/password/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/password/screens/Verify/OTPInput.js +8 -3
- package/build/features/password/screens/Verify/Verify.js +12 -11
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +4 -4
- package/build/features/shared/Background/Background.js +3 -2
- package/build/features/shared/Background/LogoBackground.d.ts +1 -4
- package/build/features/shared/Background/LogoBackground.js +8 -39
- package/build/features/shared/Button/AbsherButton.d.ts +2 -3
- package/build/features/shared/Button/AbsherButton.js +7 -12
- package/build/features/shared/Button/Button.d.ts +1 -1
- package/build/features/shared/Button/Button.js +7 -7
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +4 -3
- package/build/features/shared/Button/FlowsButtons.d.ts +5 -2
- package/build/features/shared/Button/FlowsButtons.js +14 -9
- package/build/features/shared/Button/MobileButton.d.ts +2 -3
- package/build/features/shared/Button/MobileButton.js +7 -12
- package/build/features/shared/Button/SuccessButton.js +1 -1
- package/build/features/shared/Footer/Footer.js +5 -6
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/OTP/OTP.d.ts +3 -2
- package/build/features/shared/OTP/OTP.js +13 -5
- package/build/features/shared/Search/Search.js +1 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +13 -12
- package/build/features/tax/screens/Success/Success.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +11 -8
- package/build/features/tax/screens/TaxDetails/VATId.js +18 -7
- package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/validation.js +2 -1
- package/build/features/tax/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/tax/screens/Verify/OTPInput.js +8 -3
- package/build/features/tax/screens/Verify/Verify.js +12 -11
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +7 -4
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useAppSelector.d.ts +1 -1
- package/build/hooks/useAppTheme.d.ts +1 -1
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useErrorListener.d.ts +1 -1
- package/build/hooks/useErrorListener.js +5 -7
- package/build/hooks/useLanguage.js +1 -1
- package/build/hooks/useRedirectionListener.js +1 -1
- package/build/hooks/useStepStartedListener.d.ts +1 -0
- package/build/hooks/useStepStartedListener.js +10 -0
- package/build/i18n.js +1 -1
- package/build/index.css +135 -0
- package/build/index.d.ts +8 -9
- package/build/index.js +8 -11
- package/build/theme/theme.d.ts +1 -1
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +1 -1
- package/build/utils/rsa.js +1 -1
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +22 -3
- package/package.json +127 -127
- package/build/features/Landing/Landing.d.ts +0 -7
- package/build/features/Landing/Landing.js +0 -55
- package/build/features/Landing/index.d.ts +0 -1
- package/build/features/Landing/index.js +0 -1
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.d.ts +0 -5
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +0 -41
- package/build/features/Landing/screens/VerifyAndRedirect/index.d.ts +0 -2
- package/build/features/Landing/screens/VerifyAndRedirect/index.js +0 -2
- package/build/features/app/landing/landingStore.d.ts +0 -22
- package/build/features/app/landing/landingStore.js +0 -103
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import Input from '@mui/material/Input';
|
|
26
|
-
import Collapse from '
|
|
27
|
-
import Warning from '
|
|
26
|
+
import Collapse from '../Collapse';
|
|
27
|
+
import Warning from '../Warning';
|
|
28
28
|
import { alpha, styled } from '@mui/material/styles';
|
|
29
29
|
var InputStyled = styled(Input)(function (_a) {
|
|
30
30
|
var theme = _a.theme;
|
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
|
-
import Text from '
|
|
26
|
+
import Text from '../Text';
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
28
|
var OTPTimerStyled = styled(Box)(function (_a) {
|
|
29
29
|
var theme = _a.theme;
|
|
@@ -27,7 +27,7 @@ import List from '@mui/material/List';
|
|
|
27
27
|
import ListItem from '@mui/material/ListItem';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import get from 'lodash-es/get';
|
|
30
|
-
import { useEventListener } from '
|
|
30
|
+
import { useEventListener } from '../../hooks';
|
|
31
31
|
var ListStyled = styled(List)(function (_a) {
|
|
32
32
|
var _b;
|
|
33
33
|
var theme = _a.theme;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { SocialMediaTypes } from '
|
|
2
|
+
import { SocialMediaTypes } from '../../@types';
|
|
3
3
|
import { ToggleButtonGroupProps } from '../ToggleButtonGroup';
|
|
4
4
|
import { ToggleButtonProps } from '../ToggleButton';
|
|
5
5
|
export interface SocialMediaGroupProps extends ToggleButtonGroupProps {
|
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
|
-
import { ICONS_NAMES } from '
|
|
27
|
-
import { SocialMediaTypes } from '
|
|
26
|
+
import { ICONS_NAMES } from '../../constants';
|
|
27
|
+
import { SocialMediaTypes } from '../../@types';
|
|
28
28
|
import ToggleButtonGroup from '../ToggleButtonGroup';
|
|
29
29
|
import ToggleButton from '../ToggleButton';
|
|
30
30
|
import Icon from '../Icon';
|
package/build/constants/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScreenStepNavigation, BusinessType } from '
|
|
1
|
+
import { ScreenStepNavigation, BusinessType } from '../@types';
|
|
2
2
|
export declare const CLIENT_ORIGIN: string;
|
|
3
3
|
export declare const LOCAL_STORAGE_KEYS: {
|
|
4
4
|
themeMode: string;
|
|
@@ -18,7 +18,6 @@ export declare const INDIVIDUAL_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
|
18
18
|
export declare const PASSWORD_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
19
19
|
export declare const BANK_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
20
20
|
export declare const TAX_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
21
|
-
export declare const LANDING_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
22
21
|
export declare const DefaultDeviceInfo: {
|
|
23
22
|
source: string;
|
|
24
23
|
device: {
|
package/build/constants/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BusinessType } from '
|
|
1
|
+
import { BusinessType } from '../@types';
|
|
2
2
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
3
3
|
export var LOCAL_STORAGE_KEYS = {
|
|
4
4
|
themeMode: 'themeMode',
|
|
@@ -210,14 +210,6 @@ export var TAX_SCREENS_NAVIGATION = [
|
|
|
210
210
|
order: 4
|
|
211
211
|
}
|
|
212
212
|
];
|
|
213
|
-
export var LANDING_SCREENS_NAVIGATION = [
|
|
214
|
-
{
|
|
215
|
-
name: 'LANDING_VERIFY_AND_REDIRECT_STEP',
|
|
216
|
-
next: '',
|
|
217
|
-
prev: '',
|
|
218
|
-
order: 1
|
|
219
|
-
}
|
|
220
|
-
];
|
|
221
213
|
export var DefaultDeviceInfo = {
|
|
222
214
|
source: 'browser',
|
|
223
215
|
device: {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { BankFormValues, OTPFormValues, ResponseData, SharedState } from '
|
|
1
|
+
import { RootState } from '../../../app/store';
|
|
2
|
+
import { BankFormValues, FlowsTypes, OTPFormValues, ResponseData, SharedState } from '../../../@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
4
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
5
|
data: any;
|
|
6
6
|
leadData: any;
|
|
7
7
|
token: string;
|
|
8
8
|
}, string, {}>;
|
|
9
|
+
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
10
|
+
data: any;
|
|
11
|
+
}, void, {}>;
|
|
9
12
|
export declare const verifyBankLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
10
13
|
data: any;
|
|
11
14
|
formData: OTPFormValues;
|
|
@@ -35,6 +38,7 @@ export interface BankData {
|
|
|
35
38
|
verify: ResponseData & VerifyData;
|
|
36
39
|
otpData: OTPFormValues & ResponseData;
|
|
37
40
|
bankData: BankFormValues & ResponseData;
|
|
41
|
+
flowName: FlowsTypes;
|
|
38
42
|
}
|
|
39
43
|
export interface BankState extends SharedState<BankData> {
|
|
40
44
|
}
|
|
@@ -47,10 +47,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
-
import API from '
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
50
|
+
import API from '../../../api';
|
|
51
|
+
import { FlowsTypes } from '../../../@types';
|
|
52
|
+
import { hasKey, removeRequestHeaders } from '../../../utils';
|
|
53
|
+
import { handleNextScreenStep } from '../../../app/settings';
|
|
54
|
+
import { BANK_STEP_NAMES } from '../../../constants';
|
|
54
55
|
export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
56
|
var payload, data, leadResponse, _a, steps, entity, hasCompleted;
|
|
56
57
|
return __generator(this, function (_b) {
|
|
@@ -85,6 +86,23 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
|
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
}); });
|
|
89
|
+
export var resendOTP = createAsyncThunk('resendOTPBank', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
90
|
+
var bank, payload, data;
|
|
91
|
+
return __generator(this, function (_a) {
|
|
92
|
+
switch (_a.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
bank = thunkApi.getState().bank;
|
|
95
|
+
payload = {
|
|
96
|
+
service_name: 'tap_email',
|
|
97
|
+
verify_token: bank.data.verify.token
|
|
98
|
+
};
|
|
99
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
100
|
+
case 1:
|
|
101
|
+
data = (_a.sent()).data;
|
|
102
|
+
return [2, { data: data }];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}); });
|
|
88
106
|
export var verifyBankLeadOTP = createAsyncThunk('verifyBankLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
107
|
var _a, bank, settings, responseBody, payload, data, steps, hasCompleted;
|
|
90
108
|
var _b, _c, _d, _e;
|
|
@@ -215,6 +233,7 @@ var initialState = {
|
|
|
215
233
|
loading: false,
|
|
216
234
|
customLoading: false,
|
|
217
235
|
data: {
|
|
236
|
+
flowName: FlowsTypes.BANK,
|
|
218
237
|
verify: {
|
|
219
238
|
token: ''
|
|
220
239
|
},
|
|
@@ -224,7 +243,8 @@ var initialState = {
|
|
|
224
243
|
bankData: {
|
|
225
244
|
iban: '',
|
|
226
245
|
beneficiaryName: '',
|
|
227
|
-
bankName: ''
|
|
246
|
+
bankName: '',
|
|
247
|
+
confirmPolicy: false
|
|
228
248
|
}
|
|
229
249
|
}
|
|
230
250
|
};
|
|
@@ -264,6 +284,23 @@ export var bankSlice = createSlice({
|
|
|
264
284
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
265
285
|
state.error = action.error.message;
|
|
266
286
|
state.customLoading = false;
|
|
287
|
+
})
|
|
288
|
+
.addCase(resendOTP.pending, function (state) {
|
|
289
|
+
state.error = null;
|
|
290
|
+
})
|
|
291
|
+
.addCase(resendOTP.fulfilled, function (state, action) {
|
|
292
|
+
var _a;
|
|
293
|
+
state.error = null;
|
|
294
|
+
var data = action.payload.data;
|
|
295
|
+
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
296
|
+
if (description) {
|
|
297
|
+
state.error = description;
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
301
|
+
})
|
|
302
|
+
.addCase(resendOTP.rejected, function (state, action) {
|
|
303
|
+
state.error = action.error.message;
|
|
267
304
|
})
|
|
268
305
|
.addCase(verifyBankLeadOTP.pending, function (state) {
|
|
269
306
|
state.loading = true;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues,
|
|
3
|
-
export declare const getCountries: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
|
-
businessCountry: any;
|
|
5
|
-
countries: any;
|
|
6
|
-
}, void, {}>;
|
|
1
|
+
import { RootState } from '../../../app/store';
|
|
2
|
+
import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, FlowsTypes } from '../../../@types';
|
|
7
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
4
|
data: any;
|
|
9
5
|
leadData: any;
|
|
10
6
|
token: string;
|
|
11
7
|
}, string, {}>;
|
|
8
|
+
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
9
|
+
data: any;
|
|
10
|
+
}, void, {}>;
|
|
12
11
|
export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
13
12
|
data: any;
|
|
14
13
|
formData: {
|
|
@@ -44,8 +43,8 @@ export declare const createAccount: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
44
43
|
export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
45
44
|
data: any;
|
|
46
45
|
formData: {
|
|
47
|
-
activities: import("
|
|
48
|
-
salesChannels: import("
|
|
46
|
+
activities: import("../../../@types").Activity[] | undefined;
|
|
47
|
+
salesChannels: import("../../../@types").SalesChannel[];
|
|
49
48
|
operationStartDate: string;
|
|
50
49
|
};
|
|
51
50
|
}, ActivitiesFormValues, {}>;
|
|
@@ -70,8 +69,6 @@ declare type VerifyData = {
|
|
|
70
69
|
};
|
|
71
70
|
export interface BusinessData {
|
|
72
71
|
verify: ResponseData & VerifyData;
|
|
73
|
-
businessCountry: CountryCode;
|
|
74
|
-
countries: CountryCode[];
|
|
75
72
|
otpData: OTPFormValues & ResponseData & {
|
|
76
73
|
isNID: boolean;
|
|
77
74
|
};
|
|
@@ -81,6 +78,7 @@ export interface BusinessData {
|
|
|
81
78
|
businessTypeData: BusinessTypeFormValues & ResponseData;
|
|
82
79
|
activitiesData: ActivitiesFormValues & ResponseData;
|
|
83
80
|
customersData: CustomersFormValues & ResponseData;
|
|
81
|
+
flowName: FlowsTypes;
|
|
84
82
|
}
|
|
85
83
|
export interface BusinessState extends SharedState<BusinessData> {
|
|
86
84
|
}
|
|
@@ -57,27 +57,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
59
|
import moment from 'moment';
|
|
60
|
-
import API from '
|
|
61
|
-
import { BusinessType } from '
|
|
62
|
-
import { BUSINESS_STEP_NAMES,
|
|
63
|
-
import { convertNumbers2English, getFlowUrl, hasKey, removeRequestHeaders } from '
|
|
64
|
-
import { handleNextScreenStep } from '
|
|
65
|
-
export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
-
var settings, countriesBody, businessCountry;
|
|
67
|
-
return __generator(this, function (_a) {
|
|
68
|
-
switch (_a.label) {
|
|
69
|
-
case 0:
|
|
70
|
-
settings = thunkApi.getState().settings;
|
|
71
|
-
return [4, API.countryService.getAllCountries()];
|
|
72
|
-
case 1:
|
|
73
|
-
countriesBody = (_a.sent()).data;
|
|
74
|
-
businessCountry = (countriesBody.list || []).find(function (country) {
|
|
75
|
-
return [country.iso2, country.iso3].includes(settings.data.appConfig.businessCountryCode.toUpperCase());
|
|
76
|
-
});
|
|
77
|
-
return [2, { businessCountry: businessCountry, countries: (countriesBody === null || countriesBody === void 0 ? void 0 : countriesBody.list) || [] }];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}); });
|
|
60
|
+
import API from '../../../api';
|
|
61
|
+
import { BusinessType, FlowsTypes } from '../../../@types';
|
|
62
|
+
import { BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
63
|
+
import { convertNumbers2English, getFlowUrl, hasKey, removeRequestHeaders } from '../../../utils';
|
|
64
|
+
import { handleNextScreenStep } from '../../../app/settings';
|
|
81
65
|
export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
66
|
var payload, data, leadResponse;
|
|
83
67
|
return __generator(this, function (_a) {
|
|
@@ -106,6 +90,23 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
|
|
|
106
90
|
}
|
|
107
91
|
});
|
|
108
92
|
}); });
|
|
93
|
+
export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
+
var business, payload, data;
|
|
95
|
+
return __generator(this, function (_a) {
|
|
96
|
+
switch (_a.label) {
|
|
97
|
+
case 0:
|
|
98
|
+
business = thunkApi.getState().business;
|
|
99
|
+
payload = {
|
|
100
|
+
service_name: 'tap_email',
|
|
101
|
+
verify_token: business.data.verify.token
|
|
102
|
+
};
|
|
103
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
104
|
+
case 1:
|
|
105
|
+
data = (_a.sent()).data;
|
|
106
|
+
return [2, { data: data }];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}); });
|
|
109
110
|
export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
110
111
|
var _a, business, settings, isNID, responseBody, verifyResponse, stepName, payload, data, steps, hasBusinessCompleted;
|
|
111
112
|
var _b, _c, _d, _e;
|
|
@@ -174,7 +175,7 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
174
175
|
identification_id: params.nid,
|
|
175
176
|
identification_id_type: identification_id_type,
|
|
176
177
|
date_of_birth: params.dob,
|
|
177
|
-
country_code:
|
|
178
|
+
country_code: settings.data.businessCountry.iso2,
|
|
178
179
|
step_name: stepName,
|
|
179
180
|
encryption_contract: ['country_code', 'identification_id', 'identification_id_type', 'date_of_birth']
|
|
180
181
|
};
|
|
@@ -350,7 +351,7 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
|
|
|
350
351
|
agree_refund: params.refundPolicy,
|
|
351
352
|
agree_chargeback: params.transactionPolicy,
|
|
352
353
|
step_name: stepName,
|
|
353
|
-
encryption_contract: ['
|
|
354
|
+
encryption_contract: ['customers_served_monthly', 'yearly_sales_range']
|
|
354
355
|
};
|
|
355
356
|
return [4, API.entityService.updateEntityInfo(requestBody)];
|
|
356
357
|
case 1:
|
|
@@ -435,8 +436,7 @@ var initialState = {
|
|
|
435
436
|
loading: false,
|
|
436
437
|
customLoading: false,
|
|
437
438
|
data: {
|
|
438
|
-
|
|
439
|
-
countries: [],
|
|
439
|
+
flowName: FlowsTypes.BUSINESS,
|
|
440
440
|
verify: {
|
|
441
441
|
token: ''
|
|
442
442
|
},
|
|
@@ -482,23 +482,6 @@ export var businessSlice = createSlice({
|
|
|
482
482
|
},
|
|
483
483
|
extraReducers: function (builder) {
|
|
484
484
|
builder
|
|
485
|
-
.addCase(getCountries.fulfilled, function (state, action) {
|
|
486
|
-
state.error = null;
|
|
487
|
-
state.customLoading = false;
|
|
488
|
-
var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries;
|
|
489
|
-
state.data.countries = countries
|
|
490
|
-
.slice()
|
|
491
|
-
.sort(function (cOne, cTwo) { return cOne.name.english.localeCompare(cTwo.name.english); });
|
|
492
|
-
state.data.businessCountry = businessCountry || defaultCountry;
|
|
493
|
-
})
|
|
494
|
-
.addCase(getCountries.pending, function (state) {
|
|
495
|
-
state.error = null;
|
|
496
|
-
state.customLoading = true;
|
|
497
|
-
})
|
|
498
|
-
.addCase(getCountries.rejected, function (state, action) {
|
|
499
|
-
state.error = action.error.message;
|
|
500
|
-
state.customLoading = false;
|
|
501
|
-
})
|
|
502
485
|
.addCase(verifyLeadToken.pending, function (state) {
|
|
503
486
|
state.error = null;
|
|
504
487
|
state.customLoading = true;
|
|
@@ -520,6 +503,23 @@ export var businessSlice = createSlice({
|
|
|
520
503
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
521
504
|
state.error = action.error.message;
|
|
522
505
|
state.customLoading = false;
|
|
506
|
+
})
|
|
507
|
+
.addCase(resendOTP.pending, function (state) {
|
|
508
|
+
state.error = null;
|
|
509
|
+
})
|
|
510
|
+
.addCase(resendOTP.fulfilled, function (state, action) {
|
|
511
|
+
var _a;
|
|
512
|
+
state.error = null;
|
|
513
|
+
var data = action.payload.data;
|
|
514
|
+
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
515
|
+
if (description) {
|
|
516
|
+
state.error = description;
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
520
|
+
})
|
|
521
|
+
.addCase(resendOTP.rejected, function (state, action) {
|
|
522
|
+
state.error = action.error.message;
|
|
523
523
|
})
|
|
524
524
|
.addCase(verifyLeadOTP.pending, function (state) {
|
|
525
525
|
state.loading = true;
|
|
@@ -551,7 +551,6 @@ export var businessSlice = createSlice({
|
|
|
551
551
|
.addCase(updateLeadIdentity.fulfilled, function (state, action) {
|
|
552
552
|
var _a;
|
|
553
553
|
state.loading = false;
|
|
554
|
-
state.customLoading = false;
|
|
555
554
|
state.error = null;
|
|
556
555
|
var _b = action.payload, data = _b.data, formData = _b.formData;
|
|
557
556
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
@@ -566,7 +565,6 @@ export var businessSlice = createSlice({
|
|
|
566
565
|
})
|
|
567
566
|
.addCase(updateLeadIdentity.rejected, function (state, action) {
|
|
568
567
|
state.loading = false;
|
|
569
|
-
state.customLoading = false;
|
|
570
568
|
state.error = action.error.message;
|
|
571
569
|
})
|
|
572
570
|
.addCase(retrieveEntityList.pending, function (state) {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { ResponseData,
|
|
1
|
+
import { RootState } from '../../../app/store';
|
|
2
|
+
import { ResponseData, MobileFormValues, NIDFormValues, OTPFormValues, IndividualFormValues, SharedState, BrandFormValues, FlowsTypes } from '../../../@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
|
-
export declare const getCountries: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
|
-
businessCountry: any;
|
|
6
|
-
countries: any;
|
|
7
|
-
}, void, {}>;
|
|
8
4
|
export declare const createMobileAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
9
5
|
response: any;
|
|
10
6
|
formData: MobileFormValues & {
|
|
@@ -80,8 +76,6 @@ export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
80
76
|
formData: void;
|
|
81
77
|
}, void, {}>;
|
|
82
78
|
export interface ConnectData {
|
|
83
|
-
countries: Array<CountryCode>;
|
|
84
|
-
businessCountry: CountryCode;
|
|
85
79
|
mobileData: (MobileFormValues | undefined) & ResponseData;
|
|
86
80
|
nidData: NIDFormValues & ResponseData & {
|
|
87
81
|
type: string;
|
|
@@ -91,6 +85,7 @@ export interface ConnectData {
|
|
|
91
85
|
};
|
|
92
86
|
individualData: IndividualFormValues & ResponseData;
|
|
93
87
|
brandData: BrandFormValues & ResponseData;
|
|
88
|
+
flowName: FlowsTypes;
|
|
94
89
|
}
|
|
95
90
|
export interface ConnectState extends SharedState<ConnectData> {
|
|
96
91
|
}
|
|
@@ -56,27 +56,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
56
56
|
};
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
|
-
import { handleNextScreenStep } from '
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
|
|
65
|
-
var settings, countriesBody, businessCountry;
|
|
66
|
-
return __generator(this, function (_a) {
|
|
67
|
-
switch (_a.label) {
|
|
68
|
-
case 0:
|
|
69
|
-
settings = thunkApi.getState().settings;
|
|
70
|
-
return [4, API.countryService.getAllCountries()];
|
|
71
|
-
case 1:
|
|
72
|
-
countriesBody = (_a.sent()).data;
|
|
73
|
-
businessCountry = (countriesBody.list || []).find(function (country) {
|
|
74
|
-
return [country.iso2, country.iso3].includes(settings.data.appConfig.businessCountryCode.toUpperCase());
|
|
75
|
-
});
|
|
76
|
-
return [2, { businessCountry: businessCountry, countries: countriesBody.list }];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}); });
|
|
59
|
+
import { handleNextScreenStep } from '../../../app/settings';
|
|
60
|
+
import { FlowsTypes } from '../../../@types';
|
|
61
|
+
import API from '../../../api';
|
|
62
|
+
import { CONNECT_STEP_NAMES, IDENTIFICATION_TYPE, INSTAGRAM_URL, OTHER_BRAND, TWITTER_URL } from '../../../constants';
|
|
63
|
+
import { defaultCountry } from '../../../constants';
|
|
64
|
+
import { getIndividualName, getFlowUrl, capitalizeTheFirstLetterOfEachWord, removeRequestHeaders } from '../../../utils';
|
|
80
65
|
export var createMobileAuth = createAsyncThunk('createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
81
66
|
var settings, requestBody, data;
|
|
82
67
|
var _a, _b;
|
|
@@ -117,7 +102,7 @@ export var createNIDAuth = createAsyncThunk('createNIDAuth', function (params, t
|
|
|
117
102
|
identification_id: params.nid,
|
|
118
103
|
identification_id_type: identification_id_type,
|
|
119
104
|
date_of_birth: params.dob,
|
|
120
|
-
country_code:
|
|
105
|
+
country_code: settings.data.businessCountry.iso2
|
|
121
106
|
},
|
|
122
107
|
sign_in: false,
|
|
123
108
|
step_name: CONNECT_STEP_NAMES.CREATE_AUTH_NID,
|
|
@@ -199,12 +184,12 @@ export var retrieveLead = createAsyncThunk('retrieveLead', function (params, thu
|
|
|
199
184
|
});
|
|
200
185
|
}); });
|
|
201
186
|
export var createLead = createAsyncThunk('createLead', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
202
|
-
var connect, businessCountry, payload, brandPayload,
|
|
203
|
-
return __generator(this, function (
|
|
204
|
-
switch (
|
|
187
|
+
var _a, connect, settings, businessCountry, payload, brandPayload, _b, brandResponse, data;
|
|
188
|
+
return __generator(this, function (_c) {
|
|
189
|
+
switch (_c.label) {
|
|
205
190
|
case 0:
|
|
206
|
-
|
|
207
|
-
businessCountry =
|
|
191
|
+
_a = thunkApi.getState(), connect = _a.connect, settings = _a.settings;
|
|
192
|
+
businessCountry = settings.data.businessCountry;
|
|
208
193
|
payload = {
|
|
209
194
|
individual_id: params.individualId,
|
|
210
195
|
country_code: businessCountry.iso2
|
|
@@ -217,8 +202,10 @@ export var createLead = createAsyncThunk('createLead', function (params, thunkAp
|
|
|
217
202
|
API.leadService.createLead(payload)
|
|
218
203
|
])];
|
|
219
204
|
case 1:
|
|
220
|
-
|
|
221
|
-
|
|
205
|
+
_b = _c.sent(), brandResponse = _b[0].data, data = _b[1].data;
|
|
206
|
+
if (!data.errors) {
|
|
207
|
+
thunkApi.dispatch(handleNextScreenStep(params.stepName));
|
|
208
|
+
}
|
|
222
209
|
return [2, { response: data, brandResponse: brandResponse, formData: params }];
|
|
223
210
|
}
|
|
224
211
|
});
|
|
@@ -290,14 +277,7 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
290
277
|
id: (isExistingUser ? (_h = brandData.responseBody) === null || _h === void 0 ? void 0 : _h.lead_id : (_j = otpData.responseBody) === null || _j === void 0 ? void 0 : _j.lead_id) || '',
|
|
291
278
|
terms_conditions_accepted: params.termAndConditionChecked,
|
|
292
279
|
step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_MERCHANT,
|
|
293
|
-
encryption_contract: [
|
|
294
|
-
'brand.name.en',
|
|
295
|
-
'brand.name.ar',
|
|
296
|
-
'brand.name.zh',
|
|
297
|
-
'brand.website',
|
|
298
|
-
'brand.social[0]',
|
|
299
|
-
'brand.social[1]'
|
|
300
|
-
]
|
|
280
|
+
encryption_contract: ['brand.name.en', 'brand.name.ar', 'brand.name.zh', 'brand.website']
|
|
301
281
|
};
|
|
302
282
|
return [4, API.leadService.updateLead(payload)];
|
|
303
283
|
case 1:
|
|
@@ -391,8 +371,7 @@ var initialState = {
|
|
|
391
371
|
loading: false,
|
|
392
372
|
customLoading: false,
|
|
393
373
|
data: {
|
|
394
|
-
|
|
395
|
-
countries: [],
|
|
374
|
+
flowName: FlowsTypes.CONNECT,
|
|
396
375
|
mobileData: {
|
|
397
376
|
countryCode: defaultCountry,
|
|
398
377
|
mobile: null
|
|
@@ -452,24 +431,6 @@ export var connectSlice = createSlice({
|
|
|
452
431
|
},
|
|
453
432
|
extraReducers: function (builder) {
|
|
454
433
|
builder
|
|
455
|
-
.addCase(getCountries.fulfilled, function (state, action) {
|
|
456
|
-
state.error = null;
|
|
457
|
-
state.customLoading = false;
|
|
458
|
-
var _a = action.payload, countries = _a.countries, businessCountry = _a.businessCountry;
|
|
459
|
-
state.data.countries = countries
|
|
460
|
-
.slice()
|
|
461
|
-
.sort(function (cOne, cTwo) { return cOne.name.english.localeCompare(cTwo.name.english); });
|
|
462
|
-
state.data.businessCountry = businessCountry || defaultCountry;
|
|
463
|
-
state.data.mobileData.countryCode = businessCountry || defaultCountry;
|
|
464
|
-
})
|
|
465
|
-
.addCase(getCountries.pending, function (state) {
|
|
466
|
-
state.error = null;
|
|
467
|
-
state.customLoading = true;
|
|
468
|
-
})
|
|
469
|
-
.addCase(getCountries.rejected, function (state, action) {
|
|
470
|
-
state.error = action.error.message;
|
|
471
|
-
state.customLoading = false;
|
|
472
|
-
})
|
|
473
434
|
.addCase(createMobileAuth.fulfilled, function (state, action) {
|
|
474
435
|
var _a;
|
|
475
436
|
state.loading = false;
|
|
@@ -576,14 +537,19 @@ export var connectSlice = createSlice({
|
|
|
576
537
|
state.error = null;
|
|
577
538
|
var _c = action.payload, response = _c.response, brandResponse = _c.brandResponse;
|
|
578
539
|
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
579
|
-
var brandError = ((_b = brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.errors) === null || _b === void 0 ? void 0 : _b[0]) || {};
|
|
580
|
-
if (
|
|
581
|
-
|
|
582
|
-
|
|
540
|
+
var brandError = (((_b = brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.errors) === null || _b === void 0 ? void 0 : _b[0]) || {}).description;
|
|
541
|
+
if (description) {
|
|
542
|
+
state.error = description;
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
var brandList = undefined;
|
|
546
|
+
if (!brandError) {
|
|
547
|
+
brandList = Array.isArray(brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.brands) ? __spreadArray(__spreadArray([], brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.brands, true), [OTHER_BRAND], false) : [];
|
|
583
548
|
var brand = brandList === null || brandList === void 0 ? void 0 : brandList[0];
|
|
584
549
|
if (!!brand)
|
|
585
550
|
state.data.brandData.selectedBrandItem = brand;
|
|
586
551
|
}
|
|
552
|
+
state.data.brandData.responseBody = __assign({ brands: brandList || [] }, response);
|
|
587
553
|
})
|
|
588
554
|
.addCase(createLead.pending, function (state) {
|
|
589
555
|
state.loading = true;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { CountryCode, IndividualExtraFormValues, OTPFormValues, ResponseData, SharedState } from '
|
|
3
|
-
export declare const getCountries: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
|
-
businessCountry: any;
|
|
5
|
-
countries: any;
|
|
6
|
-
}, void, {}>;
|
|
1
|
+
import { RootState } from '../../../app/store';
|
|
2
|
+
import { CountryCode, FlowsTypes, IndividualExtraFormValues, OTPFormValues, ResponseData, SharedState } from '../../../@types';
|
|
7
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
4
|
data: any;
|
|
9
5
|
leadData: any;
|
|
10
6
|
token: string;
|
|
11
7
|
}, string, {}>;
|
|
8
|
+
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
9
|
+
data: any;
|
|
10
|
+
}, void, {}>;
|
|
12
11
|
export declare const retrieveDataList: import("@reduxjs/toolkit").AsyncThunk<{
|
|
13
12
|
sourceIncome: any;
|
|
14
13
|
monthlyIncome: any;
|
|
15
14
|
countryCode: string;
|
|
15
|
+
countries: CountryCode[];
|
|
16
16
|
}, string, {}>;
|
|
17
17
|
export declare const retrieveEntityInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
18
18
|
data: any;
|
|
@@ -35,11 +35,10 @@ declare type VerifyData = {
|
|
|
35
35
|
token: string;
|
|
36
36
|
};
|
|
37
37
|
export interface IndividualData {
|
|
38
|
-
businessCountry: CountryCode;
|
|
39
|
-
countries: Array<CountryCode>;
|
|
40
38
|
verify: ResponseData & VerifyData;
|
|
41
39
|
otpData: OTPFormValues & ResponseData;
|
|
42
40
|
individualData: IndividualExtraFormValues & ResponseData;
|
|
41
|
+
flowName: FlowsTypes;
|
|
43
42
|
}
|
|
44
43
|
export interface IndividualState extends SharedState<IndividualData> {
|
|
45
44
|
}
|