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

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 (633) hide show
  1. package/README.md +1 -1
  2. package/build/@types/app.d.ts +73 -15
  3. package/build/@types/app.js +18 -1
  4. package/build/@types/config.d.ts +45 -0
  5. package/build/@types/config.js +1 -0
  6. package/build/@types/form.d.ts +14 -3
  7. package/build/@types/index.d.ts +1 -0
  8. package/build/@types/index.js +1 -0
  9. package/build/@types/redux.d.ts +1 -0
  10. package/build/@types/theme.d.ts +4 -0
  11. package/build/@types/theme.js +5 -0
  12. package/build/api/account.d.ts +5 -0
  13. package/build/api/account.js +16 -2
  14. package/build/api/auth.d.ts +25 -1
  15. package/build/api/auth.js +18 -1
  16. package/build/api/availabilityServices.d.ts +1 -0
  17. package/build/api/country.d.ts +1 -0
  18. package/build/api/country.js +8 -1
  19. package/build/api/data.d.ts +4 -17
  20. package/build/api/data.js +5 -45
  21. package/build/api/entity.d.ts +28 -3
  22. package/build/api/entity.js +23 -10
  23. package/build/api/firebase.js +68 -8
  24. package/build/api/index.d.ts +19 -27
  25. package/build/api/lead.d.ts +25 -3
  26. package/build/api/lead.js +47 -1
  27. package/build/api/operator.d.ts +8 -3
  28. package/build/api/operator.js +4 -16
  29. package/build/app/rootReducer.d.ts +2 -0
  30. package/build/app/rootReducer.js +5 -1
  31. package/build/app/settings.d.ts +14 -3
  32. package/build/app/settings.js +127 -41
  33. package/build/app/store.d.ts +4 -0
  34. package/build/assets/locales/ar.json +333 -142
  35. package/build/assets/locales/en.json +330 -142
  36. package/build/components/AnimationFlow/AnimationFlow.d.ts +14 -3
  37. package/build/components/AnimationFlow/AnimationFlow.js +16 -5
  38. package/build/components/AnimationFlow/BottomSheet.d.ts +7 -2
  39. package/build/components/AnimationFlow/BottomSheet.js +37 -12
  40. package/build/components/AnimationFlow/Dialog.d.ts +11 -2
  41. package/build/components/AnimationFlow/Dialog.js +7 -11
  42. package/build/components/AnimationFlow/Loader.d.ts +6 -1
  43. package/build/components/AnimationFlow/Loader.js +17 -5
  44. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
  45. package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
  46. package/build/components/DatePicker/DatePicker.d.ts +1 -1
  47. package/build/components/DatePicker/DatePicker.js +2 -2
  48. package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -0
  49. package/build/components/Footer/Footer.js +2 -1
  50. package/build/components/Providers/ThemeProvider.js +3 -3
  51. package/build/components/Slide/Slide.d.ts +1 -1
  52. package/build/components/Tooltip/Tooltip.js +1 -1
  53. package/build/constants/api.d.ts +9 -7
  54. package/build/constants/api.js +19 -15
  55. package/build/constants/app.d.ts +46 -0
  56. package/build/constants/app.js +380 -21
  57. package/build/constants/assets.d.ts +4 -0
  58. package/build/constants/assets.js +5 -1
  59. package/build/constants/dummy.d.ts +43 -196
  60. package/build/constants/dummy.js +614 -6141
  61. package/build/constants/validation.d.ts +5 -0
  62. package/build/constants/validation.js +6 -1
  63. package/build/features/app/auth/authStore.d.ts +103 -0
  64. package/build/features/app/auth/authStore.js +1179 -0
  65. package/build/features/app/bank/bankStore.d.ts +14 -18
  66. package/build/features/app/bank/bankStore.js +218 -158
  67. package/build/features/app/board/boardStore.d.ts +33 -0
  68. package/build/features/app/board/boardStore.js +269 -0
  69. package/build/features/app/brand/brandStore.d.ts +18 -31
  70. package/build/features/app/brand/brandStore.js +296 -263
  71. package/build/features/app/business/businessStore.d.ts +28 -10
  72. package/build/features/app/business/businessStore.js +361 -215
  73. package/build/features/app/connect/connectStore.d.ts +39 -15
  74. package/build/features/app/connect/connectStore.js +308 -207
  75. package/build/features/app/connectExpress/connectExpressStore.d.ts +63 -35
  76. package/build/features/app/connectExpress/connectExpressStore.js +764 -414
  77. package/build/features/app/entity/entityStore.d.ts +21 -34
  78. package/build/features/app/entity/entityStore.js +248 -246
  79. package/build/features/app/individual/individualStore.d.ts +24 -33
  80. package/build/features/app/individual/individualStore.js +336 -274
  81. package/build/features/app/password/passwordStore.d.ts +34 -18
  82. package/build/features/app/password/passwordStore.js +286 -219
  83. package/build/features/app/tax/taxStore.d.ts +14 -7
  84. package/build/features/app/tax/taxStore.js +202 -141
  85. package/build/features/auth/Auth.d.ts +14 -0
  86. package/build/features/auth/Auth.js +168 -0
  87. package/build/features/auth/index.d.ts +1 -0
  88. package/build/features/auth/index.js +1 -0
  89. package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
  90. package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
  91. package/build/features/auth/screens/AccountCreatedLoader/index.d.ts +2 -0
  92. package/build/features/auth/screens/AccountCreatedLoader/index.js +2 -0
  93. package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +5 -0
  94. package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +71 -0
  95. package/build/features/auth/screens/AccountNotFound/index.d.ts +2 -0
  96. package/build/features/auth/screens/AccountNotFound/index.js +2 -0
  97. package/build/features/auth/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
  98. package/build/features/auth/screens/AuthMerchant/AuthMerchant.js +73 -0
  99. package/build/features/{connectExpress/screens/AuthenticationList → auth/screens/AuthMerchant}/MerchantList.d.ts +2 -1
  100. package/build/features/auth/screens/AuthMerchant/MerchantList.js +64 -0
  101. package/build/features/auth/screens/AuthMerchant/index.d.ts +2 -0
  102. package/build/features/auth/screens/AuthMerchant/index.js +2 -0
  103. package/build/features/auth/screens/AuthMerchant/validation.d.ts +8 -0
  104. package/build/features/auth/screens/AuthMerchant/validation.js +4 -0
  105. package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
  106. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
  107. package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
  108. package/build/features/auth/screens/AuthSwitch/index.js +2 -0
  109. package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
  110. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +96 -0
  111. package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +10 -0
  112. package/build/features/auth/screens/AuthenticationList/BrandList.js +81 -0
  113. package/build/features/auth/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
  114. package/build/features/auth/screens/AuthenticationList/EntityLegalName.js +48 -0
  115. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
  116. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +90 -0
  117. package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +11 -0
  118. package/build/features/auth/screens/AuthenticationList/EntityList.js +138 -0
  119. package/build/features/auth/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
  120. package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +36 -0
  121. package/build/features/auth/screens/AuthenticationList/index.d.ts +3 -0
  122. package/build/features/auth/screens/AuthenticationList/index.js +2 -0
  123. package/build/features/auth/screens/AuthenticationList/validation.d.ts +20 -0
  124. package/build/features/auth/screens/AuthenticationList/validation.js +68 -0
  125. package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
  126. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +111 -0
  127. package/build/features/auth/screens/BusinessCountry/index.d.ts +3 -0
  128. package/build/features/auth/screens/BusinessCountry/index.js +2 -0
  129. package/build/features/auth/screens/CivilID/CivilID.d.ts +5 -0
  130. package/build/features/auth/screens/CivilID/CivilID.js +57 -0
  131. package/build/features/auth/screens/CivilID/IDNumber.d.ts +8 -0
  132. package/build/features/auth/screens/CivilID/IDNumber.js +54 -0
  133. package/build/features/auth/screens/CivilID/index.d.ts +3 -0
  134. package/build/features/auth/screens/CivilID/index.js +2 -0
  135. package/build/features/auth/screens/CivilID/validation.d.ts +8 -0
  136. package/build/features/auth/screens/CivilID/validation.js +4 -0
  137. package/build/features/auth/screens/DOB/DOB.js +47 -0
  138. package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
  139. package/build/features/auth/screens/DOB/DOBForm.js +59 -0
  140. package/build/features/auth/screens/DOB/index.d.ts +3 -0
  141. package/build/features/auth/screens/DOB/index.js +2 -0
  142. package/build/features/auth/screens/DOB/validation.d.ts +8 -0
  143. package/build/features/auth/screens/DOB/validation.js +4 -0
  144. package/build/features/auth/screens/Email/Email.d.ts +5 -0
  145. package/build/features/auth/screens/Email/Email.js +57 -0
  146. package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
  147. package/build/features/auth/screens/Email/EmailField.js +52 -0
  148. package/build/features/auth/screens/Email/index.d.ts +3 -0
  149. package/build/features/auth/screens/Email/index.js +2 -0
  150. package/build/features/auth/screens/Email/validation.d.ts +8 -0
  151. package/build/features/auth/screens/Email/validation.js +4 -0
  152. package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
  153. package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
  154. package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
  155. package/build/features/auth/screens/EmailSent/index.js +2 -0
  156. package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
  157. package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
  158. package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
  159. package/build/features/auth/screens/MigratingData/index.js +2 -0
  160. package/build/features/auth/screens/Mobile/Mobile.d.ts +5 -0
  161. package/build/features/auth/screens/Mobile/Mobile.js +82 -0
  162. package/build/features/auth/screens/Mobile/MobileNumber.d.ts +13 -0
  163. package/build/features/auth/screens/Mobile/MobileNumber.js +158 -0
  164. package/build/features/auth/screens/Mobile/index.d.ts +3 -0
  165. package/build/features/auth/screens/Mobile/index.js +2 -0
  166. package/build/features/auth/screens/Mobile/validation.d.ts +8 -0
  167. package/build/features/auth/screens/Mobile/validation.js +35 -0
  168. package/build/features/auth/screens/NID/IDNumber.d.ts +7 -0
  169. package/build/features/auth/screens/NID/IDNumber.js +55 -0
  170. package/build/features/auth/screens/NID/NID.d.ts +5 -0
  171. package/build/features/auth/screens/NID/NID.js +56 -0
  172. package/build/features/auth/screens/NID/index.d.ts +3 -0
  173. package/build/features/auth/screens/NID/index.js +2 -0
  174. package/build/features/auth/screens/NID/validation.d.ts +8 -0
  175. package/build/features/auth/screens/NID/validation.js +10 -0
  176. package/build/features/auth/screens/OTP/OTP.js +118 -0
  177. package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTPInput.js +27 -7
  178. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  179. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  180. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  181. package/build/features/auth/screens/OperatorError/index.js +2 -0
  182. package/build/features/auth/screens/Password/Password.d.ts +5 -0
  183. package/build/features/auth/screens/Password/Password.js +61 -0
  184. package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
  185. package/build/features/auth/screens/Password/PasswordField.js +28 -0
  186. package/build/features/auth/screens/Password/index.d.ts +3 -0
  187. package/build/features/auth/screens/Password/index.js +2 -0
  188. package/build/features/auth/screens/Password/validation.d.ts +8 -0
  189. package/build/features/auth/screens/Password/validation.js +4 -0
  190. package/build/features/auth/screens/PreparingData/PreparingData.d.ts +5 -0
  191. package/build/features/auth/screens/PreparingData/PreparingData.js +44 -0
  192. package/build/features/auth/screens/PreparingData/index.d.ts +2 -0
  193. package/build/features/auth/screens/PreparingData/index.js +2 -0
  194. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
  195. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
  196. package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
  197. package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
  198. package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  199. package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
  200. package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
  201. package/build/features/auth/screens/VerifyNafath/index.js +2 -0
  202. package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  203. package/build/features/auth/screens/VerifyPACI/VerifyPACI.js +34 -0
  204. package/build/features/auth/screens/VerifyPACI/index.d.ts +3 -0
  205. package/build/features/auth/screens/VerifyPACI/index.js +2 -0
  206. package/build/features/bank/Bank.d.ts +2 -0
  207. package/build/features/bank/Bank.js +15 -9
  208. package/build/features/bank/screens/BankDetails/BankDetails.js +21 -7
  209. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  210. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  211. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  212. package/build/features/bank/screens/OperatorError/index.js +2 -0
  213. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
  214. package/build/features/bank/screens/Verify/Verify.js +8 -7
  215. package/build/features/board/Board.d.ts +13 -0
  216. package/build/features/board/Board.js +87 -0
  217. package/build/features/board/index.d.ts +1 -0
  218. package/build/features/board/index.js +1 -0
  219. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  220. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  221. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  222. package/build/features/board/screens/OperatorError/index.js +2 -0
  223. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  224. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  225. package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
  226. package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
  227. package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  228. package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
  229. package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
  230. package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
  231. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  232. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +44 -0
  233. package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  234. package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
  235. package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
  236. package/build/features/{business/screens/OTP → board/screens/Verify}/OTPInput.js +9 -7
  237. package/build/features/{connectExpress/screens/IdentityOTP/OTP.js → board/screens/Verify/Verify.js} +25 -37
  238. package/build/features/board/screens/Verify/index.d.ts +2 -0
  239. package/build/features/board/screens/Verify/index.js +2 -0
  240. package/build/features/brand/Brand.d.ts +2 -0
  241. package/build/features/brand/Brand.js +15 -9
  242. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +9 -9
  243. package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
  244. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
  245. package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
  246. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -2
  247. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +4 -4
  248. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  249. package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
  250. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  251. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  252. package/build/features/brand/screens/BrandInfo/BrandInfo.js +27 -7
  253. package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
  254. package/build/features/brand/screens/BrandInfo/validation.js +2 -2
  255. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +23 -7
  256. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  257. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  258. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  259. package/build/features/brand/screens/OperatorError/index.js +2 -0
  260. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
  261. package/build/features/brand/screens/Verify/Verify.js +4 -3
  262. package/build/features/business/Business.js +20 -12
  263. package/build/features/business/screens/Activities/Activities.js +27 -10
  264. package/build/features/business/screens/Activities/ActivitiesList.d.ts +4 -4
  265. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  266. package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
  267. package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
  268. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
  269. package/build/features/business/screens/BusinessType/BusinessType.js +24 -8
  270. package/build/features/business/screens/BusinessType/EntityName.js +3 -3
  271. package/build/features/business/screens/BusinessType/LicenseList.js +3 -3
  272. package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
  273. package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -4
  274. package/build/features/business/screens/BusinessType/validation.d.ts +10 -0
  275. package/build/features/business/screens/BusinessType/validation.js +16 -0
  276. package/build/features/business/screens/CivilID/CivilID.js +1 -1
  277. package/build/features/business/screens/Customers/CustomerLocations.d.ts +14 -12
  278. package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
  279. package/build/features/business/screens/Customers/Customers.js +51 -11
  280. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
  281. package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
  282. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
  283. package/build/features/business/screens/Customers/ExpectedSalesRange.js +10 -4
  284. package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -5
  285. package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
  286. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
  287. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
  288. package/build/features/business/screens/Customers/validation.d.ts +6 -6
  289. package/build/features/business/screens/Customers/validation.js +3 -8
  290. package/build/features/business/screens/DOB/DOB.d.ts +6 -0
  291. package/build/features/business/screens/DOB/DOB.js +45 -0
  292. package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
  293. package/build/features/business/screens/DOB/DOBForm.js +72 -0
  294. package/build/features/business/screens/DOB/index.d.ts +3 -0
  295. package/build/features/business/screens/DOB/index.js +2 -0
  296. package/build/features/business/screens/DOB/validation.d.ts +8 -0
  297. package/build/features/business/screens/DOB/validation.js +4 -0
  298. package/build/features/business/screens/IDBOD/ID.js +6 -2
  299. package/build/features/business/screens/IDBOD/IDBOD.js +18 -19
  300. package/build/features/business/screens/IDBOD/validation.d.ts +7 -0
  301. package/build/features/business/screens/IDBOD/validation.js +4 -1
  302. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  303. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  304. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  305. package/build/features/business/screens/OperatorError/index.js +2 -0
  306. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
  307. package/build/features/business/screens/Verify/Verify.js +16 -5
  308. package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  309. package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
  310. package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
  311. package/build/features/business/screens/VerifyNafath/index.js +2 -0
  312. package/build/features/connect/Connect.d.ts +5 -1
  313. package/build/features/connect/Connect.js +48 -31
  314. package/build/features/connect/screens/BrandSegment/BrandSegment.js +4 -26
  315. package/build/features/connect/screens/BrandSegment/TeamSize.js +1 -1
  316. package/build/features/connect/screens/BrandSegment/validation.d.ts +0 -9
  317. package/build/features/connect/screens/BrandSegment/validation.js +0 -3
  318. package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
  319. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +113 -0
  320. package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
  321. package/build/features/connect/screens/BusinessCountry/index.js +2 -0
  322. package/build/features/connect/screens/CivilID/CivilID.js +12 -4
  323. package/build/features/{connectExpress/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
  324. package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
  325. package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
  326. package/build/features/connect/screens/DOB/DOBForm.js +59 -0
  327. package/build/features/connect/screens/DOB/index.d.ts +3 -0
  328. package/build/features/connect/screens/DOB/index.js +2 -0
  329. package/build/features/connect/screens/DOB/validation.d.ts +8 -0
  330. package/build/features/connect/screens/DOB/validation.js +4 -0
  331. package/build/features/connect/screens/Individual/Individual.js +12 -6
  332. package/build/features/connect/screens/Individual/MobileNumber.js +6 -3
  333. package/build/features/connect/screens/Individual/validation.js +8 -3
  334. package/build/features/connect/screens/Merchant/BrandList.js +3 -3
  335. package/build/features/connect/screens/Merchant/BrandName.js +5 -2
  336. package/build/features/connect/screens/Merchant/Merchant.js +1 -1
  337. package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
  338. package/build/features/connect/screens/Merchant/validation.js +2 -2
  339. package/build/features/connect/screens/Mobile/Mobile.js +14 -7
  340. package/build/features/connect/screens/Mobile/MobileNumber.js +14 -8
  341. package/build/features/connect/screens/Mobile/validation.js +8 -3
  342. package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
  343. package/build/features/connect/screens/NID/IDNumber.js +2 -2
  344. package/build/features/connect/screens/NID/NID.js +10 -13
  345. package/build/features/connect/screens/NID/validation.d.ts +0 -3
  346. package/build/features/connect/screens/NID/validation.js +0 -1
  347. package/build/features/connect/screens/OTP/OTP.js +7 -7
  348. package/build/features/connect/screens/OTP/OTPInput.js +3 -11
  349. package/build/features/connect/screens/OperatorError/OperatorError.d.ts +5 -0
  350. package/build/features/connect/screens/OperatorError/OperatorError.js +9 -0
  351. package/build/features/connect/screens/OperatorError/index.d.ts +3 -0
  352. package/build/features/connect/screens/OperatorError/index.js +2 -0
  353. package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  354. package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
  355. package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
  356. package/build/features/connect/screens/VerifyNafath/index.js +2 -0
  357. package/build/features/connectExpress/ConnectExpress.d.ts +5 -3
  358. package/build/features/connectExpress/ConnectExpress.js +70 -44
  359. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
  360. package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
  361. package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
  362. package/build/features/connectExpress/screens/AccountCreatedLoader/index.d.ts +2 -0
  363. package/build/features/connectExpress/screens/AccountCreatedLoader/index.js +2 -0
  364. package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
  365. package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.js +74 -0
  366. package/build/features/connectExpress/screens/{AuthenticationList/TerminalList.d.ts → AuthMerchant/MerchantList.d.ts} +4 -3
  367. package/build/features/connectExpress/screens/AuthMerchant/MerchantList.js +64 -0
  368. package/build/features/connectExpress/screens/AuthMerchant/index.d.ts +2 -0
  369. package/build/features/connectExpress/screens/AuthMerchant/index.js +2 -0
  370. package/build/features/connectExpress/screens/AuthMerchant/validation.d.ts +8 -0
  371. package/build/features/connectExpress/screens/AuthMerchant/validation.js +4 -0
  372. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +30 -17
  373. package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
  374. package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
  375. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
  376. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
  377. package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +3 -3
  378. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +52 -10
  379. package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
  380. package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +36 -0
  381. package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +13 -10
  382. package/build/features/connectExpress/screens/AuthenticationList/validation.js +66 -7
  383. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
  384. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +111 -0
  385. package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
  386. package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
  387. package/build/features/connectExpress/screens/CivilID/CivilID.js +16 -5
  388. package/build/features/connectExpress/screens/CivilID/IDNumber.js +7 -2
  389. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
  390. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
  391. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +20 -5
  392. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -5
  393. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
  394. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -4
  395. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
  396. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
  397. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
  398. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +68 -1
  399. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +34 -7
  400. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +7 -4
  401. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +8 -3
  402. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
  403. package/build/features/connectExpress/screens/DOB/DOB.d.ts +6 -0
  404. package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
  405. package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
  406. package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
  407. package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
  408. package/build/features/connectExpress/screens/DOB/index.js +2 -0
  409. package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
  410. package/build/features/connectExpress/screens/DOB/validation.js +4 -0
  411. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
  412. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
  413. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
  414. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
  415. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +2 -2
  416. package/build/features/connectExpress/screens/Mobile/Mobile.js +17 -7
  417. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +17 -11
  418. package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
  419. package/build/features/connectExpress/screens/Mobile/validation.js +16 -6
  420. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
  421. package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
  422. package/build/features/connectExpress/screens/NID/NID.js +15 -12
  423. package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
  424. package/build/features/connectExpress/screens/NID/TAC.js +2 -2
  425. package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
  426. package/build/features/connectExpress/screens/NID/validation.js +0 -2
  427. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +6 -2
  428. package/build/features/connectExpress/screens/NIDMissed/NID.js +10 -8
  429. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +7 -0
  430. package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -1
  431. package/build/features/connectExpress/screens/OTP/OTP.js +14 -16
  432. package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
  433. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  434. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  435. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  436. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  437. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
  438. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
  439. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
  440. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
  441. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -4
  442. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  443. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -0
  444. package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
  445. package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
  446. package/build/features/entity/Entity.d.ts +2 -0
  447. package/build/features/entity/Entity.js +15 -9
  448. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
  449. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +5 -3
  450. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +6 -4
  451. package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
  452. package/build/features/entity/screens/EntityName/EntityName.js +44 -19
  453. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +9 -9
  454. package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
  455. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
  456. package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -7
  457. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
  458. package/build/features/entity/screens/EntityName/IssuingDate.js +5 -7
  459. package/build/features/entity/screens/EntityName/LegalName.js +1 -13
  460. package/build/features/entity/screens/EntityName/LicenseNumber.js +10 -11
  461. package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
  462. package/build/features/entity/screens/EntityName/validation.d.ts +31 -3
  463. package/build/features/entity/screens/EntityName/validation.js +38 -9
  464. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  465. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  466. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  467. package/build/features/entity/screens/OperatorError/index.js +2 -0
  468. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
  469. package/build/features/entity/screens/Verify/Verify.js +4 -3
  470. package/build/features/featuresScreens.d.ts +2 -0
  471. package/build/features/featuresScreens.js +250 -16
  472. package/build/features/individual/Individual.d.ts +2 -0
  473. package/build/features/individual/Individual.js +15 -9
  474. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
  475. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +55 -15
  476. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +36 -0
  477. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
  478. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
  479. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
  480. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -4
  481. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
  482. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +4 -3
  483. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
  484. package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
  485. package/build/features/individual/screens/IndividualList/MobileNumber.js +6 -3
  486. package/build/features/individual/screens/IndividualList/UserList.js +13 -9
  487. package/build/features/individual/screens/IndividualList/validation.js +8 -3
  488. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -4
  489. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +6 -2
  490. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
  491. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -21
  492. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -3
  493. package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
  494. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +72 -63
  495. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +7 -4
  496. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
  497. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +8 -3
  498. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  499. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  500. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  501. package/build/features/individual/screens/OperatorError/index.js +2 -0
  502. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
  503. package/build/features/individual/screens/Verify/Verify.js +4 -3
  504. package/build/features/password/Password.d.ts +2 -0
  505. package/build/features/password/Password.js +94 -32
  506. package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
  507. package/build/features/password/screens/OTP/OTP.js +4 -4
  508. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  509. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  510. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  511. package/build/features/password/screens/OperatorError/index.js +2 -0
  512. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  513. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  514. package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
  515. package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
  516. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
  517. package/build/features/password/screens/Verify/Verify.js +8 -7
  518. package/build/features/shared/Address/CountryList.d.ts +7 -7
  519. package/build/features/shared/Address/InputSelect.d.ts +7 -7
  520. package/build/features/shared/Background/Background.d.ts +3 -1
  521. package/build/features/shared/Background/Background.js +9 -11
  522. package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +15 -0
  523. package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
  524. package/build/features/shared/BusinessCountry/index.d.ts +2 -0
  525. package/build/features/shared/BusinessCountry/index.js +2 -0
  526. package/build/features/shared/Button/Button.js +11 -5
  527. package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
  528. package/build/features/shared/Button/FlowsButtons.js +15 -3
  529. package/build/features/shared/Button/NafathButton.d.ts +8 -0
  530. package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
  531. package/build/features/shared/Button/index.d.ts +2 -2
  532. package/build/features/shared/Button/index.js +2 -2
  533. package/build/features/shared/Calender/Calender.d.ts +2 -1
  534. package/build/features/shared/Calender/Calender.js +3 -3
  535. package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
  536. package/build/features/shared/Containers/FeatureContainer.js +3 -3
  537. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  538. package/build/features/shared/DataLoading/DataLoading.d.ts +4 -1
  539. package/build/features/shared/DataLoading/DataLoading.js +2 -2
  540. package/build/features/shared/Footer/Footer.js +2 -1
  541. package/build/features/shared/Input/Input.d.ts +2 -2
  542. package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
  543. package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
  544. package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
  545. package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
  546. package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
  547. package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
  548. package/build/features/shared/NafathVerification/index.d.ts +2 -0
  549. package/build/features/shared/NafathVerification/index.js +2 -0
  550. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
  551. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
  552. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  553. package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
  554. package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
  555. package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
  556. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
  557. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
  558. package/build/features/signIn/SignIn.js +18 -7
  559. package/build/features/signIn/screens/Mobile/MobileNumber.js +6 -3
  560. package/build/features/signIn/screens/Mobile/validation.js +8 -3
  561. package/build/features/signIn/screens/OTP/OTP.js +5 -4
  562. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  563. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  564. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  565. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  566. package/build/features/tax/Tax.d.ts +2 -0
  567. package/build/features/tax/Tax.js +15 -9
  568. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  569. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  570. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  571. package/build/features/tax/screens/OperatorError/index.js +2 -0
  572. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
  573. package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
  574. package/build/features/tax/screens/Verify/Verify.js +8 -7
  575. package/build/hooks/index.d.ts +3 -0
  576. package/build/hooks/index.js +3 -0
  577. package/build/hooks/useAppConfig.d.ts +3 -3
  578. package/build/hooks/useAppConfig.js +9 -6
  579. package/build/hooks/useAppDispatch.d.ts +2 -0
  580. package/build/hooks/useAppTheme.js +4 -3
  581. package/build/hooks/useCountDown.d.ts +10 -0
  582. package/build/hooks/useCountDown.js +17 -0
  583. package/build/hooks/useCountry.d.ts +1 -0
  584. package/build/hooks/useCountry.js +4 -3
  585. package/build/hooks/useFormDirtyCheck.d.ts +10 -0
  586. package/build/hooks/useFormDirtyCheck.js +66 -0
  587. package/build/hooks/useSanitizedTranslation.d.ts +1 -0
  588. package/build/hooks/useSanitizedTranslation.js +15 -0
  589. package/build/hooks/useVerifyToken.d.ts +5 -2
  590. package/build/hooks/useVerifyToken.js +10 -5
  591. package/build/index.css +360 -120
  592. package/build/index.d.ts +4 -2
  593. package/build/index.js +6 -2
  594. package/build/theme/components.js +7 -0
  595. package/build/theme/palette.js +4 -2
  596. package/build/theme/theme.d.ts +1 -1
  597. package/build/theme/theme.js +2 -2
  598. package/build/utils/array.js +2 -2
  599. package/build/utils/common.d.ts +3 -0
  600. package/build/utils/common.js +38 -2
  601. package/build/utils/device.d.ts +2 -0
  602. package/build/utils/device.js +6 -0
  603. package/build/utils/locale.js +2 -1
  604. package/build/utils/object.d.ts +1 -0
  605. package/build/utils/object.js +4 -1
  606. package/build/utils/string.d.ts +5 -2
  607. package/build/utils/string.js +24 -5
  608. package/build/utils/validation.d.ts +5 -0
  609. package/build/utils/validation.js +16 -0
  610. package/package.json +2 -2
  611. package/build/features/business/screens/OTP/OTP.d.ts +0 -8
  612. package/build/features/business/screens/OTP/OTP.js +0 -90
  613. package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +0 -8
  614. package/build/features/connect/screens/BrandSegment/SegmentLocations.js +0 -66
  615. package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +0 -8
  616. package/build/features/connect/screens/BrandSegment/SegmentProfits.js +0 -66
  617. package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +0 -8
  618. package/build/features/connect/screens/BrandSegment/SegmentTechs.js +0 -66
  619. package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +0 -100
  620. package/build/features/connectExpress/screens/AuthenticationList/TerminalList.js +0 -101
  621. package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
  622. package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
  623. package/build/features/shared/Button/AbsherButton.d.ts +0 -8
  624. /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
  625. /package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTP.d.ts +0 -0
  626. /package/build/features/{business → auth}/screens/OTP/OTPInput.d.ts +0 -0
  627. /package/build/features/{business → auth}/screens/OTP/index.d.ts +0 -0
  628. /package/build/features/{business → auth}/screens/OTP/index.js +0 -0
  629. /package/build/features/{business → auth}/screens/OTP/validation.d.ts +0 -0
  630. /package/build/features/{business → auth}/screens/OTP/validation.js +0 -0
  631. /package/build/features/{connectExpress/screens/IdentityOTP/OTPInput.d.ts → board/screens/Verify/Verify.d.ts} +0 -0
  632. /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.d.ts +0 -0
  633. /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.js +0 -0
@@ -69,119 +69,115 @@ var _a;
69
69
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
70
70
  import API from '../../../api';
71
71
  import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
72
- import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, 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';
72
+ import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
73
+ import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES, MONTHLY_INCOME_LIST } from '../../../constants';
74
+ import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType, isOtherThanKWOrSA, isKWOrSA, isSA, sendCustomEventToGTM } from '../../../utils';
75
75
  export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a, thunkApi) {
76
76
  var token = _a.token, isInternally = _a.isInternally, isUpdatePhoneInfo = _a.isUpdatePhoneInfo;
77
77
  return __awaiter(void 0, void 0, void 0, function () {
78
- var payload, settings, data, boardData, individualData, countryCode, boardInfoData, boardInfoStatus, countries, publicKey, 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, _l;
80
- return __generator(this, function (_m) {
81
- switch (_m.label) {
78
+ var settings, payload, data, userList, recipientData, countries, _b, country_code, config, boardId, countryCode, publicKey, data_1, _c, business_id, recipient, board_id, board_info_id, notification, _d, id_1, type, individualData, birthCountry;
79
+ var _e, _f, _g, _h;
80
+ return __generator(this, function (_j) {
81
+ switch (_j.label) {
82
82
  case 0:
83
- payload = {
84
- service_name: 'tap_email',
85
- verify_token: token
86
- };
87
83
  settings = thunkApi.getState().settings;
84
+ payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
85
+ notification: {
86
+ sms: false
87
+ }
88
+ }));
88
89
  return [4, API.leadService.verifyLeadToken(payload)];
89
90
  case 1:
90
- data = (_m.sent()).data;
91
- boardInfoStatus = undefined;
91
+ data = (_j.sent()).data;
92
+ recipientData = undefined;
92
93
  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
+ if (((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
94
95
  throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
95
96
  if (isInternally)
96
97
  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
- publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
102
- if (publicKey) {
98
+ _b = data || {}, country_code = _b.country_code, config = _b.config, boardId = _b.id;
99
+ countryCode = country_code;
100
+ publicKey = config === null || config === void 0 ? void 0 : config.public_key;
101
+ if (country_code)
102
+ thunkApi.dispatch(handleSetCountryByIso2(country_code));
103
+ if (publicKey)
103
104
  thunkApi.dispatch(handlePublicKey(publicKey));
104
- }
105
- if (!(data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_INFO)) return [3, 2];
106
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
107
- return [3, 16];
105
+ if (!!country_code) return [3, 3];
106
+ return [4, API.boardService.retrieveBoardDetails(boardId)];
108
107
  case 2:
109
- if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 15];
110
- board_id = data === null || data === void 0 ? void 0 : data.id;
111
- board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
112
- if (!(board_id && board_info_id)) return [3, 5];
113
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
108
+ data_1 = _j.sent();
109
+ countryCode = (_f = data_1 === null || data_1 === void 0 ? void 0 : data_1.entity) === null || _f === void 0 ? void 0 : _f.country;
110
+ if (countryCode)
111
+ thunkApi.dispatch(handleSetCountryByIso2(countryCode));
112
+ _j.label = 3;
114
113
  case 3:
115
- boardInfoData = _m.sent();
116
- notification = (boardInfoData || {}).notification;
117
- _b = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _b.id, type = _b.type;
118
- if (!(id && type)) return [3, 5];
119
- return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
114
+ if (!(data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_INFO)) return [3, 4];
115
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PHONE_INFO_STEP'));
116
+ return [3, 18];
120
117
  case 4:
121
- data_1 = (_m.sent()).data;
122
- individualData = data_1 || {};
123
- _m.label = 5;
118
+ if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 17];
119
+ _c = data || {}, business_id = _c.business_id, recipient = _c.recipient, board_id = _c.id, board_info_id = _c.board_info_id;
120
+ recipientData = recipient;
121
+ if (!!((_g = data === null || data === void 0 ? void 0 : data.recipient) === null || _g === void 0 ? void 0 : _g.id)) return [3, 6];
122
+ if (!(board_id && board_info_id)) return [3, 6];
123
+ return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
124
124
  case 5:
125
- if (!board_id) return [3, 7];
126
- return [4, API.boardService.retrieveBoardDetails(board_id)];
125
+ notification = (_j.sent()).notification;
126
+ recipientData = notification === null || notification === void 0 ? void 0 : notification.recipient;
127
+ if (!(recipientData === null || recipientData === void 0 ? void 0 : recipientData.id))
128
+ throw new Error('individual_id_missing');
129
+ _j.label = 6;
127
130
  case 6:
128
- boardData = _m.sent();
129
- _m.label = 7;
131
+ _d = recipientData || {}, id_1 = _d.id, type = _d.type;
132
+ return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id_1, type: type, countryCode: countryCode })).unwrap()];
130
133
  case 7:
131
- if (!countryCode) {
132
- countryCode = (_f = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _f === void 0 ? void 0 : _f.country;
133
- if (countryCode)
134
- thunkApi.dispatch(handleSetCountryByIso2(countryCode));
135
- }
136
- if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 11];
137
- if (!((_g = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _g === void 0 ? void 0 : _g.id)) return [3, 9];
138
- return [4, thunkApi.dispatch(getIndividualList((_h = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _h === void 0 ? void 0 : _h.id))];
134
+ individualData = (_j.sent()).data;
135
+ if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && !isKWOrSA(countryCode))) return [3, 10];
136
+ if (!business_id) return [3, 9];
137
+ return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
139
138
  case 8:
140
- _m.sent();
141
- _m.label = 9;
142
- case 9: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
143
- case 10:
144
- boardInfoStatus = _m.sent();
139
+ userList = _j.sent();
140
+ _j.label = 9;
141
+ case 9:
142
+ userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id === id_1; });
145
143
  thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
146
- return [3, 14];
144
+ return [3, 16];
145
+ case 10:
146
+ if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 13];
147
+ if (!business_id) return [3, 12];
148
+ return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
147
149
  case 11:
