@tap-payments/auth-jsconnect 2.0.125-test → 2.1.0

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 (764) hide show
  1. package/README.md +34 -34
  2. package/build/@types/app.d.ts +397 -7
  3. package/build/@types/app.js +47 -0
  4. package/build/@types/form.d.ts +89 -37
  5. package/build/@types/index.d.ts +1 -0
  6. package/build/@types/index.js +1 -0
  7. package/build/@types/redux.d.ts +4 -0
  8. package/build/@types/theme.d.ts +1 -1
  9. package/build/@types/user.d.ts +177 -0
  10. package/build/@types/user.js +1 -0
  11. package/build/api/account.d.ts +6 -1
  12. package/build/api/account.js +9 -1
  13. package/build/api/auth.d.ts +24 -18
  14. package/build/api/auth.js +25 -5
  15. package/build/api/availabilityServices.d.ts +3 -3
  16. package/build/api/axios.js +3 -3
  17. package/build/api/board.d.ts +20 -3
  18. package/build/api/board.js +17 -1
  19. package/build/api/brand.d.ts +8 -0
  20. package/build/api/brand.js +18 -1
  21. package/build/api/country.d.ts +4 -0
  22. package/build/api/country.js +9 -1
  23. package/build/api/data.d.ts +24 -8
  24. package/build/api/data.js +50 -2
  25. package/build/api/document.d.ts +25 -0
  26. package/build/api/document.js +38 -0
  27. package/build/api/entity.d.ts +61 -31
  28. package/build/api/entity.js +47 -20
  29. package/build/api/file.d.ts +14 -0
  30. package/build/api/file.js +37 -0
  31. package/build/api/index.d.ts +70 -13
  32. package/build/api/index.js +9 -3
  33. package/build/api/individual.d.ts +87 -13
  34. package/build/api/individual.js +17 -1
  35. package/build/api/init.d.ts +16 -0
  36. package/build/api/init.js +13 -0
  37. package/build/api/lead.d.ts +24 -11
  38. package/build/api/lead.js +25 -1
  39. package/build/api/location.d.ts +5 -0
  40. package/build/api/location.js +19 -0
  41. package/build/api/operator.d.ts +1 -1
  42. package/build/api/operator.js +1 -1
  43. package/build/api/user.d.ts +7 -1
  44. package/build/api/user.js +9 -1
  45. package/build/app/rootReducer.d.ts +2 -1
  46. package/build/app/rootReducer.js +4 -2
  47. package/build/app/settings.d.ts +25 -12
  48. package/build/app/settings.js +95 -43
  49. package/build/app/store.d.ts +8 -6
  50. package/build/assets/locales/ar.json +93 -2
  51. package/build/assets/locales/en.json +95 -1
  52. package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
  53. package/build/components/AnimationFlow/AnimationFlow.js +4 -4
  54. package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
  55. package/build/components/AnimationFlow/BottomSheet.js +43 -19
  56. package/build/components/AnimationFlow/Dialog.d.ts +4 -2
  57. package/build/components/AnimationFlow/Dialog.js +30 -7
  58. package/build/components/Button/Button.js +1 -5
  59. package/build/components/DatePicker/DatePicker.d.ts +3 -1
  60. package/build/components/DatePicker/DatePicker.js +20 -15
  61. package/build/components/FileInput/DragAndDrop.d.ts +3 -2
  62. package/build/components/FileInput/DragAndDrop.js +5 -7
  63. package/build/components/LogoBadge/LogoBadge.js +3 -0
  64. package/build/components/Lottie/Lottie.d.ts +3536 -211
  65. package/build/components/Lottie/Lottie.js +12 -4
  66. package/build/components/Lottie/files/account_creating.json +732 -0
  67. package/build/components/Lottie/files/error.json +692 -0
  68. package/build/components/Lottie/files/start_loading.json +1140 -0
  69. package/build/components/Lottie/files/still_loading.json +1140 -0
  70. package/build/components/Lottie/index.d.ts +2 -2
  71. package/build/components/Lottie/index.js +2 -2
  72. package/build/components/ProgressBar/CircularProgressBar.d.ts +3 -1
  73. package/build/components/ProgressBar/CircularProgressBar.js +2 -2
  74. package/build/components/Radio/Radio.js +1 -1
  75. package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
  76. package/build/components/RadioGroup/RadioGroup.js +5 -9
  77. package/build/components/RadioGroup/index.d.ts +1 -1
  78. package/build/components/RadioLabel/RadioLabel.d.ts +4 -2
  79. package/build/components/RadioLabel/RadioLabel.js +2 -2
  80. package/build/components/SimpleList/SimpleList.d.ts +8 -2
  81. package/build/components/SimpleList/SimpleList.js +46 -14
  82. package/build/components/Slide/Slide.d.ts +1 -1
  83. package/build/components/Tooltip/Tooltip.d.ts +1 -1
  84. package/build/components/Tooltip/Tooltip.js +12 -3
  85. package/build/constants/api.d.ts +16 -0
  86. package/build/constants/api.js +32 -1
  87. package/build/constants/app.d.ts +69 -1
  88. package/build/constants/app.js +274 -36
  89. package/build/constants/assets.d.ts +14 -0
  90. package/build/constants/assets.js +14 -0
  91. package/build/constants/validation.d.ts +4 -0
  92. package/build/constants/validation.js +4 -0
  93. package/build/features/app/bank/bankStore.d.ts +94 -24
  94. package/build/features/app/bank/bankStore.js +192 -166
  95. package/build/features/app/brand/brandStore.d.ts +232 -0
  96. package/build/features/app/brand/brandStore.js +837 -0
  97. package/build/features/app/business/businessStore.d.ts +192 -28
  98. package/build/features/app/business/businessStore.js +431 -358
  99. package/build/features/app/connect/connectStore.d.ts +124 -19
  100. package/build/features/app/connect/connectStore.js +249 -278
  101. package/build/features/app/connectExpress/connectExpressStore.d.ts +323 -0
  102. package/build/features/app/connectExpress/connectExpressStore.js +1152 -0
  103. package/build/features/app/entity/entityStore.d.ts +109 -20
  104. package/build/features/app/entity/entityStore.js +451 -246
  105. package/build/features/app/individual/individualStore.d.ts +242 -26
  106. package/build/features/app/individual/individualStore.js +1002 -240
  107. package/build/features/app/password/passwordStore.d.ts +111 -24
  108. package/build/features/app/password/passwordStore.js +107 -43
  109. package/build/features/app/signIn/signInStore.d.ts +61 -7
  110. package/build/features/app/signIn/signInStore.js +24 -47
  111. package/build/features/app/tax/taxStore.d.ts +82 -9
  112. package/build/features/app/tax/taxStore.js +181 -119
  113. package/build/features/bank/Bank.d.ts +5 -3
  114. package/build/features/bank/Bank.js +45 -38
  115. package/build/features/bank/screens/BankDetails/BankDetails.js +59 -28
  116. package/build/features/bank/screens/BankDetails/BankName.d.ts +5 -1
  117. package/build/features/bank/screens/BankDetails/BankName.js +15 -12
  118. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +8 -1
  119. package/build/features/bank/screens/BankDetails/BankStatement.js +16 -46
  120. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +3 -1
  121. package/build/features/bank/screens/BankDetails/Beneficiary.js +15 -17
  122. package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +4 -1
  123. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +12 -13
  124. package/build/features/bank/screens/BankDetails/IBAN.d.ts +3 -1
  125. package/build/features/bank/screens/BankDetails/IBAN.js +17 -12
  126. package/build/features/bank/screens/BankDetails/validation.d.ts +26 -10
  127. package/build/features/bank/screens/BankDetails/validation.js +23 -28
  128. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  129. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  130. package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
  131. package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
  132. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
  133. package/build/features/bank/screens/Success/Success.js +7 -3
  134. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  135. package/build/features/bank/screens/Verify/OTPInput.js +5 -3
  136. package/build/features/bank/screens/Verify/Verify.js +1 -5
  137. package/build/features/brand/Brand.d.ts +9 -0
  138. package/build/features/brand/Brand.js +76 -0
  139. package/build/features/brand/index.d.ts +1 -0
  140. package/build/features/brand/index.js +1 -0
  141. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +74 -0
  142. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +180 -0
  143. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
  144. package/build/features/brand/screens/BrandActivities/BrandActivities.js +114 -0
  145. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +55 -0
  146. package/build/features/brand/screens/BrandActivities/CustomerBase.js +135 -0
  147. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +10 -0
  148. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +100 -0
  149. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +10 -0
  150. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +142 -0
  151. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +43 -0
  152. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +93 -0
  153. package/build/features/brand/screens/BrandActivities/TAC.d.ts +18 -0
  154. package/build/features/brand/screens/BrandActivities/TAC.js +93 -0
  155. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +6 -0
  156. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +56 -0
  157. package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
  158. package/build/features/brand/screens/BrandActivities/index.js +2 -0
  159. package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/validation.d.ts +19 -16
  160. package/build/features/brand/screens/BrandActivities/validation.js +23 -0
  161. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
  162. package/build/features/brand/screens/BrandInfo/BrandInfo.js +124 -0
  163. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +10 -0
  164. package/build/features/brand/screens/BrandInfo/BrandLogo.js +53 -0
  165. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +10 -0
  166. package/build/features/brand/screens/BrandInfo/BrandName.js +141 -0
  167. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +6 -0
  168. package/build/features/brand/screens/BrandInfo/SalesChannels.js +36 -0
  169. package/build/features/brand/screens/BrandInfo/SegmentLocations.d.ts +10 -0
  170. package/build/features/brand/screens/BrandInfo/SegmentLocations.js +69 -0
  171. package/build/features/brand/screens/BrandInfo/SegmentProfits.d.ts +10 -0
  172. package/build/features/brand/screens/BrandInfo/SegmentProfits.js +69 -0
  173. package/build/features/brand/screens/BrandInfo/SegmentTechs.d.ts +10 -0
  174. package/build/features/brand/screens/BrandInfo/SegmentTechs.js +69 -0
  175. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +10 -0
  176. package/build/features/brand/screens/BrandInfo/TeamSize.js +69 -0
  177. package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
  178. package/build/features/brand/screens/BrandInfo/index.js +2 -0
  179. package/build/features/brand/screens/BrandInfo/validation.d.ts +47 -0
  180. package/build/features/brand/screens/BrandInfo/validation.js +110 -0
  181. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  182. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  183. package/build/features/brand/screens/PrepareDataLoading/index.d.ts +2 -0
  184. package/build/features/brand/screens/PrepareDataLoading/index.js +2 -0
  185. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  186. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
  187. package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
  188. package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
  189. package/build/features/brand/screens/Success/Success.d.ts +5 -0
  190. package/build/features/brand/screens/Success/Success.js +20 -0
  191. package/build/features/brand/screens/Success/index.d.ts +3 -0
  192. package/build/features/brand/screens/Success/index.js +2 -0
  193. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  194. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -0
  195. package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  196. package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
  197. package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
  198. package/build/features/{auth/screens/OTP → brand/screens/Verify}/OTPInput.js +8 -10
  199. package/build/features/brand/screens/Verify/Verify.js +78 -0
  200. package/build/features/brand/screens/Verify/index.d.ts +2 -0
  201. package/build/features/brand/screens/Verify/index.js +2 -0
  202. package/build/features/business/Business.d.ts +4 -3
  203. package/build/features/business/Business.js +15 -18
  204. package/build/features/business/screens/Activities/Activities.js +6 -14
  205. package/build/features/business/screens/Activities/ActivitiesList.d.ts +17 -70
  206. package/build/features/business/screens/Activities/ActivitiesList.js +222 -100
  207. package/build/features/business/screens/Activities/OperationStartDate.d.ts +3 -3
  208. package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
  209. package/build/features/business/screens/Activities/validation.d.ts +165 -30
  210. package/build/features/business/screens/Activities/validation.js +9 -3
  211. package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +5 -0
  212. package/build/features/business/screens/BrandDetails/BrandDetails.js +39 -0
  213. package/build/features/business/screens/BrandDetails/BrandName.d.ts +5 -0
  214. package/build/features/business/screens/BrandDetails/BrandName.js +36 -0
  215. package/build/features/business/screens/BrandDetails/Header.d.ts +5 -0
  216. package/build/features/business/screens/BrandDetails/Header.js +49 -0
  217. package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +5 -0
  218. package/build/features/business/screens/BrandDetails/LicenseInfo.js +38 -0
  219. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +18 -0
  220. package/build/features/business/screens/BrandDetails/SalesChannel.js +48 -0
  221. package/build/features/business/screens/BrandDetails/index.d.ts +3 -0
  222. package/build/features/business/screens/BrandDetails/index.js +2 -0
  223. package/build/features/business/screens/BusinessType/Article.d.ts +8 -0
  224. package/build/features/business/screens/BusinessType/Article.js +52 -0
  225. package/build/features/business/screens/BusinessType/BusinessType.js +42 -17
  226. package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
  227. package/build/features/business/screens/BusinessType/EntityLicenseList.js +129 -0
  228. package/build/features/business/screens/BusinessType/EntityName.js +6 -7
  229. package/build/features/business/screens/BusinessType/LicenseCertificate.js +14 -46
  230. package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
  231. package/build/features/business/screens/BusinessType/LicenseList.js +11 -23
  232. package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
  233. package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -8
  234. package/build/features/business/screens/BusinessType/LicenseType.d.ts +30 -2
  235. package/build/features/business/screens/BusinessType/LicenseType.js +42 -6
  236. package/build/features/business/screens/BusinessType/validation.d.ts +9 -6
  237. package/build/features/business/screens/BusinessType/validation.js +21 -13
  238. package/build/features/business/screens/CivilID/IDNumber.js +2 -3
  239. package/build/features/business/screens/Customers/CustomerLocations.d.ts +47 -40
  240. package/build/features/business/screens/Customers/CustomerLocations.js +36 -21
  241. package/build/features/business/screens/Customers/Customers.js +27 -16
  242. package/build/features/business/screens/Customers/ExpectedCustomers.js +13 -6
  243. package/build/features/business/screens/Customers/ExpectedSalesRange.js +20 -9
  244. package/build/features/business/screens/Customers/RefundPolicy.d.ts +7 -7
  245. package/build/features/business/screens/Customers/RefundPolicy.js +15 -6
  246. package/build/features/business/screens/Customers/TransactionPolicy.js +19 -11
  247. package/build/features/business/screens/IDBOD/DOB.js +2 -2
  248. package/build/features/business/screens/IDBOD/ID.js +2 -3
  249. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
  250. package/build/features/business/screens/Success/Success.js +10 -3
  251. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -96
  252. package/build/features/business/screens/Verify/OTPInput.js +5 -3
  253. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  254. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +9 -134
  255. package/build/features/connect/Connect.d.ts +4 -4
  256. package/build/features/connect/Connect.js +40 -37
  257. package/build/features/connect/screens/CivilID/CivilID.js +6 -14
  258. package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
  259. package/build/features/connect/screens/Individual/Email.js +18 -28
  260. package/build/features/connect/screens/Individual/Individual.js +20 -10
  261. package/build/features/connect/screens/Individual/MobileNumber.js +16 -15
  262. package/build/features/connect/screens/Individual/Name.js +11 -15
  263. package/build/features/connect/screens/Individual/validation.js +2 -8
  264. package/build/features/connect/screens/Merchant/BrandList.js +17 -9
  265. package/build/features/connect/screens/Merchant/BrandName.js +10 -12
  266. package/build/features/connect/screens/Merchant/Merchant.js +41 -36
  267. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -3
  268. package/build/features/connect/screens/Merchant/SalesChannels.js +28 -103
  269. package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
  270. package/build/features/connect/screens/Merchant/Segments.js +66 -0
  271. package/build/features/connect/screens/Merchant/TAC.js +1 -3
  272. package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
  273. package/build/features/connect/screens/Merchant/TeamSize.js +66 -0
  274. package/build/features/connect/screens/Merchant/validation.d.ts +9 -0
  275. package/build/features/connect/screens/Merchant/validation.js +17 -14
  276. package/build/features/connect/screens/Mobile/Mobile.js +13 -16
  277. package/build/features/connect/screens/Mobile/MobileNumber.js +14 -10
  278. package/build/features/connect/screens/NID/DOB.js +1 -1
  279. package/build/features/connect/screens/NID/IDNumber.js +6 -7
  280. package/build/features/connect/screens/NID/NID.js +6 -0
  281. package/build/features/connect/screens/OTP/OTP.js +13 -15
  282. package/build/features/connect/screens/OTP/OTPInput.js +10 -0
  283. package/build/features/connect/screens/ThankYou/ThankYou.js +24 -2
  284. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  285. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +9 -73
  286. package/build/features/connectExpress/ConnectExpress.d.ts +12 -0
  287. package/build/features/connectExpress/ConnectExpress.js +149 -0
  288. package/build/features/connectExpress/index.d.ts +1 -0
  289. package/build/features/connectExpress/index.js +1 -0
  290. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
  291. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
  292. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
  293. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
  294. package/build/features/connectExpress/screens/Brand/Brand.d.ts +5 -0
  295. package/build/features/connectExpress/screens/Brand/Brand.js +71 -0
  296. package/build/features/connectExpress/screens/Brand/index.d.ts +2 -0
  297. package/build/features/connectExpress/screens/Brand/index.js +2 -0
  298. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
  299. package/build/features/connectExpress/screens/CivilID/CivilID.js +84 -0
  300. package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
  301. package/build/features/connectExpress/screens/CivilID/IDNumber.js +54 -0
  302. package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
  303. package/build/features/connectExpress/screens/CivilID/index.js +2 -0
  304. package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
  305. package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
  306. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
  307. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
  308. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
  309. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +54 -0
  310. package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
  311. package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
  312. package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
  313. package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
  314. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +9 -0
  315. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +138 -0
  316. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
  317. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +83 -0
  318. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +9 -0
  319. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +139 -0
  320. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
  321. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
  322. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +35 -0
  323. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +96 -0
  324. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +19 -0
  325. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +82 -0
  326. package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
  327. package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
  328. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
  329. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +155 -0
  330. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
  331. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +94 -0
  332. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +9 -0
  333. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +105 -0
  334. package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts → connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts} +3 -2
  335. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +153 -0
  336. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +7 -0
  337. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +44 -0
  338. package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
  339. package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
  340. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
  341. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
  342. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
  343. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +34 -0
  344. package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
  345. package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
  346. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.js +23 -12
  347. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +5 -0
  348. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +52 -0
  349. package/build/features/connectExpress/screens/IdentityOTP/validation.d.ts +8 -0
  350. package/build/features/connectExpress/screens/IdentityOTP/validation.js +4 -0
  351. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
  352. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
  353. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
  354. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
  355. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
  356. package/build/features/connectExpress/screens/Mobile/Mobile.js +111 -0
  357. package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +13 -0
  358. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +155 -0
  359. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +7 -0
  360. package/build/features/{auth/screens/NID → connectExpress/screens/Mobile}/TAC.js +12 -14
  361. package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
  362. package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
  363. package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
  364. package/build/features/connectExpress/screens/Mobile/index.js +2 -0
  365. package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
  366. package/build/features/connectExpress/screens/Mobile/validation.js +60 -0
  367. package/build/features/connectExpress/screens/NID/DOB.d.ts +7 -0
  368. package/build/features/connectExpress/screens/NID/DOB.js +47 -0
  369. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +7 -0
  370. package/build/features/{auth → connectExpress}/screens/NID/IDNumber.js +14 -18
  371. package/build/features/connectExpress/screens/NID/NID.js +94 -0
  372. package/build/features/connectExpress/screens/NID/TAC.d.ts +19 -0
  373. package/build/features/connectExpress/screens/NID/TAC.js +82 -0
  374. package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
  375. package/build/features/connectExpress/screens/NID/validation.js +22 -0
  376. package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/DOB.d.ts +1 -2
  377. package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/DOB.js +9 -9
  378. package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/IDNumber.d.ts +4 -1
  379. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +55 -0
  380. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
  381. package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/NID.js +14 -23
  382. package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
  383. package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
  384. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
  385. package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
  386. package/build/features/{auth/screens/NID/TAC.d.ts → connectExpress/screens/OTP/OTP.d.ts} +2 -0
  387. package/build/features/connectExpress/screens/OTP/OTP.js +88 -0
  388. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
  389. package/build/features/connectExpress/screens/OTP/OTPInput.js +55 -0
  390. package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
  391. package/build/features/connectExpress/screens/OTP/index.js +2 -0
  392. package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
  393. package/build/features/connectExpress/screens/OTP/validation.js +4 -0
  394. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  395. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
  396. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  397. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
  398. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  399. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +34 -0
  400. package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
  401. package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
  402. package/build/features/entity/Entity.d.ts +5 -3
  403. package/build/features/entity/Entity.js +45 -39
  404. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +37 -0
  405. package/build/features/entity/screens/EntityCapital/ActivityList.js +286 -0
  406. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +7 -0
  407. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +45 -0
  408. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +7 -0
  409. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +40 -0
  410. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +7 -0
  411. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +45 -0
  412. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
  413. package/build/features/entity/screens/EntityCapital/EntityCapital.js +86 -0
  414. package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
  415. package/build/features/entity/screens/EntityCapital/index.js +2 -0
  416. package/build/features/entity/screens/EntityCapital/validation.d.ts +197 -0
  417. package/build/features/entity/screens/EntityCapital/validation.js +18 -0
  418. package/build/features/entity/screens/EntityName/Article.d.ts +10 -0
  419. package/build/features/entity/screens/EntityName/Article.js +53 -0
  420. package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
  421. package/build/features/entity/screens/EntityName/EntityName.js +137 -0
  422. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +73 -0
  423. package/build/features/entity/screens/EntityName/EntityTypeList.js +134 -0
  424. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +21 -0
  425. package/build/features/entity/screens/EntityName/ExpiryDate.js +44 -0
  426. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +21 -0
  427. package/build/features/entity/screens/EntityName/IssuingDate.js +43 -0
  428. package/build/features/entity/screens/EntityName/LegalName.d.ts +7 -0
  429. package/build/features/entity/screens/EntityName/LegalName.js +49 -0
  430. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +9 -0
  431. package/build/features/entity/screens/EntityName/LicenseCertificate.js +54 -0
  432. package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +8 -0
  433. package/build/features/entity/screens/EntityName/LicenseNumber.js +53 -0
  434. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +8 -0
  435. package/build/features/entity/screens/EntityName/UnifiedNumber.js +44 -0
  436. package/build/features/entity/screens/EntityName/index.d.ts +2 -0
  437. package/build/features/entity/screens/EntityName/index.js +2 -0
  438. package/build/features/entity/screens/EntityName/validation.d.ts +60 -0
  439. package/build/features/entity/screens/EntityName/validation.js +91 -0
  440. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  441. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  442. package/build/features/entity/screens/PrepareDataLoading/index.d.ts +2 -0
  443. package/build/features/entity/screens/PrepareDataLoading/index.js +2 -0
  444. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
  445. package/build/features/entity/screens/Success/Success.js +7 -3
  446. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -94
  447. package/build/features/entity/screens/Verify/OTPInput.js +5 -3
  448. package/build/features/entity/screens/Verify/Verify.js +7 -20
  449. package/build/features/featuresScreens.d.ts +2 -1
  450. package/build/features/featuresScreens.js +148 -12
  451. package/build/features/individual/Individual.d.ts +5 -3
  452. package/build/features/individual/Individual.js +45 -39
  453. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -0
  454. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +96 -40
  455. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +9 -0
  456. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +54 -0
  457. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +3 -1
  458. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +19 -5
  459. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +2 -1
  460. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +34 -46
  461. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +3 -3
  462. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +90 -56
  463. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +31 -1
  464. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +37 -4
  465. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +7 -0
  466. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +42 -0
  467. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +7 -0
  468. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +47 -0
  469. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +9 -0
  470. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +54 -0
  471. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +2 -1
  472. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +31 -39
  473. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +31 -23
  474. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +15 -23
  475. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +12 -0
  476. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +32 -0
  477. package/build/features/individual/screens/IndividualList/Email.d.ts +10 -0
  478. package/build/features/individual/screens/IndividualList/Email.js +113 -0
  479. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
  480. package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
  481. package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
  482. package/build/features/individual/screens/IndividualList/MobileNumber.js +142 -0
  483. package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
  484. package/build/features/individual/screens/IndividualList/UserList.js +207 -0
  485. package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
  486. package/build/features/individual/screens/IndividualList/index.js +2 -0
  487. package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
  488. package/build/features/individual/screens/IndividualList/validation.js +40 -0
  489. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +10 -0
  490. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +103 -0
  491. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +12 -0
  492. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +76 -0
  493. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +9 -0
  494. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
  495. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +8 -0
  496. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +42 -0
  497. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +9 -0
  498. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +47 -0
  499. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +36 -0
  500. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +84 -0
  501. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +8 -0
  502. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +40 -0
  503. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
  504. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +182 -0
  505. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +12 -0
  506. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/IssuedCountry.js} +19 -35
  507. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +12 -0
  508. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +142 -0
  509. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +8 -0
  510. package/build/features/individual/screens/IndividualPersonalInfo/Name.js +44 -0
  511. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +12 -0
  512. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +76 -0
  513. package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
  514. package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
  515. package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
  516. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
  517. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +13 -0
  518. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +146 -0
  519. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +5 -0
  520. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +63 -0
  521. package/build/features/individual/screens/IndividualPhoneInfo/index.d.ts +3 -0
  522. package/build/features/individual/screens/IndividualPhoneInfo/index.js +2 -0
  523. package/build/features/individual/screens/IndividualPhoneInfo/validation.d.ts +8 -0
  524. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +31 -0
  525. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  526. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  527. package/build/features/individual/screens/PrepareDataLoading/index.d.ts +2 -0
  528. package/build/features/individual/screens/PrepareDataLoading/index.js +2 -0
  529. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
  530. package/build/features/individual/screens/Success/Success.js +7 -3
  531. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  532. package/build/features/individual/screens/Verify/OTPInput.js +5 -3
  533. package/build/features/individual/screens/Verify/Verify.js +10 -21
  534. package/build/features/password/Password.d.ts +5 -3
  535. package/build/features/password/Password.js +15 -18
  536. package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -16
  537. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
  538. package/build/features/password/screens/Success/Success.js +7 -3
  539. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  540. package/build/features/password/screens/Verify/OTPInput.js +5 -3
  541. package/build/features/password/screens/Verify/Verify.js +7 -20
  542. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
  543. package/build/features/shared/Address/Address.d.ts +16 -0
  544. package/build/features/shared/Address/Address.js +73 -0
  545. package/build/features/shared/Address/CountryList.d.ts +72 -0
  546. package/build/features/shared/Address/CountryList.js +89 -0
  547. package/build/features/shared/Address/InputSelect.d.ts +71 -0
  548. package/build/features/shared/Address/InputSelect.js +172 -0
  549. package/build/features/shared/Address/InputText.d.ts +12 -0
  550. package/build/features/shared/Address/InputText.js +12 -0
  551. package/build/features/shared/Address/index.d.ts +2 -0
  552. package/build/features/shared/Address/index.js +2 -0
  553. package/build/features/shared/Background/Background.js +1 -5
  554. package/build/features/shared/Button/Button.d.ts +3 -1
  555. package/build/features/shared/Button/Button.js +14 -4
  556. package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
  557. package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
  558. package/build/features/shared/Button/FlowsButtons.d.ts +4 -1
  559. package/build/features/shared/Button/FlowsButtons.js +64 -30
  560. package/build/features/shared/Button/IndividualActionButtons.d.ts +21 -0
  561. package/build/features/shared/Button/IndividualActionButtons.js +156 -0
  562. package/build/features/shared/Button/index.d.ts +2 -1
  563. package/build/features/shared/Button/index.js +2 -1
  564. package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
  565. package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
  566. package/build/features/shared/Chip/Chip.d.ts +3 -0
  567. package/build/features/shared/Chip/Chip.js +21 -0
  568. package/build/features/shared/Chip/index.d.ts +2 -0
  569. package/build/features/shared/Chip/index.js +2 -0
  570. package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
  571. package/build/features/shared/Containers/FeatureContainer.js +5 -4
  572. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  573. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +7 -0
  574. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
  575. package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
  576. package/build/features/shared/CreateAccountLoading/index.js +2 -0
  577. package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
  578. package/build/features/shared/DataLoading/DataLoading.js +58 -0
  579. package/build/features/shared/DataLoading/index.d.ts +2 -0
  580. package/build/features/shared/DataLoading/index.js +2 -0
  581. package/build/features/shared/Dot/Dot.d.ts +8 -0
  582. package/build/features/shared/Dot/Dot.js +29 -0
  583. package/build/features/shared/Dot/index.d.ts +2 -0
  584. package/build/features/shared/Dot/index.js +2 -0
  585. package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
  586. package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
  587. package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
  588. package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
  589. package/build/features/shared/EndAdornment/index.d.ts +3 -0
  590. package/build/features/shared/EndAdornment/index.js +3 -0
  591. package/build/features/shared/Footer/Footer.js +9 -1
  592. package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
  593. package/build/features/shared/Footer/PoweredByFooter.js +36 -0
  594. package/build/features/shared/Footer/index.d.ts +3 -2
  595. package/build/features/shared/Footer/index.js +3 -2
  596. package/build/features/shared/GenericError/GenericError.d.ts +7 -0
  597. package/build/features/shared/GenericError/GenericError.js +55 -0
  598. package/build/features/shared/GenericError/index.d.ts +2 -0
  599. package/build/features/shared/GenericError/index.js +2 -0
  600. package/build/features/shared/Input/Input.d.ts +12 -11
  601. package/build/features/shared/Input/Input.js +4 -5
  602. package/build/features/shared/Input/index.d.ts +2 -1
  603. package/build/features/shared/InputSelect/InputSelect.d.ts +4 -0
  604. package/build/features/shared/InputSelect/InputSelect.js +33 -0
  605. package/build/features/shared/InputSelect/index.d.ts +2 -0
  606. package/build/features/shared/InputSelect/index.js +2 -0
  607. package/build/features/shared/OTP/OTP.d.ts +2 -1
  608. package/build/features/shared/OTP/OTP.js +2 -2
  609. package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
  610. package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
  611. package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACILoading.d.ts +1 -0
  612. package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
  613. package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.js +1 -1
  614. package/build/features/shared/PaciVerification/index.d.ts +2 -0
  615. package/build/features/shared/PaciVerification/index.js +2 -0
  616. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +13 -0
  617. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +102 -0
  618. package/build/features/shared/SalesChannels/SalesChannel.d.ts +14 -0
  619. package/build/features/shared/SalesChannels/SalesChannel.js +154 -0
  620. package/build/features/shared/SalesChannels/index.d.ts +2 -0
  621. package/build/features/shared/SalesChannels/index.js +2 -0
  622. package/build/features/shared/Search/Search.d.ts +2 -1
  623. package/build/features/shared/Search/Search.js +2 -2
  624. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +17 -0
  625. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +134 -0
  626. package/build/features/shared/SuccessFlowButtons/index.d.ts +2 -0
  627. package/build/features/shared/SuccessFlowButtons/index.js +2 -0
  628. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +4 -2
  629. package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -3
  630. package/build/features/shared/UploadFile/FileUpload.d.ts +32 -0
  631. package/build/features/shared/UploadFile/FileUpload.js +267 -0
  632. package/build/features/shared/UploadFile/UploadFile.d.ts +5 -4
  633. package/build/features/shared/UploadFile/UploadFile.js +20 -20
  634. package/build/features/shared/UploadFile/UploadWrapper.d.ts +36 -0
  635. package/build/features/shared/UploadFile/UploadWrapper.js +115 -0
  636. package/build/features/shared/UploadFile/index.d.ts +2 -1
  637. package/build/features/shared/UploadFile/index.js +2 -1
  638. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +29 -0
  639. package/build/features/shared/UploadMultipleFile/UploadFile.js +273 -0
  640. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +36 -0
  641. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +178 -0
  642. package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
  643. package/build/features/shared/UploadMultipleFile/index.js +2 -0
  644. package/build/features/signIn/SignIn.d.ts +4 -3
  645. package/build/features/signIn/SignIn.js +12 -19
  646. package/build/features/tax/Tax.d.ts +5 -3
  647. package/build/features/tax/Tax.js +45 -40
  648. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  649. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  650. package/build/features/tax/screens/PrepareDataLoading/index.d.ts +2 -0
  651. package/build/features/tax/screens/PrepareDataLoading/index.js +2 -0
  652. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
  653. package/build/features/tax/screens/Success/Success.js +9 -3
  654. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  655. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +4 -1
  656. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +12 -12
  657. package/build/features/tax/screens/TaxDetails/TaxDetails.js +38 -26
  658. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +9 -0
  659. package/build/features/tax/screens/TaxDetails/TaxDocument.js +50 -0
  660. package/build/features/tax/screens/TaxDetails/VATId.d.ts +5 -1
  661. package/build/features/tax/screens/TaxDetails/VATId.js +12 -7
  662. package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -1
  663. package/build/features/tax/screens/TaxDetails/validation.js +7 -4
  664. package/build/features/tax/screens/Verify/OTPInput.js +5 -3
  665. package/build/features/tax/screens/Verify/Verify.js +6 -22
  666. package/build/hooks/index.d.ts +8 -0
  667. package/build/hooks/index.js +8 -0
  668. package/build/hooks/useAppConfig.d.ts +6 -2
  669. package/build/hooks/useAppConfig.js +13 -6
  670. package/build/hooks/useAppDispatch.d.ts +2 -1
  671. package/build/hooks/useCountUp.d.ts +9 -0
  672. package/build/hooks/useCountUp.js +17 -0
  673. package/build/hooks/useCountry.d.ts +4 -0
  674. package/build/hooks/useCountry.js +7 -0
  675. package/build/hooks/useDataNoneEditable.d.ts +2 -0
  676. package/build/hooks/useDataNoneEditable.js +19 -0
  677. package/build/hooks/useDataVerified.d.ts +6 -0
  678. package/build/hooks/useDataVerified.js +19 -0
  679. package/build/hooks/useErrorListener.d.ts +2 -1
  680. package/build/hooks/useErrorListener.js +16 -1
  681. package/build/hooks/useExcludeReadOnlyFelids.d.ts +11 -0
  682. package/build/hooks/useExcludeReadOnlyFelids.js +33 -0
  683. package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
  684. package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
  685. package/build/hooks/useFormReadOnly.d.ts +6 -0
  686. package/build/hooks/useFormReadOnly.js +40 -0
  687. package/build/hooks/useSetFromDefaultValues.js +4 -2
  688. package/build/hooks/useVerifyToken.d.ts +15 -0
  689. package/build/hooks/useVerifyToken.js +25 -0
  690. package/build/index.d.ts +12 -11
  691. package/build/index.js +14 -21
  692. package/build/theme/shadows.js +1 -1
  693. package/build/theme/typography.js +1 -1
  694. package/build/utils/array.d.ts +55 -1
  695. package/build/utils/array.js +280 -5
  696. package/build/utils/common.d.ts +2 -1
  697. package/build/utils/common.js +7 -0
  698. package/build/utils/date.d.ts +3 -0
  699. package/build/utils/date.js +17 -0
  700. package/build/utils/error.d.ts +2 -0
  701. package/build/utils/error.js +6 -0
  702. package/build/utils/gtm.d.ts +6 -0
  703. package/build/utils/gtm.js +29 -0
  704. package/build/utils/html.d.ts +1 -2
  705. package/build/utils/html.js +6 -11
  706. package/build/utils/index.d.ts +3 -0
  707. package/build/utils/index.js +3 -0
  708. package/build/utils/object.d.ts +4 -0
  709. package/build/utils/object.js +17 -0
  710. package/build/utils/string.d.ts +20 -2
  711. package/build/utils/string.js +81 -5
  712. package/build/utils/validation.d.ts +1 -0
  713. package/build/utils/validation.js +3 -0
  714. package/package.json +4 -2
  715. package/build/api/ip.d.ts +0 -4
  716. package/build/api/ip.js +0 -12
  717. package/build/features/app/auth/authStore.d.ts +0 -46
  718. package/build/features/app/auth/authStore.js +0 -261
  719. package/build/features/auth/Auth.d.ts +0 -10
  720. package/build/features/auth/Auth.js +0 -87
  721. package/build/features/auth/index.d.ts +0 -1
  722. package/build/features/auth/index.js +0 -1
  723. package/build/features/auth/screens/NID/validation.d.ts +0 -27
  724. package/build/features/auth/screens/NID/validation.js +0 -19
  725. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -6
  726. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +0 -23
  727. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -6
  728. package/build/features/connect/screens/Merchant/SocialMedia.js +0 -182
  729. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -23
  730. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
  731. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
  732. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -55
  733. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +0 -149
  734. package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +0 -3
  735. package/build/features/entity/screens/EntityInfoConfirm/Article.js +0 -73
  736. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
  737. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -75
  738. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
  739. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -32
  740. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
  741. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -49
  742. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
  743. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -33
  744. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
  745. package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
  746. package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -24
  747. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
  748. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +0 -46
  749. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
  750. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
  751. package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
  752. package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
  753. package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
  754. package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
  755. /package/build/features/{auth/screens/OTP/OTPInput.d.ts → brand/screens/Verify/Verify.d.ts} +0 -0
  756. /package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.d.ts +0 -0
  757. /package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.js +0 -0
  758. /package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.d.ts +0 -0
  759. /package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.d.ts +0 -0
  760. /package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.js +0 -0
  761. /package/build/features/{auth → connectExpress}/screens/NID/NID.d.ts +0 -0
  762. /package/build/features/{auth → connectExpress}/screens/NID/index.d.ts +0 -0
  763. /package/build/features/{auth → connectExpress}/screens/NID/index.js +0 -0
  764. /package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.d.ts +0 -0
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (_) try {
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
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
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -45,106 +45,320 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
+ var __rest = (this && this.__rest) || function (s, e) {
49
+ var t = {};
50
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ };
59
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
60
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
61
+ if (ar || !(i in from)) {
62
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
63
+ ar[i] = from[i];
64
+ }
65
+ }
66
+ return to.concat(ar || Array.prototype.slice.call(from));
67
+ };
48
68
  var _a;
