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

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 (1221) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +167 -167
  3. package/build/@types/app.d.ts +500 -222
  4. package/build/@types/app.js +82 -29
  5. package/build/@types/form.d.ts +142 -87
  6. package/build/@types/form.js +1 -1
  7. package/build/@types/index.d.ts +5 -4
  8. package/build/@types/index.js +5 -4
  9. package/build/@types/redux.d.ts +18 -14
  10. package/build/@types/redux.js +1 -1
  11. package/build/@types/theme.d.ts +14 -14
  12. package/build/@types/theme.js +15 -15
  13. package/build/@types/user.d.ts +141 -0
  14. package/build/@types/user.js +1 -0
  15. package/build/api/account.d.ts +19 -14
  16. package/build/api/account.js +21 -13
  17. package/build/api/auth.d.ts +93 -77
  18. package/build/api/auth.js +76 -44
  19. package/build/api/availabilityServices.d.ts +20 -20
  20. package/build/api/availabilityServices.js +17 -17
  21. package/build/api/axios.d.ts +7 -7
  22. package/build/api/axios.js +110 -110
  23. package/build/api/board.d.ts +43 -26
  24. package/build/api/board.js +72 -56
  25. package/build/api/brand.d.ts +16 -7
  26. package/build/api/brand.js +66 -40
  27. package/build/api/country.d.ts +10 -4
  28. package/build/api/country.js +22 -12
  29. package/build/api/data.d.ts +50 -36
  30. package/build/api/data.js +100 -61
  31. package/build/api/document.d.ts +25 -0
  32. package/build/api/document.js +38 -0
  33. package/build/api/entity.d.ts +131 -57
  34. package/build/api/entity.js +116 -59
  35. package/build/api/file.d.ts +14 -0
  36. package/build/api/file.js +37 -0
  37. package/build/api/firebase.d.ts +4 -4
  38. package/build/api/firebase.js +14 -12
  39. package/build/api/index.d.ts +156 -101
  40. package/build/api/index.js +39 -33
  41. package/build/api/individual.d.ts +145 -32
  42. package/build/api/individual.js +47 -12
  43. package/build/api/init.d.ts +16 -0
  44. package/build/api/init.js +13 -0
  45. package/build/api/lead.d.ts +105 -93
  46. package/build/api/lead.js +68 -45
  47. package/build/api/location.d.ts +5 -0
  48. package/build/api/location.js +19 -0
  49. package/build/api/operator.d.ts +12 -12
  50. package/build/api/operator.js +65 -65
  51. package/build/api/user.d.ts +14 -8
  52. package/build/api/user.js +20 -12
  53. package/build/app/rootReducer.d.ts +14 -14
  54. package/build/app/rootReducer.js +25 -25
  55. package/build/app/settings.d.ts +44 -37
  56. package/build/app/settings.js +281 -246
  57. package/build/app/store.d.ts +29 -29
  58. package/build/app/store.js +11 -11
  59. package/build/assets/locales/ar.json +400 -258
  60. package/build/assets/locales/en.json +430 -278
  61. package/build/components/AnimationFlow/AnimationFlow.d.ts +19 -16
  62. package/build/components/AnimationFlow/AnimationFlow.js +34 -34
  63. package/build/components/AnimationFlow/BottomSheet.d.ts +14 -10
  64. package/build/components/AnimationFlow/BottomSheet.js +89 -86
  65. package/build/components/AnimationFlow/Dialog.d.ts +17 -14
  66. package/build/components/AnimationFlow/Dialog.js +134 -110
  67. package/build/components/AnimationFlow/Error.d.ts +6 -6
  68. package/build/components/AnimationFlow/Error.js +32 -32
  69. package/build/components/AnimationFlow/Loader.d.ts +2 -2
  70. package/build/components/AnimationFlow/Loader.js +24 -24
  71. package/build/components/AnimationFlow/index.d.ts +2 -2
  72. package/build/components/AnimationFlow/index.js +2 -2
  73. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  74. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  75. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  76. package/build/components/ArabicDatePicker/index.js +2 -0
  77. package/build/components/ArabicDatePicker/style.css +24 -0
  78. package/build/components/Button/Button.d.ts +14 -14
  79. package/build/components/Button/Button.js +97 -101
  80. package/build/components/Button/index.d.ts +4 -4
  81. package/build/components/Button/index.js +2 -2
  82. package/build/components/CheckBox/CheckBox.d.ts +5 -5
  83. package/build/components/CheckBox/CheckBox.js +39 -39
  84. package/build/components/CheckBox/index.d.ts +4 -4
  85. package/build/components/CheckBox/index.js +2 -2
  86. package/build/components/Collapse/Collapse.d.ts +5 -5
  87. package/build/components/Collapse/Collapse.js +28 -28
  88. package/build/components/Collapse/index.d.ts +3 -3
  89. package/build/components/Collapse/index.js +2 -2
  90. package/build/components/DatePicker/DatePicker.d.ts +15 -14
  91. package/build/components/DatePicker/DatePicker.js +105 -101
  92. package/build/components/DatePicker/index.d.ts +3 -3
  93. package/build/components/DatePicker/index.js +2 -2
  94. package/build/components/ExpandIcon/ExpandIcon.d.ts +7 -7
  95. package/build/components/ExpandIcon/ExpandIcon.js +24 -24
  96. package/build/components/ExpandIcon/index.d.ts +2 -2
  97. package/build/components/ExpandIcon/index.js +2 -2
  98. package/build/components/FileInput/DragAndDrop.d.ts +17 -15
  99. package/build/components/FileInput/DragAndDrop.js +136 -143
  100. package/build/components/FileInput/UploadInput.d.ts +7 -7
  101. package/build/components/FileInput/UploadInput.js +38 -38
  102. package/build/components/FileInput/index.d.ts +3 -3
  103. package/build/components/FileInput/index.js +3 -3
  104. package/build/components/Footer/Footer.d.ts +15 -15
  105. package/build/components/Footer/Footer.js +62 -62
  106. package/build/components/Footer/index.d.ts +4 -4
  107. package/build/components/Footer/index.js +2 -2
  108. package/build/components/Form/Form.d.ts +11 -11
  109. package/build/components/Form/Form.js +38 -38
  110. package/build/components/Form/index.d.ts +3 -3
  111. package/build/components/Form/index.js +2 -2
  112. package/build/components/Icon/Icon.d.ts +11 -11
  113. package/build/components/Icon/Icon.js +26 -26
  114. package/build/components/Icon/index.d.ts +3 -3
  115. package/build/components/Icon/index.js +2 -2
  116. package/build/components/Input/Input.d.ts +19 -19
  117. package/build/components/Input/Input.js +84 -84
  118. package/build/components/Input/index.d.ts +3 -3
  119. package/build/components/Input/index.js +2 -2
  120. package/build/components/InputAdornment/InputAdornment.d.ts +10 -10
  121. package/build/components/InputAdornment/InputAdornment.js +46 -46
  122. package/build/components/InputAdornment/index.d.ts +3 -3
  123. package/build/components/InputAdornment/index.js +2 -2
  124. package/build/components/List/List.d.ts +5 -5
  125. package/build/components/List/List.js +52 -52
  126. package/build/components/List/index.d.ts +3 -3
  127. package/build/components/List/index.js +2 -2
  128. package/build/components/ListItem/ListItem.d.ts +5 -5
  129. package/build/components/ListItem/ListItem.js +35 -35
  130. package/build/components/ListItem/index.d.ts +3 -3
  131. package/build/components/ListItem/index.js +2 -2
  132. package/build/components/Loader/Loader.d.ts +24 -24
  133. package/build/components/Loader/Loader.js +41 -41
  134. package/build/components/Loader/index.d.ts +4 -4
  135. package/build/components/Loader/index.js +2 -2
  136. package/build/components/LogoBadge/LogoBadge.d.ts +7 -7
  137. package/build/components/LogoBadge/LogoBadge.js +64 -61
  138. package/build/components/LogoBadge/index.d.ts +3 -3
  139. package/build/components/LogoBadge/index.js +2 -2
  140. package/build/components/Lottie/Lottie.d.ts +4203 -878
  141. package/build/components/Lottie/Lottie.js +66 -58
  142. package/build/components/Lottie/files/account_creating.json +732 -0
  143. package/build/components/Lottie/files/error.json +692 -0
  144. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -236
  145. package/build/components/Lottie/files/start_loading.json +1140 -0
  146. package/build/components/Lottie/files/still_loading.json +1140 -0
  147. package/build/components/Lottie/files/success.json +425 -425
  148. package/build/components/Lottie/index.d.ts +3 -3
  149. package/build/components/Lottie/index.js +3 -3
  150. package/build/components/OTPField/OTPField.d.ts +18 -17
  151. package/build/components/OTPField/OTPField.js +45 -45
  152. package/build/components/OTPField/index.d.ts +4 -4
  153. package/build/components/OTPField/index.js +2 -2
  154. package/build/components/OTPTimer/OTPTimer.d.ts +14 -14
  155. package/build/components/OTPTimer/OTPTimer.js +70 -70
  156. package/build/components/OTPTimer/index.d.ts +4 -4
  157. package/build/components/OTPTimer/index.js +2 -2
  158. package/build/components/ProgressBar/CircularProgressBar.d.ts +16 -14
  159. package/build/components/ProgressBar/CircularProgressBar.js +48 -48
  160. package/build/components/ProgressBar/ProgressBar.d.ts +6 -6
  161. package/build/components/ProgressBar/ProgressBar.js +45 -45
  162. package/build/components/ProgressBar/index.d.ts +6 -6
  163. package/build/components/ProgressBar/index.js +4 -4
  164. package/build/components/Providers/ReduxProvider.d.ts +7 -7
  165. package/build/components/Providers/ReduxProvider.js +17 -17
  166. package/build/components/Providers/ThemeProvider.d.ts +8 -8
  167. package/build/components/Providers/ThemeProvider.js +22 -22
  168. package/build/components/Providers/index.d.ts +3 -3
  169. package/build/components/Providers/index.js +3 -3
  170. package/build/components/Radio/Radio.d.ts +5 -5
  171. package/build/components/Radio/Radio.js +31 -31
  172. package/build/components/Radio/index.d.ts +3 -3
  173. package/build/components/Radio/index.js +2 -2
  174. package/build/components/RadioGroup/RadioGroup.d.ts +8 -5
  175. package/build/components/RadioGroup/RadioGroup.js +37 -41
  176. package/build/components/RadioGroup/index.d.ts +3 -3
  177. package/build/components/RadioGroup/index.js +2 -2
  178. package/build/components/RadioLabel/RadioLabel.d.ts +10 -7
  179. package/build/components/RadioLabel/RadioLabel.js +34 -34
  180. package/build/components/RadioLabel/index.d.ts +3 -3
  181. package/build/components/RadioLabel/index.js +2 -2
  182. package/build/components/SimpleList/SimpleList.d.ts +23 -18
  183. package/build/components/SimpleList/SimpleList.js +133 -104
  184. package/build/components/SimpleList/index.d.ts +3 -3
  185. package/build/components/SimpleList/index.js +2 -2
  186. package/build/components/Slide/Slide.d.ts +6 -6
  187. package/build/components/Slide/Slide.js +30 -30
  188. package/build/components/Slide/index.d.ts +3 -3
  189. package/build/components/Slide/index.js +2 -2
  190. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +11 -15
  191. package/build/components/SocialMediaGroup/SocialMediaGroup.js +34 -79
  192. package/build/components/SocialMediaGroup/index.d.ts +3 -3
  193. package/build/components/SocialMediaGroup/index.js +2 -2
  194. package/build/components/Text/Text.d.ts +5 -5
  195. package/build/components/Text/Text.js +35 -35
  196. package/build/components/Text/index.d.ts +3 -3
  197. package/build/components/Text/index.js +2 -2
  198. package/build/components/ToggleButton/ToggleButton.d.ts +5 -5
  199. package/build/components/ToggleButton/ToggleButton.js +44 -44
  200. package/build/components/ToggleButton/index.d.ts +3 -3
  201. package/build/components/ToggleButton/index.js +2 -2
  202. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +5 -5
  203. package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +37 -37
  204. package/build/components/ToggleButtonGroup/index.d.ts +3 -3
  205. package/build/components/ToggleButtonGroup/index.js +2 -2
  206. package/build/components/Tooltip/Tooltip.d.ts +10 -10
  207. package/build/components/Tooltip/Tooltip.js +53 -44
  208. package/build/components/Tooltip/index.d.ts +3 -3
  209. package/build/components/Tooltip/index.js +2 -2
  210. package/build/components/Warning/Warning.d.ts +13 -13
  211. package/build/components/Warning/Warning.js +53 -53
  212. package/build/components/Warning/index.d.ts +4 -4
  213. package/build/components/Warning/index.js +2 -2
  214. package/build/constants/api.d.ts +52 -35
  215. package/build/constants/api.js +103 -69
  216. package/build/constants/app.d.ts +237 -173
  217. package/build/constants/app.js +725 -486
  218. package/build/constants/assets.d.ts +102 -85
  219. package/build/constants/assets.js +102 -85
  220. package/build/constants/dummy.d.ts +328 -328
  221. package/build/constants/dummy.js +6436 -6436
  222. package/build/constants/index.d.ts +5 -5
  223. package/build/constants/index.js +5 -5
  224. package/build/constants/validation.d.ts +28 -15
  225. package/build/constants/validation.js +28 -15
  226. package/build/features/app/bank/bankStore.d.ts +72 -64
  227. package/build/features/app/bank/bankStore.js +473 -442
  228. package/build/features/app/brand/brandStore.d.ts +109 -0
  229. package/build/features/app/brand/brandStore.js +735 -0
  230. package/build/features/app/business/businessStore.d.ts +128 -103
  231. package/build/features/app/business/businessStore.js +1129 -1106
  232. package/build/features/app/connect/connectStore.d.ts +101 -112
  233. package/build/features/app/connect/connectStore.js +923 -956
  234. package/build/features/app/connectExpress/connectExpressStore.d.ts +134 -0
  235. package/build/features/app/connectExpress/connectExpressStore.js +1149 -0
  236. package/build/features/app/entity/entityStore.d.ts +86 -53
  237. package/build/features/app/entity/entityStore.js +705 -461
  238. package/build/features/app/individual/individualStore.d.ts +142 -68
  239. package/build/features/app/individual/individualStore.js +1225 -460
  240. package/build/features/app/password/passwordStore.d.ts +85 -90
  241. package/build/features/app/password/passwordStore.js +550 -522
  242. package/build/features/app/signIn/signInStore.d.ts +33 -33
  243. package/build/features/app/signIn/signInStore.js +367 -390
  244. package/build/features/app/tax/taxStore.d.ts +55 -46
  245. package/build/features/app/tax/taxStore.js +426 -375
  246. package/build/features/bank/Bank.d.ts +9 -7
  247. package/build/features/bank/Bank.js +71 -69
  248. package/build/features/bank/index.d.ts +1 -1
  249. package/build/features/bank/index.js +1 -1
  250. package/build/features/bank/screens/BankDetails/BankDetails.d.ts +5 -5
  251. package/build/features/bank/screens/BankDetails/BankDetails.js +105 -66
  252. package/build/features/bank/screens/BankDetails/BankName.d.ts +6 -3
  253. package/build/features/bank/screens/BankDetails/BankName.js +64 -59
  254. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +9 -3
  255. package/build/features/bank/screens/BankDetails/BankStatement.js +32 -55
  256. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +6 -5
  257. package/build/features/bank/screens/BankDetails/Beneficiary.js +50 -51
  258. package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +6 -3
  259. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +66 -67
  260. package/build/features/bank/screens/BankDetails/IBAN.d.ts +8 -7
  261. package/build/features/bank/screens/BankDetails/IBAN.js +104 -97
  262. package/build/features/bank/screens/BankDetails/index.d.ts +3 -3
  263. package/build/features/bank/screens/BankDetails/index.js +2 -2
  264. package/build/features/bank/screens/BankDetails/validation.d.ts +39 -23
  265. package/build/features/bank/screens/BankDetails/validation.js +24 -29
  266. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  267. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  268. package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
  269. package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
  270. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  271. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -9
  272. package/build/features/bank/screens/ResetPasswordSuccess/index.d.ts +3 -3
  273. package/build/features/bank/screens/ResetPasswordSuccess/index.js +2 -2
  274. package/build/features/bank/screens/Success/Success.d.ts +5 -5
  275. package/build/features/bank/screens/Success/Success.js +20 -16
  276. package/build/features/bank/screens/Success/index.d.ts +3 -3
  277. package/build/features/bank/screens/Success/index.js +2 -2
  278. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  279. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  280. package/build/features/bank/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  281. package/build/features/bank/screens/SuccessWithFlowButtons/index.js +2 -2
  282. package/build/features/bank/screens/Verify/OTPInput.d.ts +7 -7
  283. package/build/features/bank/screens/Verify/OTPInput.js +49 -47
  284. package/build/features/bank/screens/Verify/Verify.d.ts +5 -5
  285. package/build/features/bank/screens/Verify/Verify.js +74 -78
  286. package/build/features/bank/screens/Verify/index.d.ts +2 -2
  287. package/build/features/bank/screens/Verify/index.js +2 -2
  288. package/build/features/bank/screens/Verify/validation.d.ts +8 -8
  289. package/build/features/bank/screens/Verify/validation.js +4 -4
  290. package/build/features/brand/Brand.d.ts +9 -0
  291. package/build/features/brand/Brand.js +71 -0
  292. package/build/features/brand/index.d.ts +1 -0
  293. package/build/features/brand/index.js +1 -0
  294. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +88 -0
  295. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +177 -0
  296. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
  297. package/build/features/brand/screens/BrandActivities/BrandActivities.js +92 -0
  298. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +78 -0
  299. package/build/features/brand/screens/BrandActivities/CustomerBase.js +147 -0
  300. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +9 -0
  301. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +102 -0
  302. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +9 -0
  303. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +144 -0
  304. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +43 -0
  305. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +93 -0
  306. package/build/features/brand/screens/BrandActivities/TAC.d.ts +19 -0
  307. package/build/features/brand/screens/BrandActivities/TAC.js +93 -0
  308. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +6 -0
  309. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +56 -0
  310. package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
  311. package/build/features/brand/screens/BrandActivities/index.js +2 -0
  312. package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
  313. package/build/features/brand/screens/BrandActivities/validation.js +23 -0
  314. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
  315. package/build/features/brand/screens/BrandInfo/BrandInfo.js +99 -0
  316. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +9 -0
  317. package/build/features/brand/screens/BrandInfo/BrandLogo.js +52 -0
  318. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +9 -0
  319. package/build/features/brand/screens/BrandInfo/BrandName.js +143 -0
  320. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +6 -0
  321. package/build/features/brand/screens/BrandInfo/SalesChannels.js +25 -0
  322. package/build/features/brand/screens/BrandInfo/Segments.d.ts +9 -0
  323. package/build/features/brand/screens/BrandInfo/Segments.js +84 -0
  324. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +9 -0
  325. package/build/features/brand/screens/BrandInfo/TeamSize.js +84 -0
  326. package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
  327. package/build/features/brand/screens/BrandInfo/index.js +2 -0
  328. package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
  329. package/build/features/brand/screens/BrandInfo/validation.js +108 -0
  330. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  331. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  332. package/build/features/brand/screens/PrepareDataLoading/index.d.ts +2 -0
  333. package/build/features/brand/screens/PrepareDataLoading/index.js +2 -0
  334. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  335. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
  336. package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
  337. package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
  338. package/build/features/brand/screens/Success/Success.d.ts +5 -0
  339. package/build/features/brand/screens/Success/Success.js +20 -0
  340. package/build/features/brand/screens/Success/index.d.ts +3 -0
  341. package/build/features/brand/screens/Success/index.js +2 -0
  342. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  343. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -0
  344. package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  345. package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
  346. package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
  347. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/OTPInput.js +49 -47
  348. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/Verify.d.ts +5 -5
  349. package/build/features/brand/screens/Verify/Verify.js +78 -0
  350. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.d.ts +2 -2
  351. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.js +2 -2
  352. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.d.ts +8 -8
  353. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.js +4 -4
  354. package/build/features/business/Business.d.ts +8 -7
  355. package/build/features/business/Business.js +64 -70
  356. package/build/features/business/index.d.ts +1 -1
  357. package/build/features/business/index.js +1 -1
  358. package/build/features/business/screens/Activities/Activities.d.ts +5 -5
  359. package/build/features/business/screens/Activities/Activities.js +69 -78
  360. package/build/features/business/screens/Activities/ActivitiesList.d.ts +85 -54
  361. package/build/features/business/screens/Activities/ActivitiesList.js +169 -131
  362. package/build/features/business/screens/Activities/LicenseName.d.ts +5 -5
  363. package/build/features/business/screens/Activities/LicenseName.js +30 -30
  364. package/build/features/business/screens/Activities/OperationStartDate.d.ts +20 -6
  365. package/build/features/business/screens/Activities/OperationStartDate.js +45 -26
  366. package/build/features/business/screens/Activities/index.d.ts +3 -3
  367. package/build/features/business/screens/Activities/index.js +2 -2
  368. package/build/features/business/screens/Activities/validation.d.ts +56 -107
  369. package/build/features/business/screens/Activities/validation.js +11 -17
  370. package/build/features/business/screens/BusinessType/Article.d.ts +8 -0
  371. package/build/features/business/screens/BusinessType/Article.js +52 -0
  372. package/build/features/business/screens/BusinessType/BusinessType.d.ts +5 -5
  373. package/build/features/business/screens/BusinessType/BusinessType.js +98 -60
  374. package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
  375. package/build/features/business/screens/BusinessType/EntityLicenseList.js +132 -0
  376. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  377. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  378. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  379. package/build/features/business/screens/BusinessType/LicenseCertificate.js +44 -0
  380. package/build/features/business/screens/BusinessType/LicenseList.d.ts +9 -8
  381. package/build/features/business/screens/BusinessType/LicenseList.js +136 -128
  382. package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +6 -7
  383. package/build/features/business/screens/BusinessType/LicenseNumber.js +54 -46
  384. package/build/features/business/screens/BusinessType/LicenseType.d.ts +34 -0
  385. package/build/features/business/screens/BusinessType/LicenseType.js +103 -0
  386. package/build/features/business/screens/BusinessType/SelectType.d.ts +8 -8
  387. package/build/features/business/screens/BusinessType/SelectType.js +106 -106
  388. package/build/features/business/screens/BusinessType/Switch.d.ts +7 -7
  389. package/build/features/business/screens/BusinessType/Switch.js +35 -35
  390. package/build/features/business/screens/BusinessType/index.d.ts +3 -3
  391. package/build/features/business/screens/BusinessType/index.js +2 -2
  392. package/build/features/business/screens/BusinessType/validation.d.ts +33 -11
  393. package/build/features/business/screens/BusinessType/validation.js +89 -32
  394. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -5
  395. package/build/features/business/screens/CivilID/CivilID.js +67 -85
  396. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -7
  397. package/build/features/business/screens/CivilID/IDNumber.js +59 -59
  398. package/build/features/business/screens/CivilID/index.d.ts +3 -3
  399. package/build/features/business/screens/CivilID/index.js +2 -2
  400. package/build/features/business/screens/CivilID/validation.d.ts +8 -8
  401. package/build/features/business/screens/CivilID/validation.js +4 -4
  402. package/build/features/business/screens/Customers/CustomerLocations.d.ts +77 -69
  403. package/build/features/business/screens/Customers/CustomerLocations.js +143 -138
  404. package/build/features/business/screens/Customers/Customers.d.ts +5 -5
  405. package/build/features/business/screens/Customers/Customers.js +90 -84
  406. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +8 -8
  407. package/build/features/business/screens/Customers/ExpectedCustomers.js +107 -98
  408. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +8 -8
  409. package/build/features/business/screens/Customers/ExpectedSalesRange.js +140 -127
  410. package/build/features/business/screens/Customers/RefundPolicy.d.ts +36 -36
  411. package/build/features/business/screens/Customers/RefundPolicy.js +82 -78
  412. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +3 -3
  413. package/build/features/business/screens/Customers/TransactionPolicy.js +42 -38
  414. package/build/features/business/screens/Customers/index.d.ts +3 -3
  415. package/build/features/business/screens/Customers/index.js +2 -2
  416. package/build/features/business/screens/Customers/validation.d.ts +20 -20
  417. package/build/features/business/screens/Customers/validation.js +13 -13
  418. package/build/features/business/screens/IDBOD/DOB.d.ts +6 -6
  419. package/build/features/business/screens/IDBOD/DOB.js +45 -45
  420. package/build/features/business/screens/IDBOD/ID.d.ts +5 -5
  421. package/build/features/business/screens/IDBOD/ID.js +28 -28
  422. package/build/features/business/screens/IDBOD/IDBOD.d.ts +5 -5
  423. package/build/features/business/screens/IDBOD/IDBOD.js +68 -55
  424. package/build/features/business/screens/IDBOD/index.d.ts +3 -3
  425. package/build/features/business/screens/IDBOD/index.js +2 -2
  426. package/build/features/business/screens/IDBOD/validation.d.ts +11 -11
  427. package/build/features/business/screens/IDBOD/validation.js +9 -9
  428. package/build/features/business/screens/OTP/OTP.d.ts +8 -8
  429. package/build/features/business/screens/OTP/OTP.js +90 -77
  430. package/build/features/business/screens/OTP/OTPInput.d.ts +5 -5
  431. package/build/features/business/screens/OTP/OTPInput.js +46 -46
  432. package/build/features/business/screens/OTP/index.d.ts +3 -3
  433. package/build/features/business/screens/OTP/index.js +2 -2
  434. package/build/features/business/screens/OTP/validation.d.ts +8 -8
  435. package/build/features/business/screens/OTP/validation.js +4 -4
  436. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  437. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -9
  438. package/build/features/business/screens/ResetPasswordSuccess/index.d.ts +3 -3
  439. package/build/features/business/screens/ResetPasswordSuccess/index.js +2 -2
  440. package/build/features/business/screens/Success/Success.d.ts +5 -5
  441. package/build/features/business/screens/Success/Success.js +23 -16
  442. package/build/features/business/screens/Success/index.d.ts +3 -3
  443. package/build/features/business/screens/Success/index.js +2 -2
  444. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  445. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  446. package/build/features/business/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  447. package/build/features/business/screens/SuccessWithFlowButtons/index.js +2 -2
  448. package/build/features/business/screens/Verify/OTPInput.d.ts +7 -7
  449. package/build/features/business/screens/Verify/OTPInput.js +49 -47
  450. package/build/features/business/screens/Verify/Verify.d.ts +5 -5
  451. package/build/features/business/screens/Verify/Verify.js +78 -78
  452. package/build/features/business/screens/Verify/index.d.ts +2 -2
  453. package/build/features/business/screens/Verify/index.js +2 -2
  454. package/build/features/business/screens/Verify/validation.d.ts +8 -8
  455. package/build/features/business/screens/Verify/validation.js +4 -4
  456. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -5
  457. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +34 -162
  458. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -3
  459. package/build/features/business/screens/VerifyPACI/index.js +2 -2
  460. package/build/features/connect/Connect.d.ts +8 -8
  461. package/build/features/connect/Connect.js +66 -79
  462. package/build/features/connect/index.d.ts +1 -1
  463. package/build/features/connect/index.js +1 -1
  464. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -5
  465. package/build/features/connect/screens/CivilID/CivilID.js +102 -85
  466. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -7
  467. package/build/features/connect/screens/CivilID/IDNumber.js +59 -59
  468. package/build/features/connect/screens/CivilID/index.d.ts +3 -3
  469. package/build/features/connect/screens/CivilID/index.js +2 -2
  470. package/build/features/connect/screens/CivilID/validation.d.ts +8 -8
  471. package/build/features/connect/screens/CivilID/validation.js +4 -4
  472. package/build/features/connect/screens/Individual/Email.d.ts +8 -8
  473. package/build/features/connect/screens/Individual/Email.js +108 -108
  474. package/build/features/connect/screens/Individual/Individual.d.ts +5 -5
  475. package/build/features/connect/screens/Individual/Individual.js +101 -88
  476. package/build/features/connect/screens/Individual/MobileNumber.d.ts +10 -10
  477. package/build/features/connect/screens/Individual/MobileNumber.js +156 -152
  478. package/build/features/connect/screens/Individual/Name.d.ts +6 -6
  479. package/build/features/connect/screens/Individual/Name.js +48 -48
  480. package/build/features/connect/screens/Individual/index.d.ts +3 -3
  481. package/build/features/connect/screens/Individual/index.js +2 -2
  482. package/build/features/connect/screens/Individual/validation.d.ts +24 -24
  483. package/build/features/connect/screens/Individual/validation.js +35 -41
  484. package/build/features/connect/screens/Merchant/BrandList.d.ts +10 -10
  485. package/build/features/connect/screens/Merchant/BrandList.js +106 -85
  486. package/build/features/connect/screens/Merchant/BrandName.d.ts +8 -8
  487. package/build/features/connect/screens/Merchant/BrandName.js +142 -139
  488. package/build/features/connect/screens/Merchant/Merchant.d.ts +5 -5
  489. package/build/features/connect/screens/Merchant/Merchant.js +103 -133
  490. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -5
  491. package/build/features/connect/screens/Merchant/SalesChannels.js +38 -114
  492. package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
  493. package/build/features/connect/screens/Merchant/Segments.js +79 -0
  494. package/build/features/connect/screens/Merchant/TAC.d.ts +6 -6
  495. package/build/features/connect/screens/Merchant/TAC.js +84 -80
  496. package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
  497. package/build/features/connect/screens/Merchant/TeamSize.js +79 -0
  498. package/build/features/connect/screens/Merchant/index.d.ts +3 -3
  499. package/build/features/connect/screens/Merchant/index.js +2 -2
  500. package/build/features/connect/screens/Merchant/validation.d.ts +41 -142
  501. package/build/features/connect/screens/Merchant/validation.js +135 -197
  502. package/build/features/connect/screens/Mobile/Mobile.d.ts +5 -5
  503. package/build/features/connect/screens/Mobile/Mobile.js +133 -115
  504. package/build/features/connect/screens/Mobile/MobileNumber.d.ts +12 -12
  505. package/build/features/connect/screens/Mobile/MobileNumber.js +154 -154
  506. package/build/features/connect/screens/Mobile/Title.d.ts +8 -8
  507. package/build/features/connect/screens/Mobile/Title.js +29 -29
  508. package/build/features/connect/screens/Mobile/index.d.ts +3 -3
  509. package/build/features/connect/screens/Mobile/index.js +2 -2
  510. package/build/features/connect/screens/Mobile/validation.d.ts +8 -8
  511. package/build/features/connect/screens/Mobile/validation.js +28 -28
  512. package/build/features/connect/screens/NID/DOB.d.ts +6 -6
  513. package/build/features/connect/screens/NID/DOB.js +47 -47
  514. package/build/features/connect/screens/NID/IDNumber.d.ts +6 -6
  515. package/build/features/connect/screens/NID/IDNumber.js +60 -60
  516. package/build/features/connect/screens/NID/NID.d.ts +5 -5
  517. package/build/features/connect/screens/NID/NID.js +94 -90
  518. package/build/features/connect/screens/NID/index.d.ts +3 -3
  519. package/build/features/connect/screens/NID/index.js +2 -2
  520. package/build/features/connect/screens/NID/validation.d.ts +11 -11
  521. package/build/features/connect/screens/NID/validation.js +9 -9
  522. package/build/features/connect/screens/OTP/OTP.d.ts +5 -5
  523. package/build/features/connect/screens/OTP/OTP.js +94 -80
  524. package/build/features/connect/screens/OTP/OTPInput.d.ts +5 -5
  525. package/build/features/connect/screens/OTP/OTPInput.js +54 -53
  526. package/build/features/connect/screens/OTP/index.d.ts +3 -3
  527. package/build/features/connect/screens/OTP/index.js +2 -2
  528. package/build/features/connect/screens/OTP/validation.d.ts +8 -8
  529. package/build/features/connect/screens/OTP/validation.js +4 -4
  530. package/build/features/connect/screens/ThankYou/ThankYou.d.ts +5 -5
  531. package/build/features/connect/screens/ThankYou/ThankYou.js +16 -9
  532. package/build/features/connect/screens/ThankYou/index.d.ts +3 -3
  533. package/build/features/connect/screens/ThankYou/index.js +2 -2
  534. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -5
  535. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +95 -162
  536. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -3
  537. package/build/features/connect/screens/VerifyPACI/index.js +2 -2
  538. package/build/features/connectExpress/ConnectExpress.d.ts +11 -0
  539. package/build/features/connectExpress/ConnectExpress.js +83 -0
  540. package/build/features/connectExpress/index.d.ts +1 -0
  541. package/build/features/connectExpress/index.js +1 -0
  542. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
  543. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
  544. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
  545. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
  546. package/build/features/connectExpress/screens/Brand/Brand.d.ts +5 -0
  547. package/build/features/connectExpress/screens/Brand/Brand.js +71 -0
  548. package/build/features/connectExpress/screens/Brand/index.d.ts +2 -0
  549. package/build/features/connectExpress/screens/Brand/index.js +2 -0
  550. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
  551. package/build/features/connectExpress/screens/CivilID/CivilID.js +84 -0
  552. package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
  553. package/build/features/connectExpress/screens/CivilID/IDNumber.js +55 -0
  554. package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
  555. package/build/features/connectExpress/screens/CivilID/index.js +2 -0
  556. package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
  557. package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
  558. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
  559. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
  560. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
  561. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +55 -0
  562. package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
  563. package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
  564. package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
  565. package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
  566. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +9 -0
  567. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +140 -0
  568. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
  569. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +83 -0
  570. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +9 -0
  571. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +142 -0
  572. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
  573. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
  574. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +35 -0
  575. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +96 -0
  576. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +19 -0
  577. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +82 -0
  578. package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
  579. package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
  580. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
  581. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +155 -0
  582. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
  583. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +94 -0
  584. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +9 -0
  585. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +107 -0
  586. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +11 -0
  587. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +153 -0
  588. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +7 -0
  589. package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerName.js → connectExpress/screens/CollectIndividualInfo/Name.js} +45 -46
  590. package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
  591. package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
  592. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
  593. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
  594. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
  595. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +34 -0
  596. package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
  597. package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
  598. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.d.ts +5 -5
  599. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.js +87 -72
  600. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.d.ts +5 -5
  601. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.js +52 -44
  602. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.d.ts +3 -3
  603. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.js +2 -2
  604. package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.d.ts +8 -8
  605. package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.js +4 -4
  606. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
  607. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
  608. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
  609. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
  610. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
  611. package/build/features/connectExpress/screens/Mobile/Mobile.js +111 -0
  612. package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +13 -0
  613. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +155 -0
  614. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +7 -0
  615. package/build/features/connectExpress/screens/Mobile/TAC.js +85 -0
  616. package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
  617. package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
  618. package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
  619. package/build/features/connectExpress/screens/Mobile/index.js +2 -0
  620. package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
  621. package/build/features/connectExpress/screens/Mobile/validation.js +60 -0
  622. package/build/features/connectExpress/screens/NID/DOB.d.ts +7 -0
  623. package/build/features/connectExpress/screens/NID/DOB.js +47 -0
  624. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +7 -0
  625. package/build/features/connectExpress/screens/NID/IDNumber.js +61 -0
  626. package/build/features/connectExpress/screens/NID/NID.d.ts +5 -0
  627. package/build/features/connectExpress/screens/NID/NID.js +94 -0
  628. package/build/features/connectExpress/screens/NID/TAC.d.ts +19 -0
  629. package/build/features/connectExpress/screens/NID/TAC.js +82 -0
  630. package/build/features/connectExpress/screens/NID/index.d.ts +3 -0
  631. package/build/features/connectExpress/screens/NID/index.js +2 -0
  632. package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
  633. package/build/features/connectExpress/screens/NID/validation.js +22 -0
  634. package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +6 -0
  635. package/build/features/connectExpress/screens/NIDMissed/DOB.js +47 -0
  636. package/build/features/connectExpress/screens/NIDMissed/IDNumber.d.ts +6 -0
  637. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +56 -0
  638. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
  639. package/build/features/connectExpress/screens/NIDMissed/NID.js +59 -0
  640. package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
  641. package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
  642. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
  643. package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
  644. package/build/features/connectExpress/screens/OTP/OTP.d.ts +5 -0
  645. package/build/features/connectExpress/screens/OTP/OTP.js +88 -0
  646. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
  647. package/build/features/connectExpress/screens/OTP/OTPInput.js +55 -0
  648. package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
  649. package/build/features/connectExpress/screens/OTP/index.js +2 -0
  650. package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
  651. package/build/features/connectExpress/screens/OTP/validation.js +4 -0
  652. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  653. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
  654. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  655. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
  656. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  657. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +34 -0
  658. package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
  659. package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
  660. package/build/features/entity/Entity.d.ts +9 -7
  661. package/build/features/entity/Entity.js +71 -70
  662. package/build/features/entity/index.d.ts +1 -1
  663. package/build/features/entity/index.js +1 -1
  664. package/build/features/entity/screens/{EntityInfoConfirm/ActivitiesList.d.ts → EntityCapital/ActivityList.d.ts} +51 -54
  665. package/build/features/entity/screens/EntityCapital/ActivityList.js +272 -0
  666. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +6 -0
  667. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +50 -0
  668. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +6 -0
  669. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +45 -0
  670. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +6 -0
  671. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +50 -0
  672. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
  673. package/build/features/entity/screens/EntityCapital/EntityCapital.js +78 -0
  674. package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
  675. package/build/features/entity/screens/EntityCapital/index.js +2 -0
  676. package/build/features/entity/screens/EntityCapital/validation.d.ts +197 -0
  677. package/build/features/entity/screens/EntityCapital/validation.js +18 -0
  678. package/build/features/entity/screens/EntityName/Article.d.ts +9 -0
  679. package/build/features/entity/screens/EntityName/Article.js +52 -0
  680. package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
  681. package/build/features/entity/screens/EntityName/EntityName.js +115 -0
  682. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +86 -0
  683. package/build/features/entity/screens/EntityName/EntityTypeList.js +146 -0
  684. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +20 -0
  685. package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
  686. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +20 -0
  687. package/build/features/entity/screens/EntityName/IssuingDate.js +45 -0
  688. package/build/features/entity/screens/EntityName/LegalName.d.ts +6 -0
  689. package/build/features/entity/screens/EntityName/LegalName.js +50 -0
  690. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +9 -0
  691. package/build/features/entity/screens/EntityName/LicenseCertificate.js +48 -0
  692. package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +7 -0
  693. package/build/features/entity/screens/EntityName/LicenseNumber.js +54 -0
  694. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +7 -0
  695. package/build/features/entity/screens/EntityName/UnifiedNumber.js +45 -0
  696. package/build/features/entity/screens/EntityName/index.d.ts +2 -0
  697. package/build/features/entity/screens/EntityName/index.js +2 -0
  698. package/build/features/entity/screens/EntityName/validation.d.ts +60 -0
  699. package/build/features/entity/screens/EntityName/validation.js +91 -0
  700. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  701. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  702. package/build/features/entity/screens/PrepareDataLoading/index.d.ts +2 -0
  703. package/build/features/entity/screens/PrepareDataLoading/index.js +2 -0
  704. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  705. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -9
  706. package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -3
  707. package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -2
  708. package/build/features/entity/screens/Success/Success.d.ts +5 -5
  709. package/build/features/entity/screens/Success/Success.js +20 -16
  710. package/build/features/entity/screens/Success/index.d.ts +3 -3
  711. package/build/features/entity/screens/Success/index.js +2 -2
  712. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  713. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  714. package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  715. package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -2
  716. package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -7
  717. package/build/features/entity/screens/Verify/OTPInput.js +49 -47
  718. package/build/features/entity/screens/Verify/Verify.d.ts +5 -5
  719. package/build/features/entity/screens/Verify/Verify.js +78 -78
  720. package/build/features/entity/screens/Verify/index.d.ts +2 -2
  721. package/build/features/entity/screens/Verify/index.js +2 -2
  722. package/build/features/entity/screens/Verify/validation.d.ts +8 -8
  723. package/build/features/entity/screens/Verify/validation.js +4 -4
  724. package/build/features/featuresScreens.d.ts +11 -11
  725. package/build/features/featuresScreens.js +383 -241
  726. package/build/features/individual/Individual.d.ts +9 -7
  727. package/build/features/individual/Individual.js +71 -70
  728. package/build/features/individual/index.d.ts +1 -1
  729. package/build/features/individual/index.js +1 -1
  730. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +21 -8
  731. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +139 -101
  732. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +9 -0
  733. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +48 -0
  734. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +7 -6
  735. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +56 -45
  736. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +11 -10
  737. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +100 -100
  738. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +11 -10
  739. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +92 -97
  740. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +35 -6
  741. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +75 -45
  742. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +7 -0
  743. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +41 -0
  744. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +7 -0
  745. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +46 -0
  746. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +9 -0
  747. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +48 -0
  748. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +11 -10
  749. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +91 -89
  750. package/build/features/individual/screens/AdditionalIndividualInfo/index.d.ts +3 -3
  751. package/build/features/individual/screens/AdditionalIndividualInfo/index.js +2 -2
  752. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +33 -25
  753. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +15 -24
  754. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +12 -0
  755. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +32 -0
  756. package/build/features/individual/screens/IndividualList/Email.d.ts +10 -0
  757. package/build/features/individual/screens/IndividualList/Email.js +113 -0
  758. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
  759. package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
  760. package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
  761. package/build/features/individual/screens/IndividualList/MobileNumber.js +142 -0
  762. package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
  763. package/build/features/individual/screens/IndividualList/UserList.js +203 -0
  764. package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
  765. package/build/features/individual/screens/IndividualList/index.js +2 -0
  766. package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
  767. package/build/features/individual/screens/IndividualList/validation.js +40 -0
  768. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +9 -0
  769. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +119 -0
  770. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +11 -0
  771. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/BirthCountry.js} +92 -92
  772. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +8 -0
  773. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
  774. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +7 -0
  775. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +47 -0
  776. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +8 -0
  777. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +48 -0
  778. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +35 -0
  779. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +83 -0
  780. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +7 -0
  781. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +42 -0
  782. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
  783. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +164 -0
  784. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +11 -0
  785. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +93 -0
  786. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +11 -0
  787. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +145 -0
  788. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +7 -0
  789. package/build/features/individual/screens/IndividualPersonalInfo/Name.js +51 -0
  790. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.d.ts → IndividualPersonalInfo/Nationality.d.ts} +11 -10
  791. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +93 -0
  792. package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
  793. package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
  794. package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
  795. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
  796. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +13 -0
  797. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +146 -0
  798. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +5 -0
  799. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +63 -0
  800. package/build/features/individual/screens/IndividualPhoneInfo/index.d.ts +3 -0
  801. package/build/features/individual/screens/IndividualPhoneInfo/index.js +2 -0
  802. package/build/features/individual/screens/IndividualPhoneInfo/validation.d.ts +8 -0
  803. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +31 -0
  804. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  805. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  806. package/build/features/individual/screens/PrepareDataLoading/index.d.ts +2 -0
  807. package/build/features/individual/screens/PrepareDataLoading/index.js +2 -0
  808. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  809. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -9
  810. package/build/features/individual/screens/ResetPasswordSuccess/index.d.ts +3 -3
  811. package/build/features/individual/screens/ResetPasswordSuccess/index.js +2 -2
  812. package/build/features/individual/screens/Success/Success.d.ts +5 -5
  813. package/build/features/individual/screens/Success/Success.js +20 -16
  814. package/build/features/individual/screens/Success/index.d.ts +3 -3
  815. package/build/features/individual/screens/Success/index.js +2 -2
  816. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  817. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  818. package/build/features/individual/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  819. package/build/features/individual/screens/SuccessWithFlowButtons/index.js +2 -2
  820. package/build/features/individual/screens/Verify/OTPInput.d.ts +7 -7
  821. package/build/features/individual/screens/Verify/OTPInput.js +49 -47
  822. package/build/features/individual/screens/Verify/Verify.d.ts +5 -5
  823. package/build/features/individual/screens/Verify/Verify.js +80 -78
  824. package/build/features/individual/screens/Verify/index.d.ts +2 -2
  825. package/build/features/individual/screens/Verify/index.js +2 -2
  826. package/build/features/individual/screens/Verify/validation.d.ts +8 -8
  827. package/build/features/individual/screens/Verify/validation.js +4 -4
  828. package/build/features/password/Password.d.ts +9 -7
  829. package/build/features/password/Password.js +71 -77
  830. package/build/features/password/index.d.ts +1 -1
  831. package/build/features/password/index.js +1 -1
  832. package/build/features/password/screens/CreatePassword/ConditionText.d.ts +7 -7
  833. package/build/features/password/screens/CreatePassword/ConditionText.js +23 -23
  834. package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +8 -8
  835. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +22 -22
  836. package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +5 -5
  837. package/build/features/password/screens/CreatePassword/CreatePassword.js +66 -60
  838. package/build/features/password/screens/CreatePassword/Password.d.ts +5 -5
  839. package/build/features/password/screens/CreatePassword/Password.js +76 -76
  840. package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +7 -7
  841. package/build/features/password/screens/CreatePassword/PasswordBar.js +29 -29
  842. package/build/features/password/screens/CreatePassword/index.d.ts +3 -3
  843. package/build/features/password/screens/CreatePassword/index.js +2 -2
  844. package/build/features/password/screens/CreatePassword/validation.d.ts +11 -11
  845. package/build/features/password/screens/CreatePassword/validation.js +8 -8
  846. package/build/features/password/screens/OTP/OTP.d.ts +8 -8
  847. package/build/features/password/screens/OTP/OTP.js +91 -78
  848. package/build/features/password/screens/OTP/OTPInput.d.ts +5 -5
  849. package/build/features/password/screens/OTP/OTPInput.js +46 -46
  850. package/build/features/password/screens/OTP/index.d.ts +3 -3
  851. package/build/features/password/screens/OTP/index.js +2 -2
  852. package/build/features/password/screens/OTP/validation.d.ts +8 -8
  853. package/build/features/password/screens/OTP/validation.js +4 -4
  854. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  855. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -9
  856. package/build/features/password/screens/ResetPasswordSuccess/index.d.ts +3 -3
  857. package/build/features/password/screens/ResetPasswordSuccess/index.js +2 -2
  858. package/build/features/password/screens/Success/Success.d.ts +5 -5
  859. package/build/features/password/screens/Success/Success.js +26 -22
  860. package/build/features/password/screens/Success/index.d.ts +3 -3
  861. package/build/features/password/screens/Success/index.js +2 -2
  862. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  863. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -110
  864. package/build/features/password/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  865. package/build/features/password/screens/SuccessWithFlowButtons/index.js +2 -2
  866. package/build/features/password/screens/Verify/OTPInput.d.ts +7 -7
  867. package/build/features/password/screens/Verify/OTPInput.js +49 -47
  868. package/build/features/password/screens/Verify/Verify.d.ts +5 -5
  869. package/build/features/password/screens/Verify/Verify.js +78 -78
  870. package/build/features/password/screens/Verify/index.d.ts +2 -2
  871. package/build/features/password/screens/Verify/index.js +2 -2
  872. package/build/features/password/screens/Verify/validation.d.ts +8 -8
  873. package/build/features/password/screens/Verify/validation.js +4 -4
  874. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.d.ts +7 -7
  875. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +65 -65
  876. package/build/features/shared/AcceptancePayouts/index.d.ts +2 -2
  877. package/build/features/shared/AcceptancePayouts/index.js +2 -2
  878. package/build/features/shared/Address/Address.d.ts +16 -0
  879. package/build/features/shared/Address/Address.js +73 -0
  880. package/build/features/shared/Address/CountryList.d.ts +72 -0
  881. package/build/features/shared/Address/CountryList.js +89 -0
  882. package/build/features/shared/Address/InputSelect.d.ts +71 -0
  883. package/build/features/shared/Address/InputSelect.js +172 -0
  884. package/build/features/shared/Address/InputText.d.ts +12 -0
  885. package/build/features/shared/Address/InputText.js +12 -0
  886. package/build/features/shared/Address/index.d.ts +2 -0
  887. package/build/features/shared/Address/index.js +2 -0
  888. package/build/features/shared/Background/Background.d.ts +12 -12
  889. package/build/features/shared/Background/Background.js +37 -41
  890. package/build/features/shared/Background/LogoBackground.d.ts +3 -3
  891. package/build/features/shared/Background/LogoBackground.js +42 -42
  892. package/build/features/shared/Background/index.d.ts +2 -2
  893. package/build/features/shared/Background/index.js +2 -2
  894. package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.d.ts +3 -3
  895. package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.js +31 -31
  896. package/build/features/shared/BouncingDotsLoader/index.d.ts +2 -2
  897. package/build/features/shared/BouncingDotsLoader/index.js +2 -2
  898. package/build/features/shared/Button/AbsherButton.d.ts +8 -8
  899. package/build/features/shared/Button/AbsherButton.js +46 -46
  900. package/build/features/shared/Button/Button.d.ts +12 -12
  901. package/build/features/shared/Button/Button.js +111 -101
  902. package/build/features/shared/Button/EmailProvidersButtons.d.ts +14 -13
  903. package/build/features/shared/Button/EmailProvidersButtons.js +67 -62
  904. package/build/features/shared/Button/FlowsButtons.d.ts +27 -24
  905. package/build/features/shared/Button/FlowsButtons.js +227 -194
  906. package/build/features/shared/Button/IndividualActionButtons.d.ts +19 -0
  907. package/build/features/shared/Button/IndividualActionButtons.js +132 -0
  908. package/build/features/shared/Button/MobileButton.d.ts +9 -8
  909. package/build/features/shared/Button/MobileButton.js +44 -44
  910. package/build/features/shared/Button/SuccessButton.d.ts +9 -9
  911. package/build/features/shared/Button/SuccessButton.js +86 -86
  912. package/build/features/shared/Button/index.d.ts +9 -8
  913. package/build/features/shared/Button/index.js +9 -8
  914. package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -2
  915. package/build/features/shared/CheckIcon/CheckIcon.js +14 -14
  916. package/build/features/shared/CheckIcon/index.d.ts +2 -2
  917. package/build/features/shared/CheckIcon/index.js +2 -2
  918. package/build/features/shared/ClearIcon/ClearIcon.d.ts +6 -6
  919. package/build/features/shared/ClearIcon/ClearIcon.js +26 -26
  920. package/build/features/shared/ClearIcon/index.d.ts +2 -2
  921. package/build/features/shared/ClearIcon/index.js +2 -2
  922. package/build/features/shared/Containers/FeatureContainer.d.ts +7 -4
  923. package/build/features/shared/Containers/FeatureContainer.js +37 -36
  924. package/build/features/shared/Containers/ScreenContainer.d.ts +4 -4
  925. package/build/features/shared/Containers/ScreenContainer.js +29 -29
  926. package/build/features/shared/Containers/index.d.ts +3 -3
  927. package/build/features/shared/Containers/index.js +3 -3
  928. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +7 -0
  929. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
  930. package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
  931. package/build/features/shared/CreateAccountLoading/index.js +2 -0
  932. package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
  933. package/build/features/shared/DataLoading/DataLoading.js +58 -0
  934. package/build/features/shared/DataLoading/index.d.ts +2 -0
  935. package/build/features/shared/DataLoading/index.js +2 -0
  936. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -11
  937. package/build/features/shared/Dialog/CloseDialog.js +71 -62
  938. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -8
  939. package/build/features/shared/Dialog/DialogContainer.js +56 -56
  940. package/build/features/shared/Dialog/index.d.ts +4 -4
  941. package/build/features/shared/Dialog/index.js +4 -4
  942. package/build/features/shared/Footer/Footer.d.ts +2 -2
  943. package/build/features/shared/Footer/Footer.js +20 -20
  944. package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
  945. package/build/features/shared/Footer/PoweredByFooter.js +36 -0
  946. package/build/features/shared/Footer/index.d.ts +3 -2
  947. package/build/features/shared/Footer/index.js +3 -2
  948. package/build/features/shared/GenericError/GenericError.d.ts +7 -0
  949. package/build/features/shared/GenericError/GenericError.js +55 -0
  950. package/build/features/shared/GenericError/index.d.ts +2 -0
  951. package/build/features/shared/GenericError/index.js +2 -0
  952. package/build/features/shared/Input/Input.d.ts +28 -26
  953. package/build/features/shared/Input/Input.js +55 -56
  954. package/build/features/shared/Input/index.d.ts +2 -2
  955. package/build/features/shared/Input/index.js +2 -2
  956. package/build/features/shared/Mandatory/Mandatory.d.ts +2 -2
  957. package/build/features/shared/Mandatory/Mandatory.js +20 -20
  958. package/build/features/shared/Mandatory/index.d.ts +2 -2
  959. package/build/features/shared/Mandatory/index.js +2 -2
  960. package/build/features/shared/OTP/OTP.d.ts +11 -10
  961. package/build/features/shared/OTP/OTP.js +93 -93
  962. package/build/features/shared/OTP/index.d.ts +2 -2
  963. package/build/features/shared/OTP/index.js +2 -2
  964. package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
  965. package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
  966. package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACILoading.d.ts +7 -5
  967. package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
  968. package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.d.ts +5 -5
  969. package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.js +8 -8
  970. package/build/features/shared/PaciVerification/index.d.ts +2 -0
  971. package/build/features/shared/PaciVerification/index.js +2 -0
  972. package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +8 -8
  973. package/build/features/shared/PasswordIcon/PasswordIcon.js +37 -37
  974. package/build/features/shared/PasswordIcon/index.d.ts +2 -2
  975. package/build/features/shared/PasswordIcon/index.js +2 -2
  976. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +12 -0
  977. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +101 -0
  978. package/build/features/shared/SalesChannels/SalesChannel.d.ts +13 -0
  979. package/build/features/shared/SalesChannels/SalesChannel.js +150 -0
  980. package/build/features/shared/SalesChannels/index.d.ts +2 -0
  981. package/build/features/shared/SalesChannels/index.js +2 -0
  982. package/build/features/shared/Search/Search.d.ts +8 -7
  983. package/build/features/shared/Search/Search.js +13 -13
  984. package/build/features/shared/Search/index.d.ts +2 -2
  985. package/build/features/shared/Search/index.js +2 -2
  986. package/build/features/shared/SearchIcon/SearchIcon.d.ts +6 -6
  987. package/build/features/shared/SearchIcon/SearchIcon.js +26 -26
  988. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +17 -0
  989. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +125 -0
  990. package/build/features/shared/SuccessFlowButtons/index.d.ts +2 -0
  991. package/build/features/shared/SuccessFlowButtons/index.js +2 -0
  992. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +14 -12
  993. package/build/features/shared/SuccessScreen/SuccessScreen.js +63 -61
  994. package/build/features/shared/SuccessScreen/index.d.ts +2 -2
  995. package/build/features/shared/SuccessScreen/index.js +2 -2
  996. package/build/features/shared/UploadFile/FileUpload.d.ts +31 -0
  997. package/build/features/shared/UploadFile/FileUpload.js +267 -0
  998. package/build/features/shared/UploadFile/UploadFile.d.ts +29 -26
  999. package/build/features/shared/UploadFile/UploadFile.js +91 -91
  1000. package/build/features/shared/UploadFile/UploadWrapper.d.ts +35 -0
  1001. package/build/features/shared/UploadFile/UploadWrapper.js +115 -0
  1002. package/build/features/shared/UploadFile/index.d.ts +3 -2
  1003. package/build/features/shared/UploadFile/index.js +3 -2
  1004. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +28 -0
  1005. package/build/features/shared/UploadMultipleFile/UploadFile.js +273 -0
  1006. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +35 -0
  1007. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +178 -0
  1008. package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
  1009. package/build/features/shared/UploadMultipleFile/index.js +2 -0
  1010. package/build/features/signIn/SignIn.d.ts +8 -7
  1011. package/build/features/signIn/SignIn.js +50 -57
  1012. package/build/features/signIn/index.d.ts +1 -1
  1013. package/build/features/signIn/index.js +1 -1
  1014. package/build/features/signIn/screens/Email/Email.d.ts +5 -5
  1015. package/build/features/signIn/screens/Email/Email.js +97 -95
  1016. package/build/features/signIn/screens/Email/EmailField.d.ts +5 -5
  1017. package/build/features/signIn/screens/Email/EmailField.js +55 -55
  1018. package/build/features/signIn/screens/Email/index.d.ts +3 -3
  1019. package/build/features/signIn/screens/Email/index.js +2 -2
  1020. package/build/features/signIn/screens/Email/validation.d.ts +8 -8
  1021. package/build/features/signIn/screens/Email/validation.js +5 -5
  1022. package/build/features/signIn/screens/Mobile/Mobile.d.ts +5 -5
  1023. package/build/features/signIn/screens/Mobile/Mobile.js +110 -106
  1024. package/build/features/signIn/screens/Mobile/MobileNumber.d.ts +11 -11
  1025. package/build/features/signIn/screens/Mobile/MobileNumber.js +151 -151
  1026. package/build/features/signIn/screens/Mobile/index.d.ts +3 -3
  1027. package/build/features/signIn/screens/Mobile/index.js +2 -2
  1028. package/build/features/signIn/screens/Mobile/validation.d.ts +8 -8
  1029. package/build/features/signIn/screens/Mobile/validation.js +28 -28
  1030. package/build/features/signIn/screens/OTP/OTP.d.ts +5 -5
  1031. package/build/features/signIn/screens/OTP/OTP.js +93 -80
  1032. package/build/features/signIn/screens/OTP/OTPInput.d.ts +5 -5
  1033. package/build/features/signIn/screens/OTP/OTPInput.js +53 -53
  1034. package/build/features/signIn/screens/OTP/index.d.ts +3 -3
  1035. package/build/features/signIn/screens/OTP/index.js +2 -2
  1036. package/build/features/signIn/screens/OTP/validation.d.ts +8 -8
  1037. package/build/features/signIn/screens/OTP/validation.js +4 -4
  1038. package/build/features/signIn/screens/Password/Password.d.ts +5 -5
  1039. package/build/features/signIn/screens/Password/Password.js +67 -54
  1040. package/build/features/signIn/screens/Password/PasswordInput.d.ts +5 -5
  1041. package/build/features/signIn/screens/Password/PasswordInput.js +28 -28
  1042. package/build/features/signIn/screens/Password/index.d.ts +3 -3
  1043. package/build/features/signIn/screens/Password/index.js +2 -2
  1044. package/build/features/signIn/screens/Password/validation.d.ts +8 -8
  1045. package/build/features/signIn/screens/Password/validation.js +4 -4
  1046. package/build/features/tax/Tax.d.ts +9 -7
  1047. package/build/features/tax/Tax.js +71 -71
  1048. package/build/features/tax/index.d.ts +1 -1
  1049. package/build/features/tax/index.js +1 -1
  1050. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  1051. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  1052. package/build/features/tax/screens/PrepareDataLoading/index.d.ts +2 -0
  1053. package/build/features/tax/screens/PrepareDataLoading/index.js +2 -0
  1054. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  1055. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -9
  1056. package/build/features/tax/screens/ResetPasswordSuccess/index.d.ts +3 -3
  1057. package/build/features/tax/screens/ResetPasswordSuccess/index.js +2 -2
  1058. package/build/features/tax/screens/Success/Success.d.ts +5 -5
  1059. package/build/features/tax/screens/Success/Success.js +22 -16
  1060. package/build/features/tax/screens/Success/index.d.ts +3 -3
  1061. package/build/features/tax/screens/Success/index.js +2 -2
  1062. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  1063. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  1064. package/build/features/tax/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  1065. package/build/features/tax/screens/SuccessWithFlowButtons/index.js +2 -2
  1066. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +6 -3
  1067. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -66
  1068. package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +5 -5
  1069. package/build/features/tax/screens/TaxDetails/TaxDetails.js +72 -50
  1070. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +9 -0
  1071. package/build/features/tax/screens/TaxDetails/TaxDocument.js +44 -0
  1072. package/build/features/tax/screens/TaxDetails/VATId.d.ts +6 -3
  1073. package/build/features/tax/screens/TaxDetails/VATId.js +44 -37
  1074. package/build/features/tax/screens/TaxDetails/index.d.ts +3 -3
  1075. package/build/features/tax/screens/TaxDetails/index.js +2 -2
  1076. package/build/features/tax/screens/TaxDetails/validation.d.ts +14 -11
  1077. package/build/features/tax/screens/TaxDetails/validation.js +8 -5
  1078. package/build/features/tax/screens/Verify/OTPInput.d.ts +7 -7
  1079. package/build/features/tax/screens/Verify/OTPInput.js +49 -47
  1080. package/build/features/tax/screens/Verify/Verify.d.ts +5 -5
  1081. package/build/features/tax/screens/Verify/Verify.js +75 -78
  1082. package/build/features/tax/screens/Verify/index.d.ts +2 -2
  1083. package/build/features/tax/screens/Verify/index.js +2 -2
  1084. package/build/features/tax/screens/Verify/validation.d.ts +8 -8
  1085. package/build/features/tax/screens/Verify/validation.js +4 -4
  1086. package/build/hooks/index.d.ts +21 -13
  1087. package/build/hooks/index.js +21 -13
  1088. package/build/hooks/useAppConfig.d.ts +10 -6
  1089. package/build/hooks/useAppConfig.js +68 -61
  1090. package/build/hooks/useAppDispatch.d.ts +13 -13
  1091. package/build/hooks/useAppDispatch.js +2 -2
  1092. package/build/hooks/useAppSelector.d.ts +3 -3
  1093. package/build/hooks/useAppSelector.js +2 -2
  1094. package/build/hooks/useAppTheme.d.ts +4 -4
  1095. package/build/hooks/useAppTheme.js +15 -15
  1096. package/build/hooks/useContainerDimensions.d.ts +4 -4
  1097. package/build/hooks/useContainerDimensions.js +21 -21
  1098. package/build/hooks/useCountUp.d.ts +9 -0
  1099. package/build/hooks/useCountUp.js +17 -0
  1100. package/build/hooks/useCountry.d.ts +4 -0
  1101. package/build/hooks/useCountry.js +7 -0
  1102. package/build/hooks/useDataNoneEditable.d.ts +2 -0
  1103. package/build/hooks/useDataNoneEditable.js +19 -0
  1104. package/build/hooks/useErrorListener.d.ts +1 -1
  1105. package/build/hooks/useErrorListener.js +12 -18
  1106. package/build/hooks/useEventListener.d.ts +5 -5
  1107. package/build/hooks/useEventListener.js +20 -20
  1108. package/build/hooks/useExcludeReadOnlyFelids.d.ts +11 -0
  1109. package/build/hooks/useExcludeReadOnlyFelids.js +33 -0
  1110. package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
  1111. package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
  1112. package/build/hooks/useFormReadOnly.d.ts +6 -0
  1113. package/build/hooks/useFormReadOnly.js +40 -0
  1114. package/build/hooks/useLanguage.d.ts +4 -4
  1115. package/build/hooks/useLanguage.js +8 -8
  1116. package/build/hooks/useRedirectionListener.d.ts +4 -4
  1117. package/build/hooks/useRedirectionListener.js +12 -12
  1118. package/build/hooks/useScreen.d.ts +3 -3
  1119. package/build/hooks/useScreen.js +14 -14
  1120. package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
  1121. package/build/hooks/useSetFromDefaultValues.js +26 -0
  1122. package/build/hooks/useStepStartedListener.d.ts +1 -1
  1123. package/build/hooks/useStepStartedListener.js +10 -10
  1124. package/build/hooks/useThemeMode.d.ts +4 -4
  1125. package/build/hooks/useThemeMode.js +7 -7
  1126. package/build/hooks/useVerifyToken.d.ts +15 -0
  1127. package/build/hooks/useVerifyToken.js +25 -0
  1128. package/build/hooks/useWindowSize.d.ts +6 -6
  1129. package/build/hooks/useWindowSize.js +19 -19
  1130. package/build/i18n.d.ts +2 -2
  1131. package/build/i18n.js +34 -34
  1132. package/build/index.d.ts +14 -14
  1133. package/build/index.js +26 -36
  1134. package/build/theme/components.d.ts +2 -2
  1135. package/build/theme/components.js +19 -19
  1136. package/build/theme/index.d.ts +1 -1
  1137. package/build/theme/index.js +1 -1
  1138. package/build/theme/palette.d.ts +3 -3
  1139. package/build/theme/palette.js +68 -68
  1140. package/build/theme/shadows.d.ts +2 -2
  1141. package/build/theme/shadows.js +27 -27
  1142. package/build/theme/theme.d.ts +2 -2
  1143. package/build/theme/theme.js +43 -43
  1144. package/build/theme/typography.d.ts +2 -2
  1145. package/build/theme/typography.js +31 -31
  1146. package/build/utils/array.d.ts +68 -13
  1147. package/build/utils/array.js +253 -65
  1148. package/build/utils/common.d.ts +2 -1
  1149. package/build/utils/common.js +10 -3
  1150. package/build/utils/date.d.ts +2 -0
  1151. package/build/utils/date.js +11 -0
  1152. package/build/utils/device.d.ts +5 -5
  1153. package/build/utils/device.js +26 -26
  1154. package/build/utils/error.d.ts +2 -0
  1155. package/build/utils/error.js +6 -0
  1156. package/build/utils/html.d.ts +4 -5
  1157. package/build/utils/html.js +27 -32
  1158. package/build/utils/index.d.ts +12 -10
  1159. package/build/utils/index.js +12 -10
  1160. package/build/utils/locale.d.ts +2 -2
  1161. package/build/utils/locale.js +22 -22
  1162. package/build/utils/object.d.ts +9 -4
  1163. package/build/utils/object.js +52 -23
  1164. package/build/utils/rsa.d.ts +2 -2
  1165. package/build/utils/rsa.js +19 -19
  1166. package/build/utils/storage.d.ts +5 -5
  1167. package/build/utils/storage.js +21 -21
  1168. package/build/utils/string.d.ts +73 -45
  1169. package/build/utils/string.js +310 -178
  1170. package/build/utils/style.d.ts +1 -1
  1171. package/build/utils/style.js +1 -1
  1172. package/build/utils/validation.d.ts +18 -15
  1173. package/build/utils/validation.js +54 -45
  1174. package/package.json +129 -129
  1175. package/build/api/ip.d.ts +0 -4
  1176. package/build/api/ip.js +0 -12
  1177. package/build/features/app/auth/authStore.d.ts +0 -35
  1178. package/build/features/app/auth/authStore.js +0 -148
  1179. package/build/features/app/otp/otpStore.d.ts +0 -28
  1180. package/build/features/app/otp/otpStore.js +0 -153
  1181. package/build/features/auth/Auth.d.ts +0 -10
  1182. package/build/features/auth/Auth.js +0 -87
  1183. package/build/features/auth/index.d.ts +0 -1
  1184. package/build/features/auth/index.js +0 -1
  1185. package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
  1186. package/build/features/business/screens/Activities/SalesChannels.js +0 -112
  1187. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -5
  1188. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +0 -22
  1189. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
  1190. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -9
  1191. package/build/features/connect/screens/Merchant/SocialMedia.js +0 -162
  1192. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -22
  1193. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
  1194. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +0 -139
  1195. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
  1196. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -56
  1197. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
  1198. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -17
  1199. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
  1200. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -28
  1201. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
  1202. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -38
  1203. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
  1204. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
  1205. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
  1206. package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
  1207. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -107
  1208. package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -17
  1209. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
  1210. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
  1211. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
  1212. package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
  1213. package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
  1214. package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
  1215. package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
  1216. package/build/features/otp/OTP.d.ts +0 -7
  1217. package/build/features/otp/OTP.js +0 -58
  1218. package/build/features/otp/index.d.ts +0 -0
  1219. package/build/features/otp/index.js +0 -1
  1220. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  1221. package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