148
- birthCountry = ((_j = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _j === void 0 ? void 0 : _j.country) || countryCode;
149
- if (!birthCountry) return [3, 13];
150
- return [4, thunkApi.dispatch(getCityList(birthCountry))];
150
+ userList = _j.sent();
151
+ _j.label = 12;
151
152
  case 12:
152
- _m.sent();
153
- _m.label = 13;
153
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
154
+ return [3, 16];
154
155
  case 13:
155
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
156
- _m.label = 14;
157
- case 14: return [3, 16];
156
+ birthCountry = ((_h = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _h === void 0 ? void 0 : _h.country) || countryCode;
157
+ if (!birthCountry) return [3, 15];
158
+ return [4, thunkApi.dispatch(getCityList(birthCountry))];
159
+ case 14:
160
+ _j.sent();
161
+ _j.label = 15;
158
162
  case 15:
163
+ if (isInternally)
164
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
165
+ else
166
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
167
+ _j.label = 16;
168
+ case 16: return [3, 18];
169
+ case 17:
159
170
  if (isUpdatePhoneInfo) {
160
171
  thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_VERIFY_STEP'));
161
172
  }
162
- _m.label = 16;
163
- case 16:
164
- individuals = (boardData || {}).individuals;
165
- _c = individualData || {}, is_authorized = _c.is_authorized, data_state = _c.data_state;
166
- return [2, {
167
- data: data,
168
- boardResponse: {
169
- brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
170
- bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
171
- entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
172
- merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
173
- merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
174
- name: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.names,
175
- contact: (_l = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _l === void 0 ? void 0 : _l.contact,
176
- individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
177
- countries: countries,
178
- countryCode: countryCode,
179
- notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
180
- business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
181
- flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
182
- },
183
- token: token
184
- }];
173
+ _j.label = 18;
174
+ case 18: return [2, {
175
+ data: data,
176
+ countries: countries,
177
+ countryCode: countryCode,
178
+ token: token,
179
+ userList: userList || []
180
+ }];
185
181
  }
186
182
  });