49
69
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
70
  import API from '../../../api';
51
- import { FlowsTypes } from '../../../@types';
52
- import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
53
- import { BUSINESS_FLOW_SUCCESS, INDIVIDUAl_STEP_NAMES } from '../../../constants';
54
- export var verifyLeadToken = createAsyncThunk('individualVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
- var payload, settings, data, boardData, individualData, countryCode, boardInfoData, countries, board_id, board_info_id, notification, _a, id, type, info, hasIndividualCompleted;
56
- var _b, _c, _d, _e;
57
- return __generator(this, function (_f) {
58
- switch (_f.label) {
71
+ import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
72
+ import { handleNextScreenStep, handlePrevScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
73
+ import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES } from '../../../constants';
74
+ import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType } from '../../../utils';
75
+ export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a, thunkApi) {
76
+ var token = _a.token, isInternally = _a.isInternally, isUpdatePhoneInfo = _a.isUpdatePhoneInfo;
77
+ return __awaiter(void 0, void 0, void 0, function () {
78
+ var payload, settings, data, boardData, individualData, countryCode, boardInfoData, boardInfoStatus, countries, board_id, board_info_id, notification, _b, id, type, data_1, birthCountry, individuals, _c, is_authorized, data_state;
79
+ var _d, _e, _f, _g, _h, _j, _k;
80
+ return __generator(this, function (_l) {
81
+ switch (_l.label) {
82
+ case 0:
83
+ payload = {
84
+ service_name: 'tap_email',
85
+ verify_token: token
86
+ };
87
+ settings = thunkApi.getState().settings;
88
+ return [4, API.leadService.verifyLeadToken(payload)];
89
+ case 1:
90
+ data = (_l.sent()).data;
91
+ boardInfoStatus = undefined;
92
+ countries = settings.data.countries;
93
+ if (((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
94
+ throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
95
+ if (isInternally)
96
+ data.step_name = INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO;
97
+ if (data === null || data === void 0 ? void 0 : data.country_code) {
98
+ countryCode = data === null || data === void 0 ? void 0 : data.country_code;
99
+ thunkApi.dispatch(handleSetCountryByIso2(countryCode));
100
+ }
101
+ if (!(data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_INFO)) return [3, 2];
102
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
103
+ return [3, 16];
104
+ case 2:
105
+ if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 15];
106
+ board_id = data === null || data === void 0 ? void 0 : data.id;
107
+ board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
108
+ if (!(board_id && board_info_id)) return [3, 5];
109
+ return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
110
+ case 3:
111
+ boardInfoData = _l.sent();
112
+ notification = (boardInfoData || {}).notification;
113
+ _b = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _b.id, type = _b.type;
114
+ if (!(id && type)) return [3, 5];
115
+ return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
116
+ case 4:
117
+ data_1 = (_l.sent()).data;
118
+ individualData = data_1 || {};
119
+ _l.label = 5;
120
+ case 5:
121
+ if (!board_id) return [3, 7];
122
+ return [4, API.boardService.retrieveBoardDetails(board_id)];
123
+ case 6:
124
+ boardData = _l.sent();
125
+ _l.label = 7;
126
+ case 7:
127
+ if (!countryCode) {
128
+ countryCode = (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.country;
129
+ if (countryCode)
130
+ thunkApi.dispatch(handleSetCountryByIso2(countryCode));
131
+ }
132
+ if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 11];
133
+ if (!((_f = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _f === void 0 ? void 0 : _f.id)) return [3, 9];
134
+ return [4, thunkApi.dispatch(getIndividualList((_g = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _g === void 0 ? void 0 : _g.id))];
135
+ case 8:
136
+ _l.sent();
137
+ _l.label = 9;
138
+ case 9: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
139
+ case 10:
140
+ boardInfoStatus = _l.sent();
141
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
142
+ return [3, 14];
143
+ case 11:
144
+ birthCountry = ((_h = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _h === void 0 ? void 0 : _h.country) || countryCode;
145
+ if (!birthCountry) return [3, 13];
146
+ return [4, thunkApi.dispatch(getCityList(birthCountry))];
147
+ case 12:
148
+ _l.sent();
149
+ _l.label = 13;
150
+ case 13:
151
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
152
+ _l.label = 14;
153
+ case 14: return [3, 16];
154
+ case 15:
155
+ if (isUpdatePhoneInfo) {
156
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_VERIFY_STEP'));
157
+ }
158
+ _l.label = 16;
159
+ case 16:
160
+ individuals = (boardData || {}).individuals;
161
+ _c = individualData || {}, is_authorized = _c.is_authorized, data_state = _c.data_state;
162
+ return [2, {
163
+ data: data,
164
+ boardResponse: {
165
+ brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
166
+ bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
167
+ entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
168
+ merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
169
+ merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
170
+ name: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.names,
171
+ contact: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.contact,
172
+ individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
173
+ countries: countries,
174
+ countryCode: countryCode,
175
+ notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
176
+ business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
177
+ flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
178
+ },
179
+ token: token
180
+ }];
181
+ }
182
+ });
183
+ });
184
+ });
185
+ export var verifyLeadToken = createAsyncThunk('individualVerifyLeadToken', function (_a, thunkApi) {
186
+ var token = _a.token, isInternally = _a.isInternally;
187
+ return __awaiter(void 0, void 0, void 0, function () {
188
+ return __generator(this, function (_b) {
189
+ switch (_b.label) {
190
+ case 0: return [4, thunkApi
191
+ .dispatch(verifyToken({ token: token, isInternally: isInternally }))
192
+ .unwrap()
193
+ .catch(function (err) {
194
+ throw new Error(err.message);
195
+ })];
196
+ case 1:
197
+ _b.sent();
198
+ return [2];
199
+ }
200
+ });
201
+ });
202
+ });
203
+ export var resendOTP = createAsyncThunk('resendOTPIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
204
+ var individual, payload, data;
205
+ return __generator(this, function (_a) {
206
+ switch (_a.label) {
59
207
  case 0:
208
+ individual = thunkApi.getState().individual;
60
209
  payload = {
61
210
  service_name: 'tap_email',
62
- verify_token: token
211
+ verify_token: individual.data.verify.token
63
212
  };
64
- settings = thunkApi.getState().settings;
65
213
  return [4, API.leadService.verifyLeadToken(payload)];
66
214
  case 1:
67
- data = (_f.sent()).data;
68
- boardInfoData = undefined;
69
- countries = settings.data.countries;
70
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 10];
71
- if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 10];
72
- board_id = data === null || data === void 0 ? void 0 : data.id;
73
- board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
74
- if (!(board_id && board_info_id)) return [3, 4];
75
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
215
+ data = (_a.sent()).data;
216
+ return [2, { data: data }];
217
+ }
218
+ });
219
+ }); });
220
+ export var addDetailsAsync = createAsyncThunk('individual/addDetailsAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
221
+ var settings, user, userList, birth, individual_id, countryCode;
222
+ return __generator(this, function (_a) {
223
+ switch (_a.label) {
224
+ case 0:
225
+ settings = thunkApi.getState().settings;
226
+ user = params.user, userList = params.userList;
227
+ birth = user.birth, individual_id = user.individual_id;
228
+ countryCode = (birth === null || birth === void 0 ? void 0 : birth.country) || settings.data.businessCountry.iso2;
229
+ if (!countryCode) return [3, 2];
230
+ return [4, thunkApi.dispatch(getCityList(countryCode))];
231
+ case 1:
232
+ _a.sent();
233
+ _a.label = 2;
76
234
  case 2:
77
- boardInfoData = _f.sent();
78
- notification = (boardInfoData || {}).notification;
79
- _a = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _a.id, type = _a.type;
80
- if (!(id && type)) return [3, 4];
81
- return [4, API.individualService.retrieveIndividual(id, type)];
235
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
236
+ return [2, { userList: userList, individualId: individual_id, countryCode: settings.data.businessCountry.iso2, countries: settings.data.countries }];
237
+ }
238
+ });
239
+ }); });
240
+ export var requestDetailsByEmail = createAsyncThunk('individual/requestDetailsByEmail', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
241
+ var individual, _a, merchant_id, board_id, user, collectInfo, id, objects, ids, _b, resEmail, resPhone, isPhoneAndEmailAvailable, email, mobile, countryCode, hasContact, individualData, hasPhone, requestBody, data_2, user_1, payload, data;
242
+ var _c;
243
+ return __generator(this, function (_d) {
244
+ switch (_d.label) {
245
+ case 0:
246
+ individual = thunkApi.getState().individual;
247
+ _a = individual.data.verify.responseBody || {}, merchant_id = _a.merchant_id, board_id = _a.board_id;
248
+ user = params.user, collectInfo = params.collectInfo;
249
+ id = user.id, objects = user.objects, ids = user.ids;
250
+ _b = (user === null || user === void 0 ? void 0 : user.contact) || {}, resEmail = _b.email, resPhone = _b.phone;
251
+ isPhoneAndEmailAvailable = isValidEmail(resEmail) && (resPhone === null || resPhone === void 0 ? void 0 : resPhone.country_code) && (resPhone === null || resPhone === void 0 ? void 0 : resPhone.number);
252
+ email = collectInfo.email, mobile = collectInfo.mobile, countryCode = collectInfo.countryCode;
253
+ hasContact = !!email || !!mobile;
254
+ individualData = undefined;
255
+ if (!(!isPhoneAndEmailAvailable && hasContact)) return [3, 2];
256
+ hasPhone = mobile && (countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix);
257
+ requestBody = {
258
+ ids: (ids === null || ids === void 0 ? void 0 : ids.length) ? ids : [id],
259
+ contact: {
260
+ email: email,
261
+ phone: hasPhone
262
+ ? {
263
+ country_code: (_c = countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix) === null || _c === void 0 ? void 0 : _c.toString(),
264
+ number: mobile
265
+ }
266
+ : undefined
267
+ }
268
+ };
269
+ return [4, API.individualService.updateMultipleIndividual(requestBody)];
270
+ case 1:
271
+ data_2 = _d.sent();
272
+ user_1 = (sortUserList(mapUserList(data_2 === null || data_2 === void 0 ? void 0 : data_2.individuals)) || [])[0];
273
+ individualData = user_1;
274
+ _d.label = 2;
275
+ case 2:
276
+ payload = {
277
+ id: board_id,
278
+ merchant_id: merchant_id,
279
+ info: [
280
+ {
281
+ name: 'individual'
282
+ }
283
+ ],
284
+ notification: {
285
+ recipient: {
286
+ id: id,
287
+ type: (objects === null || objects === void 0 ? void 0 : objects[0]) || ''
288
+ },
289
+ channel: ['email']
290
+ }
291
+ };
292
+ return [4, API.boardService.requestDetailsByEmail(payload)];
82
293
  case 3:
83
- individualData = _f.sent();
84
- _f.label = 4;
85
- case 4:
86
- if (!board_id) return [3, 6];
87
- return [4, API.boardService.retrieveBoardDetails(board_id)];
88
- case 5:
89
- boardData = _f.sent();
90
- _f.label = 6;
91
- case 6:
92
- countryCode = (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.country;
93
- if (countryCode)
94
- thunkApi.dispatch(handleSetCountryByIso2(countryCode));
95
- info = boardInfoData.info;
96
- hasIndividualCompleted = ((_c = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'individual'; })) === null || _c === void 0 ? void 0 : _c.status) === 'completed';
97
- if (!hasIndividualCompleted) return [3, 7];
98
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
99
- return [3, 10];
100
- case 7:
101
- if (!countryCode) return [3, 9];
102
- return [4, thunkApi.dispatch(retrieveDataList(countryCode))];
103
- case 8:
104
- _f.sent();
105
- _f.label = 9;
106
- case 9:
107
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
108
- _f.label = 10;
109
- case 10: return [2, {
110
- data: data,
111
- boardResponse: {
112
- user: individualData === null || individualData === void 0 ? void 0 : individualData.user,
113
- brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
114
- bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
115
- entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
116
- merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
117
- name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names,
118
- contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
119
- countries: countries,
120
- countryCode: countryCode,
121
- notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
122
- flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
123
- },
124
- token: token
125
- }];
294
+ data = _d.sent();
295
+ return [2, { data: data, individualData: individualData }];
126
296
  }
127
297
  });
