@tap-payments/auth-jsconnect 2.0.32-test → 2.0.32

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 (280) hide show
  1. package/build/@types/app.d.ts +57 -20
  2. package/build/@types/app.js +14 -1
  3. package/build/@types/form.d.ts +17 -10
  4. package/build/api/auth.d.ts +24 -2
  5. package/build/api/auth.js +36 -1
  6. package/build/api/axios.js +2 -2
  7. package/build/api/brand.d.ts +2 -1
  8. package/build/api/brand.js +10 -1
  9. package/build/api/country.d.ts +3 -1
  10. package/build/api/country.js +3 -1
  11. package/build/api/data.d.ts +38 -7
  12. package/build/api/data.js +57 -17
  13. package/build/api/entity.d.ts +28 -5
  14. package/build/api/entity.js +23 -9
  15. package/build/api/firebase.d.ts +1 -1
  16. package/build/api/firebase.js +3 -1
  17. package/build/api/index.d.ts +41 -14
  18. package/build/api/individual.d.ts +76 -19
  19. package/build/api/individual.js +29 -2
  20. package/build/api/lead.d.ts +8 -6
  21. package/build/app/rootReducer.d.ts +1 -1
  22. package/build/app/rootReducer.js +2 -2
  23. package/build/app/settings.d.ts +8 -2
  24. package/build/app/settings.js +29 -12
  25. package/build/app/store.d.ts +3 -3
  26. package/build/assets/locales/ar.json +256 -179
  27. package/build/assets/locales/en.json +188 -104
  28. package/build/components/AnimationFlow/AnimationFlow.d.ts +5 -1
  29. package/build/components/AnimationFlow/AnimationFlow.js +6 -8
  30. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  31. package/build/components/AnimationFlow/BottomSheet.js +4 -3
  32. package/build/components/AnimationFlow/Dialog.d.ts +5 -1
  33. package/build/components/AnimationFlow/Dialog.js +11 -5
  34. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  35. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  36. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  37. package/build/components/ArabicDatePicker/index.js +2 -0
  38. package/build/components/ArabicDatePicker/style.css +24 -0
  39. package/build/components/FileInput/DragAndDrop.d.ts +10 -1
  40. package/build/components/FileInput/DragAndDrop.js +107 -8
  41. package/build/components/Lottie/Lottie.d.ts +878 -0
  42. package/build/components/Lottie/Lottie.js +58 -0
  43. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  44. package/build/components/Lottie/files/success.json +425 -0
  45. package/build/components/Lottie/index.d.ts +3 -0
  46. package/build/components/Lottie/index.js +3 -0
  47. package/build/components/OTPField/OTPField.d.ts +2 -1
  48. package/build/components/OTPField/OTPField.js +2 -2
  49. package/build/components/OTPTimer/OTPTimer.js +1 -1
  50. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  51. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  52. package/build/components/ProgressBar/index.d.ts +2 -0
  53. package/build/components/ProgressBar/index.js +2 -0
  54. package/build/components/RadioLabel/RadioLabel.d.ts +2 -1
  55. package/build/components/RadioLabel/RadioLabel.js +2 -2
  56. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -4
  57. package/build/components/SocialMediaGroup/SocialMediaGroup.js +3 -55
  58. package/build/constants/api.d.ts +6 -0
  59. package/build/constants/api.js +14 -1
  60. package/build/constants/app.d.ts +7 -5
  61. package/build/constants/app.js +55 -22
  62. package/build/constants/assets.d.ts +20 -1
  63. package/build/constants/assets.js +27 -8
  64. package/build/constants/dummy.d.ts +1 -1
  65. package/build/constants/dummy.js +2 -2
  66. package/build/constants/validation.d.ts +8 -0
  67. package/build/constants/validation.js +9 -1
  68. package/build/features/app/auth/authStore.d.ts +47 -0
  69. package/build/features/app/auth/authStore.js +265 -0
  70. package/build/features/app/bank/bankStore.d.ts +16 -0
  71. package/build/features/app/bank/bankStore.js +81 -37
  72. package/build/features/app/business/businessStore.d.ts +22 -3
  73. package/build/features/app/business/businessStore.js +430 -290
  74. package/build/features/app/connect/connectStore.d.ts +33 -30
  75. package/build/features/app/connect/connectStore.js +398 -258
  76. package/build/features/app/entity/entityStore.d.ts +5 -0
  77. package/build/features/app/entity/entityStore.js +153 -14
  78. package/build/features/app/individual/individualStore.d.ts +17 -0
  79. package/build/features/app/individual/individualStore.js +167 -83
  80. package/build/features/app/password/passwordStore.js +1 -1
  81. package/build/features/app/tax/taxStore.js +3 -2
  82. package/build/features/auth/Auth.d.ts +10 -0
  83. package/build/features/auth/Auth.js +87 -0
  84. package/build/features/auth/index.d.ts +1 -0
  85. package/build/features/auth/index.js +1 -0
  86. package/build/features/auth/screens/NID/DOB.d.ts +7 -0
  87. package/build/features/auth/screens/NID/DOB.js +47 -0
  88. package/build/features/auth/screens/NID/IDNumber.d.ts +3 -0
  89. package/build/features/auth/screens/NID/IDNumber.js +64 -0
  90. package/build/features/auth/screens/NID/NID.d.ts +5 -0
  91. package/build/features/auth/screens/NID/NID.js +67 -0
  92. package/build/features/auth/screens/NID/TAC.d.ts +3 -0
  93. package/build/features/auth/screens/NID/TAC.js +87 -0
  94. package/build/features/auth/screens/NID/index.d.ts +3 -0
  95. package/build/features/auth/screens/NID/index.js +2 -0
  96. package/build/features/auth/screens/NID/validation.d.ts +27 -0
  97. package/build/features/auth/screens/NID/validation.js +19 -0
  98. package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
  99. package/build/features/auth/screens/OTP/OTP.js +76 -0
  100. package/build/features/{otp/screens/OTPVerify/Verify.d.ts → auth/screens/OTP/OTPInput.d.ts} +0 -0
  101. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/OTPInput.js +11 -7
  102. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  103. package/build/features/auth/screens/OTP/index.js +2 -0
  104. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/validation.d.ts +0 -0
  105. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/validation.js +0 -0
  106. package/build/features/bank/Bank.js +12 -6
  107. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
  108. package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
  109. package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
  110. package/build/features/bank/screens/BankDetails/validation.js +2 -2
  111. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  112. package/build/features/business/Business.d.ts +1 -1
  113. package/build/features/business/Business.js +14 -7
  114. package/build/features/business/screens/Activities/Activities.js +1 -6
  115. package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
  116. package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
  117. package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
  118. package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
  119. package/build/features/business/screens/Activities/validation.d.ts +0 -51
  120. package/build/features/business/screens/Activities/validation.js +0 -9
  121. package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
  122. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  123. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  124. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  125. package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
  126. package/build/features/business/screens/BusinessType/LicenseList.js +24 -7
  127. package/build/features/business/screens/BusinessType/LicenseNumber.js +14 -8
  128. package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
  129. package/build/features/business/screens/BusinessType/LicenseType.js +67 -0
  130. package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
  131. package/build/features/business/screens/BusinessType/validation.js +50 -1
  132. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  133. package/build/features/business/screens/CivilID/CivilID.js +84 -0
  134. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  135. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  136. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  137. package/build/features/business/screens/CivilID/index.js +2 -0
  138. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  139. package/build/features/business/screens/CivilID/validation.js +4 -0
  140. package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
  141. package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
  142. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  143. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  144. package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
  145. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
  146. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -7
  147. package/build/features/business/screens/Verify/Verify.js +4 -4
  148. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  149. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +157 -0
  150. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  151. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  152. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  153. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  154. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  155. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  156. package/build/features/connect/Connect.d.ts +2 -1
  157. package/build/features/connect/Connect.js +47 -12
  158. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  159. package/build/features/connect/screens/CivilID/CivilID.js +98 -0
  160. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  161. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  162. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  163. package/build/features/connect/screens/CivilID/index.js +2 -0
  164. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  165. package/build/features/connect/screens/CivilID/validation.js +4 -0
  166. package/build/features/connect/screens/Individual/Email.js +11 -3
  167. package/build/features/connect/screens/Individual/Individual.js +27 -14
  168. package/build/features/connect/screens/Merchant/BrandList.js +15 -7
  169. package/build/features/connect/screens/Merchant/BrandName.js +7 -4
  170. package/build/features/connect/screens/Merchant/Merchant.js +47 -50
  171. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +7 -0
  172. package/build/features/connect/screens/Merchant/SalesChannels.js +113 -0
  173. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +1 -4
  174. package/build/features/connect/screens/Merchant/SocialMedia.js +131 -66
  175. package/build/features/connect/screens/Merchant/TAC.js +8 -2
  176. package/build/features/connect/screens/Merchant/validation.d.ts +22 -45
  177. package/build/features/connect/screens/Merchant/validation.js +117 -116
  178. package/build/features/connect/screens/Mobile/Mobile.js +31 -10
  179. package/build/features/connect/screens/NID/NID.js +2 -1
  180. package/build/features/connect/screens/OTP/OTP.js +5 -4
  181. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  182. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  183. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
  184. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  185. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  186. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  187. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  188. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  189. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  190. package/build/features/entity/Entity.d.ts +1 -1
  191. package/build/features/entity/Entity.js +16 -9
  192. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
  193. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +140 -0
  194. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +52 -2
  195. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
  196. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
  197. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
  198. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
  199. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
  200. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
  201. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.d.ts +0 -0
  202. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.js +8 -5
  203. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
  204. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
  205. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -5
  206. package/build/features/featuresScreens.d.ts +1 -1
  207. package/build/features/featuresScreens.js +31 -6
  208. package/build/features/individual/Individual.d.ts +1 -1
  209. package/build/features/individual/Individual.js +14 -7
  210. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
  211. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
  212. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  213. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  214. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  215. package/build/features/individual/screens/Verify/Verify.js +4 -4
  216. package/build/features/password/Password.d.ts +1 -1
  217. package/build/features/password/Password.js +14 -7
  218. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -9
  219. package/build/features/shared/Background/Background.d.ts +6 -5
  220. package/build/features/shared/Background/Background.js +16 -5
  221. package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
  222. package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
  223. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  224. package/build/features/shared/Button/MobileButton.js +2 -2
  225. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  226. package/build/features/shared/Dialog/CloseDialog.js +71 -0
  227. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  228. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  229. package/build/features/shared/Dialog/index.d.ts +4 -0
  230. package/build/features/shared/Dialog/index.js +4 -0
  231. package/build/features/shared/Input/Input.d.ts +1 -1
  232. package/build/features/shared/Input/Input.js +2 -2
  233. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  234. package/build/features/shared/UploadFile/UploadFile.d.ts +9 -3
  235. package/build/features/shared/UploadFile/UploadFile.js +23 -8
  236. package/build/features/signIn/SignIn.d.ts +1 -1
  237. package/build/features/signIn/SignIn.js +14 -6
  238. package/build/features/tax/Tax.d.ts +1 -1
  239. package/build/features/tax/Tax.js +16 -8
  240. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +11 -7
  241. package/build/hooks/index.d.ts +1 -0
  242. package/build/hooks/index.js +1 -0
  243. package/build/hooks/useAppConfig.d.ts +3 -1
  244. package/build/hooks/useAppConfig.js +4 -2
  245. package/build/hooks/useAppDispatch.d.ts +1 -1
  246. package/build/hooks/useErrorListener.js +0 -5
  247. package/build/hooks/useScreen.d.ts +3 -0
  248. package/build/hooks/useScreen.js +14 -0
  249. package/build/index.d.ts +3 -3
  250. package/build/index.js +5 -5
  251. package/build/utils/array.d.ts +13 -1
  252. package/build/utils/array.js +26 -0
  253. package/build/utils/common.d.ts +1 -0
  254. package/build/utils/common.js +3 -0
  255. package/build/utils/device.d.ts +1 -0
  256. package/build/utils/device.js +13 -0
  257. package/build/utils/html.d.ts +1 -0
  258. package/build/utils/html.js +6 -0
  259. package/build/utils/index.d.ts +1 -0
  260. package/build/utils/index.js +1 -0
  261. package/build/utils/locale.js +1 -1
  262. package/build/utils/object.d.ts +1 -0
  263. package/build/utils/object.js +12 -0
  264. package/build/utils/rsa.d.ts +2 -2
  265. package/build/utils/rsa.js +1 -1
  266. package/build/utils/string.d.ts +33 -20
  267. package/build/utils/string.js +71 -1
  268. package/build/utils/validation.d.ts +2 -0
  269. package/build/utils/validation.js +6 -0
  270. package/package.json +129 -128
  271. package/build/features/app/otp/otpStore.d.ts +0 -28
  272. package/build/features/app/otp/otpStore.js +0 -153
  273. package/build/features/otp/OTP.d.ts +0 -7
  274. package/build/features/otp/OTP.js +0 -55
  275. package/build/features/otp/index.d.ts +0 -0
  276. package/build/features/otp/index.js +0 -1
  277. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  278. package/build/features/otp/screens/OTPVerify/Verify.js +0 -50
  279. package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
  280. package/build/features/otp/screens/OTPVerify/index.js +0 -2