187
183
  });
@@ -394,126 +390,141 @@ export var retrieveDataList = createAsyncThunk('individualRetrieveDataList', fun
394
390
  });
395
391
  }); });
396
392
  export var retrieveBoardStatus = createAsyncThunk('individual/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
397
- var individual, board_id, data;
398
- return __generator(this, function (_a) {
399
- switch (_a.label) {
393
+ var individual, _a, board_id, board_info_id, data;
394
+ return __generator(this, function (_b) {
395
+ switch (_b.label) {
400
396
  case 0:
401
397
  individual = thunkApi.getState().individual;
402
- board_id = (individual.data.verify.responseBody || {}).board_id;
398
+ _a = individual.data.verify.responseBody || {}, board_id = _a.board_id, board_info_id = _a.board_info_id;
399
+ if (!board_id || !board_info_id)
400
+ throw new Error('Internal server error');
403
401
  return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
404
402
  case 1:
405
- data = _a.sent();
403
+ data = _b.sent();
404
+ return [4, thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id })).unwrap()];
405
+ case 2:
406
+ _b.sent();
406
407
  thunkApi.dispatch(handlePrevScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
407
408
  return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
408
409
  }
409
410
  });
410
411
  }); });
411
- export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetails', function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
412
- var _a, user, data;
413
- var _b, _c;
414
- return __generator(this, function (_d) {
415
- switch (_d.label) {
416
- case 0: return [4, API.boardService.retrieveBoardDetails(boardId)];
417
- case 1:
418
- _a = _d.sent(), user = _a.user, data = __rest(_a, ["user"]);
419
- return [2, {
420
- 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 })
421
- }];
422
- }
412
+ export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetails', function (_a, thunkApi) {
413
+ var boardId = _a.boardId, id = _a.individualId, type = _a.individualType;
414
+ return __awaiter(void 0, void 0, void 0, function () {
415
+ var _b, individual, settings, individualData, _c, user, data, data_3, data_state;
416
+ var _d, _e, _f;
417
+ return __generator(this, function (_g) {
418
+ switch (_g.label) {
419
+ case 0:
420
+ _b = thunkApi.getState(), individual = _b.individual, settings = _b.settings;
421
+ individualData = (_d = individual.data.verify.responseBody) === null || _d === void 0 ? void 0 : _d.user;
422
+ return [4, API.boardService.retrieveBoardDetails(boardId)];
423
+ case 1:
424
+ _c = _g.sent(), user = _c.user, data = __rest(_c, ["user"]);
425
+ if (!((individualData === null || individualData === void 0 ? void 0 : individualData.id) === (user === null || user === void 0 ? void 0 : user.id))) return [3, 2];
426
+ individualData = user;
427
+ return [3, 4];
428
+ case 2:
429
+ if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && id && type)) return [3, 4];
430
+ return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: settings.data.businessCountry.iso2 })).unwrap()];
431
+ case 3:
432
+ data_3 = (_g.sent()).data;
433
+ individualData = data_3;
434
+ _g.label = 4;
435
+ case 4:
436
+ data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && (data === null || data === void 0 ? void 0 : data.individuals) ? data === null || data === void 0 ? void 0 : data.individuals : individualData) || {}).data_state;
437
+ return [2, {
438
+ data: __assign(__assign(__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: (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.names, individuals: data === null || data === void 0 ? void 0 : data.individuals, contact: (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.contact }), (data_state && {
439
+ individuals: __assign(__assign({}, data === null || data === void 0 ? void 0 : data.individuals), { data_state: data_state })
440
+ })), { board_status: data === null || data === void 0 ? void 0 : data.status })
441
+ }];
442
+ }
443
+ });
423
444
  });