128
298
  }); });
129
- export var resendOTP = createAsyncThunk('resendOTPIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
130
- var individual, payload, data;
299
+ export var getIndividualList = createAsyncThunk('individual/getIndividualList', function (businessId) { return __awaiter(void 0, void 0, void 0, function () {
300
+ var payload, individuals, list;
131
301
  return __generator(this, function (_a) {
132
302
  switch (_a.label) {
133
303
  case 0:
134
- individual = thunkApi.getState().individual;
135
304
  payload = {
136
- service_name: 'tap_email',
137
- verify_token: individual.data.verify.token
305
+ page: 1,
306
+ limit: 10,
307
+ business_id: businessId
138
308
  };
139
- return [4, API.leadService.verifyLeadToken(payload)];
309
+ return [4, API.individualService.getIndividualList(payload)];
140
310
  case 1:
141
- data = (_a.sent()).data;
142
- return [2, { data: data }];
311
+ individuals = (_a.sent()).individuals;
312
+ list = sortUserList(mapUserList(individuals)) || [];
313
+ return [2, __spreadArray([], list, true)];
314
+ }
315
+ });
316
+ }); });
317
+ export var getCityList = createAsyncThunk('individual/getCityList', function (countryCode) { return __awaiter(void 0, void 0, void 0, function () {
318
+ var cityBody, list;
319
+ return __generator(this, function (_a) {
320
+ switch (_a.label) {
321
+ case 0:
322
+ cityBody = {
323
+ country: [countryCode]
324
+ };
325
+ return [4, API.countryService.getCities(cityBody)];
326
+ case 1:
327
+ list = (_a.sent()).list;
328
+ return [2, list || []];
329
+ }
330
+ });
331
+ }); });
332
+ export var retrieveIndividualInfo = createAsyncThunk('individual/retrieveIndividualInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
333
+ var id, type, countryCode, settings, data, _a, isShareholder, isBoardMember, isBuyer, isCustomer, individualData;
334
+ return __generator(this, function (_b) {
335
+ switch (_b.label) {
336
+ case 0:
337
+ id = params.id, type = params.type, countryCode = params.countryCode;
338
+ settings = thunkApi.getState().settings;
339
+ return [4, API.individualService.retrieveIndividual(id, type)];
340
+ case 1:
341
+ data = _b.sent();
342
+ _a = getIndividualType([type]), isShareholder = _a.isShareholder, isBoardMember = _a.isBoardMember, isBuyer = _a.isBuyer, isCustomer = _a.isCustomer;
343
+ individualData = data === null || data === void 0 ? void 0 : data.user;
344
+ if (isShareholder)
345
+ individualData = data === null || data === void 0 ? void 0 : data.shareholder;
346
+ else if (isBoardMember)
347
+ individualData = data === null || data === void 0 ? void 0 : data.board_member;
348
+ else if (isBuyer)
349
+ individualData = data === null || data === void 0 ? void 0 : data.buyer;
350
+ else if (isCustomer)
351
+ individualData = data === null || data === void 0 ? void 0 : data.customer;
352
+ return [2, {
353
+ data: __assign(__assign({}, (individualData || {})), { objects: [type], individual_data_state: individualData === null || individualData === void 0 ? void 0 : individualData.data_state, object: type }),
354
+ countryCode: countryCode,
355
+ countries: settings.data.countries
356
+ }];
143
357
  }
144
358
  });
145
359
  }); });