@@ -0,0 +1,265 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (_) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ var _a;
38
+ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
39
+ import { handleNextScreenStep, handleOpen } from '../../../app/settings';
40
+ import API from '../../../api';
41
+ import { getEighteenYearsAgo } from '../../../utils';
42
+ import { IDENTIFICATION_TYPE } from '../../../constants';
43
+ export var retrieveLead = createAsyncThunk('retrieveLeadAuthKit', function (leadId) { return __awaiter(void 0, void 0, void 0, function () {
44
+ var data;
45
+ return __generator(this, function (_a) {
46
+ switch (_a.label) {
47
+ case 0: return [4, API.leadService.retrieveLead(leadId)];
48
+ case 1:
49
+ data = (_a.sent()).data;
50
+ return [2, data];
51
+ }
52
+ });
53
+ }); });
54
+ export var verifyAuthOTP = createAsyncThunk('verifyAuthOTPKit', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
+ var _a, settings, auth, _b, postUrl, verifyToken, device_token, leadId, service_name, payload, data;
56
+ var _c, _d, _e, _f;
57
+ return __generator(this, function (_g) {
58
+ switch (_g.label) {
59
+ case 0:
60
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
61
+ _b = auth.data, postUrl = _b.postUrl, verifyToken = _b.verifyToken, device_token = _b.device_token, leadId = _b.leadId, service_name = _b.service_name;
62
+ payload = {
63
+ auth_token: verifyToken,
64
+ lead_id: leadId,
65
+ data: params.otp,
66
+ post_url: postUrl,
67
+ auth_type: 2,
68
+ device_token: device_token || '',
69
+ service_name: service_name || 'ABSHER',
70
+ sign_in: false,
71
+ scopes: settings.data.appConfig.scope || [],
72
+ terms: auth.data.termAndConditionChecked ? ['general'] : [],
73
+ encryption_contract: ['data']
74
+ };
75
+ return [4, API.authService.verifyAuthKitOTP(payload)];
76
+ case 1:
77
+ data = _g.sent();
78
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
79
+ (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, data);
80
+ thunkApi.dispatch(handleOpen(false));
81
+ return [2, { response: data, formData: params }];
82
+ }
83
+ });
84
+ }); });
85
+ export var createAuth = createAsyncThunk('authCreateAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
86
+ var _a, auth, settings, _b, type, countryISOCode, nid, dob, identification_id_type, requestBody, data;
87
+ return __generator(this, function (_c) {
88
+ switch (_c.label) {
89
+ case 0:
90
+ _a = thunkApi.getState(), auth = _a.auth, settings = _a.settings;
91
+ _b = auth.data, type = _b.type, countryISOCode = _b.countryISOCode;
92
+ nid = params.nid, dob = params.dob;
93
+ identification_id_type = type
94
+ ? type
95
+ : params.nid.startsWith('1')
96
+ ? IDENTIFICATION_TYPE.NID
97
+ : IDENTIFICATION_TYPE.IQAMA;
98
+ requestBody = {
99
+ lang: settings.data.language,
100
+ user_credentail: {
101
+ identification_id: nid,
102
+ identification_id_type: identification_id_type,
103
+ date_of_birth: dob,
104
+ country_code: countryISOCode || settings.data.businessCountry.iso2
105
+ },
106
+ sign_in: false,
107
+ is_lead: false,
108
+ encryption_contract: [
109
+ 'user_credentail.country_code',
110
+ 'user_credentail.identification_id',
111
+ 'user_credentail.identification_id_type',
112
+ 'user_credentail.date_of_birth'
113
+ ]
114
+ };
115
+ return [4, API.authService.createAuthKitNID(requestBody)];
116
+ case 1:
117
+ data = _c.sent();
118
+ thunkApi.dispatch(handleNextScreenStep());
119
+ return [2, { data: data, formData: params }];
120
+ }
121
+ });
122
+ }); });
123
+ export var resendOTP = createAsyncThunk('authResendOTP', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
124
+ var _a, auth, settings, _b, nid, dob, type, countryISOCode, identification_id_type, requestBody, data;
125
+ return __generator(this, function (_c) {
126
+ switch (_c.label) {
127
+ case 0:
128
+ _a = thunkApi.getState(), auth = _a.auth, settings = _a.settings;
129
+ _b = auth.data, nid = _b.nid, dob = _b.dob, type = _b.type, countryISOCode = _b.countryISOCode;
130
+ identification_id_type = type ? type : nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
131
+ requestBody = {
132
+ lang: settings.data.language,
133
+ user_credentail: {
134
+ identification_id: nid,
135
+ identification_id_type: identification_id_type,
136
+ date_of_birth: dob,
137
+ country_code: countryISOCode || settings.data.businessCountry.iso2
138
+ },
139
+ sign_in: false,
140
+ is_lead: false,
141
+ encryption_contract: [
142
+ 'user_credentail.country_code',
143
+ 'user_credentail.identification_id',
144
+ 'user_credentail.identification_id_type',
145
+ 'user_credentail.date_of_birth'
146
+ ]
147
+ };
148
+ return [4, API.authService.createAuthKitNID(requestBody)];
149
+ case 1:
150
+ data = _c.sent();
151
+ return [2, data];
152
+ }
153
+ });
154
+ }); });
155
+ var initialState = {
156
+ error: null,
157
+ loading: false,
158
+ customLoading: false,
159
+ data: {
160
+ verifyToken: undefined,
161
+ leadId: '',
162
+ postUrl: '',
163
+ otp: '',
164
+ nid: '',
165
+ termAndConditionChecked: false,
166
+ dob: getEighteenYearsAgo(),
167
+ type: '',
168
+ countryISOCode: ''
169
+ }
170
+ };
171
+ export var authSlice = createSlice({
172
+ name: 'auth/store',
173
+ initialState: initialState,
174
+ reducers: {
175
+ clearError: function (state) {
176
+ state.error = null;
177
+ },
178
+ stopLoader: function (state) {
179
+ state.loading = false;
180
+ },
181
+ resetOTPScreen: function (state) {
182
+ state.data.otp = '';
183
+ },
184
+ storeLeadId: function (state, action) {
185
+ var leadId = action.payload.leadId;
186
+ state.data.leadId = leadId;
187
+ },
188
+ storePostUrl: function (state, action) {
189
+ var postUrl = action.payload.postUrl;
190
+ state.data.postUrl = postUrl;
191
+ }
192
+ },
193
+ extraReducers: function (builder) {
194
+ builder
195
+ .addCase(retrieveLead.pending, function (state) {
196
+ state.customLoading = true;
197
+ state.error = null;
198
+ })
199
+ .addCase(retrieveLead.fulfilled, function (state, action) {
200
+ var _a, _b, _c, _d;
201
+ state.customLoading = false;
202
+ state.error = null;
203
+ var data = action.payload;
204
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
205
+ if (description) {
206
+ state.error = description;
207
+ return;
208
+ }
209
+ state.data.nid = (_b = data === null || data === void 0 ? void 0 : data.identification) === null || _b === void 0 ? void 0 : _b.id;
210
+ state.data.dob = data === null || data === void 0 ? void 0 : data.date_of_birth;
211
+ state.data.type = (_c = data === null || data === void 0 ? void 0 : data.identification) === null || _c === void 0 ? void 0 : _c.type;
212
+ state.data.countryISOCode = ((_d = data === null || data === void 0 ? void 0 : data.identification) === null || _d === void 0 ? void 0 : _d.issued_country_code) || (data === null || data === void 0 ? void 0 : data.country_code);
213
+ state.data.responseBody = data;
214
+ })
215
+ .addCase(retrieveLead.rejected, function (state, action) {
216
+ state.loading = false;
217
+ state.error = action.error.message;
218
+ })
219
+ .addCase(createAuth.pending, function (state) {
220
+ state.loading = true;
221
+ state.error = null;
222
+ })
223
+ .addCase(createAuth.fulfilled, function (state, action) {
224
+ state.loading = false;
225
+ state.error = null;
226
+ var _a = action.payload, data = _a.data, formData = _a.formData;
227
+ state.data.verifyToken = data === null || data === void 0 ? void 0 : data.auth_token;
228
+ state.data.dob = formData.dob;
229
+ state.data.nid = formData.nid;
230
+ state.data.termAndConditionChecked = formData.termAndConditionChecked;
231
+ state.data.device_token = data === null || data === void 0 ? void 0 : data.device_token;
232
+ state.data.service_name = data === null || data === void 0 ? void 0 : data.service_name;
233
+ })
234
+ .addCase(createAuth.rejected, function (state, action) {
235
+ state.loading = false;
236
+ state.error = action.error.message;
237
+ })
238
+ .addCase(verifyAuthOTP.pending, function (state) {
239
+ state.loading = true;
240
+ state.error = null;
241
+ })
242
+ .addCase(verifyAuthOTP.fulfilled, function (state) {
243
+ state.loading = false;
244
+ state.error = null;
245
+ })
246
+ .addCase(verifyAuthOTP.rejected, function (state, action) {
247
+ state.loading = false;
248
+ state.error = action.error.message;
249
+ })
250
+ .addCase(resendOTP.pending, function (state) {
251
+ state.error = null;
252
+ })
253
+ .addCase(resendOTP.fulfilled, function (state, action) {
254
+ state.error = null;
255
+ var data = action.payload;
256
+ state.data.verifyToken = data === null || data === void 0 ? void 0 : data.auth_token;
257
+ })
258
+ .addCase(resendOTP.rejected, function (state, action) {
259
+ state.error = action.error.message;
260
+ });
261
+ }
262
+ });
263
+ export var clearError = (_a = authSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, storeLeadId = _a.storeLeadId, storePostUrl = _a.storePostUrl;
264
+ export default authSlice.reducer;
265
+ export var authSelector = function (state) { return state.auth; };
@@ -4,6 +4,14 @@ import { CancelToken } from 'axios';
4
4
  export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
5
5
  data: any;
6
6
  boardResponse: {
7
+ user: any;
8
+ brand: any;
9
+ bank_account: any;
10
+ entity: any;
11
+ merchant: any;
12
+ name: any;
13
+ contact: any;
14
+ business: any;
7
15
  flows: {
8
16
  name: string;
9
17
  status: string;
@@ -33,6 +41,13 @@ export declare const checkIbanBank: import("@reduxjs/toolkit").AsyncThunk<{
33
41
  cancelToken: CancelToken;
34
42
  onSuccess?: (() => void) | undefined;
35
43
  }, {}>;
44
+ interface UploadBankStatementParams {
45
+ file: File;
46
+ onProgress?: (value: number) => void;
47
+ }
48
+ export declare const uploadBankStatement: import("@reduxjs/toolkit").AsyncThunk<{
49
+ data: any;
50
+ }, UploadBankStatementParams, {}>;
36
51
  export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
37
52
  response: any;
38
53
  formData: void;
@@ -48,6 +63,7 @@ export interface BankData {
48
63
  }
49
64
  export interface BankState extends SharedState<BankData> {
50
65
  customLoading?: boolean;
66
+ uploading?: boolean;
51
67
  }
52
68
  export declare const bankSlice: import("@reduxjs/toolkit").Slice<BankState, {
53
69
  clearError: (state: BankState) => void;
@@ -52,10 +52,10 @@ import { FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
53
53
  import { BANK_STEP_NAMES, BUSINESS_FLOW_SUCCESS } from '../../../constants';
54
54
  export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
- var payload, data, boardInfoData, board_id, board_info_id, info, hasBankCompleted;
56
- var _a;
57
- return __generator(this, function (_b) {
58
- switch (_b.label) {
55
+ var payload, data, boardInfoData, boardData, board_id, board_info_id, info, hasBankCompleted;
56
+ var _a, _b, _c;
57
+ return __generator(this, function (_d) {
58
+ switch (_d.label) {
59
59
  case 0:
60
60
  payload = {
61
61
  service_name: 'tap_email',
@@ -63,19 +63,19 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (t
63
63
  };
64
64
  return [4, API.leadService.verifyLeadToken(payload)];
65
65
  case 1:
66
- data = (_b.sent()).data;
67
- boardInfoData = undefined;
66
+ data = (_d.sent()).data;
67
+ boardData = undefined;
68
68
  if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 5];
69
69
  board_id = data === null || data === void 0 ? void 0 : data.id;
70
70
  board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
71
71
  if (!(!!board_id && !!board_info_id)) return [3, 3];
72
72
  return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
73
73
  case 2:
74
- boardInfoData = _b.sent();
75
- _b.label = 3;
76
- case 3: return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
74
+ boardInfoData = _d.sent();
75
+ _d.label = 3;
76
+ case 3: return [4, API.boardService.retrieveBoardDetails(board_id)];
77
77
  case 4:
78
- _b.sent();
78
+ boardData = _d.sent();
79
79
  info = boardInfoData.info;
80
80
  hasBankCompleted = ((_a = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'bank'; })) === null || _a === void 0 ? void 0 : _a.status) === 'completed';
81
81
  if (data.step_name === BANK_STEP_NAMES.PHONE_AUTH) {
@@ -87,8 +87,22 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (t
87
87
  else if (data.step_name === BANK_STEP_NAMES.BANK_INFO) {
88
88
  thunkApi.dispatch(handleNextScreenStep('BANK_BANK_DETAILS_STEP'));
89
89
  }
90
- _b.label = 5;
91
- case 5: return [2, { data: data, boardResponse: { flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) }, token: token }];
90
+ _d.label = 5;
91
+ case 5: return [2, {
92
+ data: data,
93
+ boardResponse: {
94
+ user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
95
+ brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
96
+ bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
97
+ entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
98
+ merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
99
+ name: (_b = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _b === void 0 ? void 0 : _b.names,
100
+ contact: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.contact,
101
+ business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
102
+ flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
103
+ },
104
+ token: token
105
+ }];
92
106
  }
93
107
  });
94
108
  }); });
@@ -151,52 +165,39 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBankEntityInfo', fun
151
165
  case 1:
152
166
  data = _c.sent();
153
167
  return [2, {
154
- data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.name, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
168
+ data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, business: data === null || data === void 0 ? void 0 : data.business, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
155
169
  }];
156
170
  }
157
171
  });
158
172
  }); });