424
- }); });
445
+ });
425
446
  export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
426
- var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData, individualData, boardData, boardInfoStatus, publicKey, countryCode, notification, _c, id, type, data_3, birthCountry, individuals, _d, is_authorized, data_state;
427
- var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
428
- return __generator(this, function (_r) {
429
- switch (_r.label) {
447
+ var _a, individual, settings, responseBody, countries, payload, data, userList, recipientData, publicKey, countryCode, _b, business_id, recipient, board_id, board_info_id, notification, _c, id, type, individualData, birthCountry;
448
+ var _d, _e, _f, _g, _h, _j, _k, _l;
449
+ return __generator(this, function (_m) {
450
+ switch (_m.label) {
430
451
  case 0:
431
452
  _a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
432
453
  responseBody = individual.data.verify.responseBody;
433
- _b = responseBody || {}, board_id = _b.board_id, board_info_id = _b.board_info_id;
434
454
  countries = settings.data.countries;
435
455
  payload = {
436
456
  data: params.otp,
437
- service_name: (_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _e === void 0 ? void 0 : _e.service_name,
457
+ service_name: (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name,
438
458
  verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
439
459
  step_name: INDIVIDUAl_STEP_NAMES.PHONE_AUTH,
440
460
  encryption_contract: ['data']
441
461
  };
442
462
  return [4, API.leadService.verifyLeadOTP(payload)];
443
463
  case 1:
444
- data = (_r.sent()).data;
445
- boardInfoStatus = undefined;
446
- if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
464
+ data = (_m.sent()).data;
465
+ recipientData = undefined;
466
+ if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
447
467
  throw new Error(data.errors[0].description);
448
- publicKey = (_g = data === null || data === void 0 ? void 0 : data.config) === null || _g === void 0 ? void 0 : _g.public_key;
449
- if (publicKey) {
468
+ publicKey = (_f = data === null || data === void 0 ? void 0 : data.config) === null || _f === void 0 ? void 0 : _f.public_key;
469
+ countryCode = data === null || data === void 0 ? void 0 : data.country_code;
470
+ if (publicKey)
450
471
  thunkApi.dispatch(handlePublicKey(publicKey));
451
- }
452
- if (!board_id) return [3, 3];
453
- return [4, API.boardService.retrieveBoardDetails(board_id)];
472
+ if (!((_g = settings.data.businessCountry) === null || _g === void 0 ? void 0 : _g.iso2) && countryCode)
473
+ thunkApi.dispatch(handleSetCountryByIso2(countryCode));
474
+ _b = data || {}, business_id = _b.business_id, recipient = _b.recipient, board_id = _b.id, board_info_id = _b.board_info_id;
475
+ recipientData = recipient;
476
+ if (!!((_h = data === null || data === void 0 ? void 0 : data.recipient) === null || _h === void 0 ? void 0 : _h.id)) return [3, 3];
477
+ if (!(board_id && board_info_id)) return [3, 3];
478
+ return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
454
479
  case 2:
455
- boardData = _r.sent();
456
- _r.label = 3;
480
+ notification = (_m.sent()).notification;
481
+ recipientData = notification === null || notification === void 0 ? void 0 : notification.recipient;
482
+ if (!(recipientData === null || recipientData === void 0 ? void 0 : recipientData.id))
483
+ throw new Error('individual_id_missing');
484
+ _m.label = 3;
457
485
  case 3:
458
- countryCode = (_h = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _h === void 0 ? void 0 : _h.country;
459
- if (!(board_id && board_info_id)) return [3, 6];
460
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
461
- case 4:
462
- boardInfoData = _r.sent();
463
- notification = (boardInfoData || {}).notification;
464
- _c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
465
- if (!(id && type)) return [3, 6];
486
+ _c = recipientData || {}, id = _c.id, type = _c.type;
466
487
  return [4, thunkApi.dispatch(retrieveIndividualInfo({ id: id, type: type, countryCode: countryCode })).unwrap()];
488
+ case 4:
489
+ individualData = (_m.sent()).data;
490
+ if (!(!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) && !isKWOrSA(countryCode))) return [3, 7];
491
+ if (!business_id) return [3, 6];
492
+ return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
467
493
  case 5:
468
- data_3 = (_r.sent()).data;
469
- individualData = data_3 || {};
470
- _r.label = 6;
494
+ userList = _m.sent();
495
+ _m.label = 6;
471
496
  case 6:
472
- if (countryCode)
473
- thunkApi.dispatch(handleSetCountryByIso2(countryCode));
474
- if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 10];
475
- if (!((_j = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _j === void 0 ? void 0 : _j.id)) return [3, 8];
476
- return [4, thunkApi.dispatch(getIndividualList((_k = boardData === null || boardData === void 0 ? void 0 : boardData.business) === null || _k === void 0 ? void 0 : _k.id))];
497
+ userList = userList === null || userList === void 0 ? void 0 : userList.filter(function (user) { return user.id === id; });
498
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
499
+ return [3, 13];
477
500
  case 7:
478
- _r.sent();
479
- _r.label = 8;
480
- case 8: return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
501
+ if (!(individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized)) return [3, 10];
502
+ if (!business_id) return [3, 9];
503
+ return [4, thunkApi.dispatch(getIndividualList(business_id)).unwrap()];
504
+ case 8:
505
+ userList = _m.sent();
506
+ _m.label = 9;
481
507
  case 9:
482
- boardInfoStatus = _r.sent();
483
508
  thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_LIST_STEP'));
484
509
  return [3, 13];
485
510
  case 10:
486
- birthCountry = ((_l = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _l === void 0 ? void 0 : _l.country) || countryCode;
511
+ birthCountry = ((_j = individualData === null || individualData === void 0 ? void 0 : individualData.birth) === null || _j === void 0 ? void 0 : _j.country) || countryCode;
487
512
  if (!birthCountry) return [3, 12];
488
513
  return [4, thunkApi.dispatch(getCityList(birthCountry))];
489
514
  case 11:
490
- _r.sent();
491
- _r.label = 12;
515
+ _m.sent();
516
+ _m.label = 12;
492
517
  case 12:
493
518
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP')); });
494
- _r.label = 13;
519
+ _m.label = 13;
495
520
  case 13:
496
- (_o = (_m = settings.data.appConfig).onStepCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, settings.data.activeScreen.name, { otp: params.otp });
497
- individuals = (boardData || {}).individuals;
498
- _d = individualData || {}, is_authorized = _d.is_authorized, data_state = _d.data_state;
521
+ (_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, { otp: params.otp });
499
522
  return [2, {
500
523
  data: data,
501
- boardResponse: {
502
- brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
503
- bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
504
- entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
505
- merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
506
- merchant_id: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.merchant_id,
507
- name: (_p = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _p === void 0 ? void 0 : _p.names,
508
- contact: (_q = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _q === void 0 ? void 0 : _q.contact,
509
- individuals: is_authorized ? individuals : __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })),
510
- countries: countries,
511
- countryCode: countryCode,
512
- notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
513
- business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
514
- flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
515
- },
516
- formData: __assign({}, params)
524
+ countries: countries,
525
+ countryCode: countryCode,
526
+ formData: __assign({}, params),
527
+ userList: userList
517
528
  }];
518
529
  }
519
530
  });
@@ -551,23 +562,28 @@ export var updatePhoneInfo = createAsyncThunk('individual/updatePhoneInfo', func
551
562
  });
552
563
  });
553
564
  export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateIndividualPersonalInfo', function (_a, thunkApi) {
554
- var formData = _a.formData, originalFormData = _a.originalFormData;
565
+ var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
555
566
  return __awaiter(void 0, void 0, void 0, function () {
556
- var _b, settings, individual, _c, notification, user, entity, id, _d, objects, ids, countryCode, name, email, mobile, 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;
567
+ var _b, settings, individual, _c, recipient, user, entity, id, countryCode, name, email, mobile, gender, nid, issuedCountry, expiryDate, dob, placeOfBirthCountry, placeOfBirthCity, nationality, code, _d, data_status, objects, ids, 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, individualData, data, _e, isUser, isBuyer, isUserORBuyerType;
557
568
  var _f, _g, _h, _j, _k;
558
569
  return __generator(this, function (_l) {
559
570
  switch (_l.label) {
560
571
  case 0:
561
572
  _b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
562
- _c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user, entity = _c.entity;
563
- id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
564
- _d = user || {}, objects = _d.objects, ids = _d.ids;
573
+ _c = individual.data.verify.responseBody || {}, recipient = _c.recipient, user = _c.user, entity = _c.entity;
574
+ id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : recipient) || {}).id;
565
575
  countryCode = (originalFormData || {}).countryCode;
566
576
  name = formData.name, email = formData.email, mobile = formData.mobile, gender = formData.gender, nid = formData.nid, issuedCountry = formData.issuedCountry, expiryDate = formData.expiryDate, dob = formData.dob, placeOfBirthCountry = formData.placeOfBirthCountry, placeOfBirthCity = formData.placeOfBirthCity, nationality = formData.nationality;
567
577
  code = entity === null || entity === void 0 ? void 0 : entity.country;
568
- data_status = (user || {}).data_status;
578
+ _d = user || {}, data_status = _d.data_status, objects = _d.objects, ids = _d.ids;
569
579
  userName = getUserNameObject(name);
570
580
  identification_id_type = nid ? (nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA) : undefined;
581
+ if (isOtherThanKWOrSA(settings.data.businessCountry.iso2)) {
582
+ identification_id_type = IDENTIFICATION_TYPE.NID;
583
+ }
584
+ if (isSA(settings.data.businessCountry.iso2)) {
585
+ identification_id_type = IDENTIFICATION_TYPE.NAFATH;
586
+ }
571
587
  isGenderNonEditable = hasNoneEditableValue(data_status, 'gender');
572
588
  isNameENNonEditable = hasNoneEditableValue(data_status, 'name.en');
573
589
  isNameARNonEditable = hasNoneEditableValue(data_status, 'name.ar');
@@ -585,7 +601,7 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
585
601
  hasContact = email || mobile;
586
602
  hasPhone = mobile && (countryCode === null || countryCode === void 0 ? void 0 : countryCode.idd_prefix);
587
603
  hasIdentification = nid && (issuedCountry || identification_id_type || expiryDate);
588
- hasBirth = placeOfBirthCity || placeOfBirthCountry;
604
+ hasBirth = (placeOfBirthCity === null || placeOfBirthCity === void 0 ? void 0 : placeOfBirthCity.id) || (placeOfBirthCountry === null || placeOfBirthCountry === void 0 ? void 0 : placeOfBirthCountry.iso2);
589
605
  nameIsEditable = userName.first && !(isNameENNonEditable && isNameARNonEditable);
590
606
  contact = hasContact && !(isEmailNonEditable && isMobileCountryNonEditable && isMobileNumberNonEditable)
591
607
  ? __assign({ email: isEmailNonEditable ? undefined : email }, (!(isMobileCountryNonEditable && isMobileNumberNonEditable) &&
@@ -631,48 +647,56 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
631
647
  'date_of_birth',
632
648
  'nationality'
633
649
  ], step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_PERSONAL_INFO });
650
+ individualData = undefined;
651
+ if (!isDirty) return [3, 2];
634
652
  return [4, API.individualService.updateMultipleIndividual(requestBody)];
635
653
  case 1:
636
654
  data = _l.sent();
655
+ individualData = data;
656
+ _l.label = 2;
657
+ case 2:
637
658
  _e = getIndividualType(objects), isUser = _e.isUser, isBuyer = _e.isBuyer;
638
659
  isUserORBuyerType = isUser || isBuyer;
639
- if (!isUserORBuyerType) return [3, 3];
660
+ if (!isUserORBuyerType) return [3, 4];
640
661
  return [4, thunkApi.dispatch(retrieveDataList(code))];
641
- case 2:
642
- _l.sent();
643
- _l.label = 3;
644
662
  case 3:
663
+ _l.sent();
664
+ _l.label = 4;
665
+ case 4:
645
666
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
646
667
  (_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, requestBody);
647
- return [2, { data: data, formData: originalFormData }];
668
+ return [2, { data: individualData, formData: originalFormData }];
648
669
  }
649
670
  });
650
671
  });