146
360
  export var retrieveDataList = createAsyncThunk('individualRetrieveDataList', function (countryCode) { return __awaiter(void 0, void 0, void 0, function () {
147
- var monthlyIncomeBody, dataBody, _a, sourceIncome, monthlyIncome, occupation;
361
+ var monthlyIncomeBody, dataBody, _a, sourceIncome, monthlyIncome, occupationData, occupation, mappedOccupation;
148
362
  return __generator(this, function (_b) {
149
363
  switch (_b.label) {
150
364
  case 0:
@@ -161,34 +375,54 @@ export var retrieveDataList = createAsyncThunk('individualRetrieveDataList', fun
161
375
  API.dataService.getOccupation(dataBody)
162
376
  ])];
163
377
  case 1:
164
- _a = _b.sent(), sourceIncome = _a[0], monthlyIncome = _a[1], occupation = _a[2];
378
+ _a = _b.sent(), sourceIncome = _a[0], monthlyIncome = _a[1], occupationData = _a[2];
379
+ occupation = (occupationData === null || occupationData === void 0 ? void 0 : occupationData.occupation) || {};
380
+ mappedOccupation = (occupation.section || []).map(function (section) {
381
+ var sub = (occupation.chapter || []).filter(function (chapter) { return chapter.section_code === section.code; });
382
+ return __assign(__assign({}, section), { sub: sub });
383
+ });
165
384
  return [2, {
166
385
  sourceIncome: sourceIncome,
167
386
  monthlyIncome: monthlyIncome,
168
- occupation: occupation
387
+ occupation: { list: mappedOccupation || [] }
169
388
  }];
170
389
  }
171
390
  });
172
391
  }); });
