@tap-payments/auth-jsconnect 2.10.11-beta → 2.10.11

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.
Files changed (121) hide show
  1. package/README.md +2 -2
  2. package/build/@types/app.d.ts +3 -1
  3. package/build/@types/app.js +1 -0
  4. package/build/@types/form.d.ts +7 -2
  5. package/build/api/account.d.ts +2 -2
  6. package/build/api/account.js +7 -4
  7. package/build/api/auth.d.ts +2 -1
  8. package/build/api/auth.js +7 -3
  9. package/build/api/axios.d.ts +1 -1
  10. package/build/api/entity.d.ts +3 -0
  11. package/build/api/headers.d.ts +5 -0
  12. package/build/api/headers.js +3 -0
  13. package/build/api/index.d.ts +4 -4
  14. package/build/api/lead.d.ts +1 -0
  15. package/build/api/operator.d.ts +1 -1
  16. package/build/api/operator.js +5 -2
  17. package/build/app/settings.d.ts +1 -0
  18. package/build/app/settings.js +8 -5
  19. package/build/assets/currencies/AEDSymbol.d.ts +7 -0
  20. package/build/assets/currencies/AEDSymbol.js +28 -0
  21. package/build/assets/currencies/SARSymbol.d.ts +7 -0
  22. package/build/assets/currencies/SARSymbol.js +28 -0
  23. package/build/assets/currencies/index.d.ts +2 -0
  24. package/build/assets/currencies/index.js +2 -0
  25. package/build/assets/currencies/utils.d.ts +4 -0
  26. package/build/assets/currencies/utils.js +6 -0
  27. package/build/assets/locales/ar.json +53 -7
  28. package/build/assets/locales/en.json +58 -11
  29. package/build/components/TextWithCurrency/TextWithCurrency.d.ts +7 -0
  30. package/build/components/TextWithCurrency/TextWithCurrency.js +14 -0
  31. package/build/components/TextWithCurrency/index.d.ts +2 -0
  32. package/build/components/TextWithCurrency/index.js +2 -0
  33. package/build/constants/api.d.ts +1 -0
  34. package/build/constants/api.js +2 -0
  35. package/build/constants/app.d.ts +11 -0
  36. package/build/constants/app.js +110 -19
  37. package/build/constants/assets.d.ts +12 -3
  38. package/build/constants/assets.js +123 -105
  39. package/build/constants/dummy.js +27 -20
  40. package/build/constants/validation.d.ts +1 -0
  41. package/build/constants/validation.js +1 -0
  42. package/build/features/app/auth/authStore.d.ts +24 -5
  43. package/build/features/app/auth/authStore.js +188 -113
  44. package/build/features/app/bank/bankStore.js +24 -20
  45. package/build/features/app/board/boardStore.js +11 -7
  46. package/build/features/app/brand/brandStore.js +22 -18
  47. package/build/features/app/business/businessStore.js +45 -36
  48. package/build/features/app/connect/connectStore.d.ts +6 -5
  49. package/build/features/app/connect/connectStore.js +48 -31
  50. package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -5
  51. package/build/features/app/connectExpress/connectExpressStore.js +99 -39
  52. package/build/features/app/entity/entityStore.js +21 -17
  53. package/build/features/app/individual/individualStore.js +33 -28
  54. package/build/features/app/password/passwordStore.js +44 -46
  55. package/build/features/app/signIn/signInStore.js +12 -16
  56. package/build/features/app/tax/taxStore.js +21 -17
  57. package/build/features/auth/Auth.d.ts +1 -1
  58. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +10 -7
  59. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  60. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +6 -4
  61. package/build/features/auth/screens/AuthenticationList/EntityList.js +11 -3
  62. package/build/features/auth/screens/OTP/OTP.d.ts +13 -2
  63. package/build/features/auth/screens/OTP/OTP.js +15 -3
  64. package/build/features/auth/screens/OTP/index.d.ts +1 -2
  65. package/build/features/auth/screens/Passcode/Passcode.d.ts +16 -0
  66. package/build/features/auth/screens/Passcode/Passcode.js +82 -0
  67. package/build/features/auth/screens/Passcode/PasscodeInput.d.ts +6 -0
  68. package/build/features/auth/screens/Passcode/PasscodeInput.js +42 -0
  69. package/build/features/auth/screens/Passcode/index.d.ts +2 -0
  70. package/build/features/auth/screens/Passcode/index.js +2 -0
  71. package/build/features/auth/screens/Passcode/validation.d.ts +8 -0
  72. package/build/features/auth/screens/Passcode/validation.js +4 -0
  73. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -8
  74. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +1 -1
  75. package/build/features/business/screens/BusinessType/BusinessType.js +15 -5
  76. package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
  77. package/build/features/business/screens/BusinessType/LicenseList.js +20 -12
  78. package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
  79. package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
  80. package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
  81. package/build/features/business/screens/BusinessType/validation.js +31 -10
  82. package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -8
  83. package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
  84. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +10 -10
  85. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  86. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +6 -4
  87. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +11 -3
  88. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
  89. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +27 -16
  90. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  91. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
  92. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
  93. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
  94. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
  95. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
  96. package/build/features/connectExpress/screens/Mobile/Mobile.js +7 -6
  97. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -7
  98. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -7
  99. package/build/features/entity/screens/EntityName/EntityName.js +16 -15
  100. package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
  101. package/build/features/entity/screens/EntityName/validation.d.ts +50 -48
  102. package/build/features/entity/screens/EntityName/validation.js +100 -85
  103. package/build/features/featuresScreens.js +60 -0
  104. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +3 -8
  105. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
  106. package/build/features/shared/Background/LogoBackground.js +5 -17
  107. package/build/features/shared/Button/Button.js +1 -2
  108. package/build/features/shared/Input/Input.d.ts +1 -1
  109. package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.d.ts +3 -0
  110. package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.js +9 -0
  111. package/build/features/shared/OTPVerifySecurityError/index.d.ts +2 -0
  112. package/build/features/shared/OTPVerifySecurityError/index.js +2 -0
  113. package/build/hooks/useAppConfig.js +1 -1
  114. package/build/utils/common.d.ts +1 -1
  115. package/build/utils/common.js +14 -8
  116. package/build/utils/error.d.ts +2 -0
  117. package/build/utils/error.js +6 -0
  118. package/build/utils/string.d.ts +3 -2
  119. package/build/utils/string.js +4 -1
  120. package/build/utils/validation.js +1 -1
  121. package/package.json +3 -3