651
672
  });
652
673
  export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', function (_a, thunkApi) {
653
- var formData = _a.formData, originalFormData = _a.originalFormData;
674
+ var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
654
675
  return __awaiter(void 0, void 0, void 0, function () {
655
- 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;
676
+ var _b, settings, individual, _c, recipient, user, userList, business, id, _d, objects, ids, isKWOrSAValue, occupation, sourceIncome, monthlyIncome, isPEP, isInfluencer, shareCount, shareValue, civilID, signatureFileId, isAuthorized, isOccupationNonEditable, isSourceIncomeNonEditable, isPEPNonEditable, isInfluencerNonEditable, isMonthlyIncomeNonEditable, isAuthorizedNonEditable, isSharesAvailable, pepInfo, influencerInfo, occupationInfo, sourceIncomeInfo, monthlyIncomeInfo, isAuthorizedInfo, userPayload, shareHolderPayload, boardMemberPayload, buyerMemberPayload, _e, isUser, isShareholder, isBoardMember, isBuyer, isCustomer, isUserORBuyerType, payload, businessCountry, hasCivilIdDocument, hasSignatureDocument, isSendSignatureFile, civilIdDocument, signatureDocument, documentBody, documentBody, documentsList, documentBody, data, individualData, requestBody, user_2, userListRes;
656
677
  var _f, _g;
657
678
  return __generator(this, function (_h) {
658
679
  switch (_h.label) {
659
680
  case 0:
660
681
  _b = thunkApi.getState(), settings = _b.settings, individual = _b.individual;
661
- _c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user;
662
- id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
682
+ _c = individual.data.verify.responseBody || {}, recipient = _c.recipient, user = _c.user, userList = _c.userList, business = _c.business;
683
+ id = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : recipient) || {}).id;
663
684
  _d = user || {}, objects = _d.objects, ids = _d.ids;
664
- 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;
685
+ isKWOrSAValue = isKWOrSA(settings.data.businessCountry.iso2);
686
+ 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, isAuthorized = formData.isAuthorized;
665
687
  isOccupationNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'occupation');
666
688
  isSourceIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'source_of_income');
667
689
  isPEPNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_relative_PEP');
668
690
  isInfluencerNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_influencer');
669
691
  isMonthlyIncomeNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'monthly_income');