392
+ export var retrieveBoardStatus = createAsyncThunk('individual/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
393
+ var individual, board_id, data;
394
+ return __generator(this, function (_a) {
395
+ switch (_a.label) {
396
+ case 0:
397
+ individual = thunkApi.getState().individual;
398
+ board_id = (individual.data.verify.responseBody || {}).board_id;
399
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
400
+ case 1:
401
+ data = _a.sent();
402
+ thunkApi.dispatch(handlePrevScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
403
+ return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
404
+ }
405
+ });
406
+ }); });
173
407
  export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetails', function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
174
- var data;
175
- var _a, _b;
176
- return __generator(this, function (_c) {
177
- switch (_c.label) {
408
+ var _a, user, data;
409
+ var _b, _c;
410
+ return __generator(this, function (_d) {
411
+ switch (_d.label) {
178
412
  case 0: return [4, API.boardService.retrieveBoardDetails(boardId)];
179
413
  case 1:
180
- data = _c.sent();
414
+ _a = _d.sent(), user = _a.user, data = __rest(_a, ["user"]);
181
415
  return [2, {
182
- 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 })
416
+ data: __assign(__assign({}, data), { 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: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.names, individuals: data === null || data === void 0 ? void 0 : data.individuals, contact: (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.contact })
183
417
  }];
184
418
  }
185
419
  });
186
420
  }); });
187
421
  export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
188
- var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData, individualData, boardData, countryCode, notification, _c, id, type, info, hasIndividualCompleted;
189
- var _d, _e, _f, _g, _h, _j, _k;
190
- return __generator(this, function (_l) {
191
- switch (_l.label) {
422
+ var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData, individualData, boardData, boardInfoStatus, countryCode, notification, _c, id, type, data_3, birthCountry, individuals, _d, is_authorized, data_state;
423
+ var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
424
+ return __generator(this, function (_q) {
425
+ switch (_q.label) {
192
426
  case 0:
193
427
  _a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
194
428
  responseBody = individual.data.verify.responseBody;
@@ -196,110 +430,353 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
196
430
  countries = settings.data.countries;
197
431
  payload = {
198
432
  data: params.otp,
199
- service_name: (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name,
433
+ service_name: (_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _e === void 0 ? void 0 : _e.service_name,
200
434
  verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
201
435
  step_name: INDIVIDUAl_STEP_NAMES.PHONE_AUTH,
202
436
  encryption_contract: ['data']
203
437
  };
204
438
  return [4, API.leadService.verifyLeadOTP(payload)];
205
439
  case 1:
206
- data = (_l.sent()).data;
207
- countryCode = undefined;
208
- if (!!(data === null || data === void 0 ? void 0 : data.errors)) return [3, 10];
209
- if (!(board_id && board_info_id)) return [3, 4];
210
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
440
+ data = (_q.sent()).data;
441
+ boardInfoStatus = undefined;
442
+ if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
443
+ throw new Error(data.errors[0].description);
444
+ if (!board_id) return [3, 3];
445
+ return [4, API.boardService.retrieveBoardDetails(board_id)];
211
446
  case 2:
212
- boardInfoData = _l.sent();
213
- notification = (boardInfoData || {}).notification;
214
- _c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
215
- if (!(id && type)) return [3, 4];
216
- return [4, API.individualService.retrieveIndividual(id, type)];
447
+ boardData = _q.sent();
448
+ _q.label = 3;
217
449
  case 3:
218
- individualData = _l.sent();
219
- _l.label = 4;
450
+ countryCode = (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.country;
451
+ if (!(board_id && board_info_id)) return [3, 6];
452
+ return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
220
453
  case 4:
221
- if (!board_id) return [3, 6];
222
- return [4, API.boardService.retrieveBoardDetails(board_id)];
454
+ boardInfoData = _q.sent();
455
+ notification = (boardInfoData || {}).notification;
456
+ _c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
457
+ if (!(id && type)) return [3, 6];
458
+ return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
223
459
  case 5:
224
- boardData = _l.sent();
225
- _l.label = 6;
460
+ data_3 = (_q.sent()).data;
461
+ individualData = data_3 || {};
462
+ _q.label = 6;
226
463
  case 6:
227
- countryCode = (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.country;
228
- info = boardInfoData.info;
229
- hasIndividualCompleted = ((_f = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'individual'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
230
- (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
231
- if (!hasIndividualCompleted) return [3, 7];
232
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
233
- return [3, 10];
464
+ if (countryCode)
465
+ thunkApi.dispatch(handleSetCountryByIso2(countryCode));
466
+ if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 10];
467
+ if (!((_h = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _h === void 0 ? void 0 : _h.id)) return [3, 8];
468
+ return [4, thunkApi.dispatch(getIndividualList((_j = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _j === void 0 ? void 0 : _j.id))];
234
469
  case 7:
235
- if (!countryCode) return [3, 9];
236
- return [4, thunkApi.dispatch(retrieveDataList(countryCode))];
237
- case 8:
238
- _l.sent();
239
- _l.label = 9;
470
+ _q.sent();
471
+ _q.label = 8;
472
+ case 8: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
240
473
  case 9:
241
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
242
- _l.label = 10;
243
- case 10: return [2, {
244
- data: data,
245
- boardResponse: {
246
- user: individualData === null || individualData === void 0 ? void 0 : individualData.user,
247
- brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
248
- bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
249
- entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
250
- merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
251
- name: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.names,
252
- contact: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.contact,
253
- countries: countries,
254
- countryCode: countryCode,
255
- notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
256
- flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
257
- },
258
- formData: __assign({}, params)
259
- }];
474
+ boardInfoStatus = _q.sent();
475
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
476
+ return [3, 13];
477
+ case 10:
478
+ birthCountry = ((_k = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _k === void 0 ? void 0 : _k.country) || countryCode;
479
+ if (!birthCountry) return [3, 12];
480
+ return [4, thunkApi.dispatch(getCityList(birthCountry))];
481
+ case 11:
482
+ _q.sent();
483
+ _q.label = 12;
484
+ case 12:
485
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
486
+ _q.label = 13;
487
+ case 13:
488
+ (_m = (_l = settings.data.appConfig).onStepCompleted) === null || _m === void 0 ? void 0 : _m.call(_l, settings.data.activeScreen.name, { otp: params.otp });
489
+ individuals = (boardData || {}).individuals;
490
+ _d = individualData || {}, is_authorized = _d.is_authorized, data_state = _d.data_state;
491
+ return [2, {
492
+ data: data,
493
+ boardResponse: {
494
+ brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
495
+ bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
496
+ entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
497
+ merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
498
+ merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
499
+ name: (_o = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _o === void 0 ? void 0 : _o.names,
500
+ contact: (_p = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _p === void 0 ? void 0 : _p.contact,
501
+ individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
502
+ countries: countries,
503
+ countryCode: countryCode,
504
+ notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
505
+ business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
506
+ flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
507
+ },
508
+ formData: __assign({}, params)
509
+ }];
260
510
  }
261
511
  });
262
512
  }); });
263
- export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
264
- var _a, settings, individual, _b, id, type, requestBody, data;
265
- var _c, _d, _e, _f, _g, _h, _j, _k;
266
- return __generator(this, function (_l) {
267
- switch (_l.label) {
268
- case 0:
269
- _a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
270
- _b = ((_d = (_c = individual.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.notification) === null || _d === void 0 ? void 0 : _d.recipient) || {}, id = _b.id, type = _b.type;
271
- requestBody = {
272
- id: id,
273
- type: type,
274
- occupation: { id: (_e = params.occupation) === null || _e === void 0 ? void 0 : _e.id },
275
- employer_name: params.employerName,
276
- employer_country: (_f = params.employerLocation) === null || _f === void 0 ? void 0 : _f.iso2,
277
- source_income: [{ id: (_g = params.sourceIncome) === null || _g === void 0 ? void 0 : _g.id }],
278
- monthly_income: { id: (_h = params.monthlyIncome) === null || _h === void 0 ? void 0 : _h.id },
279
- is_relative_PEP: params.isPEP,
280
- is_influencer: params.isInfluencer,
281
- encryption_contract: ['employer_name', 'employer_country'],
282
- step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO
283
- };
284
- return [4, API.individualService.updateIndividual(requestBody)];
285
- case 1:
286
- data = (_l.sent()).data;
287
- if (!(data === null || data === void 0 ? void 0 : data.errors)) {
288
- thunkApi.dispatch(handleNextScreenStep());
513
+ export var updatePhoneInfo = createAsyncThunk('individual/updatePhoneInfo', function (_a, thunkApi) {
514
+ var formData = _a.formData, originalFormData = _a.originalFormData;
515
+ return __awaiter(void 0, void 0, void 0, function () {
516
+ var individual, _b, token, responseBody, id, mobile, countryCode, requestBody, data;
517
+ var _c;
518
+ return __generator(this, function (_d) {
519
+ switch (_d.label) {
520
+ case 0:
521
+ individual = thunkApi.getState().individual;
522
+ _b = individual.data.verify, token = _b.token, responseBody = _b.responseBody;
523
+ id = ((responseBody === null || responseBody === void 0 ? void 0 : responseBody.source) || {}).id;
524
+ mobile = formData.mobile, countryCode = formData.countryCode;
525
+ requestBody = {
526
+ ids: [id],
527
+ contact: {
528
+ phone: {
529
+ country_code: (_c = countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix) === null || _c === void 0 ? void 0 : _c.toString(),
530
+ number: mobile || ''
531
+ }
532
+ }
533
+ };
534
+ return [4, API.individualService.updateMultipleIndividual(requestBody)];
535
+ case 1:
536
+ data = _d.sent();
537
+ return [4, thunkApi.dispatch(verifyToken({ token: token, isUpdatePhoneInfo: true }))];
538
+ case 2:
539
+ _d.sent();
540
+ return [2, { data: data, formData: originalFormData }];
541
+ }
542
+ });
543
+ });
544
+ });
545
+ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateIndividualPersonalInfo', function (_a, thunkApi) {
546
+ var formData = _a.formData, originalFormData = _a.originalFormData;
547
+ return __awaiter(void 0, void 0, void 0, function () {
548
+ var _b, settings, individual, _c, notification, user, entity, id, _d, objects, ids, name, email, mobile, countryCode, gender, nid, issuedCountry, expiryDate, dob, placeOfBirthCountry, placeOfBirthCity, nationality, code, data_status, userName, identification_id_type, isGenderNonEditable, isNameENNonEditable, isNameARNonEditable, isEmailNonEditable, isMobileNumberNonEditable, isMobileCountryNonEditable, isNidNonEditable, isIssuedCountryNonEditable, isExpiryNonEditable, isIdTypeNonEditable, isNationalityNonEditable, isDOBNonEditable, isBirthCityNonEditable, isBirthCountryNonEditable, hasContact, hasPhone, hasIdentification, hasBirth, nameIsEditable, contact, requestBody, data, _e, isUser, isBuyer, isUserORBuyerType;
549
+ var _f, _g, _h, _j, _k;
550
+ return __generator(this, function (_l) {
551
+ switch (_l.label) {
552
+ case 0:
553
+ _b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
554
+ _c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user, entity = _c.entity;
555
+ id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
556
+ _d = user || {}, objects = _d.objects, ids = _d.ids;
557
+ name = formData.name, email = formData.email, mobile = formData.mobile, countryCode = formData.countryCode, gender = formData.gender, nid = formData.nid, issuedCountry = formData.issuedCountry, expiryDate = formData.expiryDate, dob = formData.dob, placeOfBirthCountry = formData.placeOfBirthCountry, placeOfBirthCity = formData.placeOfBirthCity, nationality = formData.nationality;
558
+ code = entity === null || entity === void 0 ? void 0 : entity.country;
559
+ data_status = (user || {}).data_status;
560
+ userName = getUserNameObject(name);
561
+ identification_id_type = nid ? (nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA) : undefined;
562
+ isGenderNonEditable = hasNoneEditableValue(data_status, 'gender');
563
+ isNameENNonEditable = hasNoneEditableValue(data_status, 'name.en');
564
+ isNameARNonEditable = hasNoneEditableValue(data_status, 'name.ar');
565
+ isEmailNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.contact, 'email');
566
+ isMobileNumberNonEditable = hasNoneEditableValue((_f = data_status === null || data_status === void 0 ? void 0 : data_status.contact) === null || _f === void 0 ? void 0 : _f.phone, 'number');
567
+ isMobileCountryNonEditable = hasNoneEditableValue((_g = data_status === null || data_status === void 0 ? void 0 : data_status.contact) === null || _g === void 0 ? void 0 : _g.phone, 'country_code');
568
+ isNidNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.identification, 'id');
569
+ isIssuedCountryNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.identification, 'issuer_country');
570
+ isExpiryNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.identification, 'expiry');
571
+ isIdTypeNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.identification, 'type');
572
+ isNationalityNonEditable = hasNoneEditableValue(data_status, 'nationality');
573
+ isDOBNonEditable = hasNoneEditableValue(data_status, 'birth.date');
574
+ isBirthCityNonEditable = hasNoneEditableValue(data_status, 'birth.city');
575
+ isBirthCountryNonEditable = hasNoneEditableValue(data_status, 'birth.country');
576
+ hasContact = email || mobile || countryCode;
577
+ hasPhone = mobile && (countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix);
578
+ hasIdentification = nid && (issuedCountry || identification_id_type || expiryDate);
579
+ hasBirth = placeOfBirthCity || placeOfBirthCountry;
580
+ nameIsEditable = userName.first && !(isNameENNonEditable && isNameARNonEditable);
581
+ contact = hasContact && !(isEmailNonEditable && isMobileCountryNonEditable && isMobileNumberNonEditable)
582
+ ? __assign({ email: isEmailNonEditable ? undefined : email }, (!((isMobileCountryNonEditable && isMobileNumberNonEditable) || !hasPhone) && {
583
+ phone: {
584
+ country_code: isMobileCountryNonEditable ? undefined : (_h = countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix) === null || _h === void 0 ? void 0 : _h.toString(),
585
+ number: isMobileNumberNonEditable || !mobile ? undefined : mobile
586
+ }
587
+ })) : undefined;
588
+ requestBody = __assign(__assign(__assign(__assign(__assign(__assign(__assign({ ids: (ids === null || ids === void 0 ? void 0 : ids.length) ? ids : [id], gender: isGenderNonEditable || !gender ? undefined : gender }, (nameIsEditable && {
589
+ names: {
590
+ en: isNameENNonEditable ? undefined : userName,
591
+ ar: isNameARNonEditable ? undefined : userName
592
+ }
593
+ })), { contact: contact }), (hasIdentification &&
594
+ !(isNidNonEditable && isIssuedCountryNonEditable && isExpiryNonEditable && isIdTypeNonEditable) && {
595
+ identification: {
596
+ id: isNidNonEditable || !nid ? undefined : nid,
597
+ issued_country_code: isIssuedCountryNonEditable ? undefined : issuedCountry === null || issuedCountry === void 0 ? void 0 : issuedCountry.iso2,
598
+ expiry: isExpiryNonEditable || !expiryDate ? undefined : new Date(expiryDate).getTime(),
599
+ type: isIdTypeNonEditable || !identification_id_type ? undefined : identification_id_type
600
+ }
601
+ })), (!isDOBNonEditable && {
602
+ date_of_birth: dob
603
+ })), (hasBirth &&
604
+ !(isBirthCityNonEditable && isBirthCountryNonEditable) && {
605
+ birth: {
606
+ city: isBirthCityNonEditable ? undefined : placeOfBirthCity === null || placeOfBirthCity === void 0 ? void 0 : placeOfBirthCity.id,
607
+ country: isBirthCountryNonEditable ? undefined : placeOfBirthCountry === null || placeOfBirthCountry === void 0 ? void 0 : placeOfBirthCountry.iso2
608
+ }
609
+ })), (!isNationalityNonEditable && {
610
+ nationality: nationality === null || nationality === void 0 ? void 0 : nationality.iso2
611
+ })), { encryption_contract: [
612
+ 'gender',
613
+ 'contact.email',
614
+ 'contact.phone.country_code',
615
+ 'contact.phone.number',
616
+ 'identification.id',
617
+ 'identification.issued_country_code',
618
+ 'identification.expiry',
619
+ 'identification.type',
620
+ 'birth.country',
621
+ 'date_of_birth',
622
+ 'nationality'
623
+ ], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_PERSONAL_INFO });
624
+ return [4, API.individualService.updateMultipleIndividual(requestBody)];
625
+ case 1:
626
+ data = _l.sent();
627
+ _e = getIndividualType(objects), isUser = _e.isUser, isBuyer = _e.isBuyer;
628
+ isUserORBuyerType = isUser || isBuyer;
629
+ if (!isUserORBuyerType) return [3, 3];
630
+ return [4, thunkApi.dispatch(retrieveDataList(code))];
631
+ case 2:
632
+ _l.sent();
633
+ _l.label = 3;
634
+ case 3:
635
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
289
636
  (_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, requestBody);
290
- }
291
- return [2, { data: data, formData: params }];
292
- }
637
+ return [2, { data: data, formData: originalFormData }];
638
+ }
639
+ });
293
640
  });
294
- }); });
641
+ });
642
+ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', function (_a, thunkApi) {
643
+ var formData = _a.formData, originalFormData = _a.originalFormData;
644
+ return __awaiter(void 0, void 0, void 0, function () {
645
+ var _b, settings, individual, _c, notification, user, id, _d, objects, ids, occupation, sourceIncome, monthlyIncome, isPEP, isInfluencer, shareCount, shareValue, civilID, signatureFileId, isOccupationNonEditable, isSourceIncomeNonEditable, isPEPNonEditable, isInfluencerNonEditable, isMonthlyIncomeNonEditable, isSharesAvailable, pepInfo, influencerInfo, occupationInfo, sourceIncomeInfo, monthlyIncomeInfo, userPayload, shareHolderPayload, boardMemberPayload, buyerMemberPayload, _e, isUser, isShareholder, isBoardMember, isBuyer, isCustomer, isUserORBuyerType, payload, requestBody, data, businessCountry, hasCivilIdDocument, hasSignatureDocument, isSendSignatureFile, civilIdDocument, signatureDocument, documentBody, documentBody, documentsList, documentBody, individualData;
646
+ var _f, _g;
647
+ return __generator(this, function (_h) {
648
+ switch (_h.label) {
649
+ case 0:
650
+ _b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
651
+ _c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user;
652
+ id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
653
+ _d = user || {}, objects = _d.objects, ids = _d.ids;
654
+ occupation = formData.occupation, sourceIncome = formData.sourceIncome, monthlyIncome = formData.monthlyIncome, isPEP = formData.isPEP, isInfluencer = formData.isInfluencer, shareCount = formData.shareCount, shareValue = formData.shareValue, civilID = formData.civilID, signatureFileId = formData.signatureFileId;
655
+ isOccupationNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'occupation');
656
+ isSourceIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'source_of_income');
657
+ isPEPNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_relative_PEP');
658
+ isInfluencerNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_influencer');
659
+ isMonthlyIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'monthly_income');
660
+ isSharesAvailable = shareCount || shareValue;
661
+ pepInfo = isPEPNonEditable ? undefined : isPEP;
662
+ influencerInfo = isInfluencerNonEditable ? undefined : isInfluencer;
663
+ occupationInfo = isOccupationNonEditable || !(occupation === null || occupation === void 0 ? void 0 : occupation.id) ? undefined : { chapter: { id: occupation.id } };
664
+ sourceIncomeInfo = isSourceIncomeNonEditable || !(sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.id) ? undefined : [{ id: sourceIncome.id }];
665
+ monthlyIncomeInfo = isMonthlyIncomeNonEditable || !(monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.id) ? undefined : { id: monthlyIncome.id };
666
+ userPayload = {
667
+ occupation: occupationInfo,
668
+ source_income: sourceIncomeInfo,
669
+ monthly_income: monthlyIncomeInfo,
670
+ is_relative_PEP: pepInfo,
671
+ is_influencer: influencerInfo
672
+ };
673
+ shareHolderPayload = {
674
+ shares: isSharesAvailable
675
+ ? {
676
+ count: shareCount && Number(shareCount),
677
+ value: shareValue && Number(removeAllCharsFromNumber(shareValue))
678
+ }
679
+ : undefined
680
+ };
681
+ boardMemberPayload = {
682
+ is_relative_PEP: pepInfo,
683
+ is_influencer: influencerInfo
684
+ };
685
+ buyerMemberPayload = {
686
+ occupation: occupationInfo,
687
+ source_income: sourceIncomeInfo,
688
+ monthly_income: monthlyIncomeInfo
689
+ };
690
+ _e = getIndividualType(objects), isUser = _e.isUser, isShareholder = _e.isShareholder, isBoardMember = _e.isBoardMember, isBuyer = _e.isBuyer, isCustomer = _e.isCustomer;
691
+ isUserORBuyerType = isUser || isBuyer;
692
+ payload = userPayload;
693
+ if (objects === null || objects === void 0 ? void 0 : objects.length) {
694
+ payload = __assign(__assign(__assign(__assign(__assign({}, (isUser && payload)), (isShareholder && shareHolderPayload)), (isBoardMember && boardMemberPayload)), (isBuyer && buyerMemberPayload)), (isCustomer && {}));
695
+ }
696
+ requestBody = __assign(__assign({ ids: (ids === null || ids === void 0 ? void 0 : ids.length) ? ids : [id] }, payload), { encryption_contract: [], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO });
697
+ return [4, API.individualService.updateMultipleIndividual(requestBody)];
698
+ case 1:
699
+ data = _h.sent();
700
+ businessCountry = settings.data.businessCountry;
701
+ hasCivilIdDocument = (civilID || []).length > 0;
702
+ hasSignatureDocument = (signatureFileId || []).length > 0;
703
+ isSendSignatureFile = (user === null || user === void 0 ? void 0 : user.is_authorized) && isUserORBuyerType;
704
+ civilIdDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.IDENTITY_DOCUMENT);
705
+ signatureDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.CUSTOMER_SIGNATURE);
706
+ if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3, 3];
707
+ documentBody = {
708
+ id: civilIdDocument.id,
709
+ images: civilID
710
+ };
711
+ return [4, API.documentService.addFilesToExistingDocument(documentBody)];
712
+ case 2:
713
+ _h.sent();
714
+ _h.label = 3;
715
+ case 3:
716
+ if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3, 5];
717
+ documentBody = {
718
+ id: signatureDocument.id,
719
+ images: signatureFileId
720
+ };
721
+ return [4, API.documentService.addFilesToExistingDocument(documentBody)];
722
+ case 4:
723
+ _h.sent();
724
+ _h.label = 5;
725
+ case 5:
726
+ documentsList = [];
727
+ if (hasCivilIdDocument && !(civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id))
728
+ documentsList.push({ type: DocumentPurpose.IDENTITY_DOCUMENT, images: civilID });
729
+ if (isSendSignatureFile && hasSignatureDocument && !(signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id))
730
+ documentsList.push({ type: DocumentPurpose.CUSTOMER_SIGNATURE, images: signatureFileId });
731
+ if (!(documentsList.length > 0)) return [3, 7];
732
+ documentBody = {
733
+ individual_type_id: ((ids === null || ids === void 0 ? void 0 : ids.length) ? ids.find(function (i) { return i.includes('usr_'); }) : id) || '',
734
+ country: businessCountry.iso2,
735
+ documents: documentsList
736
+ };
737
+ return [4, API.documentService.updateDocumentInfo(documentBody)];
738
+ case 6:
739
+ _h.sent();
740
+ _h.label = 7;
741
+ case 7:
742
+ individualData = (sortUserList(mapUserList(data === null || data === void 0 ? void 0 : data.individuals)) || [])[0];
743
+ thunkApi.dispatch(handleNextScreenStep());
744
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
745
+ return [2, { data: data, formData: originalFormData, individualData: individualData }];
746
+ }
747
+ });
748
+ });
749
+ });
750
+ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a) {
751
+ var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
752
+ return __awaiter(void 0, void 0, void 0, function () {
753
+ var requestBody, data;
754
+ return __generator(this, function (_b) {
755
+ switch (_b.label) {
756
+ case 0:
757
+ requestBody = {
758
+ email: email,
759
+ encryption_contract: ['email']
760
+ };
761
+ return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
762
+ case 1:
763
+ data = (_b.sent()).data;
764
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
765
+ if (!data.errors)
766
+ return [2, { response: data, formData: email }];
767
+ return [2];
768
+ }
769
+ });
770
+ });
771
+ });
295
772
  export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