@@ -51,7 +51,7 @@ import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
53
53
  import { BOARD_STEP_STEPS } from '../../../constants';
54
- import { retrieveIndividualData, sleep } from '../../../utils';
54
+ import { isAuthenticationVerificationFailed, retrieveIndividualData, sleep } from '../../../utils';
55
55
  export var createVerifyTokenBy = createAsyncThunk('board/createVerifyTokenByBoardId', function (_a, thunkApi) {
56
56
  var boardId = _a.boardId, isInternally = _a.isInternally;
57
57
  return __awaiter(void 0, void 0, void 0, function () {
@@ -129,17 +129,19 @@ export var verifyBoardLeadOTP = createAsyncThunk('board/verifyBoardLeadOTP', fun
129
129
  step_name: BOARD_STEP_STEPS.PHONE_AUTH,
130
130
  encryption_contract: ['data']
131
131
  };
132
- return [4, API.leadService.verifyLeadOTP(payload)];
132
+ return [4, API.leadService.verifyTokenOTP(payload).catch(function (err) {
133
+ if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
134
+ thunkApi.dispatch(handleNextScreenStep('BOARD_OTP_VERIFY_SECURITY_ERROR_STEP'));
135
+ throw new Error(err === null || err === void 0 ? void 0 : err.message);
136
+ })];
133
137
  case 1:
134
- data = (_j.sent()).data;
138
+ data = _j.sent();
135
139
  _b = data || {}, country_code = _b.country_code, config = _b.config;
136
140
  publicKey = config === null || config === void 0 ? void 0 : config.public_key;
137
141
  if (country_code)
138
142
  thunkApi.dispatch(handleSetCountryByIso2(country_code));
139
143
  if (publicKey)
140
144
  thunkApi.dispatch(handlePublicKey(publicKey));
141
- if (data.errors)
142
- throw new Error(data.errors[0].description);
143
145
  return [4, thunkApi.dispatch(retrieveBoardDetails({ boardId: data.id, boardInfoId: data.board_info_id })).unwrap()];
144
146
  case 2:
145
147
  boardData = (_j.sent()).data;
@@ -249,9 +251,11 @@ export var boardSlice = createSlice({
249
251
  state.data.otpData = formData;
250
252
  state.data.otpData.responseBody = data;
251
253
  })
252
- .addCase(verifyBoardLeadOTP.rejected, function (state, action) {
254
+ .addCase(verifyBoardLeadOTP.rejected, function (state, _a) {
255
+ var message = _a.error.message;
253
256
  state.loading = false;
254
- state.error = action.error.message;
257
+ if (!isAuthenticationVerificationFailed(message))
258
+ state.error = message;
255
259
  })
256
260
  .addCase(retrieveBoardDetails.pending, function (state) {
257
261
  state.error = null;
@@ -62,7 +62,7 @@ import API from '../../../api';
62
62
  import { FlowsTypes } from '../../../@types';
63
63
  import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
64
64
  import { BRAND_STEP_NAMES, EXPECTED_SALES_LIST } from '../../../constants';
65
- import { hasNoneEditableValue, isKW, isTwitter, isWebsite, mapSalesChannel, retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
65
+ import { hasNoneEditableValue, isAuthenticationVerificationFailed, isKW, isTwitter, isWebsite, mapSalesChannel, retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
66
66
  export var verifyLeadToken = createAsyncThunk('brand/verifyLeadToken', function (_a, thunkApi) {
67
67
  var token = _a.token, isInternally = _a.isInternally;
68
68
  return __awaiter(void 0, void 0, void 0, function () {
@@ -143,9 +143,9 @@ export var resendOTP = createAsyncThunk('brandResendOTP', function (params, thun
143
143
  }); });
144
144
  export var verifyBrandLeadOTP = createAsyncThunk('brand/verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
145
145
  var _a, brand, settings, responseBody, payload, data, publicKey, countryIso2, _b, brand_id, entity_id, boardId, brandData, data_2, salesChannels;
146
- var _c, _d, _e, _f, _g, _h, _j;
147
- return __generator(this, function (_k) {
148
- switch (_k.label) {
146
+ var _c, _d, _e, _f, _g, _h;
147
+ return __generator(this, function (_j) {
148
+ switch (_j.label) {
149
149
  case 0:
150
150
  _a = thunkApi.getState(), brand = _a.brand, settings = _a.settings;
151
151
  responseBody = brand.data.verify.responseBody;
@@ -156,12 +156,14 @@ export var verifyBrandLeadOTP = createAsyncThunk('brand/verifyLeadOTP', function
156
156
  step_name: BRAND_STEP_NAMES.PHONE_AUTH,
157
157
  encryption_contract: ['data']
158
158
  };
159
- return [4, API.leadService.verifyLeadOTP(payload)];
159
+ return [4, API.leadService.verifyTokenOTP(payload).catch(function (err) {
160
+ if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
161
+ thunkApi.dispatch(handleNextScreenStep('BRAND_OTP_VERIFY_SECURITY_ERROR_STEP'));
162
+ throw new Error(err === null || err === void 0 ? void 0 : err.message);
163
+ })];
160
164
  case 1:
161
- data = (_k.sent()).data;
162
- if ((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length)
163
- throw new Error(data.errors[0].description);
164
- publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
165
+ data = _j.sent();
166
+ publicKey = (_d = data === null || data === void 0 ? void 0 : data.config) === null || _d === void 0 ? void 0 : _d.public_key;
165
167
  countryIso2 = (data === null || data === void 0 ? void 0 : data.country_code) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.country_code);
166
168
  if (publicKey)
167
169
  thunkApi.dispatch(handlePublicKey(publicKey));
@@ -172,21 +174,21 @@ export var verifyBrandLeadOTP = createAsyncThunk('brand/verifyLeadOTP', function
172
174
  if (!(!brand_id || !countryIso2)) return [3, 3];
173
175
  return [4, API.boardService.retrieveBoardDetails(boardId)];
174
176
  case 2:
175
- data_2 = _k.sent();
176
- if (!countryIso2 && ((_f = data_2 === null || data_2 === void 0 ? void 0 : data_2.entity) === null || _f === void 0 ? void 0 : _f.country))
177
+ data_2 = _j.sent();
178
+ if (!countryIso2 && ((_e = data_2 === null || data_2 === void 0 ? void 0 : data_2.entity) === null || _e === void 0 ? void 0 : _e.country))
177
179
  thunkApi.dispatch(handleSetCountryByIso2(data_2.entity.country));
178
- if (!((_g = data_2 === null || data_2 === void 0 ? void 0 : data_2.brand) === null || _g === void 0 ? void 0 : _g.id))
180
+ if (!((_f = data_2 === null || data_2 === void 0 ? void 0 : data_2.brand) === null || _f === void 0 ? void 0 : _f.id))
179
181
  throw new Error('brand_id_missing');
180
182
  brandData = data_2;
181
183
  return [3, 5];
182
184
  case 3: return [4, API.brandService.retrieveBrand(brand_id)];
183
185
  case 4:
184
- brandData = _k.sent();
185
- _k.label = 5;
186
+ brandData = _j.sent();
187
+ _j.label = 5;
186
188
  case 5: return [4, API.dataService.getChannelsOfServices({ page: 0 })];
187
189
  case 6:
188
- salesChannels = _k.sent();
189
- (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, { otp: params.otp });
190
+ salesChannels = _j.sent();
191
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
190
192
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('BRAND_INFO_STEP')); });
191
193
  return [2, {
192
194
  data: data,
@@ -682,9 +684,11 @@ export var brandSlice = createSlice({
682
684
  state.data.brandActivities.refundPolicy = termFlag;
683
685
  state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { brand: brand, board_id: data.id, channel_list: (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.list) || [], salesChannels: mappedSalesChannels, entityInfoId: entityInfoId });
684
686
  })
685
- .addCase(verifyBrandLeadOTP.rejected, function (state, action) {
687
+ .addCase(verifyBrandLeadOTP.rejected, function (state, _a) {
688
+ var message = _a.error.message;
686
689
  state.loading = false;
687
- state.error = action.error.message;
690
+ if (!isAuthenticationVerificationFailed(message))
691
+ state.error = message;
688
692
  })
689
693
  .addCase(checkBrandNameAvailability.fulfilled, function (state, action) {
690
694
  var _a;
@@ -59,7 +59,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
59
  import API from '../../../api';
60
60
  import { BusinessType, FlowsTypes, DocumentPurpose, LicenseType } from '../../../@types';
61
61
  import { BUSINESS_STEP_NAMES, COLLECT_DOB_INFO_NAFATH, EXPECTED_SALES_LIST, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, OTHER_CR_LICENSE, OTHER_ENTITY_LICENSE, OTHER_FL_LICENSE, defaultCountry } from '../../../constants';
62
- import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue, sendCustomEventToGTM, findCountryByIddPrefix, isNetworkError, isTimeoutError } from '../../../utils';
62
+ import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue, sendCustomEventToGTM, findCountryByIddPrefix, isNetworkError, isTimeoutError, isAuthenticationVerificationFailed } from '../../../utils';
63
63
  import { handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
64
64
  export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
65
65
  var payload, data, publicKey, countryIso2, boardData, brandData, isicActivityList, leadData, _a, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, list, list;
@@ -198,9 +198,9 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
198
198
  }); });
199
199
  export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
200
200
  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 _b, _c, _d, _e, _f, _g, _h, _j;
202
- return __generator(this, function (_k) {
203
- switch (_k.label) {
201
+ var _b, _c, _d, _e, _f, _g, _h;
202
+ return __generator(this, function (_j) {
203
+ switch (_j.label) {
204
204
  case 0:
205
205
  _a = thunkApi.getState(), business = _a.business, settings = _a.settings;
206
206
  isNID = business.data.otpData.isNID;
@@ -213,26 +213,28 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
213
213
  step_name: stepName,
214
214
  encryption_contract: ['data']
215
215
  };
216
- return [4, API.leadService.verifyLeadOTP(payload)];
216
+ return [4, API.leadService.verifyTokenOTP(payload).catch(function (err) {
217
+ if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
218
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_OTP_VERIFY_SECURITY_ERROR_STEP'));
219
+ throw new Error(err === null || err === void 0 ? void 0 : err.message);
220
+ })];
217
221
  case 1:
218
- data = (_k.sent()).data;
219
- if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
220
- throw new Error(data.errors[0].description);
221
- publicKey = (_g = data === null || data === void 0 ? void 0 : data.config) === null || _g === void 0 ? void 0 : _g.public_key;
222
+ data = _j.sent();
223
+ publicKey = (_f = data === null || data === void 0 ? void 0 : data.config) === null || _f === void 0 ? void 0 : _f.public_key;
222
224
  if (publicKey) {
223
225
  thunkApi.dispatch(handlePublicKey(publicKey));
224
226
  }
225
227
  isicActivityList = undefined;
226
228
  return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
227
229
  case 2:
228
- leadData = (_k.sent()).data;
230
+ leadData = (_j.sent()).data;
229
231
  thunkApi.dispatch(updateStepName(stepName));
230
232
  brand = leadData.brand, country_code = leadData.country_code, steps = leadData.steps, board_id = leadData.board_id, business_id = leadData.business_id, entity = leadData.entity;
231
233
  brandID = brand === null || brand === void 0 ? void 0 : brand.id;
232
234
  countryIso2 = country_code;
233
235
  if (countryIso2)
234
236
  thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
235
- (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, { otp: params.otp });
237
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
236
238
  hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
237
239
  hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
238
240
  hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
@@ -241,14 +243,14 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
241
243
  if (!(!isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 4];
242
244
  return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
243
245
  case 3:
244
- _k.sent();
245
- _k.label = 4;
246
+ _j.sent();
247
+ _j.label = 4;
246
248
  case 4:
247
249
  if (!(isSA(countryIso2) && !isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 6];
248
250
  return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
249
251
  case 5:
250
- _k.sent();
251
- _k.label = 6;
252
+ _j.sent();
253
+ _j.label = 6;
252
254
  case 6:
253
255
  if (!isNID) return [3, 7];
254
256
  thunkApi.dispatch(handleNextScreenStep());
@@ -262,12 +264,12 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
262
264
  if (!board_id) return [3, 11];
263
265
  return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
264
266
  case 9:
265
- boardResponse = _k.sent();
267
+ boardResponse = _j.sent();
266
268
  leadData = __assign(__assign({}, leadData), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] });
267
269
  return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
268
270
  case 10:
269
- _k.sent();
270
- _k.label = 11;
271
+ _j.sent();
272
+ _j.label = 11;
271
273
  case 11:
272
274
  sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP')); });
273
275
  return [3, 23];
@@ -287,30 +289,30 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
287
289
  if (!hasBusinessCRActivitiesCompleted) return [3, 19];
288
290
  return [4, API.dataService.getActivitiesIsIc()];
289
291
  case 16:
290
- list = (_k.sent()).list;
292
+ list = (_j.sent()).list;
291
293
  isicActivityList = list || [];
292
294
  return [4, thunkApi.dispatch(retrieveDataList())];
293
295
  case 17:
294
- _k.sent();
296
+ _j.sent();
295
297
  return [4, API.brandService.retrieveBrand(brandID)];
296
298
  case 18:
297
- brandData = _k.sent();
299
+ brandData = _j.sent();
298
300
  sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP')); });
299
301
  return [3, 23];
300
302
  case 19:
301
303
  if (!hasBusinessCRInfoCompleted) return [3, 22];
302
304
  return [4, API.dataService.getActivitiesIsIc()];
303
305
  case 20:
304
- list = (_k.sent()).list;
306
+ list = (_j.sent()).list;
305
307
  isicActivityList = list || [];
306
308
  return [4, API.brandService.retrieveBrand(brandID)];
307
309
  case 21:
308
- brandData = _k.sent();
310
+ brandData = _j.sent();
309
311
  sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP')); });
310
312
  return [3, 23];
311
313
  case 22:
312
314
  sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP')); });
313
- _k.label = 23;
315
+ _j.label = 23;
314
316
  case 23: return [2, { data: data, verifyNextStepName: data.step_name, isicActivityList: isicActivityList, formData: __assign(__assign({}, params), { isNID: isNID }), brand: brandData === null || brandData === void 0 ? void 0 : brandData.brand, leadData: leadData }];
315
317
  }
316
318
  });
@@ -651,26 +653,26 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
651
653
  });
652
654
  }); });
653
655
  export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
654
- var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, documentData, entityData, brandData, data_1, brandRes, _c, message, error, list, entityId, documentBody, payload_1;
656
+ var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, unifiedNumber, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, documentData, entityData, brandData, data_1, brandRes, _c, message, error, list, entityId, documentBody, payload_1;
655
657
  var _d, _e, _f;
656
658
  return __generator(this, function (_g) {
657
659
  switch (_g.label) {
658
660
  case 0:
659
661
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
660
662
  isKWCountry = isKW(settings.data.businessCountry.iso2);
661
- selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense;
663
+ selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense, unifiedNumber = params.unifiedNumber;
662
664
  isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
663
665
  _b = business.data.verify.responseBody || {}, lead_id = _b.lead_id, brand = _b.brand;
664
666
  stepName = 'BUSINESS_ACTIVITIES_STEP';
665
667
  payload = __assign(__assign(__assign(__assign({ id: lead_id || '', entity: {
666
668
  id: (selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && (isKWCountry ? !isFL : true) ? selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id : ''
667
- } }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
669
+ }, unified_number: unifiedNumber }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
668
670
  license_number: isKWCountry && isFL ? '' : licenseNumber,
669
671
  license_type: isFL ? LicenseType.FL : LicenseType.CR,
670
672
  business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type
671
673
  })), { step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO }), (isKWCountry && {
672
674
  business_name: isFL ? undefined : { ar: entityLegalName, en: entityLegalName }
673
- })), { encryption_contract: ['license_number', 'business_type', 'license_type'] });
675
+ })), { encryption_contract: ['license_number', 'business_type', 'license_type', 'entity.unified_number'] });
674
676
  return [4, API.leadService.updateLead(payload)];
675
677
  case 1:
676
678
  data = _g.sent();
@@ -988,6 +990,7 @@ var initialState = {
988
990
  businessTypeData: {
989
991
  licenseNumber: '',
990
992
  entityLegalName: '',
993
+ unifiedNumber: '',
991
994
  isPrevDob: false
992
995
  },
993
996
  activitiesData: {
@@ -1134,9 +1137,11 @@ export var businessSlice = createSlice({
1134
1137
  var licenseList = [OTHER_CR_LICENSE, OTHER_FL_LICENSE];
1135
1138
  state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activityList: isicActivityList }), (!((_e = (_d = (_c = state.data.businessTypeData) === null || _c === void 0 ? void 0 : _c.responseBody) === null || _d === void 0 ? void 0 : _d.licenseList) === null || _e === void 0 ? void 0 : _e.length) && { licenseList: licenseList }));
1136
1139
  })
1137
- .addCase(verifyLeadOTP.rejected, function (state, action) {
1140
+ .addCase(verifyLeadOTP.rejected, function (state, _a) {
1141
+ var message = _a.error.message;
1138
1142
  state.loading = false;
1139
- state.error = action.error.message;
1143
+ if (!isAuthenticationVerificationFailed(message))
1144
+ state.error = message;
1140
1145
  })
1141
1146
  .addCase(createCivilIdAuth.pending, function (state) {
1142
1147
  state.loading = true;
@@ -1264,7 +1269,7 @@ export var businessSlice = createSlice({
1264
1269
  state.loading = true;
1265
1270
  })
1266
1271
  .addCase(retrieveEntityList.fulfilled, function (state, action) {
1267
- var _a, _b, _c, _d;
1272
+ var _a, _b, _c, _d, _e, _f;
1268
1273
  state.error = null;
1269
1274
  state.loading = false;
1270
1275
  var data = action.payload;
@@ -1285,7 +1290,7 @@ export var businessSlice = createSlice({
1285
1290
  licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
1286
1291
  licenseList = licenseList.filter(function (_a) {
1287
1292
  var license = _a.license;
1288
- return !(entityLicenseList || []).some(function (e) { return e.license.number === license.number; });
1293
+ return !(entityLicenseList || []).some(function (e) { var _a, _b; return e.license.number === license.number || ((_a = e.license.additional_info) === null || _a === void 0 ? void 0 : _a.unified_number) === ((_b = license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number); });
1289
1294
  });
1290
1295
  }
1291
1296
  }
@@ -1295,8 +1300,10 @@ export var businessSlice = createSlice({
1295
1300
  var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
1296
1301
  var isOtherLicense_1 = ((_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.number) === 'other_fl' || ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_cr';
1297
1302
  state.data.businessTypeData.selectedLicense = selectedLicense;
1298
- if (!isOtherLicense_1)
1303
+ if (!isOtherLicense_1) {
1299
1304
  state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
1305
+ state.data.businessTypeData.unifiedNumber = ((_f = (_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.additional_info) === null || _f === void 0 ? void 0 : _f.unified_number) || '';
1306
+ }
1300
1307
  }
1301
1308
  })
1302
1309
  .addCase(retrieveEntityList.rejected, function (state, action) {
@@ -1308,10 +1315,10 @@ export var businessSlice = createSlice({
1308
1315
  state.loading = true;
1309
1316
  })
1310
1317
  .addCase(retrieveAllEntityList.fulfilled, function (state, action) {
1311
- var _a;
1318
+ var _a, _b, _c;
1312
1319
  state.error = null;
1313
1320
  state.loading = false;
1314
- var _b = action.payload, data = _b.data, businessCountryCode = _b.businessCountryCode, entityId = _b.entityId;
1321
+ var _d = action.payload, data = _d.data, businessCountryCode = _d.businessCountryCode, entityId = _d.entityId;
1315
1322
  var isKWCountry = isKW(businessCountryCode);
1316
1323
  var list = (data === null || data === void 0 ? void 0 : data.entities_info) || [];
1317
1324
  if (isKWCountry) {
@@ -1329,8 +1336,10 @@ export var businessSlice = createSlice({
1329
1336
  var selectedLicense = findEntity ? findEntity : entityLicenseList[0];
1330
1337
  state.data.businessTypeData.selectedEntityLicense = selectedLicense;
1331
1338
  state.data.businessTypeData.selectedLicense = selectedLicense;
1332
- if (!isOtherLicense(selectedLicense))
1339
+ if (!isOtherLicense(selectedLicense)) {
1333
1340
  state.data.businessTypeData.licenseNumber = ((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _a === void 0 ? void 0 : _a.number) || '';
1341
+ state.data.businessTypeData.unifiedNumber = ((_c = (_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.additional_info) === null || _c === void 0 ? void 0 : _c.unified_number) || '';
1342
+ }
1334
1343
  }
1335
1344
  })
1336
1345
  .addCase(retrieveAllEntityList.rejected, function (state, action) {
@@ -82,14 +82,15 @@ export declare const updateLeadMobile: import("@reduxjs/toolkit").AsyncThunk<{
82
82
  export declare const skipUpdateLeadMobile: import("@reduxjs/toolkit").AsyncThunk<{
83
83
  leadResponse: any;
84
84
  }, void, {}>;
85
+ interface EmailCheckProps {
86
+ email: string;
87
+ cancelToken: CancelToken;
88
+ onSuccess?: () => void;
89
+ }
85
90
  export declare const checkEmailAvailability: import("@reduxjs/toolkit").AsyncThunk<{
86
91
  response: any;
87
92
  formData: string;
88
- } | undefined, {
89
- email: string;
90
- cancelToken: CancelToken;
91
- onSuccess?: (() => void) | undefined;
92
- }, {}>;
93
+ } | undefined, EmailCheckProps, {}>;
93
94
  export declare const checkBrandNameAvailability: import("@reduxjs/toolkit").AsyncThunk<{
94
95
  response: any;
95
96
  formData: {
@@ -71,7 +71,7 @@ import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2
71
71
  import { COLLECT_DOB_INFO_NAFATH, CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, OTHER_BRAND } from '../../../constants';
72
72
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
73
73
  import { AuthForType, FlowsTypes } from '../../../@types';
74
- import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isNetworkError, isTimeoutError } from '../../../utils';
74
+ import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isNetworkError, isTimeoutError, isInternalServerError, isAuthenticationVerificationFailed } from '../../../utils';
75
75
  export var updateBusinessCountry = createAsyncThunk('connect/updateBusinessCountry', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
76
76
  var connect, payload, data;
77
77
  return __generator(this, function (_a) {
@@ -209,9 +209,9 @@ export var createNafathAuth = createAsyncThunk('connect/createNafathAuth', funct
209
209
  }); });
210
210
  export var verifyAuth = createAsyncThunk('connect/verifyAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
211
211
  var _a, connect, settings, startWithNID, _b, mobileData, nidData, responseBody, stepName, payload, data, lead_id, leadResponse, channels, brand, err_1, brands, err_2, countryCode, phone;
212
- var _c, _d, _e, _f;
213
- return __generator(this, function (_g) {
214
- switch (_g.label) {
212
+ var _c, _d, _e;
213
+ return __generator(this, function (_f) {
214
+ switch (_f.label) {
215
215
  case 0:
216
216
  _a = thunkApi.getState(), connect = _a.connect, settings = _a.settings;
217
217
  startWithNID = connect.data.otpData.authFor === AuthForType.NATIONAL_ID;
@@ -229,11 +229,13 @@ export var verifyAuth = createAsyncThunk('connect/verifyAuth', function (params,
229
229
  step_name: stepName,
230
230
  encryption_contract: ['data']
231
231
  };
232
- return [4, API.authService.verifyAuth(payload)];
232
+ return [4, API.authService.verifyAuth(payload).catch(function (err) {
233
+ if (isAuthenticationVerificationFailed(err === null || err === void 0 ? void 0 : err.message))
234
+ thunkApi.dispatch(handleNextScreenStep('CONNECT_OTP_VERIFY_SECURITY_ERROR_STEP'));
235
+ throw new Error(err === null || err === void 0 ? void 0 : err.message);
236
+ })];
233
237
  case 1:
234
- data = (_g.sent()).data;
235
- if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
236
- throw new Error(data.errors[0].description);
238
+ data = _f.sent();
237
239
  sendCustomEventToGTM({
238
240
  event: 'Send Event',
239
241
  event_category: 'User Registration Flow',
@@ -244,41 +246,41 @@ export var verifyAuth = createAsyncThunk('connect/verifyAuth', function (params,
244
246
  throw new Error('Lead id is missing');
245
247
  return [4, API.leadService.retrieveLead(lead_id)];
246
248
  case 2:
247
- leadResponse = (_g.sent()).data;
248
- if ((_d = leadResponse.errors) === null || _d === void 0 ? void 0 : _d.length)
249
+ leadResponse = (_f.sent()).data;
250
+ if ((_c = leadResponse.errors) === null || _c === void 0 ? void 0 : _c.length)
249
251
  throw new Error(leadResponse.errors[0].description);
250
252
  return [4, API.dataService.getChannelsOfServices({ page: 0 })];
251
253
  case 3:
252
- channels = (_g.sent()).list;
254
+ channels = (_f.sent()).list;
253
255
  leadResponse.channel_list = channels;
254
- _g.label = 4;
256
+ _f.label = 4;
255
257
  case 4:
256
- _g.trys.push([4, 6, , 7]);
258
+ _f.trys.push([4, 6, , 7]);
257
259
  return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
258
260
  case 5:
259
- brand = (_g.sent()).brand;
261
+ brand = (_f.sent()).brand;
260
262
  leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
261
263
  return [3, 7];
262
264
  case 6:
263
- err_1 = _g.sent();
265
+ err_1 = _f.sent();
264
266
  return [3, 7];
265
267
  case 7:
266
- _g.trys.push([7, 9, , 10]);
268
+ _f.trys.push([7, 9, , 10]);
267
269
  return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
268
270
  case 8:
269
- brands = (_g.sent()).brands;
271
+ brands = (_f.sent()).brands;
270
272
  leadResponse.brand_list = fixBrandList(brands, channels);
271
273
  return [3, 10];
272
274
  case 9:
273
- err_2 = _g.sent();
275
+ err_2 = _f.sent();
274
276
  return [3, 10];
275
277
  case 10:
276
278
  countryCode = settings.data.businessCountry;
277
279
  phone = (leadResponse.contact || {}).phone;
278
280
  if (phone === null || phone === void 0 ? void 0 : phone.country_code)
279
281
  countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
280
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
281
- thunkApi.dispatch(handleNextScreenStep());
282
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
283
+ thunkApi.dispatch(handleNextScreenStep('CONNECT_INDIVIDUAL_STEP'));
282
284
  return [2, { authResponse: data, leadResponse: leadResponse, countryCode: countryCode }];
283
285
  }
284
286
  });
@@ -763,23 +765,36 @@ export var skipUpdateLeadMobile = createAsyncThunk('connect/skipUpdateLeadMobile
763
765
  export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
764
766
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
765
767
  return __awaiter(void 0, void 0, void 0, function () {
766
- var connect, requestBody, data;
767
- var _b, _c;
768
- return __generator(this, function (_d) {
769
- switch (_d.label) {
768
+ var responseBody, requestBody, data, retryData;
769
+ var _b, _c, _d, _e;
770
+ return __generator(this, function (_f) {
771
+ switch (_f.label) {
770
772
  case 0:
771
- connect = thunkApi.getState().connect;
773
+ responseBody = thunkApi.getState().connect.data.otpData.responseBody;
772
774
  requestBody = {
773
775
  email: email,
774
- country: (_c = (_b = connect.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.leadData) === null || _c === void 0 ? void 0 : _c.country_code,
776
+ country: (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.leadData) === null || _b === void 0 ? void 0 : _b.country_code,
775
777
  encryption_contract: ['email']
776
778
  };
777
779
  return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
778
780
  case 1:
779
- data = (_d.sent()).data;
780
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
781
- if (!data.errors)
781
+ data = (_f.sent()).data;
782
+ if (!data.errors) {
783
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
782
784
  return [2, { response: data, formData: email }];
785
+ }
786
+ if (!isInternalServerError((_d = (_c = data.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.error)) {
787
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
788
+ return [2];
789
+ }
790
+ return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
791
+ case 2:
792
+ retryData = (_f.sent()).data;
793
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
794
+ if (!retryData.errors)
795
+ return [2, { response: retryData, formData: email }];
796
+ if (isInternalServerError((_e = retryData.errors) === null || _e === void 0 ? void 0 : _e[0].error))
797
+ return [2, { response: { is_available: true }, formData: email }];
783
798
  return [2];
784
799
  }
785
800
  });
@@ -1122,9 +1137,11 @@ export var connectSlice = createSlice({
1122
1137
  state.loading = true;
1123
1138
  state.error = null;
1124
1139
  })
1125
- .addCase(verifyAuth.rejected, function (state, action) {
1140
+ .addCase(verifyAuth.rejected, function (state, _a) {
1141
+ var message = _a.error.message;
1126
1142
  state.loading = false;
1127
- state.error = action.error.message;
1143
+ if (!isAuthenticationVerificationFailed(message))
1144
+ state.error = message;
1128
1145
  })
1129
1146
  .addCase(updateLeadDOB.fulfilled, function (state, action) {
1130
1147
  state.loading = false;
@@ -82,14 +82,15 @@ export declare const verifyNafathIdentityAsync: import("@reduxjs/toolkit").Async
82
82
  isNextScreenIsDob: boolean;
83
83
  }, verifyPACIAsyncParams, {}>;
84
84
  export declare const verifyPaciLeadIdentityAsync: import("@reduxjs/toolkit").AsyncThunk<any, verifyPACIAsyncParams, {}>;
85
+ interface EmailCheckProps {
86
+ email: string;
87
+ cancelToken: CancelToken;
88
+ onSuccess?: () => void;
89
+ }
85
90
  export declare const checkEmailAvailabilityAsync: import("@reduxjs/toolkit").AsyncThunk<{
86
91
  response: any;
87
92
  formData: string;
88
- } | undefined, {
89
- email: string;
90
- cancelToken: CancelToken;
91
- onSuccess?: (() => void) | undefined;
92
- }, {}>;
93
+ } | undefined, EmailCheckProps, {}>;
93
94
  export declare const checkBrandNameAvailabilityAsync: import("@reduxjs/toolkit").AsyncThunk<{
94
95
  response: any;
95
96
  formData: {