692
+ isAuthorizedNonEditable = hasNoneEditableValue(user === null || user === void 0 ? void 0 : user.data_status, 'is_authorized');
670
693
  isSharesAvailable = shareCount || shareValue;
671
- pepInfo = isPEPNonEditable ? undefined : isPEP;
672
- influencerInfo = isInfluencerNonEditable ? undefined : isInfluencer;
694
+ pepInfo = isPEPNonEditable || isPEP === null ? undefined : isPEP;
695
+ influencerInfo = isInfluencerNonEditable || isInfluencer === null ? undefined : isInfluencer;
673
696
  occupationInfo = isOccupationNonEditable || !(occupation === null || occupation === void 0 ? void 0 : occupation.id) ? undefined : { chapter: { id: occupation.id } };
674
697
  sourceIncomeInfo = isSourceIncomeNonEditable || !(sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.id) ? undefined : [{ id: sourceIncome.id }];
675
698
  monthlyIncomeInfo = isMonthlyIncomeNonEditable || !(monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.id) ? undefined : { id: monthlyIncome.id };
699
+ isAuthorizedInfo = isAuthorizedNonEditable || isKWOrSAValue ? undefined : { is_authorized: isAuthorized };
676
700
  userPayload = {
677
701
  occupation: occupationInfo,
678
702
  source_income: sourceIncomeInfo,
@@ -701,76 +725,91 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
701
725
  isUserORBuyerType = isUser || isBuyer;
702
726
  payload = userPayload;
703
727
  if (objects === null || objects === void 0 ? void 0 : objects.length) {
704
- payload = __assign(__assign(__assign(__assign(__assign({}, (isUser && payload)), (isShareholder && shareHolderPayload)), (isBoardMember && boardMemberPayload)), (isBuyer && buyerMemberPayload)), (isCustomer && {}));
728
+ payload = __assign(__assign(__assign(__assign(__assign(__assign({}, (isUser && payload)), (isShareholder && shareHolderPayload)), (isBoardMember && boardMemberPayload)), (isBuyer && buyerMemberPayload)), (isCustomer && {})), (isAuthorizedInfo && isAuthorizedInfo));
705
729
  }
706
- 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 });
707
- return [4, API.individualService.updateMultipleIndividual(requestBody)];
708
- case 1:
709
- data = _h.sent();
710
730
  businessCountry = settings.data.businessCountry;
711
731
  hasCivilIdDocument = (civilID || []).length > 0;
712
732
  hasSignatureDocument = (signatureFileId || []).length > 0;
713
- isSendSignatureFile = (user === null || user === void 0 ? void 0 : user.is_authorized) && isUserORBuyerType;
733
+ isSendSignatureFile = isAuthorized && isUserORBuyerType;
714
734
  civilIdDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.IDENTITY_DOCUMENT);
715
735
  signatureDocument = getRecentDocumentBasedOnPurpose(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.CUSTOMER_SIGNATURE);
716
- if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3, 3];
736
+ if (!((civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id) && hasCivilIdDocument)) return [3, 2];
717
737
  documentBody = {
718
738
  id: civilIdDocument.id,
719
739
  images: civilID
720
740
  };