296
- var _a, settings, individual, _b, id, infoId, payload, data;
297
- var _c, _d, _e, _f;
298
- return __generator(this, function (_g) {
299
- switch (_g.label) {
773
+ var _a, settings, individual, _b, id, infoId, primaryUser, payload, data, boardInfoStatus, individualDataRes, _c, is_authorized, userId, type;
774
+ var _d, _e, _f, _g;
775
+ return __generator(this, function (_h) {
776
+ switch (_h.label) {
300
777
  case 0:
301
778
  _a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
302
- _b = individual.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id;
779
+ _b = individual.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id, primaryUser = _b.primaryUser;
303
780
  if (!id)
304
781
  return [2];
305
782
  payload = {
@@ -309,20 +786,34 @@ export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess',
309
786
  };
310
787
  return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
311
788
  case 1:
312
- data = _g.sent();
313
- return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
789
+ data = _h.sent();
790
+ return [4, API.boardService.retrieveBoardInfoStatus(id)];
314
791
  case 2:
315
- _g.sent();
316
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
317
- (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
792
+ boardInfoStatus = _h.sent();
793
+ return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
794
+ case 3:
795
+ _h.sent();
796
+ individualDataRes = undefined;
797
+ _c = primaryUser || {}, is_authorized = _c.is_authorized, userId = _c.id, type = _c.object;
798
+ if (!!is_authorized) return [3, 5];
799
+ return [4, thunkApi
800
+ .dispatch(retrieveIndividualInfo({ id: userId, type: type, countryCode: settings.data.businessCountry.iso2 }))
801
+ .unwrap()];
802
+ case 4:
803
+ individualDataRes = _h.sent();
804
+ _h.label = 5;
805
+ case 5:
806
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
807
+ (_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: data });
318
808
  thunkApi.dispatch(handleNextScreenStep());
319
- return [2, { response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(data === null || data === void 0 ? void 0 : data.info) }), formData: params }];
809
+ return [2, { response: __assign(__assign({}, data), { flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || [] }), formData: params, individualData: individualDataRes === null || individualDataRes === void 0 ? void 0 : individualDataRes.data }];
320
810
  }
321
811
  });
322
812
  }); });