@@ -1,1106 +1,1129 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (_) try {
28
- 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;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
49
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
50
- if (ar || !(i in from)) {
51
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52
- ar[i] = from[i];
53
- }
54
- }
55
- return to.concat(ar || Array.prototype.slice.call(from));
56
- };
57
- var _a;
58
- import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
- import moment from 'moment';
60
- import API from '../../../api';
61
- import { BusinessType, FlowsTypes } from '../../../@types';
62
- import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
63
- import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep } from '../../../utils';
64
- import { handleNextScreenStep } from '../../../app/settings';
65
- export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
- var payload, data, leadResponse, brandInfo, boardResponse, board_id, board_info_id, steps, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
67
- var _a, _b, _c, _d, _e, _f;
68
- return __generator(this, function (_g) {
69
- switch (_g.label) {
70
- case 0:
71
- payload = {
72
- service_name: 'tap_email',
73
- verify_token: token
74
- };
75
- return [4, API.leadService.verifyLeadToken(payload)];
76
- case 1:
77
- data = (_g.sent()).data;
78
- leadResponse = undefined;
79
- brandInfo = undefined;
80
- boardResponse = undefined;
81
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 17];
82
- return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
83
- case 2:
84
- leadResponse = _g.sent();
85
- board_id = (_a = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _a === void 0 ? void 0 : _a.board_id;
86
- board_info_id = (_b = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _b === void 0 ? void 0 : _b.board_info_id;
87
- if (!(!!board_id && !!board_info_id)) return [3, 4];
88
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
89
- case 3:
90
- boardResponse = _g.sent();
91
- _g.label = 4;
92
- case 4:
93
- if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH) {
94
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
95
- }
96
- if (!(data.step_name === 'business_info')) return [3, 17];
97
- steps = (_c = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _c === void 0 ? void 0 : _c.steps;
98
- brandID = (_e = (_d = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _d === void 0 ? void 0 : _d.brand) === null || _e === void 0 ? void 0 : _e.id;
99
- hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
100
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
101
- hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
102
- hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
103
- if (!hasBusinessCompleted) return [3, 6];
104
- return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
105
- case 5:
106
- _g.sent();
107
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
108
- return [3, 17];
109
- case 6:
110
- if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 7];
111
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
112
- return [3, 17];
113
- case 7:
114
- if (!hasBusinessCustomersCompleted) return [3, 8];
115
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
116
- return [3, 17];
117
- case 8:
118
- if (!hasBusinessCRActivitiesCompleted) return [3, 12];
119
- return [4, thunkApi.dispatch(retrieveChannels())];
120
- case 9:
121
- _g.sent();
122
- return [4, thunkApi.dispatch(retrieveDataList())];
123
- case 10:
124
- _g.sent();
125
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
126
- return [4, API.brandService.retrieveBrand(brandID)];
127
- case 11:
128
- brandInfo = _g.sent();
129
- return [3, 17];
130
- case 12:
131
- if (!hasBusinessCRInfoCompleted) return [3, 15];
132
- return [4, thunkApi.dispatch(retrieveChannels())];
133
- case 13:
134
- _g.sent();
135
- return [4, API.brandService.retrieveBrand(brandID)];
136
- case 14:
137
- brandInfo = _g.sent();
138
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
139
- return [3, 17];
140
- case 15: return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
141
- case 16:
142
- _g.sent();
143
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
144
- _g.label = 17;
145
- case 17: return [2, {
146
- data: data,
147
- leadData: __assign(__assign({}, leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
148
- token: token,
149
- brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand,
150
- boardId: (_f = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _f === void 0 ? void 0 : _f.board_id
151
- }];
152
- }
153
- });
154
- }); });
155
- export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
156
- var business, payload, data;
157
- return __generator(this, function (_a) {
158
- switch (_a.label) {
159
- case 0:
160
- business = thunkApi.getState().business;
161
- payload = {
162
- service_name: 'tap_email',
163
- verify_token: business.data.verify.token
164
- };
165
- return [4, API.leadService.verifyLeadToken(payload)];
166
- case 1:
167
- data = (_a.sent()).data;
168
- return [2, { data: data }];
169
- }
170
- });
171
- }); });
172
- export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
173
- var _a, business, settings, isNID, responseBody, verifyResponse, stepName, brandID, payload, data, brandInfo, steps, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
174
- var _b, _c, _d, _e, _f, _g, _h, _j;
175
- return __generator(this, function (_k) {
176
- switch (_k.label) {
177
- case 0:
178
- _a = thunkApi.getState(), business = _a.business, settings = _a.settings;
179
- isNID = business.data.otpData.isNID;
180
- responseBody = (isNID ? business.data.nidData : business.data.verify).responseBody;
181
- verifyResponse = business.data.verify.responseBody;
182
- stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
183
- brandID = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
184
- payload = {
185
- data: params.otp,
186
- service_name: ((_e = (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _d === void 0 ? void 0 : _d.verification_by) === null || _e === void 0 ? void 0 : _e.service_name) || ((_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _f === void 0 ? void 0 : _f.service_name),
187
- verify_token: ((_g = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _g === void 0 ? void 0 : _g.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
188
- step_name: stepName,
189
- encryption_contract: ['data']
190
- };
191
- return [4, API.leadService.verifyLeadOTP(payload)];
192
- case 1:
193
- data = (_k.sent()).data;
194
- brandInfo = undefined;
195
- if (!!data.errors) return [3, 14];
196
- thunkApi.dispatch(updateStepName(stepName));
197
- return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
198
- case 2:
199
- _k.sent();
200
- (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, { otp: params.otp });
201
- steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
202
- hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
203
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
204
- hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
205
- hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
206
- if (!isNID) return [3, 3];
207
- thunkApi.dispatch(handleNextScreenStep());
208
- return [3, 14];
209
- case 3:
210
- if (!hasBusinessCompleted) return [3, 5];
211
- return [4, thunkApi.dispatch(retrieveBoardDetails(verifyResponse === null || verifyResponse === void 0 ? void 0 : verifyResponse.board_id))];
212
- case 4:
213
- _k.sent();
214
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
215
- return [3, 14];
216
- case 5:
217
- if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 6];
218
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
219
- return [3, 14];
220
- case 6:
221
- if (!hasBusinessCustomersCompleted) return [3, 7];
222
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
223
- return [3, 14];
224
- case 7:
225
- if (!hasBusinessCRActivitiesCompleted) return [3, 10];
226
- thunkApi.dispatch(retrieveChannels());
227
- return [4, thunkApi.dispatch(retrieveDataList())];
228
- case 8:
229
- _k.sent();
230
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
231
- return [4, API.brandService.retrieveBrand(brandID)];
232
- case 9:
233
- brandInfo = _k.sent();
234
- return [3, 14];
235
- case 10:
236
- if (!hasBusinessCRInfoCompleted) return [3, 13];
237
- return [4, thunkApi.dispatch(retrieveChannels())];
238
- case 11:
239
- _k.sent();
240
- return [4, API.brandService.retrieveBrand(brandID)];
241
- case 12:
242
- brandInfo = _k.sent();
243
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
244
- return [3, 14];
245
- case 13:
246
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
247
- _k.label = 14;
248
- case 14: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand }];
249
- }
250
- });
251
- }); });
252
- export var verifyPACI = createAsyncThunk('verifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
253
- var _a, settings, connect, responseBody, expiry, interval, maxCalls, response, count, data, isSuccess;
254
- var _b, _c;
255
- return __generator(this, function (_d) {
256
- switch (_d.label) {
257
- case 0:
258
- _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
259
- responseBody = connect.data.civilIdData.responseBody;
260
- expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
261
- interval = 5;
262
- maxCalls = Math.floor(expiry / interval);
263
- response = null;
264
- if (thunkApi.signal.aborted) {
265
- return [2, { response: null }];
266
- }
267
- count = 1;
268
- _d.label = 1;
269
- case 1:
270
- if (!(count <= maxCalls)) return [3, 7];
271
- return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token)];
272
- case 2:
273
- data = _d.sent();
274
- response = data;
275
- if (count === 1) {
276
- }
277
- isSuccess = ((_b = data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
278
- if (!isSuccess) return [3, 4];
279
- return [4, ((_c = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _c === void 0 ? void 0 : _c.call(params))];
280
- case 3:
281
- _d.sent();
282
- _d.label = 4;
283
- case 4: return [4, sleep(interval * 1000)];
284
- case 5:
285
- _d.sent();
286
- _d.label = 6;
287
- case 6:
288
- count++;
289
- return [3, 1];
290
- case 7: return [2, { response: response }];
291
- }
292
- });
293
- }); });
294
- export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
295
- var settings, requestBody, data;
296
- var _a, _b;
297
- return __generator(this, function (_c) {
298
- switch (_c.label) {
299
- case 0:
300
- settings = thunkApi.getState().settings;
301
- requestBody = {
302
- lang: settings.data.language,
303
- user_credentail: {
304
- identification_id: params.civilId,
305
- country_code: 'KW'
306
- },
307
- sign_in: false,
308
- step_name: BUSINESS_STEP_NAMES.CREATE_AUTH_CIVIL_ID,
309
- encryption_contract: ['user_credentail.identification_id']
310
- };
311
- return [4, API.authService.createAuth(requestBody)];
312
- case 1:
313
- data = (_c.sent()).data;
314
- if (!data.errors) {
315
- thunkApi.dispatch(handleNextScreenStep());
316
- (_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
317
- }
318
- return [2, { response: data, formData: params }];
319
- }
320
- });
321
- }); });
322
- export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
323
- var _a, settings, business, identification_id_type, stepName, requestBody, data;
324
- var _b, _c, _d;
325
- return __generator(this, function (_e) {
326
- switch (_e.label) {
327
- case 0:
328
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
329
- identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
330
- stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
331
- requestBody = {
332
- id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id) || '',
333
- identification_id: params.nid,
334
- identification_id_type: identification_id_type,
335
- date_of_birth: params.dob,
336
- country_code: settings.data.businessCountry.iso2,
337
- step_name: stepName,
338
- encryption_contract: ['country_code', 'identification_id', 'identification_id_type', 'date_of_birth']
339
- };
340
- return [4, API.leadService.updateLead(requestBody)];
341
- case 1:
342
- data = _e.sent();
343
- thunkApi.dispatch(updateStepName(stepName));
344
- thunkApi.dispatch(handleNextScreenStep());
345
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody);
346
- return [2, { data: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
347
- }
348
- });
349
- }); });
350
- export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
351
- var _a, settings, business, _b, nid, dob, type, stepName, requestBody, data;
352
- var _c;
353
- return __generator(this, function (_d) {
354
- switch (_d.label) {
355
- case 0:
356
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
357
- _b = business.data.nidData, nid = _b.nid, dob = _b.dob, type = _b.type;
358
- stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
359
- requestBody = {
360
- id: ((_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.id) || '',
361
- identification_id: nid,
362
- identification_id_type: type,
363
- date_of_birth: dob,
364
- country_code: settings.data.businessCountry.iso2,
365
- step_name: stepName,
366
- encryption_contract: ['country_code', 'identification_id', 'identification_id_type', 'date_of_birth']
367
- };
368
- return [4, API.leadService.updateLead(requestBody)];
369
- case 1:
370
- data = _d.sent();
371
- thunkApi.dispatch(updateStepName(stepName));
372
- return [2, data];
373
- }
374
- });
375
- }); });
376
- export var retrieveChannels = createAsyncThunk('retrieveChannels', function () { return __awaiter(void 0, void 0, void 0, function () {
377
- var body, data;
378
- return __generator(this, function (_a) {
379
- switch (_a.label) {
380
- case 0:
381
- body = {
382
- page: 0
383
- };
384
- return [4, API.dataService.getChannelsOfServices(body)];
385
- case 1:
386
- data = _a.sent();
387
- return [2, data];
388
- }
389
- });
390
- }); });
391
- export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function (params) { return __awaiter(void 0, void 0, void 0, function () {
392
- var data;
393
- return __generator(this, function (_a) {
394
- switch (_a.label) {
395
- case 0: return [4, API.leadService.retrieveEntityList(params.leadId)];
396
- case 1:
397
- data = (_a.sent()).data;
398
- return [2, data];
399
- }
400
- });
401
- }); });
402
- export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', function (boardID) { return __awaiter(void 0, void 0, void 0, function () {
403
- var data;
404
- var _a, _b;
405
- return __generator(this, function (_c) {
406
- switch (_c.label) {
407
- case 0: return [4, API.boardService.retrieveBoardDetails(boardID)];
408
- case 1:
409
- data = _c.sent();
410
- return [2, {
411
- 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 })
412
- }];
413
- }
414
- });
415
- }); });
416
- export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
417
- var _a, settings, business, payload, data, accountBody, accountData;
418
- var _b, _c, _d, _e, _f, _g;
419
- return __generator(this, function (_h) {
420
- switch (_h.label) {
421
- case 0:
422
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
423
- payload = {
424
- id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id) || '',
425
- license_number: params.licenseNumber,
426
- license_type: ((_c = params.selectedLicense) === null || _c === void 0 ? void 0 : _c.type) === BusinessType.FL ? 'freelance' : 'commercial_registration',
427
- business_type: (_d = params.selectedLicense) === null || _d === void 0 ? void 0 : _d.type,
428
- step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO,
429
- encryption_contract: ['license_number', 'business_type', 'license_type']
430
- };
431
- return [4, API.leadService.updateLead(payload)];
432
- case 1:
433
- data = _h.sent();
434
- accountBody = {
435
- lead_id: (_e = business.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.id,
436
- notify: {
437
- email: false,
438
- phone: false
439
- },
440
- skip_legacy: false,
441
- is_acknowledged: true,
442
- step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
443
- };
444
- return [4, API.accountService.createAccount(accountBody)];
445
- case 2:
446
- accountData = _h.sent();
447
- return [4, thunkApi.dispatch(retrieveChannels())];
448
- case 3:
449
- _h.sent();
450
- thunkApi.dispatch(handleNextScreenStep());
451
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
452
- return [2, { data: data, formData: params, accountData: accountData }];
453
- }
454
- });
455
- }); });
456
- export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
457
- var _a, settings, business, channel, activities, stepName, id, requestBody, data;
458
- var _b, _c, _d, _e, _f;
459
- return __generator(this, function (_g) {
460
- switch (_g.label) {
461
- case 0:
462
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
463
- channel = params.salesChannels.map(function (_a) {
464
- var id = _a.id;
465
- return id;
466
- });
467
- activities = (_b = (params.activities || [])) === null || _b === void 0 ? void 0 : _b.map(function (_a) {
468
- var en = _a.en;
469
- return en;
470
- });
471
- stepName = BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES;
472
- id = (_d = (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.id;
473
- requestBody = {
474
- id: id,
475
- brand: {
476
- activities: activities,
477
- channel_services: channel,
478
- business_operation_start_at: params.operationStartDate
479
- },
480
- step_name: stepName,
481
- encryption_contract: ['brand.business_operation_start_at']
482
- };
483
- return [4, API.brandService.updateBrandInfo(requestBody)];
484
- case 1:
485
- data = _g.sent();
486
- thunkApi.dispatch(retrieveDataList());
487
- thunkApi.dispatch(updateStepName(stepName));
488
- thunkApi.dispatch(handleNextScreenStep());
489
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
490
- return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: __assign({}, params) }];
491
- }
492
- });
493
- }); });
494
- export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function () { return __awaiter(void 0, void 0, void 0, function () {
495
- var dataBody, _a, customerBases, expectedSales, expectedCustomerSales;
496
- return __generator(this, function (_b) {
497
- switch (_b.label) {
498
- case 0:
499
- dataBody = {
500
- page: 0
501
- };
502
- return [4, Promise.all([
503
- API.dataService.getCustomerBases(dataBody),
504
- API.dataService.getExpectedSales(dataBody),
505
- API.dataService.getExpectedCustomerSales(dataBody)
506
- ])];
507
- case 1:
508
- _a = _b.sent(), customerBases = _a[0], expectedSales = _a[1], expectedCustomerSales = _a[2];
509
- return [2, {
510
- customerBases: customerBases,
511
- expectedSales: expectedSales,
512
- expectedCustomerSales: expectedCustomerSales
513
- }];
514
- }
515
- });
516
- }); });
517
- export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
518
- var _a, settings, business, id, customerBase, stepName, requestBody, data;
519
- var _b, _c, _d, _e, _f, _g;
520
- return __generator(this, function (_h) {
521
- switch (_h.label) {
522
- case 0:
523
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
524
- id = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
525
- customerBase = params.customerLocations.map(function (_a) {
526
- var id = _a.id;
527
- return id;
528
- });
529
- stepName = BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS;
530
- requestBody = {
531
- brand: {
532
- customers_base: customerBase,
533
- customers_served_monthly: (_d = params.expectedCustomer) === null || _d === void 0 ? void 0 : _d.id,
534
- monthly_sales_range: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '',
535
- agree_refund: params.refundPolicy,
536
- agree_chargeback: params.transactionPolicy
537
- },
538
- id: id,
539
- step_name: stepName,
540
- encryption_contract: ['brand.customers_served_monthly', 'brand.monthly_sales_range']
541
- };
542
- return [4, API.brandService.updateBrandInfo(requestBody)];
543
- case 1:
544
- data = _h.sent();
545
- thunkApi.dispatch(updateStepName(stepName));
546
- thunkApi.dispatch(handleNextScreenStep());
547
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
548
- return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: params }];
549
- }
550
- });
551
- }); });
552
- export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
553
- var _a, settings, business, _b, steps, id, flowCompleted, boardResponse, payload, data, board_id, board_info_id;
554
- var _c, _d, _e, _f;
555
- return __generator(this, function (_g) {
556
- switch (_g.label) {
557
- case 0:
558
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
559
- _b = business.data.verify.responseBody || {}, steps = _b.steps, id = _b.id;
560
- flowCompleted = Object.keys(steps).find(function (key) { return key === BUSINESS_STEP_NAMES.BUSINESS_SUCCESS; });
561
- if (flowCompleted || !id)
562
- return [2];
563
- boardResponse = undefined;
564
- payload = {
565
- lang: settings.data.language,
566
- step_name: BUSINESS_STEP_NAMES.BUSINESS_SUCCESS,
567
- id: id,
568
- encryption_contract: []
569
- };
570
- return [4, API.leadService.updateLead(payload)];
571
- case 1:
572
- data = _g.sent();
573
- board_id = data === null || data === void 0 ? void 0 : data.board_id;
574
- board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
575
- if (!(!!board_id && !!board_info_id)) return [3, 3];
576
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
577
- case 2:
578
- boardResponse = _g.sent();
579
- _g.label = 3;
580
- case 3:
581
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
582
- (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
583
- thunkApi.dispatch(handleNextScreenStep());
584
- return [2, {
585
- response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
586
- formData: params
587
- }];
588
- }
589
- });
590
- }); });
591
- export var updateStepName = createAsyncThunk('updateStepName', function (stepName, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
592
- var business, payload, data;
593
- var _a;
594
- return __generator(this, function (_b) {
595
- switch (_b.label) {
596
- case 0:
597
- business = thunkApi.getState().business;
598
- payload = {
599
- step_name: stepName,
600
- id: ((_a = business.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.id) || '',
601
- encryption_contract: []
602
- };
603
- return [4, API.leadService.updateLead(payload)];
604
- case 1:
605
- data = _b.sent();
606
- return [2, { response: data }];
607
- }
608
- });
609
- }); });
610
- var initialState = {
611
- error: null,
612
- loading: false,
613
- customLoading: false,
614
- data: {
615
- flowName: FlowsTypes.BUSINESS,
616
- verify: {
617
- token: ''
618
- },
619
- otpData: {
620
- otp: '',
621
- isNID: false
622
- },
623
- nidData: {
624
- nid: '',
625
- dob: getEighteenYearsAgo(),
626
- type: ''
627
- },
628
- businessTypeData: {
629
- licenseNumber: ''
630
- },
631
- activitiesData: {
632
- activities: [],
633
- salesChannels: [],
634
- operationStartDate: '1998-08-22'
635
- },
636
- customersData: {
637
- customerLocations: [],
638
- expectedCustomer: undefined,
639
- expectedSale: undefined,
640
- refundPolicy: false,
641
- transactionPolicy: false
642
- }
643
- }
644
- };
645
- export var businessSlice = createSlice({
646
- name: 'business/store',
647
- initialState: initialState,
648
- reducers: {
649
- clearError: function (state) {
650
- state.error = null;
651
- },
652
- stopLoader: function (state) {
653
- state.loading = false;
654
- },
655
- resetOTPScreen: function (state) {
656
- state.data.otpData.otp = '';
657
- }
658
- },
659
- extraReducers: function (builder) {
660
- builder
661
- .addCase(verifyLeadToken.pending, function (state) {
662
- state.error = null;
663
- state.customLoading = true;
664
- })
665
- .addCase(verifyLeadToken.fulfilled, function (state, action) {
666
- var _a, _b, _c, _d, _e, _f;
667
- state.error = null;
668
- state.customLoading = false;
669
- var _g = action.payload, data = _g.data, token = _g.token, leadData = _g.leadData, brandInfo = _g.brandInfo, boardId = _g.boardId;
670
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
671
- if (description) {
672
- state.error = description;
673
- return;
674
- }
675
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody), { board_id: boardId });
676
- state.data.verify.token = token;
677
- state.data.otpData.isNID = false;
678
- var _h = state.data.verify.responseBody || {}, entity = _h.entity, entity_activities = _h.entity_activities, business_type = _h.business_type, brand = _h.brand;
679
- var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
680
- ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
681
- : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
682
- if (!!issuingDate) {
683
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
684
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
685
- }
686
- var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
687
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
688
- var _j = brand || {}, website = _j.website, social = _j.social;
689
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
690
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
691
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
692
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
693
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
694
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
695
- selectedChannels = [websiteData, socialData];
696
- else if (isHasTwitter || isHasInstagram)
697
- selectedChannels = [socialData];
698
- else if (isHasWebsite)
699
- selectedChannels = [websiteData];
700
- if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
701
- selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
702
- var _a;
703
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.id === storedChannel; });
704
- });
705
- }
706
- state.data.activitiesData.salesChannels = selectedChannels;
707
- var activities = entity_activities || [];
708
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
709
- var _a;
710
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { var _a; return ((_a = activity.en) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === value.toLowerCase(); });
711
- });
712
- state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
713
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
714
- if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
715
- var licenseNumber_1 = (_e = entity === null || entity === void 0 ? void 0 : entity.license) === null || _e === void 0 ? void 0 : _e.number;
716
- var _k = state.data.businessTypeData || {}, responseBody = _k.responseBody, selectedLicense = _k.selectedLicense;
717
- var licenseList = (responseBody || {}).licenseList;
718
- var selectedLicenseData = selectedLicense;
719
- if (!!licenseNumber_1) {
720
- selectedLicenseData =
721
- ((_f = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _f === void 0 ? void 0 : _f.call(licenseList, function (_a) {
722
- var license = _a.license;
723
- return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_1;
724
- })) ||
725
- business_type === BusinessType.CR
726
- ? __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_1 } }) : __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_1 } });
727
- state.data.businessTypeData.licenseNumber = licenseNumber_1 || '';
728
- }
729
- state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
730
- }
731
- })
732
- .addCase(verifyLeadToken.rejected, function (state, action) {
733
- state.error = action.error.message;
734
- state.customLoading = false;
735
- })
736
- .addCase(resendOTP.pending, function (state) {
737
- state.error = null;
738
- })
739
- .addCase(resendOTP.fulfilled, function (state, action) {
740
- var _a;
741
- state.error = null;
742
- var data = action.payload.data;
743
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
744
- if (description) {
745
- state.error = description;
746
- return;
747
- }
748
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
749
- })
750
- .addCase(resendOTP.rejected, function (state, action) {
751
- state.error = action.error.message;
752
- })
753
- .addCase(verifyLeadOTP.pending, function (state) {
754
- state.loading = true;
755
- state.error = null;
756
- })
757
- .addCase(verifyLeadOTP.fulfilled, function (state, action) {
758
- var _a, _b, _c, _d, _e, _f;
759
- state.loading = false;
760
- state.error = null;
761
- var _g = action.payload, data = _g.data, formData = _g.formData, brandInfo = _g.brandInfo;
762
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
763
- if (description) {
764
- state.error = description;
765
- return;
766
- }
767
- state.data.otpData = formData;
768
- state.data.otpData.responseBody = data;
769
- var _h = state.data.verify.responseBody || {}, entity = _h.entity, entity_activities = _h.entity_activities, business_type = _h.business_type, brand = _h.brand;
770
- var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
771
- ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
772
- : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
773
- if (!!issuingDate) {
774
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
775
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
776
- }
777
- var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
778
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
779
- var _j = brand || {}, website = _j.website, social = _j.social;
780
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
781
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
782
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
783
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
784
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
785
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
786
- selectedChannels = [websiteData, socialData];
787
- else if (isHasTwitter || isHasInstagram)
788
- selectedChannels = [socialData];
789
- else if (isHasWebsite)
790
- selectedChannels = [websiteData];
791
- if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
792
- selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
793
- var _a;
794
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name.en.toLowerCase() === storedChannel.toLowerCase(); });
795
- });
796
- }
797
- state.data.activitiesData.salesChannels = selectedChannels;
798
- var activities = entity_activities || [];
799
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
800
- var _a;
801
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { var _a; return ((_a = activity.en) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === value.toLowerCase(); });
802
- });
803
- state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
804
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
805
- if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
806
- var licenseNumber_2 = (_e = entity === null || entity === void 0 ? void 0 : entity.license) === null || _e === void 0 ? void 0 : _e.number;
807
- var _k = state.data.businessTypeData || {}, responseBody = _k.responseBody, selectedLicense = _k.selectedLicense;
808
- var licenseList = (responseBody || {}).licenseList;
809
- var selectedLicenseData = selectedLicense;
810
- if (!!licenseNumber_2) {
811
- selectedLicenseData =
812
- ((_f = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _f === void 0 ? void 0 : _f.call(licenseList, function (_a) {
813
- var license = _a.license;
814
- return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_2;
815
- })) ||
816
- business_type === BusinessType.CR
817
- ? __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_2 } }) : __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_2 } });
818
- state.data.businessTypeData.licenseNumber = licenseNumber_2 || '';
819
- }
820
- state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
821
- }
822
- })
823
- .addCase(verifyLeadOTP.rejected, function (state, action) {
824
- state.loading = false;
825
- state.error = action.error.message;
826
- })
827
- .addCase(createCivilIdAuth.pending, function (state, action) {
828
- state.loading = true;
829
- state.error = null;
830
- })
831
- .addCase(createCivilIdAuth.fulfilled, function (state, action) {
832
- var _a;
833
- state.loading = false;
834
- state.error = null;
835
- var _b = action.payload, formData = _b.formData, response = _b.response;
836
- var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
837
- if (description) {
838
- state.error = description;
839
- return;
840
- }
841
- })
842
- .addCase(createCivilIdAuth.rejected, function (state, action) {
843
- state.loading = false;
844
- state.error = action.error.message;
845
- })
846
- .addCase(verifyPACI.pending, function (state) {
847
- state.loading = true;
848
- state.error = null;
849
- })
850
- .addCase(verifyPACI.fulfilled, function (state, action) {
851
- state.loading = false;
852
- state.error = null;
853
- state.data.otpData.responseBody = action.payload.response;
854
- })
855
- .addCase(verifyPACI.rejected, function (state, action) {
856
- state.loading = false;
857
- var error = action.error.message;
858
- if (error !== 'Aborted') {
859
- state.error = error;
860
- }
861
- })
862
- .addCase(updateLeadIdentity.pending, function (state) {
863
- state.loading = true;
864
- state.error = null;
865
- })
866
- .addCase(updateLeadIdentity.fulfilled, function (state, action) {
867
- var _a;
868
- state.loading = false;
869
- state.error = null;
870
- var _b = action.payload, data = _b.data, formData = _b.formData;
871
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
872
- if (description) {
873
- state.error = description;
874
- return;
875
- }
876
- state.data.nidData = formData;
877
- state.data.nidData.responseBody = data;
878
- state.data.otpData.otp = '';
879
- state.data.otpData.isNID = true;
880
- })
881
- .addCase(updateLeadIdentity.rejected, function (state, action) {
882
- state.loading = false;
883
- state.error = action.error.message;
884
- })
885
- .addCase(resendOTPLeadIdentity.pending, function (state) {
886
- state.error = null;
887
- })
888
- .addCase(resendOTPLeadIdentity.fulfilled, function (state, action) {
889
- var _a;
890
- state.error = null;
891
- var data = action.payload;
892
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
893
- if (description) {
894
- state.error = description;
895
- return;
896
- }
897
- state.data.nidData.responseBody = data;
898
- state.data.otpData.otp = '';
899
- state.data.otpData.isNID = true;
900
- })
901
- .addCase(resendOTPLeadIdentity.rejected, function (state, action) {
902
- state.error = action.error.message;
903
- })
904
- .addCase(retrieveEntityList.pending, function (state) {
905
- state.error = null;
906
- state.loading = true;
907
- })
908
- .addCase(retrieveEntityList.fulfilled, function (state, action) {
909
- var _a, _b, _c, _d;
910
- state.error = null;
911
- state.loading = false;
912
- var data = action.payload;
913
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
914
- var licenseList = [];
915
- if (!description) {
916
- var fl = data.fl, cr = data.cr;
917
- if (Array.isArray(cr) && cr.length > 0) {
918
- licenseList = cr.map(function (item) {
919
- return __assign(__assign({}, item), { type: BusinessType.CR });
920
- });
921
- }
922
- if (Array.isArray(fl) && fl.length > 0) {
923
- var mappedFL = fl.map(function (item) {
924
- return __assign(__assign({}, item), { type: BusinessType.FL });
925
- });
926
- licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
927
- }
928
- }
929
- licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
930
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { licenseList: licenseList });
931
- var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
932
- var isOtherLicense = ((_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';
933
- state.data.businessTypeData.selectedLicense = selectedLicense;
934
- if (!isOtherLicense)
935
- state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
936
- })
937
- .addCase(retrieveEntityList.rejected, function (state, action) {
938
- state.error = action.error.message;
939
- state.loading = false;
940
- })
941
- .addCase(retrieveBoardDetails.pending, function (state) {
942
- state.error = null;
943
- state.loading = true;
944
- })
945
- .addCase(retrieveBoardDetails.fulfilled, function (state, action) {
946
- state.error = null;
947
- state.loading = false;
948
- var data = (action.payload || {}).data;
949
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
950
- })
951
- .addCase(retrieveBoardDetails.rejected, function (state, action) {
952
- state.error = action.error.message;
953
- state.loading = false;
954
- })
955
- .addCase(retrieveChannels.pending, function (state) {
956
- state.error = null;
957
- state.loading = true;
958
- })
959
- .addCase(retrieveChannels.fulfilled, function (state, action) {
960
- var _a;
961
- state.error = null;
962
- state.loading = false;
963
- var data = action.payload || {};
964
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
965
- if (description) {
966
- state.error = description;
967
- return;
968
- }
969
- var channels = data.list || [];
970
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { channelList: channels });
971
- var brand = (state.data.verify.responseBody || {}).brand;
972
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
973
- var _b = brand || {}, website = _b.website, social = _b.social;
974
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
975
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
976
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
977
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
978
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
979
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
980
- selectedChannels = [websiteData, socialData];
981
- else if (isHasTwitter || isHasInstagram)
982
- selectedChannels = [socialData];
983
- else if (isHasWebsite)
984
- selectedChannels = [websiteData];
985
- state.data.activitiesData.salesChannels = selectedChannels;
986
- })
987
- .addCase(retrieveChannels.rejected, function (state, action) {
988
- state.error = action.error.message;
989
- state.loading = false;
990
- })
991
- .addCase(updateLeadBusinessType.pending, function (state) {
992
- state.loading = true;
993
- state.error = null;
994
- })
995
- .addCase(updateLeadBusinessType.fulfilled, function (state, action) {
996
- var _a;
997
- state.loading = false;
998
- state.error = null;
999
- var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData;
1000
- state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
1001
- var entity = data.entity, entity_activities = data.entity_activities;
1002
- var issuingDate = (_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date;
1003
- if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
1004
- state.error = 'signup_user_exists_error';
1005
- return;
1006
- }
1007
- if (!!issuingDate) {
1008
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
1009
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
1010
- }
1011
- var activities = entity_activities || [];
1012
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities[0];
1013
- if (!!selectedActivity)
1014
- state.data.activitiesData.activities = [selectedActivity];
1015
- state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData);
1016
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
1017
- })
1018
- .addCase(updateLeadBusinessType.rejected, function (state, action) {
1019
- state.loading = false;
1020
- state.error = action.error.message;
1021
- })
1022
- .addCase(updateActivitiesInfo.pending, function (state) {
1023
- state.loading = true;
1024
- state.error = null;
1025
- })
1026
- .addCase(updateActivitiesInfo.fulfilled, function (state, action) {
1027
- state.loading = false;
1028
- state.error = null;
1029
- var _a = action.payload, data = _a.data, formData = _a.formData;
1030
- state.data.activitiesData = formData;
1031
- console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
1032
- console.log('updateActivitiesInfo', data);
1033
- state.data.activitiesData.responseBody = __assign(__assign({}, data), state.data.activitiesData.responseBody);
1034
- console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
1035
- })
1036
- .addCase(updateActivitiesInfo.rejected, function (state, action) {
1037
- state.loading = false;
1038
- state.error = action.error.message;
1039
- })
1040
- .addCase(retrieveDataList.pending, function (state) {
1041
- state.loading = true;
1042
- state.error = null;
1043
- })
1044
- .addCase(retrieveDataList.fulfilled, function (state, action) {
1045
- var _a, _b, _c, _d, _e;
1046
- state.loading = false;
1047
- state.error = null;
1048
- var payload = action.payload;
1049
- var customerBases = ((_a = payload.customerBases) === null || _a === void 0 ? void 0 : _a.list) || [];
1050
- var customerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases[1];
1051
- var expectedSales = ((_b = payload.expectedSales) === null || _b === void 0 ? void 0 : _b.list) || [];
1052
- var expectedSale = (_d = (_c = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[0]) === null || _c === void 0 ? void 0 : _c.sub) === null || _d === void 0 ? void 0 : _d[4];
1053
- var expectedCustomerSales = ((_e = payload.expectedCustomerSales) === null || _e === void 0 ? void 0 : _e.list) || [];
1054
- var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
1055
- state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
1056
- if (!!customerBase)
1057
- state.data.customersData.customerLocations = [customerBase];
1058
- if (!!expectedSale)
1059
- state.data.customersData.expectedSale = expectedSale;
1060
- if (!!expectedCustomerSale)
1061
- state.data.customersData.expectedCustomer = expectedCustomerSale;
1062
- })
1063
- .addCase(retrieveDataList.rejected, function (state, action) {
1064
- state.loading = false;
1065
- state.error = action.error.message;
1066
- })
1067
- .addCase(updateCustomersInfo.pending, function (state) {
1068
- state.loading = true;
1069
- state.error = null;
1070
- })
1071
- .addCase(updateCustomersInfo.fulfilled, function (state, action) {
1072
- state.loading = false;
1073
- state.error = null;
1074
- var _a = action.payload, data = _a.data, formData = _a.formData;
1075
- state.data.customersData = formData;
1076
- state.data.customersData.responseBody = data;
1077
- })
1078
- .addCase(updateCustomersInfo.rejected, function (state, action) {
1079
- state.loading = false;
1080
- state.error = action.error.message;
1081
- })
1082
- .addCase(updateLeadSuccess.fulfilled, function (state, action) {
1083
- var _a;
1084
- state.loading = false;
1085
- state.error = null;
1086
- var response = (action.payload || {}).response;
1087
- var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
1088
- if (description) {
1089
- state.error = description;
1090
- return;
1091
- }
1092
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), response);
1093
- })
1094
- .addCase(updateLeadSuccess.pending, function (state) {
1095
- state.loading = true;
1096
- state.error = null;
1097
- })
1098
- .addCase(updateLeadSuccess.rejected, function (state, action) {
1099
- state.loading = false;
1100
- state.error = action.error.message;
1101
- });
1102
- }
1103
- });
1104
- export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
1105
- export default businessSlice.reducer;
1106
- export var businessSelector = function (state) { return state.business; };
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ 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;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
49
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
50
+ if (ar || !(i in from)) {
51
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52
+ ar[i] = from[i];
53
+ }
54
+ }
55
+ return to.concat(ar || Array.prototype.slice.call(from));
56
+ };
57
+ var _a;
58
+ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
+ import API from '../../../api';
60
+ import { BusinessType, FlowsTypes, DocumentPurpose, LicenseType } from '../../../@types';
61
+ import { BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_ENTITY_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
62
+ import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense } from '../../../utils';
63
+ import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
64
+ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
65
+ var payload, data, countryIso2, boardData, brandData, leadData, entity_activities, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, activityList;
66
+ var _a;
67
+ return __generator(this, function (_b) {
68
+ switch (_b.label) {
69
+ case 0:
70
+ payload = {
71
+ service_name: 'tap_email',
72
+ verify_token: token
73
+ };
74
+ return [4, API.leadService.verifyLeadToken(payload)];
75
+ case 1:
76
+ data = (_b.sent()).data;
77
+ if ((_a = data.errors) === null || _a === void 0 ? void 0 : _a.length)
78
+ throw new Error(data.errors[0].description);
79
+ if (data.mw_error)
80
+ throw new Error(data.mw_error);
81
+ countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
82
+ if (countryIso2)
83
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
84
+ if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 20];
85
+ boardData = undefined;
86
+ brandData = undefined;
87
+ return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
88
+ case 2:
89
+ leadData = (_b.sent()).data;
90
+ countryIso2 = leadData === null || leadData === void 0 ? void 0 : leadData.country_code;
91
+ if (!countryIso2)
92
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
93
+ if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && isKW(countryIso2)) {
94
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
95
+ }
96
+ if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && !isKW(countryIso2)) {
97
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
98
+ }
99
+ if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3, 19];
100
+ entity_activities = leadData.entity_activities, steps = leadData.steps, brand = leadData.brand, board_id = leadData.board_id, business_id = leadData.business_id, entity = leadData.entity;
101
+ brandID = brand === null || brand === void 0 ? void 0 : brand.id;
102
+ hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
103
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
104
+ hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
105
+ hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
106
+ if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 4];
107
+ return [4, API.dataService.getActivities()];
108
+ case 3:
109
+ activityList = (_b.sent()).list;
110
+ leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
111
+ _b.label = 4;
112
+ case 4:
113
+ if (!hasBusinessCompleted) return [3, 8];
114
+ if (!board_id) return [3, 7];
115
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
116
+ case 5:
117
+ boardData = _b.sent();
118
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
119
+ case 6:
120
+ _b.sent();
121
+ _b.label = 7;
122
+ case 7:
123
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
124
+ return [3, 19];
125
+ case 8:
126
+ if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 9];
127
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
128
+ return [3, 19];
129
+ case 9:
130
+ if (!hasBusinessCustomersCompleted) return [3, 10];
131
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
132
+ return [3, 19];
133
+ case 10:
134
+ if (!hasBusinessCRActivitiesCompleted) return [3, 13];
135
+ return [4, thunkApi.dispatch(retrieveDataList())];
136
+ case 11:
137
+ _b.sent();
138
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
139
+ return [4, API.brandService.retrieveBrand(brandID)];
140
+ case 12:
141
+ brandData = _b.sent();
142
+ return [3, 19];
143
+ case 13:
144
+ if (!hasBusinessCRInfoCompleted) return [3, 15];
145
+ return [4, API.brandService.retrieveBrand(brandID)];
146
+ case 14:
147
+ brandData = _b.sent();
148
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
149
+ return [3, 19];
150
+ case 15: return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
151
+ case 16:
152
+ _b.sent();
153
+ if (!isSA(countryIso2)) return [3, 18];
154
+ return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
155
+ case 17:
156
+ _b.sent();
157
+ _b.label = 18;
158
+ case 18:
159
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
160
+ _b.label = 19;
161
+ case 19: return [2, {
162
+ data: data,
163
+ leadData: __assign(__assign({}, leadData), { flows: (boardData === null || boardData === void 0 ? void 0 : boardData.info) || [] }),
164
+ token: token,
165
+ brandData: (brandData === null || brandData === void 0 ? void 0 : brandData.brand) || {},
166
+ boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id
167
+ }];
168
+ case 20: return [2, { data: data, isRequireOTP: true, token: token }];
169
+ }
170
+ });
171
+ }); });
172
+ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
173
+ var business, payload, data;
174
+ return __generator(this, function (_a) {
175
+ switch (_a.label) {
176
+ case 0:
177
+ business = thunkApi.getState().business;
178
+ payload = {
179
+ service_name: 'tap_email',
180
+ verify_token: business.data.verify.token
181
+ };
182
+ return [4, API.leadService.verifyLeadToken(payload)];
183
+ case 1:
184
+ data = (_a.sent()).data;
185
+ return [2, { data: data }];
186
+ }
187
+ });
188
+ }); });
189
+ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
190
+ var _a, business, settings, isNID, responseBody, stepName, payload, data, brandData, leadData, brand, country_code, steps, board_id, business_id, entity, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, entity_activities, activityList, boardResponse;
191
+ var _b, _c, _d, _e, _f, _g, _h;
192
+ return __generator(this, function (_j) {
193
+ switch (_j.label) {
194
+ case 0:
195
+ _a = thunkApi.getState(), business = _a.business, settings = _a.settings;
196
+ isNID = business.data.otpData.isNID;
197
+ responseBody = (isNID ? business.data.nidData : business.data.verify).responseBody;
198
+ stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
199
+ payload = {
200
+ data: params.otp,
201
+ service_name: ((_c = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.service_name) || ((_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name),
202
+ verify_token: ((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _e === void 0 ? void 0 : _e.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
203
+ step_name: stepName,
204
+ encryption_contract: ['data']
205
+ };
206
+ return [4, API.leadService.verifyLeadOTP(payload)];
207
+ case 1:
208
+ data = (_j.sent()).data;
209
+ if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
210
+ throw new Error(data.errors[0].description);
211
+ brandData = undefined;
212
+ return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
213
+ case 2:
214
+ leadData = (_j.sent()).data;
215
+ thunkApi.dispatch(updateStepName(stepName));
216
+ brand = leadData.brand, country_code = leadData.country_code, steps = leadData.steps, board_id = leadData.board_id, business_id = leadData.business_id, entity = leadData.entity;
217
+ brandID = brand === null || brand === void 0 ? void 0 : brand.id;
218
+ countryIso2 = country_code;
219
+ if (countryIso2)
220
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
221
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
222
+ hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
223
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
224
+ hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
225
+ hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
226
+ isIdentityAuthStep = data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH;
227
+ if (!(!isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 4];
228
+ return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
229
+ case 3:
230
+ _j.sent();
231
+ _j.label = 4;
232
+ case 4:
233
+ if (!(isSA(countryIso2) && !isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 6];
234
+ return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
235
+ case 5:
236
+ _j.sent();
237
+ _j.label = 6;
238
+ case 6:
239
+ entity_activities = leadData.entity_activities;
240
+ if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 8];
241
+ return [4, API.dataService.getActivities()];
242
+ case 7:
243
+ activityList = (_j.sent()).list;
244
+ leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
245
+ _j.label = 8;
246
+ case 8:
247
+ if (!isNID) return [3, 9];
248
+ thunkApi.dispatch(handleNextScreenStep());
249
+ return [3, 22];
250
+ case 9:
251
+ if (!(isIdentityAuthStep && isKW(countryIso2))) return [3, 10];
252
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
253
+ return [3, 22];
254
+ case 10:
255
+ if (!hasBusinessCompleted) return [3, 14];
256
+ if (!board_id) return [3, 13];
257
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
258
+ case 11:
259
+ boardResponse = _j.sent();
260
+ leadData = __assign(__assign({}, leadData), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] });
261
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
262
+ case 12:
263
+ _j.sent();
264
+ _j.label = 13;
265
+ case 13:
266
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
267
+ return [3, 22];
268
+ case 14:
269
+ if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 15];
270
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
271
+ return [3, 22];
272
+ case 15:
273
+ if (!hasBusinessCustomersCompleted) return [3, 16];
274
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
275
+ return [3, 22];
276
+ case 16:
277
+ if (!hasBusinessCRActivitiesCompleted) return [3, 19];
278
+ return [4, thunkApi.dispatch(retrieveDataList())];
279
+ case 17:
280
+ _j.sent();
281
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
282
+ return [4, API.brandService.retrieveBrand(brandID)];
283
+ case 18:
284
+ brandData = _j.sent();
285
+ return [3, 22];
286
+ case 19:
287
+ if (!hasBusinessCRInfoCompleted) return [3, 21];
288
+ return [4, API.brandService.retrieveBrand(brandID)];
289
+ case 20:
290
+ brandData = _j.sent();
291
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
292
+ return [3, 22];
293
+ case 21:
294
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
295
+ _j.label = 22;
296
+ case 22: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brand: brandData === null || brandData === void 0 ? void 0 : brandData.brand, leadData: leadData }];
297
+ }
298
+ });
299
+ }); });
300
+ export var verifyPACI = createAsyncThunk('businessVerifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
301
+ var _a, settings, business, responseBody, _b, business_id, entity, expiry, interval, maxCalls, count, data, isSuccess;
302
+ var _c, _d, _e, _f;
303
+ return __generator(this, function (_g) {
304
+ switch (_g.label) {
305
+ case 0:
306
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
307
+ responseBody = business.data.civilIdData.responseBody;
308
+ _b = business.data.verify.responseBody || {}, business_id = _b.business_id, entity = _b.entity;
309
+ expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
310
+ interval = 5;
311
+ maxCalls = Math.floor(expiry / interval);
312
+ if (thunkApi.signal.aborted) {
313
+ return [2, { response: null }];
314
+ }
315
+ count = 1;
316
+ _g.label = 1;
317
+ case 1:
318
+ if (!(count <= maxCalls)) return [3, 8];
319
+ return [4, API.authService.getTokenVerify(responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token)];
320
+ case 2:
321
+ data = _g.sent();
322
+ isSuccess = ((_c = data.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'success';
323
+ if (!isSuccess) return [3, 5];
324
+ return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
325
+ case 3:
326
+ _g.sent();
327
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
328
+ (_f = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _f === void 0 ? void 0 : _f.call(params);
329
+ return [4, sleep(3000)];
330
+ case 4:
331
+ _g.sent();
332
+ thunkApi.dispatch(handleNextScreenStep());
333
+ return [2, { response: data }];
334
+ case 5: return [4, sleep(interval * 1000)];
335
+ case 6:
336
+ _g.sent();
337
+ _g.label = 7;
338
+ case 7:
339
+ count++;
340
+ return [3, 1];
341
+ case 8: throw new Error('paci_verification_failed');
342
+ }
343
+ });
344
+ }); });
345
+ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
346
+ var _a, settings, business, stepName, lead_id, requestBody, data;
347
+ var _b, _c;
348
+ return __generator(this, function (_d) {
349
+ switch (_d.label) {
350
+ case 0:
351
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
352
+ stepName = BUSINESS_STEP_NAMES.CREATE_AUTH_CIVIL_ID;
353
+ lead_id = (business.data.verify.responseBody || {}).lead_id;
354
+ requestBody = {
355
+ id: lead_id || '',
356
+ identification: {
357
+ id: params.civilId,
358
+ issued_country_code: settings.data.businessCountry.iso2,
359
+ type: 'civil_id'
360
+ },
361
+ step_name: stepName,
362
+ encryption_contract: ['identification.id', 'identification.issued_country_code', 'identification.type']
363
+ };
364
+ return [4, API.leadService.updateLead(requestBody)];
365
+ case 1:
366
+ data = _d.sent();
367
+ thunkApi.dispatch(handleNextScreenStep());
368
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
369
+ return [2, { response: data, formData: params }];
370
+ }
371
+ });
372
+ }); });
373
+ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
374
+ var _a, settings, business, identification_id_type, stepName, lead_id, requestBody, data;
375
+ var _b, _c;
376
+ return __generator(this, function (_d) {
377
+ switch (_d.label) {
378
+ case 0:
379
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
380
+ identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
381
+ stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
382
+ lead_id = (business.data.verify.responseBody || {}).lead_id;
383
+ requestBody = {
384
+ id: lead_id || '',
385
+ identification: {
386
+ id: params.nid,
387
+ issued_country_code: settings.data.businessCountry.iso2,
388
+ type: identification_id_type
389
+ },
390
+ date_of_birth: params.dob,
391
+ step_name: stepName,
392
+ encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
393
+ };
394
+ return [4, API.leadService.updateLead(requestBody)];
395
+ case 1:
396
+ data = _d.sent();
397
+ thunkApi.dispatch(handleNextScreenStep());
398
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
399
+ return [2, { data: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
400
+ }
401
+ });
402
+ }); });
403
+ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
404
+ var _a, settings, business, _b, nid, dob, type, stepName, lead_id, requestBody, data;
405
+ return __generator(this, function (_c) {
406
+ switch (_c.label) {
407
+ case 0:
408
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
409
+ _b = business.data.nidData, nid = _b.nid, dob = _b.dob, type = _b.type;
410
+ stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
411
+ lead_id = (business.data.verify.responseBody || {}).lead_id;
412
+ requestBody = {
413
+ id: lead_id || '',
414
+ identification: {
415
+ id: nid,
416
+ issued_country_code: settings.data.businessCountry.iso2,
417
+ type: type
418
+ },
419
+ date_of_birth: dob,
420
+ step_name: stepName,
421
+ encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
422
+ };
423
+ return [4, API.leadService.updateLead(requestBody)];
424
+ case 1:
425
+ data = _c.sent();
426
+ return [2, data];
427
+ }
428
+ });
429
+ }); });
430
+ export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function (params) { return __awaiter(void 0, void 0, void 0, function () {
431
+ var data;
432
+ return __generator(this, function (_a) {
433
+ switch (_a.label) {
434
+ case 0: return [4, API.leadService.retrieveEntityList(params.leadId)];
435
+ case 1:
436
+ data = (_a.sent()).data;
437
+ return [2, data];
438
+ }
439
+ });
440
+ }); });
441
+ export var retrieveAllEntityList = createAsyncThunk('retrieveAllEntityList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
442
+ var settings, data;
443
+ return __generator(this, function (_a) {
444
+ switch (_a.label) {
445
+ case 0:
446
+ settings = thunkApi.getState().settings;
447
+ return [4, API.entityService.retrieveAllEntities(params.businessId)];
448
+ case 1:
449
+ data = _a.sent();
450
+ return [2, { data: data, businessCountryCode: settings.data.businessCountry.iso2, entityId: params.entityId }];
451
+ }
452
+ });
453
+ }); });
454
+ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', function (boardID) { return __awaiter(void 0, void 0, void 0, function () {
455
+ var data;
456
+ var _a, _b;
457
+ return __generator(this, function (_c) {
458
+ switch (_c.label) {
459
+ case 0: return [4, API.boardService.retrieveBoardDetails(boardID)];
460
+ case 1:
461
+ data = _c.sent();
462
+ return [2, {
463
+ 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, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact, individuals: data === null || data === void 0 ? void 0 : data.individuals, board_id: data === null || data === void 0 ? void 0 : data.id })
464
+ }];
465
+ }
466
+ });
467
+ }); });
468
+ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
469
+ var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, documentBody, payload_1;
470
+ var _b, _c, _d, _e;
471
+ return __generator(this, function (_f) {
472
+ switch (_f.label) {
473
+ case 0:
474
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
475
+ isNonSA = !isSA(settings.data.businessCountry.iso2);
476
+ selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense;
477
+ isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
478
+ payload = __assign(__assign(__assign(__assign({ id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.lead_id) || '', entity: {
479
+ id: (selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && (isNonSA ? !isFL : true) ? selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id : ''
480
+ } }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
481
+ license_number: isNonSA && isFL ? '' : licenseNumber,
482
+ license_type: isFL ? LicenseType.FL : LicenseType.CR,
483
+ business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type
484
+ })), { step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO }), (isNonSA && {
485
+ business_name: isFL ? undefined : { ar: entityLegalName, en: entityLegalName }
486
+ })), { encryption_contract: ['license_number', 'business_type', 'license_type'] });
487
+ return [4, API.leadService.updateLead(payload)];
488
+ case 1:
489
+ data = _f.sent();
490
+ entity_activities = data.entity_activities;
491
+ if (!!entity_activities) return [3, 3];
492
+ return [4, API.dataService.getActivities()];
493
+ case 2:
494
+ list = (_f.sent()).list;
495
+ data.entity_activities = list;
496
+ _f.label = 3;
497
+ case 3:
498
+ accountBody = {
499
+ lead_id: (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id,
500
+ notify: {
501
+ email: false,
502
+ phone: false
503
+ },
504
+ skip_legacy: false,
505
+ is_acknowledged: true,
506
+ step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
507
+ };
508
+ return [4, API.accountService.createAccount(accountBody)];
509
+ case 4:
510
+ accountData = _f.sent();
511
+ entityData = undefined;
512
+ entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
513
+ if (!((certificateId || []).length > 0)) return [3, 6];
514
+ documentBody = {
515
+ entity_id: entityId || '',
516
+ documents: [
517
+ {
518
+ type: DocumentPurpose.CR,
519
+ images: certificateId
520
+ }
521
+ ]
522
+ };
523
+ return [4, API.documentService.updateDocumentInfo(documentBody)];
524
+ case 5:
525
+ documentData = _f.sent();
526
+ _f.label = 6;
527
+ case 6:
528
+ if (!(articleId && entityId)) return [3, 8];
529
+ payload_1 = {
530
+ id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
531
+ AOA_file_id: articleId
532
+ };
533
+ return [4, API.entityService.updateEntity(payload_1)];
534
+ case 7:
535
+ entityData = _f.sent();
536
+ _f.label = 8;
537
+ case 8:
538
+ thunkApi.dispatch(handleNextScreenStep());
539
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
540
+ return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
541
+ }
542
+ });
543
+ }); });
544
+ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
545
+ var _a, settings, business, activities, stepName, id, requestBody, data;
546
+ var _b, _c, _d, _e, _f;
547
+ return __generator(this, function (_g) {
548
+ switch (_g.label) {
549
+ case 0:
550
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
551
+ activities = (_b = (params.activities || [])) === null || _b === void 0 ? void 0 : _b.map(function (_a) {
552
+ var id = _a.id;
553
+ return ({ id: id });
554
+ });
555
+ stepName = BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES;
556
+ id = (_d = (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.id;
557
+ requestBody = {
558
+ id: id,
559
+ activities: activities,
560
+ operations: {
561
+ start_date: params.operationStartDate
562
+ },
563
+ step_name: stepName,
564
+ encryption_contract: ['operations.start_date']
565
+ };
566
+ return [4, API.brandService.updateBrandInfo(requestBody)];
567
+ case 1:
568
+ data = _g.sent();
569
+ thunkApi.dispatch(retrieveDataList());
570
+ thunkApi.dispatch(updateStepName(stepName));
571
+ thunkApi.dispatch(handleNextScreenStep());
572
+ (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
573
+ return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: __assign({}, params) }];
574
+ }
575
+ });
576
+ }); });
577
+ export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
578
+ var settings, countryISO2, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
579
+ return __generator(this, function (_b) {
580
+ switch (_b.label) {
581
+ case 0:
582
+ settings = thunkApi.getState().settings;
583
+ countryISO2 = settings.data.businessCountry.iso2;
584
+ dataBody = {
585
+ page: 0
586
+ };
587
+ salesDataBody = {
588
+ page: 0,
589
+ country_code: [countryISO2]
590
+ };
591
+ return [4, Promise.all([
592
+ API.dataService.getCustomerBases(dataBody),
593
+ API.dataService.getExpectedSales(salesDataBody),
594
+ API.dataService.getExpectedCustomerSales(dataBody)
595
+ ])];
596
+ case 1:
597
+ _a = _b.sent(), customerBases = _a[0].list, expectedSales = _a[1].list, expectedCustomerSales = _a[2].list;
598
+ return [2, {
599
+ customerBases: customerBases,
600
+ expectedSales: expectedSales,
601
+ expectedCustomerSales: expectedCustomerSales,
602
+ countryISO2: countryISO2
603
+ }];
604
+ }
605
+ });
606
+ }); });
607
+ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
608
+ var _a, settings, business, id, customerLocation, customerBase, sales, stepName, requestBody, data;
609
+ var _b, _c, _d, _e, _f, _g;
610
+ return __generator(this, function (_h) {
611
+ switch (_h.label) {
612
+ case 0:
613
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
614
+ id = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
615
+ customerLocation = params.customerLocations.map(function (location) { return ({
616
+ id: location === null || location === void 0 ? void 0 : location.id
617
+ }); });
618
+ customerBase = { id: ((_d = params.expectedCustomer) === null || _d === void 0 ? void 0 : _d.id) || '', period: 'monthly', locations: customerLocation };
619
+ sales = { id: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '', period: 'monthly' };
620
+ stepName = BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS;
621
+ requestBody = {
622
+ operations: {
623
+ customer_base: customerBase,
624
+ sales: sales
625
+ },
626
+ term: ['refund', 'chargeback'],
627
+ id: id,
628
+ step_name: stepName,
629
+ encryption_contract: []
630
+ };
631
+ return [4, API.brandService.updateBrandInfo(requestBody)];
632
+ case 1:
633
+ data = _h.sent();
634
+ thunkApi.dispatch(updateStepName(stepName));
635
+ thunkApi.dispatch(handleNextScreenStep());
636
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
637
+ return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: params }];
638
+ }
639
+ });
640
+ }); });
641
+ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
642
+ var _a, settings, business, _b, steps, lead_id, flowCompleted, boardResponse, payload, data, board_id;
643
+ var _c, _d, _e, _f;
644
+ return __generator(this, function (_g) {
645
+ switch (_g.label) {
646
+ case 0:
647
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
648
+ _b = business.data.verify.responseBody || {}, steps = _b.steps, lead_id = _b.lead_id;
649
+ flowCompleted = Object.keys(steps).find(function (key) { return key === BUSINESS_STEP_NAMES.BUSINESS_SUCCESS; });
650
+ if (flowCompleted || !lead_id)
651
+ return [2];
652
+ boardResponse = undefined;
653
+ payload = {
654
+ lang: settings.data.language,
655
+ step_name: BUSINESS_STEP_NAMES.BUSINESS_SUCCESS,
656
+ id: lead_id,
657
+ encryption_contract: []
658
+ };
659
+ return [4, API.leadService.updateLead(payload)];
660
+ case 1:
661
+ data = _g.sent();
662
+ board_id = data === null || data === void 0 ? void 0 : data.board_id;
663
+ if (!board_id) return [3, 4];
664
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
665
+ case 2:
666
+ boardResponse = _g.sent();
667
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
668
+ case 3:
669
+ _g.sent();
670
+ _g.label = 4;
671
+ case 4:
672
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
673
+ (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
674
+ thunkApi.dispatch(handleNextScreenStep());
675
+ return [2, {
676
+ response: __assign(__assign({}, data), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] }),
677
+ formData: params
678
+ }];
679
+ }
680
+ });
681
+ }); });
682
+ export var updateStepName = createAsyncThunk('updateStepName', function (stepName, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
683
+ var business, payload, data;
684
+ var _a;
685
+ return __generator(this, function (_b) {
686
+ switch (_b.label) {
687
+ case 0:
688
+ business = thunkApi.getState().business;
689
+ payload = {
690
+ step_name: stepName,
691
+ id: ((_a = business.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.lead_id) || '',
692
+ encryption_contract: []
693
+ };
694
+ return [4, API.leadService.updateLead(payload)];
695
+ case 1:
696
+ data = _b.sent();
697
+ return [2, { response: data }];
698
+ }
699
+ });
700
+ }); });
701
+ var initialState = {
702
+ error: null,
703
+ loading: false,
704
+ customLoading: false,
705
+ uploading: false,
706
+ uploadingArticle: false,
707
+ data: {
708
+ flowName: FlowsTypes.BUSINESS,
709
+ verify: {
710
+ token: ''
711
+ },
712
+ otpData: {
713
+ otp: '',
714
+ isNID: false
715
+ },
716
+ civilIdData: {
717
+ civilId: ''
718
+ },
719
+ nidData: {
720
+ nid: '',
721
+ dob: '',
722
+ type: ''
723
+ },
724
+ businessTypeData: {
725
+ licenseNumber: '',
726
+ entityLegalName: ''
727
+ },
728
+ activitiesData: {
729
+ activities: [],
730
+ operationStartDate: ''
731
+ },
732
+ customersData: {
733
+ customerLocations: [],
734
+ expectedCustomer: undefined,
735
+ expectedSale: undefined,
736
+ refundPolicy: false,
737
+ transactionPolicy: false
738
+ }
739
+ }
740
+ };
741
+ export var businessSlice = createSlice({
742
+ name: 'business/store',
743
+ initialState: initialState,
744
+ reducers: {
745
+ clearError: function (state) {
746
+ state.error = null;
747
+ },
748
+ stopLoader: function (state) {
749
+ state.loading = false;
750
+ },
751
+ resetOTPScreen: function (state) {
752
+ state.data.otpData.otp = '';
753
+ },
754
+ uploadingStatus: function (state, action) {
755
+ state.uploading = action.payload;
756
+ },
757
+ uploadingArticleStatus: function (state, action) {
758
+ state.uploadingArticle = action.payload;
759
+ },
760
+ clearAOAFile: function (state) {
761
+ var entity = (state.data.verify.responseBody || {}).entity;
762
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: __assign(__assign({}, entity), { AOA_file: undefined, AOA_file_id: undefined }) });
763
+ }
764
+ },
765
+ extraReducers: function (builder) {
766
+ builder
767
+ .addCase(verifyLeadToken.pending, function (state) {
768
+ state.error = null;
769
+ state.customLoading = true;
770
+ })
771
+ .addCase(verifyLeadToken.fulfilled, function (state, action) {
772
+ var _a, _b;
773
+ state.error = null;
774
+ state.customLoading = false;
775
+ var _c = action.payload, data = _c.data, boardId = _c.boardId, brandData = _c.brandData, leadData = _c.leadData, token = _c.token, isRequireOTP = _c.isRequireOTP;
776
+ var responseBody = state.data.verify.responseBody;
777
+ state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id });
778
+ if (token)
779
+ state.data.verify.token = token;
780
+ state.data.otpData.isNID = false;
781
+ if (isRequireOTP)
782
+ return;
783
+ var _d = state.data.verify.responseBody || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_name = _d.business_name;
784
+ if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
785
+ state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
786
+ var issuingDate = ((_a = brandData === null || brandData === void 0 ? void 0 : brandData.operations) === null || _a === void 0 ? void 0 : _a.start_date) || ((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date);
787
+ if (issuingDate)
788
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
789
+ var activities = entity_activities || [];
790
+ var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
791
+ var activities = (brandData || {}).activities;
792
+ return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return activity.id === value.id; });
793
+ });
794
+ state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
795
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
796
+ })
797
+ .addCase(verifyLeadToken.rejected, function (state, action) {
798
+ state.error = action.error.message;
799
+ state.customLoading = false;
800
+ })
801
+ .addCase(resendOTP.pending, function (state) {
802
+ state.error = null;
803
+ })
804
+ .addCase(resendOTP.fulfilled, function (state, action) {
805
+ var _a;
806
+ state.error = null;
807
+ var data = action.payload.data;
808
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
809
+ if (description) {
810
+ state.error = description;
811
+ return;
812
+ }
813
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
814
+ })
815
+ .addCase(resendOTP.rejected, function (state, action) {
816
+ state.error = action.error.message;
817
+ })
818
+ .addCase(verifyLeadOTP.pending, function (state) {
819
+ state.loading = true;
820
+ state.error = null;
821
+ })
822
+ .addCase(verifyLeadOTP.fulfilled, function (state, action) {
823
+ var _a, _b;
824
+ state.loading = false;
825
+ state.error = null;
826
+ var _c = action.payload, data = _c.data, formData = _c.formData, brand = _c.brand, leadData = _c.leadData;
827
+ state.data.otpData = formData;
828
+ state.data.otpData.responseBody = data;
829
+ state.data.verify.responseBody = __assign(__assign(__assign({}, leadData), state.data.verify.responseBody), { flows: (leadData === null || leadData === void 0 ? void 0 : leadData.flows) || [] });
830
+ var _d = leadData || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_name = _d.business_name;
831
+ if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
832
+ state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
833
+ var issuingDate = ((_a = brand === null || brand === void 0 ? void 0 : brand.operations) === null || _a === void 0 ? void 0 : _a.start_date) || ((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date);
834
+ if (issuingDate)
835
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
836
+ var activities = entity_activities || [];
837
+ var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
838
+ var activities = (brand || {}).activities;
839
+ return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return value.id === activity.id; });
840
+ });
841
+ state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
842
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
843
+ })
844
+ .addCase(verifyLeadOTP.rejected, function (state, action) {
845
+ state.loading = false;
846
+ state.error = action.error.message;
847
+ })
848
+ .addCase(createCivilIdAuth.pending, function (state) {
849
+ state.loading = true;
850
+ state.error = null;
851
+ })
852
+ .addCase(createCivilIdAuth.fulfilled, function (state, action) {
853
+ var _a;
854
+ state.loading = false;
855
+ state.error = null;
856
+ var _b = action.payload, formData = _b.formData, response = _b.response;
857
+ var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
858
+ if (description) {
859
+ state.error = description;
860
+ return;
861
+ }
862
+ state.data.civilIdData = __assign(__assign({}, formData), { responseBody: response });
863
+ })
864
+ .addCase(createCivilIdAuth.rejected, function (state, action) {
865
+ state.loading = false;
866
+ state.error = action.error.message;
867
+ })
868
+ .addCase(verifyPACI.pending, function (state) {
869
+ state.loading = true;
870
+ state.error = null;
871
+ })
872
+ .addCase(verifyPACI.fulfilled, function (state, action) {
873
+ state.loading = false;
874
+ state.error = null;
875
+ state.data.otpData.responseBody = action.payload.response;
876
+ })
877
+ .addCase(verifyPACI.rejected, function (state, action) {
878
+ state.loading = false;
879
+ var error = action.error.message;
880
+ if (error !== 'Aborted') {
881
+ state.error = error;
882
+ }
883
+ })
884
+ .addCase(updateLeadIdentity.pending, function (state) {
885
+ state.loading = true;
886
+ state.error = null;
887
+ })
888
+ .addCase(updateLeadIdentity.fulfilled, function (state, action) {
889
+ var _a;
890
+ state.loading = false;
891
+ state.error = null;
892
+ var _b = action.payload, data = _b.data, formData = _b.formData;
893
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
894
+ if (description) {
895
+ state.error = description;
896
+ return;
897
+ }
898
+ state.data.nidData = formData;
899
+ state.data.nidData.responseBody = data;
900
+ state.data.otpData.otp = '';
901
+ state.data.otpData.isNID = true;
902
+ })
903
+ .addCase(updateLeadIdentity.rejected, function (state, action) {
904
+ state.loading = false;
905
+ state.error = action.error.message;
906
+ })
907
+ .addCase(resendOTPLeadIdentity.pending, function (state) {
908
+ state.error = null;
909
+ })
910
+ .addCase(resendOTPLeadIdentity.fulfilled, function (state, action) {
911
+ var _a;
912
+ state.error = null;
913
+ var data = action.payload;
914
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
915
+ if (description) {
916
+ state.error = description;
917
+ return;
918
+ }
919
+ state.data.nidData.responseBody = data;
920
+ state.data.otpData.otp = '';
921
+ state.data.otpData.isNID = true;
922
+ })
923
+ .addCase(resendOTPLeadIdentity.rejected, function (state, action) {
924
+ state.error = action.error.message;
925
+ })
926
+ .addCase(retrieveEntityList.pending, function (state) {
927
+ state.error = null;
928
+ state.loading = true;
929
+ })
930
+ .addCase(retrieveEntityList.fulfilled, function (state, action) {
931
+ var _a, _b, _c, _d;
932
+ state.error = null;
933
+ state.loading = false;
934
+ var data = action.payload;
935
+ var entityLicenseList = (state.data.businessTypeData.responseBody || {}).entityLicenseList;
936
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
937
+ var licenseList = [];
938
+ if (!description) {
939
+ var fl = data.fl, cr = data.cr;
940
+ if (Array.isArray(cr) && cr.length > 0) {
941
+ licenseList = cr.map(function (item) {
942
+ return __assign(__assign({}, item), { type: BusinessType.CR });
943
+ });
944
+ }
945
+ if (Array.isArray(fl) && fl.length > 0) {
946
+ var mappedFL = fl.map(function (item) {
947
+ return __assign(__assign({}, item), { type: BusinessType.FL });
948
+ });
949
+ licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
950
+ licenseList = licenseList.filter(function (_a) {
951
+ var license = _a.license;
952
+ return !(entityLicenseList || []).some(function (e) { return e.license.number === license.number; });
953
+ });
954
+ }
955
+ }
956
+ licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
957
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { licenseList: licenseList });
958
+ if (!(entityLicenseList === null || entityLicenseList === void 0 ? void 0 : entityLicenseList.length)) {
959
+ var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
960
+ 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';
961
+ state.data.businessTypeData.selectedLicense = selectedLicense;
962
+ if (!isOtherLicense_1)
963
+ state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
964
+ }
965
+ })
966
+ .addCase(retrieveEntityList.rejected, function (state, action) {
967
+ state.error = action.error.message;
968
+ state.loading = false;
969
+ })
970
+ .addCase(retrieveAllEntityList.pending, function (state) {
971
+ state.error = null;
972
+ state.loading = true;
973
+ })
974
+ .addCase(retrieveAllEntityList.fulfilled, function (state, action) {
975
+ var _a;
976
+ state.error = null;
977
+ state.loading = false;
978
+ var _b = action.payload, data = _b.data, businessCountryCode = _b.businessCountryCode, entityId = _b.entityId;
979
+ var isKWCountry = isKW(businessCountryCode);
980
+ var list = (data === null || data === void 0 ? void 0 : data.entities_info) || [];
981
+ if (isKWCountry) {
982
+ list = list.filter(function (l) { var _a; return ((_a = l.license) === null || _a === void 0 ? void 0 : _a.type) !== LicenseType.FL; });
983
+ }
984
+ var entityLicenseList = [];
985
+ if (list.length > 0) {
986
+ entityLicenseList = list.map(function (item) {
987
+ var _a;
988
+ return __assign(__assign({}, item), { type: ((_a = item.license) === null || _a === void 0 ? void 0 : _a.type) === LicenseType.FL ? BusinessType.FL : BusinessType.CR });
989
+ });
990
+ entityLicenseList = __spreadArray(__spreadArray([], entityLicenseList, true), [OTHER_ENTITY_LICENSE], false);
991
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entityLicenseList: entityLicenseList });
992
+ var findEntity = entityLicenseList.find(function (e) { return e.id === entityId; });
993
+ var selectedLicense = findEntity ? findEntity : entityLicenseList[0];
994
+ state.data.businessTypeData.selectedEntityLicense = selectedLicense;
995
+ state.data.businessTypeData.selectedLicense = selectedLicense;
996
+ if (!isOtherLicense(selectedLicense))
997
+ state.data.businessTypeData.licenseNumber = ((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _a === void 0 ? void 0 : _a.number) || '';
998
+ }
999
+ })
1000
+ .addCase(retrieveAllEntityList.rejected, function (state, action) {
1001
+ state.error = action.error.message;
1002
+ state.loading = false;
1003
+ })
1004
+ .addCase(retrieveBoardDetails.pending, function (state) {
1005
+ state.error = null;
1006
+ state.loading = true;
1007
+ })
1008
+ .addCase(retrieveBoardDetails.fulfilled, function (state, action) {
1009
+ state.error = null;
1010
+ state.loading = false;
1011
+ var data = (action.payload || {}).data;
1012
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
1013
+ })
1014
+ .addCase(retrieveBoardDetails.rejected, function (state, action) {
1015
+ state.error = action.error.message;
1016
+ state.loading = false;
1017
+ })
1018
+ .addCase(updateLeadBusinessType.pending, function (state) {
1019
+ state.loading = true;
1020
+ state.error = null;
1021
+ })
1022
+ .addCase(updateLeadBusinessType.fulfilled, function (state, action) {
1023
+ var _a;
1024
+ state.loading = false;
1025
+ state.error = null;
1026
+ var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData, documentData = _b.documentData;
1027
+ state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
1028
+ var entity = data.entity, entity_activities = data.entity_activities;
1029
+ var issuingDate = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
1030
+ if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
1031
+ state.error = 'signup_user_exists_error';
1032
+ return;
1033
+ }
1034
+ if (issuingDate) {
1035
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
1036
+ }
1037
+ var activities = entity_activities || [];
1038
+ state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData), documentData);
1039
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
1040
+ })
1041
+ .addCase(updateLeadBusinessType.rejected, function (state, action) {
1042
+ state.loading = false;
1043
+ state.error = action.error.message;
1044
+ })
1045
+ .addCase(updateActivitiesInfo.pending, function (state) {
1046
+ state.loading = true;
1047
+ state.error = null;
1048
+ })
1049
+ .addCase(updateActivitiesInfo.fulfilled, function (state, action) {
1050
+ state.loading = false;
1051
+ state.error = null;
1052
+ var _a = action.payload, data = _a.data, formData = _a.formData;
1053
+ state.data.activitiesData = formData;
1054
+ state.data.activitiesData.responseBody = __assign(__assign({}, data), state.data.activitiesData.responseBody);
1055
+ })
1056
+ .addCase(updateActivitiesInfo.rejected, function (state, action) {
1057
+ state.loading = false;
1058
+ state.error = action.error.message;
1059
+ })
1060
+ .addCase(retrieveDataList.pending, function (state) {
1061
+ state.loading = true;
1062
+ state.error = null;
1063
+ })
1064
+ .addCase(retrieveDataList.fulfilled, function (state, action) {
1065
+ var _a, _b;
1066
+ state.loading = false;
1067
+ state.error = null;
1068
+ var _c = action.payload, customerBases = _c.customerBases, expectedSales = _c.expectedSales, expectedCustomerSales = _c.expectedCustomerSales, countryISO2 = _c.countryISO2;
1069
+ var regional = customerBases.at(1);
1070
+ var local = customerBases.at(0);
1071
+ var expectedSale = (_b = (_a = expectedSales.at(0)) === null || _a === void 0 ? void 0 : _a.sub) === null || _b === void 0 ? void 0 : _b.at(4);
1072
+ var expectedCustomerSale = expectedCustomerSales.at(3);
1073
+ state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
1074
+ if (local && isKW(countryISO2))
1075
+ state.data.customersData.customerLocations = [local];
1076
+ if (regional && local && isSA(countryISO2))
1077
+ state.data.customersData.customerLocations = [regional, local];
1078
+ if (!!expectedSale)
1079
+ state.data.customersData.expectedSale = expectedSale;
1080
+ if (!!expectedCustomerSale)
1081
+ state.data.customersData.expectedCustomer = expectedCustomerSale;
1082
+ })
1083
+ .addCase(retrieveDataList.rejected, function (state, action) {
1084
+ state.loading = false;
1085
+ state.error = action.error.message;
1086
+ })
1087
+ .addCase(updateCustomersInfo.pending, function (state) {
1088
+ state.loading = true;
1089
+ state.error = null;
1090
+ })
1091
+ .addCase(updateCustomersInfo.fulfilled, function (state, action) {
1092
+ state.loading = false;
1093
+ state.error = null;
1094
+ var _a = action.payload, data = _a.data, formData = _a.formData;
1095
+ state.data.customersData = formData;
1096
+ state.data.customersData.responseBody = data;
1097
+ })
1098
+ .addCase(updateCustomersInfo.rejected, function (state, action) {
1099
+ state.loading = false;
1100
+ state.error = action.error.message;
1101
+ })
1102
+ .addCase(updateLeadSuccess.fulfilled, function (state, action) {
1103
+ var _a, _b;
1104
+ state.loading = false;
1105
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: false });
1106
+ state.error = null;
1107
+ var response = (action.payload || {}).response;
1108
+ var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
1109
+ if (description) {
1110
+ state.error = description;
1111
+ return;
1112
+ }
1113
+ state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), response), { name: (_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.name });
1114
+ })
1115
+ .addCase(updateLeadSuccess.pending, function (state) {
1116
+ state.loading = true;
1117
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: true });
1118
+ state.error = null;
1119
+ })
1120
+ .addCase(updateLeadSuccess.rejected, function (state, action) {
1121
+ state.loading = false;
1122
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: false });
1123
+ state.error = action.error.message;
1124
+ });
1125
+ }
1126
+ });
1127
+ export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, uploadingArticleStatus = _a.uploadingArticleStatus, clearAOAFile = _a.clearAOAFile;
1128
+ export default businessSlice.reducer;
1129
+ export var businessSelector = function (state) { return state.business; };