721
741
  return [4, API.documentService.addFilesToExistingDocument(documentBody)];
722
- case 2:
742
+ case 1:
723
743
  _h.sent();
724
- _h.label = 3;
725
- case 3:
726
- if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3, 5];
744
+ _h.label = 2;
745
+ case 2:
746
+ if (!((signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id) && hasSignatureDocument && isSendSignatureFile)) return [3, 4];
727
747
  documentBody = {
728
748
  id: signatureDocument.id,
729
749
  images: signatureFileId
730
750
  };
731
751
  return [4, API.documentService.addFilesToExistingDocument(documentBody)];
732
- case 4:
752
+ case 3:
733
753
  _h.sent();
734
- _h.label = 5;
735
- case 5:
754
+ _h.label = 4;
755
+ case 4:
736
756
  documentsList = [];
737
757
  if (hasCivilIdDocument && !(civilIdDocument === null || civilIdDocument === void 0 ? void 0 : civilIdDocument.id))
738
758
  documentsList.push({ type: DocumentPurpose.IDENTITY_DOCUMENT, images: civilID });
739
759
  if (isSendSignatureFile && hasSignatureDocument && !(signatureDocument === null || signatureDocument === void 0 ? void 0 : signatureDocument.id))
740
760
  documentsList.push({ type: DocumentPurpose.CUSTOMER_SIGNATURE, images: signatureFileId });
741
- if (!(documentsList.length > 0)) return [3, 7];
761
+ if (!(documentsList.length > 0)) return [3, 6];
742
762
  documentBody = {
743
763
  individual_type_id: ((ids === null || ids === void 0 ? void 0 : ids.length) ? ids.find(function (i) { return i.includes('usr_'); }) : id) || '',
744
764
  country: businessCountry.iso2,
745
765
  documents: documentsList
746
766
  };
747
767
  return [4, API.documentService.updateDocumentInfo(documentBody)];
748
- case 6:
768
+ case 5:
749
769
  _h.sent();
750
- _h.label = 7;
770
+ _h.label = 6;
771
+ case 6:
772
+ data = undefined, individualData = user || {};
773
+ 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 });
774
+ if (!isDirty) return [3, 8];
775
+ return [4, API.individualService.updateMultipleIndividual(requestBody)];
751
776
  case 7:
752
- individualData = (sortUserList(mapUserList(data === null || data === void 0 ? void 0 : data.individuals)) || [])[0];
777
+ data = _h.sent();
778
+ user_2 = (sortUserList(mapUserList(data === null || data === void 0 ? void 0 : data.individuals)) || [])[0];
779
+ individualData = user_2;
780
+ _h.label = 8;
781
+ case 8:
782
+ userListRes = userList || [];
783
+ if (!((user === null || user === void 0 ? void 0 : user.id) === (individualData === null || individualData === void 0 ? void 0 : individualData.id) && !(user === null || user === void 0 ? void 0 : user.is_authorized) && isAuthorized && (business === null || business === void 0 ? void 0 : business.id))) return [3, 10];
784
+ return [4, thunkApi.dispatch(getIndividualList(business === null || business === void 0 ? void 0 : business.id)).unwrap()];
785
+ case 9:
786
+ userListRes = _h.sent();
787
+ _h.label = 10;
788
+ case 10:
753
789
  thunkApi.dispatch(handleNextScreenStep());
754
790
  (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
755
- return [2, { data: data, formData: originalFormData, individualData: individualData }];
791
+ return [2, { data: data, formData: originalFormData, individualData: individualData, userList: userListRes, isKWOrSACountry: isKWOrSAValue }];
756
792
  }
757
793
  });
758
794
  });
759
795
  });
760
- export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a) {
796
+ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
761
797
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
762
798
  return __awaiter(void 0, void 0, void 0, function () {
763
- var requestBody, data;
764
- return __generator(this, function (_b) {
765
- switch (_b.label) {
799
+ var settings, requestBody, data;
800
+ var _b;
801
+ return __generator(this, function (_c) {
802
+ switch (_c.label) {
766
803
  case 0:
804
+ settings = thunkApi.getState().settings;
767
805
  requestBody = {
768
806
  email: email,
807
+ country: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
769
808
  encryption_contract: ['email']
770
809
  };
771
810
  return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
772
811
  case 1:
773
- data = (_b.sent()).data;
812
+ data = (_c.sent()).data;
774
813
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
775
814
  if (!data.errors)
776
815
  return [2, { response: data, formData: email }];
@@ -780,43 +819,59 @@ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', f
780
819
  });
781
820
  });
782
821
  export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
783
- var _a, settings, individual, _b, id, infoId, primaryUser, payload, data, boardInfoStatus, individualDataRes, _c, is_authorized, userId, type;
784
- var _d, _e, _f, _g;
785
- return __generator(this, function (_h) {
786
- switch (_h.label) {
822
+ var _a, settings, individual, _b, board_id, infoId, _c, showBoard, mode, payload, data, _d, id, iType, boardInfoStatusData;
823
+ var _e, _f, _g, _h, _j, _k, _l, _m, _o;
824
+ return __generator(this, function (_p) {
825
+ switch (_p.label) {
787
826
  case 0:
788
827
  _a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
789
- _b = individual.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id, primaryUser = _b.primaryUser;
790
- if (!id)
828
+ _b = individual.data.verify.responseBody || {}, board_id = _b.board_id, infoId = _b.board_info_id;
829
+ _c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
830
+ if (!board_id)
791
831
  return [2];
792
832
  payload = {
793
833
  lang: settings.data.language,
794
- step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS,
795
- id: id
834
+ step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS
796
835
  };
797
- return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
836
+ return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
798
837
  case 1:
799
- data = _h.sent();
800
- return [4, API.boardService.retrieveBoardInfoStatus(id)];
838
+ data = _p.sent();
839
+ sendCustomEventToGTM({
840
+ event: 'Send Event',
841
+ event_category: 'Board Flows - Individual',
842
+ event_action: 'Individual Update Success Page',
843
+ event_label: settings.data.businessCountry.iso2
844
+ });
845
+ if (!showBoard && mode === 'content') {
846
+ (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
847
+ (_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
848
+ return [2, { response: __assign({}, data), formData: params }];
849
+ }
850
+ _d = ((_j = data === null || data === void 0 ? void 0 : data.notification) === null || _j === void 0 ? void 0 : _j.recipient) || {}, id = _d.id, iType = _d.type;
851
+ return [4, Promise.all([
852
+ API.boardService.retrieveBoardInfoStatus(board_id),
853
+ thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: iType })).unwrap()
854
+ ])];
801
855
  case 2:
802
- boardInfoStatus = _h.sent();
803
- return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
804
- case 3:
805
- _h.sent();
806
- individualDataRes = undefined;
807
- _c = primaryUser || {}, is_authorized = _c.is_authorized, userId = _c.id, type = _c.object;
808
- if (!!is_authorized) return [3, 5];
809
- return [4, thunkApi
810
- .dispatch(retrieveIndividualInfo({ id: userId, type: type, countryCode: settings.data.businessCountry.iso2 }))
811
- .unwrap()];
812
- case 4:
813
- individualDataRes = _h.sent();
814
- _h.label = 5;
815
- case 5:
816
- (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
817
- (_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: data });
856
+ boardInfoStatusData = (_p.sent())[0];
857
+ (_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, {});
858
+ (_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, { data: data });
818
859
  thunkApi.dispatch(handleNextScreenStep());
819
- 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 }];
860
+ return [2, { data: data, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] }];
861
+ }
862
+ });
863
+ }); });
864
+ export var onCloseCompleteIndividual = createAsyncThunk('individual/onCloseCompleteIndividual', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
865
+ var individual, _a, merchant, brand, entity;
866
+ return __generator(this, function (_b) {
867
+ switch (_b.label) {
868
+ case 0:
869
+ individual = thunkApi.getState().individual;
870
+ _a = individual.data.verify.responseBody || {}, merchant = _a.merchant, brand = _a.brand, entity = _a.entity;
871
+ return [4, thunkApi.dispatch(onCloseComplete({ merchantId: merchant === null || merchant === void 0 ? void 0 : merchant.id, brandId: brand === null || brand === void 0 ? void 0 : brand.id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
872
+ case 1:
873
+ _b.sent();
874
+ return [2];
820
875
  }
821
876
  });
822
877
  }); });
@@ -824,6 +879,7 @@ var initialState = {
824
879
  error: null,
825
880
  loading: false,
826
881
  cityLoading: false,
882
+ addOrRequestDetailLoading: false,
827
883
  data: {
828
884
  flowName: FlowsTypes.INDIVIDUAL,
829
885
  verify: {
@@ -863,7 +919,8 @@ var initialState = {
863
919
  isPEP: null,
864
920
  isInfluencer: null,
865
921
  shareCount: '',
866
- shareValue: ''
922
+ shareValue: '',
923
+ isAuthorized: false
867
924
  }
868
925
  }
869
926
  };
@@ -898,8 +955,8 @@ export var individualSlice = createSlice({
898
955
  })
899
956
  .addCase(verifyToken.fulfilled, function (state, action) {
900
957
  state.error = null;
901
- var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse;
902
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
958
+ var _a = action.payload, data = _a.data, token = _a.token, countries = _a.countries, countryCode = _a.countryCode, userList = _a.userList;
959
+ state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { countries: countries, countryCode: countryCode, board_id: data.id, userList: userList });
903
960
  state.data.verify.token = token;
904
961
  })
905
962
  .addCase(verifyToken.rejected, function (state, action) {
@@ -939,37 +996,31 @@ export var individualSlice = createSlice({
939
996
  state.error = null;
940
997
  })
941
998
  .addCase(verifyLeadOTP.fulfilled, function (state, action) {
942
- var _a;
943
999
  state.loading = false;
944
1000
  state.error = null;
945
- var _b = action.payload, data = _b.data, formData = _b.formData, boardResponse = _b.boardResponse;
946
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
947
- if (description) {
948
- state.error = description;
949
- return;
950
- }
1001
+ var _a = action.payload, data = _a.data, countries = _a.countries, countryCode = _a.countryCode, userList = _a.userList, formData = _a.formData;
951
1002
  state.data.otpData = formData;
952
1003
  state.data.otpData.responseBody = data;
953
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
1004
+ state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { countries: countries, countryCode: countryCode, userList: userList });
954
1005
  })
955
1006
  .addCase(verifyLeadOTP.rejected, function (state, action) {
956
1007
  state.loading = false;
957
1008
  state.error = action.error.message;
958
1009
  })
959
1010
  .addCase(addDetailsAsync.pending, function (state) {
960
- state.loading = true;
1011
+ state.addOrRequestDetailLoading = true;
961
1012
  state.error = null;
962
1013
  })
963
1014
  .addCase(addDetailsAsync.fulfilled, function (state, action) {
964
1015
  var _a, _b, _c, _d;
965
- state.loading = false;
1016
+ state.addOrRequestDetailLoading = false;
966
1017
  state.error = null;
967
1018
  var _e = action.payload, userList = _e.userList, individualId = _e.individualId, countries = _e.countries;
968
1019
  var primaryUser = (state.data.verify.responseBody || {}).user;
969
1020
  var user = (userList || []).find(function (user) { return user.individual_id === individualId; });
970
1021
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: userList });
971
1022
  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 }) });