159
173
  export var createBankAccount = createAsyncThunk('createBankAccount', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
160
- var _a, settings, bank, iban, beneficiaryName, bank_name, fileResponse, uploadPayload, requestBody, data;
161
- var _b, _c, _d, _e, _f, _g, _h, _j;
162
- return __generator(this, function (_k) {
163
- switch (_k.label) {
174
+ var _a, settings, bank, iban, beneficiaryName, bank_name, requestBody, data;
175
+ var _b, _c, _d, _e, _f, _g, _h;
176
+ return __generator(this, function (_j) {
177
+ switch (_j.label) {
164
178
  case 0:
165
179
  _a = thunkApi.getState(), settings = _a.settings, bank = _a.bank;
166
180
  iban = params.iban;
167
181
  beneficiaryName = params.beneficiaryName;
168
182
  bank_name = params.bankName;
169
- fileResponse = undefined;
170
- uploadPayload = {
171
- file_link_create: true,
172
- title: (_b = params.bankStatementFile) === null || _b === void 0 ? void 0 : _b.name,
173
- purpose: 'identity_document',
174
- file: params.bankStatementFile
175
- };
176
- if (!params.bankStatementFile) return [3, 2];
177
- return [4, API.entityService.uploadFileInfo(uploadPayload)];
178
- case 1:
179
- fileResponse = _k.sent();
180
- _k.label = 2;
181
- case 2:
182
183
  requestBody = {
183
- wallet_id: (_g = (_f = (_e = (_d = (_c = bank.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.business) === null || _d === void 0 ? void 0 : _d.entity) === null || _e === void 0 ? void 0 : _e.merchant) === null || _f === void 0 ? void 0 : _f.wallet) === null || _g === void 0 ? void 0 : _g.id,
184
+ wallet_id: (_f = (_e = (_d = (_c = (_b = bank.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.business) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.merchant) === null || _e === void 0 ? void 0 : _e.wallet) === null || _f === void 0 ? void 0 : _f.id,
184
185
  bank_account: {
185
186
  iban: iban,
186
187
  beneficiary_name: beneficiaryName,
187
188
  bank_name: bank_name,
188
- bank_statement_file_id: fileResponse === null || fileResponse === void 0 ? void 0 : fileResponse.id,
189
+ bank_statement_file_id: params.bankStatementFile ? bank.data.bankData.bankStatementId : undefined,
189
190
  is_acknowledged: params.confirmPolicy
190
191
  },
191
192
  step_name: BANK_STEP_NAMES.BANK_INFO,
192
193
  encryption_contract: ['bank_account.iban', 'bank_account.beneficiary_name', 'bank_account.bank_name']
193
194
  };
194
195
  return [4, API.entityService.createBankAccount(requestBody)];
195
- case 3:
196
- data = (_k.sent()).data;
196
+ case 1:
197
+ data = (_j.sent()).data;
197
198
  if (!data.errors) {
198
199
  thunkApi.dispatch(handleNextScreenStep());
199
- (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, requestBody);
200
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, requestBody);
200
201
  }
201
202
  return [2, { data: data, formData: params }];
202
203
  }
@@ -222,6 +223,31 @@ export var checkIbanBank = createAsyncThunk('checkIbanBank', function (_a) {
222
223
  });
223
224
  });
224
225
  });
226
+ export var uploadBankStatement = createAsyncThunk('uploadBankStatement', function (_a) {
227
+ var file = _a.file, onProgress = _a.onProgress;
228
+ return __awaiter(void 0, void 0, void 0, function () {
229
+ var uploadPayload, onUploadProgress, data;
230
+ return __generator(this, function (_b) {
231
+ switch (_b.label) {
232
+ case 0:
233
+ uploadPayload = {
234
+ file_link_create: true,
235
+ title: file === null || file === void 0 ? void 0 : file.name,
236
+ purpose: 'identity_document',
237
+ file: file
238
+ };
239
+ onUploadProgress = function (progressEvent) {
240
+ var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
241
+ onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
242
+ };
243
+ return [4, API.entityService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
244
+ case 1:
245
+ data = _b.sent();
246
+ return [2, { data: data }];
247
+ }
248
+ });
249
+ });
250
+ });
225
251
  export var updateBoardSuccess = createAsyncThunk('updateBoardBankSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
226
252
  var _a, settings, bank, _b, id, infoId, payload, data;
227
253
  var _c, _d, _e, _f;
@@ -254,6 +280,7 @@ var initialState = {
254
280
  error: null,
255
281
  loading: false,
256
282
  customLoading: false,
283
+ uploading: false,
257
284
  data: {
258
285
  flowName: FlowsTypes.BANK,
259
286
  verify: {
@@ -292,10 +319,10 @@ export var bankSlice = createSlice({
292
319
  state.customLoading = true;
293
320
  })
294
321
  .addCase(verifyLeadToken.fulfilled, function (state, action) {
295
- var _a;
322
+ var _a, _b, _c, _d;
296
323
  state.error = null;
297
324
  state.customLoading = false;
298
- var _b = action.payload, data = _b.data, token = _b.token, boardResponse = _b.boardResponse;
325
+ var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse;
299
326
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
300
327
  if (description) {
301
328
  state.error = description;
@@ -303,6 +330,9 @@ export var bankSlice = createSlice({
303
330
  }
304
331
  state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id });
305
332
  state.data.verify.token = token;
333
+ state.data.bankData.bankName = ((_b = boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) === null || _b === void 0 ? void 0 : _b.bank_name) || '';
334
+ state.data.bankData.beneficiaryName = ((_c = boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) === null || _c === void 0 ? void 0 : _c.beneficiary_name) || '';
335
+ state.data.bankData.iban = ((_d = boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) === null || _d === void 0 ? void 0 : _d.iban) || '';
306
336
  })
307
337
  .addCase(verifyLeadToken.rejected, function (state, action) {
308
338
  state.error = action.error.message;
@@ -414,6 +444,20 @@ export var bankSlice = createSlice({
414
444
  if (action.error.message === 'Aborted')
415
445
  return;
416
446
  state.error = action.error.message;
447
+ })
448
+ .addCase(uploadBankStatement.pending, function (state) {
449
+ state.error = null;
450
+ state.uploading = true;
451
+ })
452
+ .addCase(uploadBankStatement.fulfilled, function (state, action) {
453
+ state.error = null;
454
+ state.uploading = false;
455
+ var data = action.payload.data;
456
+ state.data.bankData.bankStatementId = data === null || data === void 0 ? void 0 : data.id;
457
+ })
458
+ .addCase(uploadBankStatement.rejected, function (state) {
459
+ state.uploading = false;
460
+ state.error = 'file_upload_error';
417
461
  });
418
462
  }
419
463
  });
@@ -1,5 +1,5 @@
1
1
  import { RootState } from '../../../app/store';
2
- import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, FlowsTypes, Activity, SalesChannel } from '../../../@types';
2
+ import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, FlowsTypes, Activity, CivilFormValues } from '../../../@types';
3
3
  export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
4
4
  data: any;
5
5
  leadData: any;
@@ -17,7 +17,18 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
17
17
  otp: string;
18
18
  };
19
19
  brandInfo: any;
20
+ leadData: any;
20
21
  }, OTPFormValues, {}>;
22
+ interface verifyPACIParams {
23
+ onSuccess?: () => void | Promise<void>;
24
+ }
25
+ export declare const verifyPACI: import("@reduxjs/toolkit").AsyncThunk<{
26
+ response: any;
27
+ }, verifyPACIParams, {}>;
28
+ export declare const createCivilIdAuth: import("@reduxjs/toolkit").AsyncThunk<{
29
+ response: any;
30
+ formData: CivilFormValues;
31
+ }, CivilFormValues, {}>;
21
32
  export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
22
33
  data: any;
23
34
  formData: {
@@ -27,7 +38,6 @@ export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
27
38
  };
28
39
  }, NIDFormValues, {}>;
29
40
  export declare const resendOTPLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
30
- export declare const retrieveChannels: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
31
41
  export declare const retrieveEntityList: import("@reduxjs/toolkit").AsyncThunk<any, {
32
42
  leadId: string;
33
43
  }, {}>;
@@ -38,12 +48,19 @@ export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThu
38
48
  data: any;
39
49
  formData: BusinessTypeFormValues;
40
50
  accountData: any;
51
+ documentData: any;
41
52
  }, BusinessTypeFormValues, {}>;
53
+ interface UploadLicenseCertificateParams {
54
+ file: File;
55
+ onProgress?: (value: number) => void;
56
+ }
57
+ export declare const uploadLicenseCertificate: import("@reduxjs/toolkit").AsyncThunk<{
58
+ data: any;
59
+ }, UploadLicenseCertificateParams, {}>;
42
60
  export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
43
61
  data: any;
44
62
  formData: {
45
63
  activities: Activity[] | undefined;
46
- salesChannels: SalesChannel[];
47
64
  operationStartDate: string;
48
65
  };
49
66
  }, ActivitiesFormValues, {}>;
@@ -74,6 +91,7 @@ export interface BusinessData {
74
91
  nidData: NIDFormValues & ResponseData & {
75
92
  type: string;
76
93
  };
94
+ civilIdData: CivilFormValues & ResponseData;
77
95
  businessTypeData: BusinessTypeFormValues & ResponseData;
78
96
  activitiesData: ActivitiesFormValues & ResponseData;
79
97
  customersData: CustomersFormValues & ResponseData;
@@ -81,6 +99,7 @@ export interface BusinessData {
81
99
  }
82
100
  export interface BusinessState extends SharedState<BusinessData> {
83
101
  customLoading?: boolean;
102
+ uploading?: boolean;
84
103
  }
85
104
  export declare const businessSlice: import("@reduxjs/toolkit").Slice<BusinessState, {
86
105
  clearError: (state: BusinessState) => void;