323
813
  var initialState = {
324
814
  error: null,
325
815
  loading: false,
816
+ cityLoading: false,
326
817
  data: {
327
818
  flowName: FlowsTypes.INDIVIDUAL,
328
819
  verify: {
@@ -331,14 +822,38 @@ var initialState = {
331
822
  otpData: {
332
823
  otp: ''
333
824
  },
825
+ individualPhoneInfo: {
826
+ mobile: '',
827
+ countryCode: defaultCountry
828
+ },
829
+ individualCollectData: {
830
+ email: '',
831
+ mobile: '',
832
+ countryCode: defaultCountry
833
+ },
834
+ individualPersonalData: {
835
+ name: '',
836
+ email: '',
837
+ mobile: '',
838
+ countryCode: defaultCountry,
839
+ gender: IndividualGender.MALE,
840
+ nid: '',
841
+ issuedCountry: undefined,
842
+ expiryDate: '',
843
+ dob: '',
844
+ placeOfBirthCountry: undefined,
845
+ placeOfBirthCity: undefined,
846
+ nationality: undefined
847
+ },
334
848
  individualData: {
335
849
  occupation: undefined,
336
850
  sourceIncome: undefined,
337
851
  monthlyIncome: undefined,
338
852
  employerName: '',
339
- employerLocation: undefined,
340
853
  isPEP: null,
341
- isInfluencer: null
854
+ isInfluencer: null,
855
+ shareCount: '',
856
+ shareValue: ''
342
857
  }
343
858
  }
344
859
  };
@@ -354,47 +869,39 @@ export var individualSlice = createSlice({
354
869
  },
355
870
  resetOTPScreen: function (state) {
356
871
  state.data.otpData.otp = '';
872
+ },
873
+ resetIndividualData: function (state) {
874
+ state.data.individualPersonalData = __assign(__assign({}, state.data.individualPersonalData), initialState.data.individualPersonalData);
875
+ state.data.individualData = __assign(__assign({}, state.data.individualData), initialState.data.individualData);
876
+ },
877
+ civilIDUploadingStatus: function (state, action) {
878
+ state.data.individualData.civilIDUploading = action.payload;
879
+ },
880
+ signatureFileUploadingStatus: function (state, action) {
881
+ state.data.individualData.signatureFileUploading = action.payload;
357
882
  }
358
883
  },
359
884
  extraReducers: function (builder) {
360
885
  builder
886
+ .addCase(verifyToken.pending, function (state) {
887
+ state.error = null;
888
+ })
889
+ .addCase(verifyToken.fulfilled, function (state, action) {
890
+ state.error = null;
891
+ var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse;
892
+ state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
893
+ state.data.verify.token = token;
894
+ })
895
+ .addCase(verifyToken.rejected, function (state, action) {
896
+ state.error = action.error.message;
897
+ })
361
898
  .addCase(verifyLeadToken.pending, function (state) {
362
899
  state.error = null;
363
900
  state.customLoading = true;
364
901
  })
365
- .addCase(verifyLeadToken.fulfilled, function (state, action) {
366
- var _a;
902
+ .addCase(verifyLeadToken.fulfilled, function (state) {
367
903
  state.error = null;
368
904
  state.customLoading = false;
369
- var _b = action.payload, data = _b.data, token = _b.token, boardResponse = _b.boardResponse;
370
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
371
- if (description) {
372
- state.error = description;
373
- return;
374
- }
375
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
376
- state.data.verify.token = token;
377
- var _c = boardResponse || {}, countries = _c.countries, user = _c.user, countryCode = _c.countryCode;
378
- var _d = user || {}, source_income = _d.source_income, monthly_income = _d.monthly_income, occupation = _d.occupation, is_relative_PEP = _d.is_relative_PEP, is_influencer = _d.is_influencer;
379
- var _e = state.data.individualData.responseBody || {}, sourceIncomeList = _e.sourceIncomeList, monthlyIncomeList = _e.monthlyIncomeList, occupationList = _e.occupationList;
380
- var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) ||
381
- (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
382
- if (!!selectedSourceIncome)
383
- state.data.individualData.sourceIncome = selectedSourceIncome;
384
- var selectedMonthlyIncome = (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) { return (income === null || income === void 0 ? void 0 : income.id) === (monthly_income === null || monthly_income === void 0 ? void 0 : monthly_income.id); })) ||
385
- (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList[2]);
386
- if (!!selectedMonthlyIncome)
387
- state.data.individualData.monthlyIncome = selectedMonthlyIncome;
388
- var code = (user === null || user === void 0 ? void 0 : user.employer_country) || countryCode;
389
- if (!!code) {
390
- var employerLocation = (countries || []).find(function (country) { return country.iso2 === code; });
391
- state.data.individualData.employerLocation = employerLocation;
392
- }
393
- var selectedOccupation = (occupationList === null || occupationList === void 0 ? void 0 : occupationList.find(function (o) { return (o === null || o === void 0 ? void 0 : o.id) === (occupation === null || occupation === void 0 ? void 0 : occupation.id); })) || (occupationList === null || occupationList === void 0 ? void 0 : occupationList[0]);
394
- if (!!selectedOccupation)
395
- state.data.individualData.occupation = selectedOccupation;
396
- state.data.individualData.isPEP = is_relative_PEP;
397
- state.data.individualData.isInfluencer = is_influencer;
398
905
  })
399
906
  .addCase(verifyLeadToken.rejected, function (state, action) {
400
907
  state.error = action.error.message;
@@ -434,29 +941,187 @@ export var individualSlice = createSlice({
434
941
  state.data.otpData = formData;
435
942
  state.data.otpData.responseBody = data;
436
943
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
437
- var _c = boardResponse || {}, countries = _c.countries, user = _c.user, countryCode = _c.countryCode;
438
- var _d = user || {}, source_income = _d.source_income, monthly_income = _d.monthly_income, occupation = _d.occupation, is_relative_PEP = _d.is_relative_PEP, is_influencer = _d.is_influencer;
439
- var _e = state.data.individualData.responseBody || {}, sourceIncomeList = _e.sourceIncomeList, monthlyIncomeList = _e.monthlyIncomeList, occupationList = _e.occupationList;
440
- var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) ||
441
- (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
944
+ })
945
+ .addCase(verifyLeadOTP.rejected, function (state, action) {
946
+ state.loading = false;
947
+ state.error = action.error.message;
948
+ })
949
+ .addCase(addDetailsAsync.pending, function (state) {
950
+ state.loading = true;
951
+ state.error = null;
952
+ })
953
+ .addCase(addDetailsAsync.fulfilled, function (state, action) {
954
+ var _a, _b, _c, _d;
955
+ state.loading = false;
956
+ state.error = null;
957
+ var _e = action.payload, userList = _e.userList, individualId = _e.individualId, countries = _e.countries;
958
+ var primaryUser = (state.data.verify.responseBody || {}).user;
959
+ var user = (userList || []).find(function (user) { return user.individual_id === individualId; });
960
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: userList });
961
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: userList, user: __assign(__assign({}, user), { is_authorized: (user === null || user === void 0 ? void 0 : user.is_authorized) !== undefined ? user === null || user === void 0 ? void 0 : user.is_authorized : primaryUser === null || primaryUser === void 0 ? void 0 : primaryUser.is_authorized }) });
962
+ var _f = user || {}, source_income = _f.source_income, monthly_income = _f.monthly_income, occupation = _f.occupation, is_relative_PEP = _f.is_relative_PEP, is_influencer = _f.is_influencer, birth = _f.birth, contact = _f.contact, identification = _f.identification, nationality = _f.nationality, gender = _f.gender, shares = _f.shares;
963
+ var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
964
+ var cityList = (state.data.verify.responseBody || {}).cityList;
965
+ if (user)
966
+ state.data.individualPersonalData.name = getUserName(user, false);
967
+ if (contact === null || contact === void 0 ? void 0 : contact.email)
968
+ state.data.individualPersonalData.email = contact === null || contact === void 0 ? void 0 : contact.email;
969
+ if ((_a = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _a === void 0 ? void 0 : _a.number)
970
+ state.data.individualPersonalData.mobile = (_b = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _b === void 0 ? void 0 : _b.number;
971
+ if ((_c = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _c === void 0 ? void 0 : _c.country_code) {
972
+ state.data.individualPersonalData.countryCode = findCountryByIddPrefix(countries, (_d = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _d === void 0 ? void 0 : _d.country_code) || defaultCountry;
973
+ }
974
+ if (gender)
975
+ state.data.individualPersonalData.gender = gender.toLowerCase();
976
+ if (identification === null || identification === void 0 ? void 0 : identification.id)
977
+ state.data.individualPersonalData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
978
+ if (identification === null || identification === void 0 ? void 0 : identification.issued_country_code) {
979
+ state.data.individualPersonalData.issuedCountry = findCountryByIso2(countries, identification === null || identification === void 0 ? void 0 : identification.issued_country_code);
980
+ }
981
+ var expiryDate = new Date((identification === null || identification === void 0 ? void 0 : identification.expiry) || new Date().getTime());
982
+ state.data.individualPersonalData.expiryDate = convertNumbers2English(dateFormat(expiryDate));
983
+ if (birth === null || birth === void 0 ? void 0 : birth.date)
984
+ state.data.individualPersonalData.dob = convertNumbers2English(dateFormat(new Date(birth === null || birth === void 0 ? void 0 : birth.date)));
985
+ if (birth === null || birth === void 0 ? void 0 : birth.country) {
986
+ state.data.individualPersonalData.placeOfBirthCountry = findCountryByIso2(countries, birth === null || birth === void 0 ? void 0 : birth.country);
987
+ }
988
+ if (birth === null || birth === void 0 ? void 0 : birth.city) {
989
+ var selectedCity = cityList === null || cityList === void 0 ? void 0 : cityList.find(function (city) {
990
+ var _a;
991
+ return city.id === ((_a = birth === null || birth === void 0 ? void 0 : birth.city) === null || _a === void 0 ? void 0 : _a.cityId);
992
+ });
993
+ state.data.individualPersonalData.placeOfBirthCity = selectedCity;
994
+ }
995
+ if (nationality) {
996
+ state.data.individualPersonalData.nationality = findCountryByIso2(countries, nationality);
997
+ }
998
+ var _h = shares || {}, count = _h.count, value = _h.value;
999
+ var shareCount = count === null || count === void 0 ? void 0 : count.toString();
1000
+ var shareValue = value === null || value === void 0 ? void 0 : value.toString();
1001
+ if (shareCount) {
1002
+ state.data.individualData.shareCount = shareCount;
1003
+ }
1004
+ if (shareValue) {
1005
+ state.data.individualData.shareValue = formatNumberAsCurrency(shareValue);
1006
+ }
1007
+ var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) || (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
442
1008
  if (!!selectedSourceIncome)
443
1009
  state.data.individualData.sourceIncome = selectedSourceIncome;
444
- var selectedMonthlyIncome = (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) { return (income === null || income === void 0 ? void 0 : income.id) === (monthly_income === null || monthly_income === void 0 ? void 0 : monthly_income.id); })) ||
445
- (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList[2]);
446
- if (!!selectedMonthlyIncome)
447
- state.data.individualData.monthlyIncome = selectedMonthlyIncome;
448
- var code = (user === null || user === void 0 ? void 0 : user.employer_country) || countryCode;
449
- if (!!code) {
450
- var employerLocation = (countries || []).find(function (country) { return country.iso2 === code; });
451
- state.data.individualData.employerLocation = employerLocation;
1010
+ var selectedMonthlyIncome = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) {
1011
+ return income.id === (monthly_income === null || monthly_income === void 0 ? void 0 : monthly_income.id);
1012
+ });
1013
+ var selectedOccupation = (occupation === null || occupation === void 0 ? void 0 : occupation.chapter) || (occupation === null || occupation === void 0 ? void 0 : occupation.section);
1014
+ state.data.individualData.monthlyIncome = selectedMonthlyIncome;
1015
+ state.data.individualData.occupation = selectedOccupation;
1016
+ if (is_relative_PEP !== undefined)
1017
+ state.data.individualData.isPEP = is_relative_PEP;
1018
+ if (is_influencer !== undefined)
1019
+ state.data.individualData.isInfluencer = is_influencer;
1020
+ })
1021
+ .addCase(addDetailsAsync.rejected, function (state, action) {
1022
+ state.loading = false;
1023
+ state.error = action.error.message;
1024
+ })
1025
+ .addCase(requestDetailsByEmail.pending, function (state) {
1026
+ state.loading = true;
1027
+ state.error = null;
1028
+ })
1029
+ .addCase(requestDetailsByEmail.fulfilled, function (state, action) {
1030
+ state.loading = false;
1031
+ state.error = null;
1032
+ var _a = action.payload, data = _a.data, individualData = _a.individualData;
1033
+ var userList = (state.data.verify.responseBody || {}).userList;
1034
+ var list = userList || [];
1035
+ list = list.map(function (user) {
1036
+ var _a, _b;
1037
+ var userInfo = user.id === (individualData === null || individualData === void 0 ? void 0 : individualData.id) ? individualData : user;
1038
+ return user.id === ((_b = (_a = data === null || data === void 0 ? void 0 : data.notification) === null || _a === void 0 ? void 0 : _a.recipient) === null || _b === void 0 ? void 0 : _b.id) ? __assign(__assign({}, userInfo), { isRequestedEmail: true }) : userInfo;
1039
+ });
1040
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { requestEmailData: data, userList: list });
1041
+ })
1042
+ .addCase(requestDetailsByEmail.rejected, function (state, action) {
1043
+ state.loading = false;
1044
+ state.error = action.error.message;
1045
+ })
1046
+ .addCase(retrieveIndividualInfo.pending, function (state) {
1047
+ state.error = null;
1048
+ })
1049
+ .addCase(retrieveIndividualInfo.fulfilled, function (state, action) {
1050
+ var _a, _b, _c, _d;
1051
+ state.error = null;
1052
+ var _e = action.payload, data = _e.data, countries = _e.countries;
1053
+ var user = (state.data.verify.responseBody || {}).user;
1054
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { primaryUser: data, user: __assign(__assign({}, data), { is_authorized: data.is_authorized !== undefined ? data.is_authorized : user === null || user === void 0 ? void 0 : user.is_authorized }) });
1055
+ var _f = data || {}, source_income = _f.source_income, monthly_income = _f.monthly_income, occupation = _f.occupation, is_relative_PEP = _f.is_relative_PEP, is_influencer = _f.is_influencer, birth = _f.birth, contact = _f.contact, identification = _f.identification, nationality = _f.nationality, gender = _f.gender, shares = _f.shares;
1056
+ var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
1057
+ var cityList = (state.data.verify.responseBody || {}).cityList;
1058
+ if (data)
1059
+ state.data.individualPersonalData.name = getUserName(data, false);
1060
+ if (contact === null || contact === void 0 ? void 0 : contact.email)
1061
+ state.data.individualPersonalData.email = contact === null || contact === void 0 ? void 0 : contact.email;
1062
+ if ((_a = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _a === void 0 ? void 0 : _a.number)
1063
+ state.data.individualPersonalData.mobile = (_b = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _b === void 0 ? void 0 : _b.number;
1064
+ if ((_c = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _c === void 0 ? void 0 : _c.country_code) {
1065
+ state.data.individualPersonalData.countryCode = findCountryByIddPrefix(countries, (_d = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _d === void 0 ? void 0 : _d.country_code) || defaultCountry;
1066
+ }
1067
+ if (gender)
1068
+ state.data.individualPersonalData.gender = gender.toLowerCase();
1069
+ if (identification === null || identification === void 0 ? void 0 : identification.id)
1070
+ state.data.individualPersonalData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
1071
+ if (identification === null || identification === void 0 ? void 0 : identification.issued_country_code) {
1072
+ state.data.individualPersonalData.issuedCountry = findCountryByIso2(countries, identification === null || identification === void 0 ? void 0 : identification.issued_country_code);
1073
+ }
1074
+ var expiryDate = (identification === null || identification === void 0 ? void 0 : identification.expiry) || new Date().getTime();
1075
+ state.data.individualPersonalData.expiryDate = convertNumbers2English(dateFormat(expiryDate));
1076
+ if (birth === null || birth === void 0 ? void 0 : birth.date)
1077
+ state.data.individualPersonalData.dob = convertNumbers2English(dateFormat(birth === null || birth === void 0 ? void 0 : birth.date));
1078
+ if (birth === null || birth === void 0 ? void 0 : birth.country) {
1079
+ state.data.individualPersonalData.placeOfBirthCountry = findCountryByIso2(countries, birth === null || birth === void 0 ? void 0 : birth.country);
1080
+ }
1081
+ if (birth === null || birth === void 0 ? void 0 : birth.city) {
1082
+ var selectedCity = cityList === null || cityList === void 0 ? void 0 : cityList.find(function (city) {
1083
+ var _a;
1084
+ return city.id === ((_a = birth === null || birth === void 0 ? void 0 : birth.city) === null || _a === void 0 ? void 0 : _a.cityId);
1085
+ });
1086
+ state.data.individualPersonalData.placeOfBirthCity = selectedCity;
1087
+ }
1088
+ if (nationality) {
1089
+ state.data.individualPersonalData.nationality = findCountryByIso2(countries, nationality);
1090
+ }
1091
+ var _h = shares || {}, count = _h.count, value = _h.value;
1092
+ var shareCount = count === null || count === void 0 ? void 0 : count.toString();
1093
+ var shareValue = value === null || value === void 0 ? void 0 : value.toString();
1094
+ if (shareCount) {
1095
+ state.data.individualData.shareCount = shareCount;
452
1096
  }
453
- var selectedOccupation = (occupationList === null || occupationList === void 0 ? void 0 : occupationList.find(function (o) { return (o === null || o === void 0 ? void 0 : o.id) === (occupation === null || occupation === void 0 ? void 0 : occupation.id); })) || (occupationList === null || occupationList === void 0 ? void 0 : occupationList[0]);
454
- if (!!selectedOccupation)
455
- state.data.individualData.occupation = selectedOccupation;
1097
+ if (shareValue) {
1098
+ state.data.individualData.shareValue = formatNumberAsCurrency(shareValue);
1099
+ }
1100
+ var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) || (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
1101
+ if (!!selectedSourceIncome)
1102
+ state.data.individualData.sourceIncome = selectedSourceIncome;
1103
+ var selectedMonthlyIncome = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) {
1104
+ return income.id === (monthly_income === null || monthly_income === void 0 ? void 0 : monthly_income.id);
1105
+ });
1106
+ var selectedOccupation = (occupation === null || occupation === void 0 ? void 0 : occupation.chapter) || (occupation === null || occupation === void 0 ? void 0 : occupation.section);
1107
+ state.data.individualData.monthlyIncome = selectedMonthlyIncome;
1108
+ state.data.individualData.occupation = selectedOccupation;
456
1109
  state.data.individualData.isPEP = is_relative_PEP;
457
1110
  state.data.individualData.isInfluencer = is_influencer;
458
1111
  })
459
- .addCase(verifyLeadOTP.rejected, function (state, action) {
1112
+ .addCase(retrieveIndividualInfo.rejected, function (state, action) {
1113
+ state.error = action.error.message;
1114
+ })
1115
+ .addCase(getIndividualList.pending, function (state) {
1116
+ state.loading = true;
1117
+ state.error = null;
1118
+ })
1119
+ .addCase(getIndividualList.fulfilled, function (state, action) {
1120
+ state.loading = false;
1121
+ state.error = null;
1122
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: action.payload });
1123
+ })
1124
+ .addCase(getIndividualList.rejected, function (state, action) {
460
1125
  state.loading = false;
461
1126
  state.error = action.error.message;
462
1127
  })
@@ -465,32 +1130,101 @@ export var individualSlice = createSlice({
465
1130
  state.error = null;
466
1131
  })
467
1132
  .addCase(retrieveDataList.fulfilled, function (state, action) {
1133
+ var _a;
468
1134
  state.loading = false;
469
1135
  state.error = null;
470
- var _a = action.payload, sourceIncome = _a.sourceIncome, monthlyIncome = _a.monthlyIncome, occupation = _a.occupation;
1136
+ var _b = action.payload, sourceIncome = _b.sourceIncome, monthlyIncome = _b.monthlyIncome, occupationData = _b.occupation;
471
1137
  var data = state.data.individualData.responseBody;
472
- state.data.individualData.responseBody = __assign(__assign({}, data), { sourceIncomeList: (sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.list) || [], monthlyIncomeList: (monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list) || [], occupationList: (occupation === null || occupation === void 0 ? void 0 : occupation.list) || [] });
1138
+ var sourceIncomeList = (sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.list) || [];
1139
+ var monthlyIncomeList = (monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list) || [];
1140
+ var occupationList = (occupationData === null || occupationData === void 0 ? void 0 : occupationData.list) || [];
1141
+ state.data.individualData.responseBody = __assign(__assign({}, data), { sourceIncomeList: sourceIncomeList, monthlyIncomeList: monthlyIncomeList, occupationList: occupationList });
1142
+ var _c = ((_a = state.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.user) || {}, source_income = _c.source_income, monthly_income = _c.monthly_income, occupation = _c.occupation;
1143
+ var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) || (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
1144
+ if (!!selectedSourceIncome)
1145
+ state.data.individualData.sourceIncome = selectedSourceIncome;
1146
+ var selectedMonthlyIncome = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) {
1147
+ return income.id === (monthly_income === null || monthly_income === void 0 ? void 0 : monthly_income.id);
1148
+ });
1149
+ var selectedOccupation = (occupation === null || occupation === void 0 ? void 0 : occupation.chapter) || (occupation === null || occupation === void 0 ? void 0 : occupation.section);
1150
+ state.data.individualData.monthlyIncome = selectedMonthlyIncome;
1151
+ state.data.individualData.occupation = selectedOccupation;
473
1152
  })
474
1153
  .addCase(retrieveDataList.rejected, function (state, action) {
475
1154
  state.loading = false;
476
1155
  state.error = action.error.message;
1156
+ })
1157
+ .addCase(getCityList.pending, function (state) {
1158
+ state.cityLoading = true;
1159
+ state.error = null;
1160
+ })
1161
+ .addCase(getCityList.fulfilled, function (state, action) {
1162
+ var _a;
1163
+ state.cityLoading = false;
1164
+ state.error = null;
1165
+ var data = state.data.verify.responseBody;
1166
+ var cityList = action.payload;
1167
+ state.data.verify.responseBody = __assign(__assign({}, data), { cityList: cityList });
1168
+ var birth = (((_a = state.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.user) || {}).birth;
1169
+ if (birth === null || birth === void 0 ? void 0 : birth.city) {
1170
+ var selectedCity = cityList === null || cityList === void 0 ? void 0 : cityList.find(function (city) {
1171
+ var _a;
1172
+ return city.id === ((_a = birth === null || birth === void 0 ? void 0 : birth.city) === null || _a === void 0 ? void 0 : _a.cityId);
1173
+ });
1174
+ state.data.individualPersonalData.placeOfBirthCity = selectedCity;
1175
+ }
1176
+ })
1177
+ .addCase(getCityList.rejected, function (state, action) {
1178
+ state.cityLoading = false;
1179
+ state.error = action.error.message;
1180
+ })
1181
+ .addCase(updatePhoneInfo.pending, function (state) {
1182
+ state.loading = true;
1183
+ state.error = null;
1184
+ })
1185
+ .addCase(updatePhoneInfo.fulfilled, function (state, action) {
1186
+ state.loading = false;
1187
+ state.error = null;
1188
+ var _a = action.payload, data = _a.data, formData = _a.formData;
1189
+ state.data.individualPhoneInfo = formData;
1190
+ state.data.individualPhoneInfo.responseBody = data;
1191
+ })
1192
+ .addCase(updatePhoneInfo.rejected, function (state, action) {
1193
+ state.loading = false;
1194
+ state.error = action.error.message;
1195
+ })
1196
+ .addCase(updateIndividualPersonalInfo.pending, function (state) {
1197
+ state.loading = true;
1198
+ state.error = null;
1199
+ })
1200
+ .addCase(updateIndividualPersonalInfo.fulfilled, function (state, action) {
1201
+ state.loading = false;
1202
+ state.error = null;
1203
+ var _a = action.payload, data = _a.data, formData = _a.formData;
1204
+ state.data.individualPersonalData = formData;
1205
+ state.data.individualPersonalData.responseBody = data;
1206
+ })
1207
+ .addCase(updateIndividualPersonalInfo.rejected, function (state, action) {
1208
+ state.loading = false;
1209
+ state.error = action.error.message;
477
1210
  })
478
1211
  .addCase(updateIndividualInfo.pending, function (state) {
479
1212
  state.loading = true;
480
1213
  state.error = null;
481
1214
  })
482
1215
  .addCase(updateIndividualInfo.fulfilled, function (state, action) {
483
- var _a;
484
1216
  state.loading = false;
485
1217
  state.error = null;
486
- var _b = action.payload, data = _b.data, formData = _b.formData;
487
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
488
- if (description) {
489
- state.error = description;
490
- return;
491
- }
1218
+ var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData;
492
1219
  state.data.individualData = formData;
493
1220
  state.data.individualData.responseBody = data;
1221
+ var userList = (state.data.verify.responseBody || {}).userList;
1222
+ var list = userList || [];
1223
+ list = list.map(function (user) {
1224
+ var userInfo = user.id === (individualData === null || individualData === void 0 ? void 0 : individualData.id) ? individualData : user;
1225
+ return userInfo;
1226
+ });
1227
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: list });
494
1228
  })