972
- 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;
1023
+ 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, is_authorized = _f.is_authorized;
973
1024
  var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
974
1025
  var cityList = (state.data.verify.responseBody || {}).cityList;
975
1026
  if (user)
@@ -1027,17 +1078,19 @@ export var individualSlice = createSlice({
1027
1078
  state.data.individualData.isPEP = is_relative_PEP;
1028
1079
  if (is_influencer !== undefined)
1029
1080
  state.data.individualData.isInfluencer = is_influencer;
1081
+ if (is_authorized !== undefined)
1082
+ state.data.individualData.isAuthorized = is_authorized;
1030
1083
  })
1031
1084
  .addCase(addDetailsAsync.rejected, function (state, action) {
1032
- state.loading = false;
1085
+ state.addOrRequestDetailLoading = false;
1033
1086
  state.error = action.error.message;
1034
1087
  })
1035
1088
  .addCase(requestDetailsByEmail.pending, function (state) {
1036
- state.loading = true;
1089
+ state.addOrRequestDetailLoading = true;
1037
1090
  state.error = null;
1038
1091
  })
1039
1092
  .addCase(requestDetailsByEmail.fulfilled, function (state, action) {
1040
- state.loading = false;
1093
+ state.addOrRequestDetailLoading = false;
1041
1094
  state.error = null;
1042
1095
  var _a = action.payload, data = _a.data, individualData = _a.individualData;
1043
1096
  var userList = (state.data.verify.responseBody || {}).userList;
@@ -1050,7 +1103,7 @@ export var individualSlice = createSlice({
1050
1103
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { requestEmailData: data, userList: list });
1051
1104
  })
1052
1105
  .addCase(requestDetailsByEmail.rejected, function (state, action) {
1053
- state.loading = false;
1106
+ state.addOrRequestDetailLoading = false;
1054
1107
  state.error = action.error.message;
1055
1108
  })
1056
1109
  .addCase(retrieveIndividualInfo.pending, function (state) {
@@ -1062,7 +1115,7 @@ export var individualSlice = createSlice({
1062
1115
  var _e = action.payload, data = _e.data, countries = _e.countries;
1063
1116
  var user = (state.data.verify.responseBody || {}).user;
1064
1117
  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 }) });
1065
- 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;
1118
+ 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, is_authorized = _f.is_authorized;
1066
1119
  var _g = state.data.individualData.responseBody || {}, sourceIncomeList = _g.sourceIncomeList, monthlyIncomeList = _g.monthlyIncomeList;
1067
1120
  var cityList = (state.data.verify.responseBody || {}).cityList;
1068
1121
  if (data)
@@ -1118,8 +1171,11 @@ export var individualSlice = createSlice({
1118
1171
  state.data.individualData.occupation = selectedOccupation;
1119
1172
  state.data.individualData.isPEP = is_relative_PEP;
1120
1173
  state.data.individualData.isInfluencer = is_influencer;
1174
+ if (is_authorized !== undefined)
1175
+ state.data.individualData.isAuthorized = is_authorized;
1121
1176
  })
1122
1177
  .addCase(retrieveIndividualInfo.rejected, function (state, action) {
1178
+ state.addOrRequestDetailLoading = false;
1123
1179
  state.error = action.error.message;
1124
1180
  })
1125
1181
  .addCase(getIndividualList.pending, function (state) {
@@ -1140,17 +1196,17 @@ export var individualSlice = createSlice({
1140
1196
  state.error = null;
1141
1197
  })
1142
1198
  .addCase(retrieveDataList.fulfilled, function (state, action) {
1143
- var _a;
1199
+ var _a, _b;
1144
1200
  state.loading = false;
1145
1201
  state.error = null;
1146
- var _b = action.payload, sourceIncome = _b.sourceIncome, monthlyIncome = _b.monthlyIncome, occupationData = _b.occupation;
1202
+ var _c = action.payload, sourceIncome = _c.sourceIncome, monthlyIncome = _c.monthlyIncome, occupationData = _c.occupation;
1147
1203
  var data = state.data.individualData.responseBody;
1148
1204
  var sourceIncomeList = (sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.list) || [];
1149
- var monthlyIncomeList = (monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list) || [];
1205
+ var monthlyIncomeList = ((_a = monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list) === null || _a === void 0 ? void 0 : _a.length) ? monthlyIncome === null || monthlyIncome === void 0 ? void 0 : monthlyIncome.list : MONTHLY_INCOME_LIST;
1150
1206
  var occupationList = (occupationData === null || occupationData === void 0 ? void 0 : occupationData.list) || [];
1151
1207
  state.data.individualData.responseBody = __assign(__assign({}, data), { sourceIncomeList: sourceIncomeList, monthlyIncomeList: monthlyIncomeList, occupationList: occupationList });
1152
- 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;
1153
- 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]);
1208
+ var _d = ((_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.user) || {}, source_income = _d.source_income, monthly_income = _d.monthly_income, occupation = _d.occupation;
1209
+ 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); });
1154
1210
  if (!!selectedSourceIncome)
1155
1211
  state.data.individualData.sourceIncome = selectedSourceIncome;
1156
1212
  var selectedMonthlyIncome = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) {
@@ -1225,16 +1281,20 @@ export var individualSlice = createSlice({
1225
1281
  .addCase(updateIndividualInfo.fulfilled, function (state, action) {
1226
1282
  state.loading = false;
1227
1283
  state.error = null;
1228
- var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData;
1229
- state.data.individualData = formData;
1284
+ var _a = action.payload, data = _a.data, formData = _a.formData, individualData = _a.individualData, userList = _a.userList, isKWOrSACountry = _a.isKWOrSACountry;
1285
+ state.data.individualData = __assign(__assign({}, formData), { civilID: undefined, signatureFileId: undefined });
1230
1286
  state.data.individualData.responseBody = data;
1231
- var userList = (state.data.verify.responseBody || {}).userList;
1287
+ var user = (state.data.verify.responseBody || {}).user;
1288
+ var isSameUser = (user === null || user === void 0 ? void 0 : user.id) === (individualData === null || individualData === void 0 ? void 0 : individualData.id);
1289
+ var userInfo = __assign(__assign({}, user), (isSameUser && individualData && __assign({}, individualData)));
1290
+ if (isSameUser && !isKWOrSACountry)
1291
+ userInfo = __assign(__assign({}, user), { is_authorized: individualData.is_authorized });
1232
1292
  var list = userList || [];
1233
1293
  list = list.map(function (user) {
1234
1294
  var userInfo = user.id === (individualData === null || individualData === void 0 ? void 0 : individualData.id) ? individualData : user;
1235
1295
  return userInfo;
1236
1296
  });
1237
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { userList: list });
1297
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { user: userInfo, userList: list });
1238
1298
  })
1239
1299
  .addCase(updateIndividualInfo.rejected, function (state, action) {
1240
1300
  state.loading = false;
@@ -1286,18 +1346,8 @@ export var individualSlice = createSlice({
1286
1346
  var _a;
1287
1347
  state.loading = false;
1288
1348
  state.error = null;
1289
- var _b = action.payload || {}, response = _b.response, individualData = _b.individualData;
1290
- var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
1291
- if (description) {
1292
- state.error = description;
1293
- return;
1294
- }
1295
- var flows = response.flows;
1296
- var individuals = (state.data.verify.responseBody || {}).individuals;
1297
- var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
1298
- state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (data_state && {
1299
- individuals: __assign(__assign({}, individuals), { data_state: data_state })
1300
- }));
1349
+ var _b = action.payload || {}, flows = _b.flows, data = _b.data;
1350
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, recipient: (_a = data === null || data === void 0 ? void 0 : data.notification) === null || _a === void 0 ? void 0 : _a.recipient });
1301
1351
  })
1302
1352
  .addCase(updateBoardSuccess.pending, function (state) {
1303
1353
  state.loading = true;
@@ -1306,6 +1356,18 @@ export var individualSlice = createSlice({
1306
1356
  .addCase(updateBoardSuccess.rejected, function (state, action) {
1307
1357
  state.loading = false;
1308
1358
  state.error = action.error.message;
1359
+ })
1360
+ .addCase(onCloseCompleteIndividual.pending, function (state) {
1361
+ state.loading = true;
1362
+ state.error = null;
1363
+ })
1364
+ .addCase(onCloseCompleteIndividual.fulfilled, function (state) {
1365
+ state.loading = false;
1366
+ state.error = null;
1367
+ })
1368
+ .addCase(onCloseCompleteIndividual.rejected, function (state, action) {
1369
+ state.loading = false;
1370
+ state.error = action.error.message;
1309
1371
  });
1310
1372
  }
1311
1373
  });