@tap-payments/auth-jsconnect 2.8.42-test → 2.8.45-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/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 +77 -3
- package/build/features/app/bank/bankStore.d.ts +18 -13
- package/build/features/app/bank/bankStore.js +161 -173
- 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 +204 -173
- package/build/features/app/business/businessStore.d.ts +5 -0
- package/build/features/app/business/businessStore.js +86 -69
- package/build/features/app/connectExpress/connectExpressStore.js +10 -18
- package/build/features/app/entity/entityStore.d.ts +35 -15
- package/build/features/app/entity/entityStore.js +228 -159
- package/build/features/app/individual/individualStore.d.ts +37 -21
- package/build/features/app/individual/individualStore.js +265 -253
- 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 -167
- package/build/features/auth/Auth.js +5 -1
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/bank/Bank.d.ts +0 -1
- package/build/features/bank/Bank.js +3 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +4 -12
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +5 -5
- 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 +3 -4
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- 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 +1 -1
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +1 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/Verify/Verify.js +1 -1
- package/build/features/business/screens/Activities/Activities.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +1 -1
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +1 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/business/screens/Verify/Verify.js +1 -1
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +1 -2
- package/build/features/connect/screens/CivilID/CivilID.js +1 -1
- 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 +1 -1
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +22 -20
- 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/CivilID/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/Mobile/Mobile.js +1 -1
- package/build/features/connectExpress/screens/NID/NID.js +1 -1
- package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -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 +3 -4
- 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 +1 -1
- package/build/features/entity/screens/EntityName/EntityName.js +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 +5 -5
- package/build/features/individual/Individual.d.ts +0 -1
- package/build/features/individual/Individual.js +3 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +7 -14
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
- 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.js +5 -11
- 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/IndividualPersonalInfo.js +3 -4
- 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 -73
- 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/Button/FlowsButtons.js +3 -4
- package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -5
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -3
- package/build/features/tax/Tax.d.ts +0 -1
- package/build/features/tax/Tax.js +3 -4
- 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 -3
- package/build/hooks/useVerifyToken.js +2 -2
- 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/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -31
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -36
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
- 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/hooks/useFormDirtyCheck.d.ts +0 -6
- package/build/hooks/useFormDirtyCheck.js +0 -29
|
@@ -7,6 +7,7 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
7
7
|
token: string;
|
|
8
8
|
brandData: any;
|
|
9
9
|
boardId: any;
|
|
10
|
+
currencyData: any;
|
|
10
11
|
isRequireOTP?: undefined;
|
|
11
12
|
} | {
|
|
12
13
|
data: any;
|
|
@@ -16,6 +17,7 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
16
17
|
leadData?: undefined;
|
|
17
18
|
brandData?: undefined;
|
|
18
19
|
boardId?: undefined;
|
|
20
|
+
currencyData?: undefined;
|
|
19
21
|
}, string, {
|
|
20
22
|
state?: unknown;
|
|
21
23
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -47,6 +49,7 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
47
49
|
};
|
|
48
50
|
brand: any;
|
|
49
51
|
leadData: any;
|
|
52
|
+
currencyData: any;
|
|
50
53
|
}, OTPFormValues, {
|
|
51
54
|
state?: unknown;
|
|
52
55
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -174,6 +177,7 @@ export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThu
|
|
|
174
177
|
export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
175
178
|
data: any;
|
|
176
179
|
formData: ActivitiesFormValues;
|
|
180
|
+
currencyData: any;
|
|
177
181
|
}, AsyncThunkParams<ActivitiesFormValues>, {
|
|
178
182
|
state?: unknown;
|
|
179
183
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -253,6 +257,7 @@ export interface BusinessData {
|
|
|
253
257
|
activitiesData: ActivitiesFormValues & ResponseData;
|
|
254
258
|
customersData: CustomersFormValues & ResponseData;
|
|
255
259
|
flowName: FlowsTypes;
|
|
260
|
+
currency: string;
|
|
256
261
|
}
|
|
257
262
|
export interface BusinessState extends SharedState<BusinessData> {
|
|
258
263
|
customLoading?: boolean;
|
|
@@ -62,11 +62,12 @@ import { BUSINESS_STEP_NAMES, EXPECTED_SALES_LIST, IDENTIFICATION_TYPE, OTHER_CR
|
|
|
62
62
|
import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue } 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
|
-
var payload, data, publicKey, countryIso2, boardData, brandData, isicActivityList, leadData, _a, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, list, list;
|
|
65
|
+
var settings, payload, data, publicKey, countryIso2, boardData, brandData, currencyData, isicActivityList, leadData, _a, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, list, list;
|
|
66
66
|
var _b, _c;
|
|
67
67
|
return __generator(this, function (_d) {
|
|
68
68
|
switch (_d.label) {
|
|
69
69
|
case 0:
|
|
70
|
+
settings = thunkApi.getState().settings;
|
|
70
71
|
payload = {
|
|
71
72
|
service_name: 'tap_email',
|
|
72
73
|
verify_token: token
|
|
@@ -85,9 +86,9 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
85
86
|
countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
|
|
86
87
|
if (countryIso2)
|
|
87
88
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
88
|
-
if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3,
|
|
89
|
+
if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 21];
|
|
89
90
|
boardData = undefined;
|
|
90
|
-
brandData = void 0, isicActivityList = undefined;
|
|
91
|
+
brandData = void 0, currencyData = undefined, isicActivityList = undefined;
|
|
91
92
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
92
93
|
case 2:
|
|
93
94
|
leadData = (_d.sent()).data;
|
|
@@ -100,7 +101,7 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
100
101
|
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && (isSA(countryIso2) || isOtherThanKWOrSA(countryIso2))) {
|
|
101
102
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
102
103
|
}
|
|
103
|
-
if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3,
|
|
104
|
+
if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3, 20];
|
|
104
105
|
_a = leadData || {}, steps = _a.steps, brand = _a.brand, board_id = _a.board_id, business_id = _a.business_id, entity = _a.entity;
|
|
105
106
|
brandID = brand === null || brand === void 0 ? void 0 : brand.id;
|
|
106
107
|
hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
|
|
@@ -118,60 +119,64 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
118
119
|
_d.label = 5;
|
|
119
120
|
case 5:
|
|
120
121
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
121
|
-
return [3,
|
|
122
|
+
return [3, 20];
|
|
122
123
|
case 6:
|
|
123
124
|
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 7];
|
|
124
125
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
125
|
-
return [3,
|
|
126
|
+
return [3, 20];
|
|
126
127
|
case 7:
|
|
127
128
|
if (!hasBusinessCustomersCompleted) return [3, 8];
|
|
128
129
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
|
|
129
|
-
return [3,
|
|
130
|
+
return [3, 20];
|
|
130
131
|
case 8:
|
|
131
|
-
if (!hasBusinessCRActivitiesCompleted) return [3,
|
|
132
|
-
return [4, API.
|
|
132
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 13];
|
|
133
|
+
return [4, API.countryService.getCurrency(settings.data.businessCountry.iso2)];
|
|
133
134
|
case 9:
|
|
135
|
+
currencyData = _d.sent();
|
|
136
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
137
|
+
case 10:
|
|
134
138
|
list = (_d.sent()).list;
|
|
135
139
|
isicActivityList = list || [];
|
|
136
140
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
137
|
-
case
|
|
141
|
+
case 11:
|
|
138
142
|
_d.sent();
|
|
139
143
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
140
|
-
case
|
|
144
|
+
case 12:
|
|
141
145
|
brandData = _d.sent();
|
|
142
146
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
143
|
-
return [3,
|
|
144
|
-
case 12:
|
|
145
|
-
if (!hasBusinessCRInfoCompleted) return [3, 15];
|
|
146
|
-
return [4, API.dataService.getActivitiesIsIc()];
|
|
147
|
+
return [3, 20];
|
|
147
148
|
case 13:
|
|
149
|
+
if (!hasBusinessCRInfoCompleted) return [3, 16];
|
|
150
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
151
|
+
case 14:
|
|
148
152
|
list = (_d.sent()).list;
|
|
149
153
|
isicActivityList = list || [];
|
|
150
154
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
151
|
-
case
|
|
155
|
+
case 15:
|
|
152
156
|
brandData = _d.sent();
|
|
153
157
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
154
|
-
return [3,
|
|
155
|
-
case
|
|
156
|
-
case 16:
|
|
157
|
-
_d.sent();
|
|
158
|
-
if (!isSA(countryIso2)) return [3, 18];
|
|
159
|
-
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
158
|
+
return [3, 20];
|
|
159
|
+
case 16: return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
160
160
|
case 17:
|
|
161
161
|
_d.sent();
|
|
162
|
-
|
|
162
|
+
if (!isSA(countryIso2)) return [3, 19];
|
|
163
|
+
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
163
164
|
case 18:
|
|
164
|
-
|
|
165
|
+
_d.sent();
|
|
165
166
|
_d.label = 19;
|
|
166
|
-
case 19:
|
|
167
|
+
case 19:
|
|
168
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
169
|
+
_d.label = 20;
|
|
170
|
+
case 20: return [2, {
|
|
167
171
|
data: data,
|
|
168
172
|
isicActivityList: isicActivityList,
|
|
169
173
|
leadData: __assign(__assign({}, leadData), { flows: (boardData === null || boardData === void 0 ? void 0 : boardData.info) || [] }),
|
|
170
174
|
token: token,
|
|
171
175
|
brandData: brandData === null || brandData === void 0 ? void 0 : brandData.brand,
|
|
172
|
-
boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id
|
|
176
|
+
boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id,
|
|
177
|
+
currencyData: currencyData
|
|
173
178
|
}];
|
|
174
|
-
case
|
|
179
|
+
case 21: return [2, { data: data, isRequireOTP: true, token: token }];
|
|
175
180
|
}
|
|
176
181
|
});
|
|
177
182
|
}); });
|
|
@@ -193,7 +198,7 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
|
|
|
193
198
|
});
|
|
194
199
|
}); });
|
|
195
200
|
export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
196
|
-
var _a, business, settings, isNID, responseBody, stepName, payload, data, publicKey, brandData, isicActivityList, leadData, brand, country_code, steps, board_id, business_id, entity, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, boardResponse, list, list;
|
|
201
|
+
var _a, business, settings, isNID, responseBody, stepName, payload, data, publicKey, brandData, isicActivityList, currencyData, leadData, brand, country_code, steps, board_id, business_id, entity, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, boardResponse, list, list;
|
|
197
202
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
198
203
|
return __generator(this, function (_k) {
|
|
199
204
|
switch (_k.label) {
|
|
@@ -218,7 +223,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
218
223
|
if (publicKey) {
|
|
219
224
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
220
225
|
}
|
|
221
|
-
|
|
226
|
+
currencyData = undefined;
|
|
222
227
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
223
228
|
case 2:
|
|
224
229
|
leadData = (_k.sent()).data;
|
|
@@ -248,11 +253,11 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
248
253
|
case 6:
|
|
249
254
|
if (!isNID) return [3, 7];
|
|
250
255
|
thunkApi.dispatch(handleNextScreenStep());
|
|
251
|
-
return [3,
|
|
256
|
+
return [3, 23];
|
|
252
257
|
case 7:
|
|
253
258
|
if (!(isIdentityAuthStep && isKW(countryIso2))) return [3, 8];
|
|
254
259
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
|
|
255
|
-
return [3,
|
|
260
|
+
return [3, 23];
|
|
256
261
|
case 8:
|
|
257
262
|
if (!hasBusinessCompleted) return [3, 12];
|
|
258
263
|
if (!board_id) return [3, 11];
|
|
@@ -266,44 +271,47 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
266
271
|
_k.label = 11;
|
|
267
272
|
case 11:
|
|
268
273
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP')); });
|
|
269
|
-
return [3,
|
|
274
|
+
return [3, 23];
|
|
270
275
|
case 12:
|
|
271
276
|
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 13];
|
|
272
277
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP')); });
|
|
273
|
-
return [3,
|
|
278
|
+
return [3, 23];
|
|
274
279
|
case 13:
|
|
275
280
|
if (!hasBusinessCustomersCompleted) return [3, 14];
|
|
276
281
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP')); });
|
|
277
|
-
return [3,
|
|
282
|
+
return [3, 23];
|
|
278
283
|
case 14:
|
|
279
|
-
if (!hasBusinessCRActivitiesCompleted) return [3,
|
|
280
|
-
return [4, API.
|
|
284
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 19];
|
|
285
|
+
return [4, API.countryService.getCurrency(settings.data.businessCountry.iso2)];
|
|
281
286
|
case 15:
|
|
287
|
+
currencyData = _k.sent();
|
|
288
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
289
|
+
case 16:
|
|
282
290
|
list = (_k.sent()).list;
|
|
283
291
|
isicActivityList = list || [];
|
|
284
292
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
285
|
-
case
|
|
293
|
+
case 17:
|
|
286
294
|
_k.sent();
|
|
287
295
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
288
|
-
case
|
|
296
|
+
case 18:
|
|
289
297
|
brandData = _k.sent();
|
|
290
298
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP')); });
|
|
291
|
-
return [3,
|
|
292
|
-
case 18:
|
|
293
|
-
if (!hasBusinessCRInfoCompleted) return [3, 21];
|
|
294
|
-
return [4, API.dataService.getActivitiesIsIc()];
|
|
299
|
+
return [3, 23];
|
|
295
300
|
case 19:
|
|
301
|
+
if (!hasBusinessCRInfoCompleted) return [3, 22];
|
|
302
|
+
return [4, API.dataService.getActivitiesIsIc()];
|
|
303
|
+
case 20:
|
|
296
304
|
list = (_k.sent()).list;
|
|
297
305
|
isicActivityList = list || [];
|
|
298
306
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
299
|
-
case
|
|
307
|
+
case 21:
|
|
300
308
|
brandData = _k.sent();
|
|
301
309
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP')); });
|
|
302
|
-
return [3,
|
|
303
|
-
case
|
|
310
|
+
return [3, 23];
|
|
311
|
+
case 22:
|
|
304
312
|
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP')); });
|
|
305
|
-
_k.label =
|
|
306
|
-
case
|
|
313
|
+
_k.label = 23;
|
|
314
|
+
case 23: return [2, { data: data, isicActivityList: isicActivityList, formData: __assign(__assign({}, params), { isNID: isNID }), brand: brandData === null || brandData === void 0 ? void 0 : brandData.brand, leadData: leadData, currencyData: currencyData }];
|
|
307
315
|
}
|
|
308
316
|
});
|
|
309
317
|
}); });
|
|
@@ -381,7 +389,7 @@ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (p
|
|
|
381
389
|
});
|
|
382
390
|
}); });
|
|
383
391
|
export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
384
|
-
var _a, settings, business, identification_id_type, stepName, lead_id, countryIso2,
|
|
392
|
+
var _a, settings, business, identification_id_type, stepName, lead_id, countryIso2, requestBody, data, business_id, entity, screen;
|
|
385
393
|
var _b, _c;
|
|
386
394
|
return __generator(this, function (_d) {
|
|
387
395
|
switch (_d.label) {
|
|
@@ -391,7 +399,6 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
391
399
|
stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
392
400
|
lead_id = (business.data.verify.responseBody || {}).lead_id;
|
|
393
401
|
countryIso2 = settings.data.businessCountry.iso2;
|
|
394
|
-
dob = dateFormat(new Date(params.dob));
|
|
395
402
|
if (isOtherThanKWOrSA(countryIso2)) {
|
|
396
403
|
identification_id_type = IDENTIFICATION_TYPE.NID;
|
|
397
404
|
}
|
|
@@ -402,7 +409,7 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
402
409
|
issued_country_code: countryIso2,
|
|
403
410
|
type: identification_id_type
|
|
404
411
|
},
|
|
405
|
-
date_of_birth: dob,
|
|
412
|
+
date_of_birth: params.dob,
|
|
406
413
|
step_name: stepName,
|
|
407
414
|
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
408
415
|
};
|
|
@@ -429,7 +436,7 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
|
|
|
429
436
|
});
|
|
430
437
|
}); });
|
|
431
438
|
export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
432
|
-
var _a, settings, business, _b, nid, dob, type, stepName, lead_id,
|
|
439
|
+
var _a, settings, business, _b, nid, dob, type, stepName, lead_id, requestBody, data;
|
|
433
440
|
return __generator(this, function (_c) {
|
|
434
441
|
switch (_c.label) {
|
|
435
442
|
case 0:
|
|
@@ -437,7 +444,6 @@ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', fun
|
|
|
437
444
|
_b = business.data.nidData, nid = _b.nid, dob = _b.dob, type = _b.type;
|
|
438
445
|
stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
439
446
|
lead_id = (business.data.verify.responseBody || {}).lead_id;
|
|
440
|
-
date_of_birth = dateFormat(new Date(dob));
|
|
441
447
|
requestBody = {
|
|
442
448
|
id: lead_id || '',
|
|
443
449
|
identification: {
|
|
@@ -445,7 +451,7 @@ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', fun
|
|
|
445
451
|
issued_country_code: settings.data.businessCountry.iso2,
|
|
446
452
|
type: type
|
|
447
453
|
},
|
|
448
|
-
date_of_birth:
|
|
454
|
+
date_of_birth: dob,
|
|
449
455
|
step_name: stepName,
|
|
450
456
|
encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
|
|
451
457
|
};
|
|
@@ -599,7 +605,7 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
599
605
|
export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (_a, thunkApi) {
|
|
600
606
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
601
607
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
602
|
-
var _b, settings, business, _c, brand, entity_activities, entity, _d, brandActivities, brandId, data_status, activities, operationStartDate, isActivitiesNonEditable, isOperationStartDateNonEditable, stepName, id, removedActivities, payload, newBrandActivities, newEntityActivities, activityPayload, requestBody, data;
|
|
608
|
+
var _b, settings, business, _c, brand, entity_activities, entity, _d, brandActivities, brandId, data_status, activities, operationStartDate, isActivitiesNonEditable, isOperationStartDateNonEditable, stepName, id, removedActivities, payload, newBrandActivities, newEntityActivities, activityPayload, requestBody, data, currencyData;
|
|
603
609
|
var _e, _f;
|
|
604
610
|
return __generator(this, function (_g) {
|
|
605
611
|
switch (_g.label) {
|
|
@@ -655,10 +661,13 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
|
|
|
655
661
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
656
662
|
case 6:
|
|
657
663
|
_g.sent();
|
|
664
|
+
return [4, API.countryService.getCurrency(settings.data.businessCountry.iso2)];
|
|
665
|
+
case 7:
|
|
666
|
+
currencyData = _g.sent();
|
|
658
667
|
thunkApi.dispatch(updateStepName(stepName));
|
|
659
668
|
thunkApi.dispatch(handleNextScreenStep());
|
|
660
669
|
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
|
|
661
|
-
return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: originalFormData }];
|
|
670
|
+
return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: originalFormData, currencyData: currencyData }];
|
|
662
671
|
}
|
|
663
672
|
});
|
|
664
673
|
});
|
|
@@ -806,6 +815,7 @@ var initialState = {
|
|
|
806
815
|
uploadingArticle: false,
|
|
807
816
|
data: {
|
|
808
817
|
flowName: FlowsTypes.BUSINESS,
|
|
818
|
+
currency: '',
|
|
809
819
|
verify: {
|
|
810
820
|
token: ''
|
|
811
821
|
},
|
|
@@ -869,13 +879,13 @@ export var businessSlice = createSlice({
|
|
|
869
879
|
state.customLoading = true;
|
|
870
880
|
})
|
|
871
881
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
872
|
-
var _a, _b, _c, _d, _e;
|
|
882
|
+
var _a, _b, _c, _d, _e, _f;
|
|
873
883
|
state.error = null;
|
|
874
884
|
state.customLoading = false;
|
|
875
|
-
var
|
|
885
|
+
var _g = action.payload, data = _g.data, boardId = _g.boardId, brandData = _g.brandData, leadData = _g.leadData, token = _g.token, isRequireOTP = _g.isRequireOTP, isicActivityList = _g.isicActivityList, currencyData = _g.currencyData;
|
|
876
886
|
var responseBody = state.data.verify.responseBody;
|
|
877
887
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), leadData), responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id }), (brandData && { brand: brandData }));
|
|
878
|
-
var
|
|
888
|
+
var _h = leadData || {}, identification = _h.identification, date_of_birth = _h.date_of_birth;
|
|
879
889
|
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
880
890
|
state.data.nidData.nid = identification.id;
|
|
881
891
|
if (date_of_birth)
|
|
@@ -887,13 +897,13 @@ export var businessSlice = createSlice({
|
|
|
887
897
|
state.data.otpData.isNID = false;
|
|
888
898
|
if (isRequireOTP)
|
|
889
899
|
return;
|
|
890
|
-
var
|
|
900
|
+
var _j = state.data.verify.responseBody || {}, entity = _j.entity, entity_activities = _j.entity_activities, business_name = _j.business_name;
|
|
891
901
|
if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
|
|
892
902
|
state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
|
|
893
903
|
var issuingDate = ((_a = brandData === null || brandData === void 0 ? void 0 : brandData.operations) === null || _a === void 0 ? void 0 : _a.start_date) || ((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date);
|
|
894
904
|
if (issuingDate)
|
|
895
905
|
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
896
|
-
var
|
|
906
|
+
var _k = brandData || {}, terms = _k.terms, activities = _k.activities;
|
|
897
907
|
var entityActivities = (entity_activities === null || entity_activities === void 0 ? void 0 : entity_activities.filter(function (activity) {
|
|
898
908
|
return !(activities === null || activities === void 0 ? void 0 : activities.some(function (value) { return value.id === activity.id; }));
|
|
899
909
|
})) || [];
|
|
@@ -904,9 +914,11 @@ export var businessSlice = createSlice({
|
|
|
904
914
|
state.data.customersData.refundPolicy = element.agree;
|
|
905
915
|
}
|
|
906
916
|
});
|
|
917
|
+
if ((_c = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _c === void 0 ? void 0 : _c.english)
|
|
918
|
+
state.data.currency = currencyData.code.english;
|
|
907
919
|
state.data.activitiesData.activities = selectedActivity;
|
|
908
920
|
var licenseList = [OTHER_CR_LICENSE, OTHER_FL_LICENSE];
|
|
909
|
-
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((
|
|
921
|
+
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((_f = (_e = (_d = state.data.businessTypeData) === null || _d === void 0 ? void 0 : _d.responseBody) === null || _e === void 0 ? void 0 : _e.licenseList) === null || _f === void 0 ? void 0 : _f.length) && { licenseList: licenseList }));
|
|
910
922
|
})
|
|
911
923
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
912
924
|
state.error = action.error.message;
|
|
@@ -934,27 +946,29 @@ export var businessSlice = createSlice({
|
|
|
934
946
|
state.error = null;
|
|
935
947
|
})
|
|
936
948
|
.addCase(verifyLeadOTP.fulfilled, function (state, action) {
|
|
937
|
-
var _a, _b, _c, _d, _e;
|
|
949
|
+
var _a, _b, _c, _d, _e, _f;
|
|
938
950
|
state.loading = false;
|
|
939
951
|
state.error = null;
|
|
940
|
-
var
|
|
952
|
+
var _g = action.payload, data = _g.data, formData = _g.formData, brand = _g.brand, leadData = _g.leadData, isicActivityList = _g.isicActivityList, currencyData = _g.currencyData;
|
|
941
953
|
state.data.otpData = formData;
|
|
942
954
|
state.data.otpData.responseBody = data;
|
|
955
|
+
if ((_a = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _a === void 0 ? void 0 : _a.english)
|
|
956
|
+
state.data.currency = currencyData.code.english;
|
|
943
957
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, leadData), state.data.verify.responseBody), (brand && { brand: brand })), { flows: (leadData === null || leadData === void 0 ? void 0 : leadData.flows) || [] });
|
|
944
|
-
var
|
|
958
|
+
var _h = leadData || {}, identification = _h.identification, date_of_birth = _h.date_of_birth;
|
|
945
959
|
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
946
960
|
state.data.nidData.nid = identification.id;
|
|
947
961
|
if (date_of_birth)
|
|
948
962
|
state.data.nidData.dob = dateFormat(date_of_birth);
|
|
949
963
|
if (identification === null || identification === void 0 ? void 0 : identification.type)
|
|
950
964
|
state.data.nidData.type = identification.type;
|
|
951
|
-
var
|
|
965
|
+
var _j = leadData || {}, entity = _j.entity, entity_activities = _j.entity_activities, business_name = _j.business_name;
|
|
952
966
|
if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
|
|
953
967
|
state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
|
|
954
|
-
var issuingDate = ((
|
|
968
|
+
var issuingDate = ((_b = brand === null || brand === void 0 ? void 0 : brand.operations) === null || _b === void 0 ? void 0 : _b.start_date) || ((_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date);
|
|
955
969
|
if (issuingDate)
|
|
956
970
|
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
957
|
-
var
|
|
971
|
+
var _k = brand || {}, terms = _k.terms, activities = _k.activities;
|
|
958
972
|
var entityActivities = (entity_activities === null || entity_activities === void 0 ? void 0 : entity_activities.filter(function (activity) {
|
|
959
973
|
return !(activities === null || activities === void 0 ? void 0 : activities.some(function (value) { return value.id === activity.id; }));
|
|
960
974
|
})) || [];
|
|
@@ -967,7 +981,7 @@ export var businessSlice = createSlice({
|
|
|
967
981
|
});
|
|
968
982
|
state.data.activitiesData.activities = selectedActivity;
|
|
969
983
|
var licenseList = [OTHER_CR_LICENSE, OTHER_FL_LICENSE];
|
|
970
|
-
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((
|
|
984
|
+
state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((_f = (_e = (_d = state.data.businessTypeData) === null || _d === void 0 ? void 0 : _d.responseBody) === null || _e === void 0 ? void 0 : _e.licenseList) === null || _f === void 0 ? void 0 : _f.length) && { licenseList: licenseList }));
|
|
971
985
|
})
|
|
972
986
|
.addCase(verifyLeadOTP.rejected, function (state, action) {
|
|
973
987
|
state.loading = false;
|
|
@@ -1188,10 +1202,13 @@ export var businessSlice = createSlice({
|
|
|
1188
1202
|
state.error = null;
|
|
1189
1203
|
})
|
|
1190
1204
|
.addCase(updateActivitiesInfo.fulfilled, function (state, action) {
|
|
1205
|
+
var _a;
|
|
1191
1206
|
state.loading = false;
|
|
1192
1207
|
state.error = null;
|
|
1193
|
-
var
|
|
1208
|
+
var _b = action.payload, data = _b.data, formData = _b.formData, currencyData = _b.currencyData;
|
|
1194
1209
|
state.data.activitiesData = formData;
|
|
1210
|
+
if ((_a = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _a === void 0 ? void 0 : _a.english)
|
|
1211
|
+
state.data.currency = currencyData.code.english;
|
|
1195
1212
|
var terms = (data || {}).terms;
|
|
1196
1213
|
terms === null || terms === void 0 ? void 0 : terms.forEach(function (element) {
|
|
1197
1214
|
if ((element === null || element === void 0 ? void 0 : element.term) === 'general') {
|
|
@@ -870,11 +870,11 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
872
|
});
|
|
873
|
-
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (
|
|
874
|
-
var _a, connectExpress, settings, responseData, _b, postURL, scope, redirectUrl, mode, showBoard, platforms, payment_provider, authId, bi, body, data, leadData, board_id, board_info_id, _c, boardInfo, boardData,
|
|
875
|
-
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s
|
|
876
|
-
return __generator(this, function (
|
|
877
|
-
switch (
|
|
873
|
+
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
874
|
+
var _a, connectExpress, settings, responseData, _b, postURL, scope, redirectUrl, mode, showBoard, platforms, payment_provider, authId, bi, body, data, leadData, board_id, board_info_id, _c, boardInfo, boardData, urlQueryStart;
|
|
875
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
876
|
+
return __generator(this, function (_t) {
|
|
877
|
+
switch (_t.label) {
|
|
878
878
|
case 0:
|
|
879
879
|
_a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
|
|
880
880
|
responseData = connectExpress.data.responseData;
|
|
@@ -891,14 +891,14 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
891
891
|
};
|
|
892
892
|
return [4, API.accountService.expressCreateAccount(body)];
|
|
893
893
|
case 1:
|
|
894
|
-
data =
|
|
894
|
+
data = _t.sent();
|
|
895
895
|
(_l = (_k = settings.data.appConfig).onCreated) === null || _l === void 0 ? void 0 : _l.call(_k, data);
|
|
896
896
|
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, data);
|
|
897
897
|
(_q = (_p = settings.data.appConfig).onStepCompleted) === null || _q === void 0 ? void 0 : _q.call(_p, settings.data.activeScreen.name, data);
|
|
898
898
|
if (!showBoard) return [3, 4];
|
|
899
899
|
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
900
900
|
case 2:
|
|
901
|
-
leadData = (
|
|
901
|
+
leadData = (_t.sent()).data;
|
|
902
902
|
board_id = (_r = data.board_id) !== null && _r !== void 0 ? _r : leadData.board_id;
|
|
903
903
|
board_info_id = (_s = data.board_info_id) !== null && _s !== void 0 ? _s : leadData.board_info_id;
|
|
904
904
|
return [4, Promise.all([
|
|
@@ -906,19 +906,10 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
906
906
|
API.boardService.retrieveBoardDetails(board_id)
|
|
907
907
|
])];
|
|
908
908
|
case 3:
|
|
909
|
-
_c =
|
|
909
|
+
_c = _t.sent(), boardInfo = _c[0], boardData = _c[1];
|
|
910
910
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
911
911
|
return [2, { boardInfo: boardInfo, boardData: boardData, account: data }];
|
|
912
912
|
case 4:
|
|
913
|
-
if (!(scope === SCOPE_AUTH)) return [3, 7];
|
|
914
|
-
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
915
|
-
case 5:
|
|
916
|
-
leadData = (_w.sent()).data;
|
|
917
|
-
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: (_t = data === null || data === void 0 ? void 0 : data.merchant) === null || _t === void 0 ? void 0 : _t.id, brandId: (_u = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _u === void 0 ? void 0 : _u.id, entityId: (_v = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _v === void 0 ? void 0 : _v.id }))];
|
|
918
|
-
case 6:
|
|
919
|
-
_w.sent();
|
|
920
|
-
return [2, { account: data }];
|
|
921
|
-
case 7:
|
|
922
913
|
if (redirectUrl && mode === 'page') {
|
|
923
914
|
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
924
915
|
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
@@ -948,7 +939,8 @@ export var createEntity = createAsyncThunk('connectExpress/createEntity', functi
|
|
|
948
939
|
number: licenseNumber || '',
|
|
949
940
|
type: licenseType || ''
|
|
950
941
|
},
|
|
951
|
-
country: (_a = settings.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2
|
|
942
|
+
country: (_a = settings.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2,
|
|
943
|
+
is_licensed: undefined
|
|
952
944
|
}
|
|
953
945
|
};
|
|
954
946
|
return [4, API.entityService.createEntity(body)];
|
|
@@ -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;
|
|
@@ -76,6 +97,7 @@ export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk
|
|
|
76
97
|
export declare const updateEntityName: import("@reduxjs/toolkit").AsyncThunk<{
|
|
77
98
|
data: any;
|
|
78
99
|
formData: EntityNameFormValues;
|
|
100
|
+
currencyData: any;
|
|
79
101
|
}, AsyncThunkParams<EntityNameFormValues>, {
|
|
80
102
|
state?: unknown;
|
|
81
103
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -100,11 +122,8 @@ export declare const updateEntityCapital: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
100
122
|
rejectedMeta?: unknown;
|
|
101
123
|
}>;
|
|
102
124
|
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
} | {
|
|
106
|
-
data: any;
|
|
107
|
-
flows: any;
|
|
125
|
+
response: any;
|
|
126
|
+
formData: void;
|
|
108
127
|
} | undefined, void, {
|
|
109
128
|
state?: unknown;
|
|
110
129
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -134,6 +153,7 @@ export interface EntityData {
|
|
|
134
153
|
entityNameData: EntityNameFormValues & ResponseData;
|
|
135
154
|
entityCapitalData: EntityCapitalFormValues & ResponseData;
|
|
136
155
|
flowName: FlowsTypes;
|
|
156
|
+
currency: string;
|
|
137
157
|
}
|
|
138
158
|
export interface EntityState extends SharedState<EntityData> {
|
|
139
159
|
customLoading?: boolean;
|