495
1229
  .addCase(updateIndividualInfo.rejected, function (state, action) {
496
1230
  state.loading = false;
@@ -510,19 +1244,47 @@ export var individualSlice = createSlice({
510
1244
  .addCase(retrieveBoardDetails.rejected, function (state, action) {
511
1245
  state.error = action.error.message;
512
1246
  state.loading = false;
1247
+ })
1248
+ .addCase(retrieveBoardStatus.pending, function (state) {
1249
+ state.error = null;
1250
+ state.loading = true;
1251
+ })
1252
+ .addCase(retrieveBoardStatus.fulfilled, function (state, action) {
1253
+ state.error = null;
1254
+ state.loading = false;
1255
+ var flows = action.payload.flows;
1256
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
1257
+ })
1258
+ .addCase(retrieveBoardStatus.rejected, function (state, action) {
1259
+ state.error = action.error.message;
1260
+ state.loading = false;
1261
+ })
1262
+ .addCase(checkEmailAvailability.fulfilled, function (state, action) {
1263
+ var _a;
1264
+ state.error = null;
1265
+ state.data.individualCollectData.responseBody = __assign(__assign({}, state.data.individualCollectData.responseBody), (_a = action.payload) === null || _a === void 0 ? void 0 : _a.response);
1266
+ })
1267
+ .addCase(checkEmailAvailability.pending, function (state) {
1268
+ state.error = null;
1269
+ })
1270
+ .addCase(checkEmailAvailability.rejected, function (state, action) {
1271
+ if (action.error.message === 'Aborted')
1272
+ return;
1273
+ state.error = action.error.message;
513
1274
  })
514
1275
  .addCase(updateBoardSuccess.fulfilled, function (state, action) {
515
1276
  var _a;
516
1277
  state.loading = false;
517
1278
  state.error = null;
518
- var response = (action.payload || {}).response;
1279
+ var _b = action.payload || {}, response = _b.response, individualData = _b.individualData;
519
1280
  var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
520
1281
  if (description) {
521
1282
  state.error = description;
522
1283
  return;
523
1284
  }
524
1285
  var flows = response.flows;
525
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
1286
+ var individuals = (state.data.verify.responseBody || {}).individuals;
1287
+ state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (individualData && { individuals: __assign(__assign({}, individuals), { data_state: individualData === null || individualData === void 0 ? void 0 : individualData.data_state }) }));
526
1288
  })
527
1289
  .addCase(updateBoardSuccess.pending, function (state) {
528
1290
  state.loading = true;
@@ -534,6 +1296,6 @@ export var individualSlice = createSlice({
534
1296
  });
535
1297
  }
536
1298
  });
537
- export var clearError = (_a = individualSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
1299
+ export var clearError = (_a = individualSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, civilIDUploadingStatus = _a.civilIDUploadingStatus, signatureFileUploadingStatus = _a.signatureFileUploadingStatus, resetIndividualData = _a.resetIndividualData;
538
1300
  export default individualSlice.reducer;
539
1301
  export var individualSelector = function (state) { return state.individual; };