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

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 (553) hide show
  1. package/build/@types/app.d.ts +42 -4
  2. package/build/@types/app.js +16 -0
  3. package/build/@types/config.d.ts +4 -0
  4. package/build/@types/form.d.ts +11 -1
  5. package/build/@types/redux.d.ts +1 -0
  6. package/build/api/account.d.ts +4 -1
  7. package/build/api/account.js +15 -1
  8. package/build/api/auth.d.ts +35 -20
  9. package/build/api/auth.js +1 -1
  10. package/build/api/axios.js +1 -2
  11. package/build/api/data.d.ts +4 -17
  12. package/build/api/data.js +5 -45
  13. package/build/api/entity.d.ts +3 -2
  14. package/build/api/entity.js +12 -4
  15. package/build/api/firebase.js +68 -8
  16. package/build/api/index.d.ts +14 -25
  17. package/build/api/lead.d.ts +16 -3
  18. package/build/api/lead.js +16 -0
  19. package/build/api/user.d.ts +7 -0
  20. package/build/api/user.js +9 -1
  21. package/build/app/rootReducer.d.ts +1 -0
  22. package/build/app/rootReducer.js +3 -1
  23. package/build/app/settings.js +15 -15
  24. package/build/app/store.d.ts +2 -0
  25. package/build/assets/locales/ar.json +353 -151
  26. package/build/assets/locales/en.json +349 -150
  27. package/build/components/AnimationFlow/AnimationFlow.d.ts +9 -5
  28. package/build/components/AnimationFlow/AnimationFlow.js +5 -5
  29. package/build/components/AnimationFlow/BottomSheet.d.ts +5 -2
  30. package/build/components/AnimationFlow/BottomSheet.js +43 -14
  31. package/build/components/AnimationFlow/Dialog.d.ts +4 -3
  32. package/build/components/AnimationFlow/Dialog.js +5 -3
  33. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
  34. package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
  35. package/build/components/ArabicDatePicker/style.css +32 -3
  36. package/build/components/DatePicker/DatePicker.d.ts +1 -1
  37. package/build/components/DatePicker/DatePicker.js +2 -2
  38. package/build/components/Footer/Footer.js +2 -1
  39. package/build/components/Input/Input.js +1 -1
  40. package/build/components/Providers/ThemeProvider.js +3 -3
  41. package/build/components/Tooltip/Tooltip.js +1 -1
  42. package/build/constants/api.d.ts +5 -7
  43. package/build/constants/api.js +11 -15
  44. package/build/constants/app.d.ts +39 -0
  45. package/build/constants/app.js +345 -35
  46. package/build/constants/assets.d.ts +3 -0
  47. package/build/constants/assets.js +4 -1
  48. package/build/constants/dummy.d.ts +4 -219
  49. package/build/constants/dummy.js +64 -6194
  50. package/build/constants/flows.d.ts +26 -0
  51. package/build/constants/flows.js +27 -0
  52. package/build/constants/index.d.ts +1 -0
  53. package/build/constants/index.js +1 -0
  54. package/build/constants/validation.d.ts +3 -0
  55. package/build/constants/validation.js +3 -0
  56. package/build/features/app/auth/authStore.d.ts +29 -8
  57. package/build/features/app/auth/authStore.js +495 -149
  58. package/build/features/app/bank/bankStore.d.ts +13 -18
  59. package/build/features/app/bank/bankStore.js +186 -153
  60. package/build/features/app/board/boardStore.d.ts +5 -1
  61. package/build/features/app/board/boardStore.js +82 -51
  62. package/build/features/app/brand/brandStore.d.ts +17 -33
  63. package/build/features/app/brand/brandStore.js +254 -257
  64. package/build/features/app/business/businessStore.d.ts +37 -15
  65. package/build/features/app/business/businessStore.js +443 -235
  66. package/build/features/app/connect/connectStore.d.ts +33 -5
  67. package/build/features/app/connect/connectStore.js +355 -120
  68. package/build/features/app/connectExpress/connectExpressStore.d.ts +56 -27
  69. package/build/features/app/connectExpress/connectExpressStore.js +676 -392
  70. package/build/features/app/entity/entityStore.d.ts +20 -36
  71. package/build/features/app/entity/entityStore.js +204 -238
  72. package/build/features/app/individual/individualStore.d.ts +18 -34
  73. package/build/features/app/individual/individualStore.js +269 -292
  74. package/build/features/app/kyc/kycStore.d.ts +67 -0
  75. package/build/features/app/kyc/kycStore.js +432 -0
  76. package/build/features/app/password/passwordStore.d.ts +33 -18
  77. package/build/features/app/password/passwordStore.js +260 -219
  78. package/build/features/app/signIn/signInStore.js +19 -15
  79. package/build/features/app/tax/taxStore.d.ts +13 -7
  80. package/build/features/app/tax/taxStore.js +170 -136
  81. package/build/features/auth/Auth.d.ts +5 -6
  82. package/build/features/auth/Auth.js +40 -15
  83. package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +2 -5
  84. package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
  85. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
  86. package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
  87. package/build/features/auth/screens/AuthSwitch/index.js +2 -0
  88. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +2 -8
  89. package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +2 -2
  90. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +8 -2
  91. package/build/features/auth/screens/CivilID/CivilID.js +4 -35
  92. package/build/features/auth/screens/{NID → DOB}/DOB.js +3 -3
  93. package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
  94. package/build/features/auth/screens/DOB/DOBForm.js +59 -0
  95. package/build/features/auth/screens/DOB/index.d.ts +3 -0
  96. package/build/features/auth/screens/DOB/index.js +2 -0
  97. package/build/features/{business/screens/OTP → auth/screens/DOB}/validation.d.ts +4 -4
  98. package/build/features/auth/screens/DOB/validation.js +4 -0
  99. package/build/features/auth/screens/Email/Email.d.ts +5 -0
  100. package/build/features/auth/screens/Email/Email.js +57 -0
  101. package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
  102. package/build/features/auth/screens/Email/EmailField.js +52 -0
  103. package/build/features/auth/screens/Email/index.d.ts +3 -0
  104. package/build/features/auth/screens/Email/index.js +2 -0
  105. package/build/features/auth/screens/Email/validation.d.ts +8 -0
  106. package/build/features/auth/screens/Email/validation.js +4 -0
  107. package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
  108. package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
  109. package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
  110. package/build/features/auth/screens/EmailSent/index.js +2 -0
  111. package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
  112. package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
  113. package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
  114. package/build/features/auth/screens/MigratingData/index.js +2 -0
  115. package/build/features/auth/screens/Mobile/Mobile.js +6 -38
  116. package/build/features/auth/screens/Mobile/MobileNumber.js +13 -15
  117. package/build/features/auth/screens/Mobile/validation.js +11 -3
  118. package/build/features/auth/screens/NID/IDNumber.js +1 -1
  119. package/build/features/auth/screens/NID/NID.js +7 -43
  120. package/build/features/auth/screens/NID/validation.d.ts +0 -3
  121. package/build/features/auth/screens/NID/validation.js +0 -1
  122. package/build/features/auth/screens/OTP/OTP.js +41 -10
  123. package/build/features/auth/screens/OTP/OTPInput.js +23 -6
  124. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  125. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  126. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  127. package/build/features/auth/screens/OperatorError/index.js +2 -0
  128. package/build/features/auth/screens/Password/Password.d.ts +5 -0
  129. package/build/features/auth/screens/Password/Password.js +61 -0
  130. package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
  131. package/build/features/auth/screens/Password/PasswordField.js +28 -0
  132. package/build/features/auth/screens/Password/index.d.ts +3 -0
  133. package/build/features/auth/screens/Password/index.js +2 -0
  134. package/build/features/auth/screens/Password/validation.d.ts +8 -0
  135. package/build/features/auth/screens/Password/validation.js +4 -0
  136. package/build/features/auth/screens/PreparingData/PreparingData.js +3 -0
  137. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
  138. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
  139. package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
  140. package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
  141. package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  142. package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
  143. package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
  144. package/build/features/auth/screens/VerifyNafath/index.js +2 -0
  145. package/build/features/bank/Bank.d.ts +5 -1
  146. package/build/features/bank/Bank.js +22 -9
  147. package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
  148. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  149. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  150. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  151. package/build/features/bank/screens/OperatorError/index.js +2 -0
  152. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  153. package/build/features/bank/screens/Verify/Verify.js +7 -6
  154. package/build/features/board/Board.d.ts +2 -0
  155. package/build/features/board/Board.js +24 -13
  156. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  157. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  158. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  159. package/build/features/board/screens/OperatorError/index.js +2 -0
  160. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  161. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  162. package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
  163. package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
  164. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -4
  165. package/build/features/board/screens/Verify/Verify.js +3 -2
  166. package/build/features/brand/Brand.d.ts +5 -1
  167. package/build/features/brand/Brand.js +22 -9
  168. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +5 -5
  169. package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
  170. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
  171. package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
  172. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
  173. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +4 -4
  174. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  175. package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
  176. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  177. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  178. package/build/features/brand/screens/BrandInfo/BrandInfo.js +22 -4
  179. package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
  180. package/build/features/brand/screens/BrandInfo/validation.js +2 -2
  181. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +22 -6
  182. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  183. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  184. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  185. package/build/features/brand/screens/OperatorError/index.js +2 -0
  186. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  187. package/build/features/brand/screens/Verify/Verify.js +3 -2
  188. package/build/features/business/Business.js +20 -12
  189. package/build/features/business/screens/Activities/Activities.js +26 -9
  190. package/build/features/business/screens/Activities/ActivitiesList.d.ts +4 -4
  191. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  192. package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
  193. package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
  194. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
  195. package/build/features/business/screens/BusinessType/BusinessType.js +11 -3
  196. package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
  197. package/build/features/business/screens/Customers/CustomerLocations.d.ts +10 -8
  198. package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
  199. package/build/features/business/screens/Customers/Customers.js +50 -10
  200. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
  201. package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
  202. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
  203. package/build/features/business/screens/Customers/ExpectedSalesRange.js +11 -5
  204. package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -5
  205. package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
  206. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
  207. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
  208. package/build/features/business/screens/Customers/validation.d.ts +6 -6
  209. package/build/features/business/screens/Customers/validation.js +3 -8
  210. package/build/features/business/screens/DOB/DOB.d.ts +6 -0
  211. package/build/features/business/screens/DOB/DOB.js +45 -0
  212. package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
  213. package/build/features/business/screens/DOB/DOBForm.js +72 -0
  214. package/build/features/business/screens/DOB/index.d.ts +3 -0
  215. package/build/features/business/screens/DOB/index.js +2 -0
  216. package/build/features/{connectExpress/screens/IdentityOTP → business/screens/DOB}/validation.d.ts +4 -4
  217. package/build/features/business/screens/DOB/validation.js +4 -0
  218. package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
  219. package/build/features/business/screens/IDBOD/validation.d.ts +0 -3
  220. package/build/features/business/screens/IDBOD/validation.js +0 -1
  221. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  222. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +103 -0
  223. package/build/features/{connectExpress/screens/IdentityOTP/OTP.d.ts → business/screens/MobileOwnership/MobileNumber.d.ts} +0 -2
  224. package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
  225. package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
  226. package/build/features/business/screens/MobileOwnership/index.js +2 -0
  227. package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
  228. package/build/features/business/screens/MobileOwnership/validation.js +38 -0
  229. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  230. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  231. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  232. package/build/features/business/screens/OperatorError/index.js +2 -0
  233. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
  234. package/build/features/business/screens/Verify/Verify.js +15 -4
  235. package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  236. package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
  237. package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
  238. package/build/features/business/screens/VerifyNafath/index.js +2 -0
  239. package/build/features/connect/Connect.d.ts +5 -1
  240. package/build/features/connect/Connect.js +16 -9
  241. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
  242. package/build/features/connect/screens/CivilID/CivilID.js +6 -1
  243. package/build/features/{auth/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
  244. package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
  245. package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
  246. package/build/features/connect/screens/DOB/DOBForm.js +59 -0
  247. package/build/features/connect/screens/DOB/index.d.ts +3 -0
  248. package/build/features/connect/screens/DOB/index.js +2 -0
  249. package/build/features/connect/screens/DOB/validation.d.ts +8 -0
  250. package/build/features/connect/screens/DOB/validation.js +4 -0
  251. package/build/features/connect/screens/Individual/Email.js +1 -3
  252. package/build/features/connect/screens/Individual/Individual.js +11 -5
  253. package/build/features/connect/screens/Individual/MobileNumber.js +8 -7
  254. package/build/features/connect/screens/Individual/validation.js +11 -3
  255. package/build/features/connect/screens/Merchant/BrandName.js +5 -2
  256. package/build/features/connect/screens/Merchant/validation.js +2 -2
  257. package/build/features/connect/screens/Mobile/Mobile.js +12 -9
  258. package/build/features/connect/screens/Mobile/MobileNumber.js +8 -7
  259. package/build/features/connect/screens/Mobile/validation.js +11 -3
  260. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  261. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +104 -0
  262. package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  263. package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
  264. package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
  265. package/build/features/connect/screens/MobileOwnership/index.js +2 -0
  266. package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
  267. package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
  268. package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
  269. package/build/features/connect/screens/NID/IDNumber.js +2 -2
  270. package/build/features/connect/screens/NID/NID.js +5 -11
  271. package/build/features/connect/screens/NID/validation.d.ts +0 -3
  272. package/build/features/connect/screens/NID/validation.js +0 -1
  273. package/build/features/connect/screens/OTP/OTP.js +6 -6
  274. package/build/features/connect/screens/OTP/OTPInput.js +3 -11
  275. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  276. package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  277. package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
  278. package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
  279. package/build/features/connect/screens/VerifyNafath/index.js +2 -0
  280. package/build/features/connectExpress/ConnectExpress.d.ts +5 -2
  281. package/build/features/connectExpress/ConnectExpress.js +62 -39
  282. package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +2 -2
  283. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
  284. package/build/features/connectExpress/screens/CivilID/CivilID.js +6 -1
  285. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
  286. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +8 -1
  287. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  288. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
  289. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +2 -2
  290. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +30 -7
  291. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
  292. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +9 -8
  293. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +11 -3
  294. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
  295. package/build/features/connectExpress/screens/{NID → DOB}/DOB.d.ts +1 -2
  296. package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
  297. package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
  298. package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
  299. package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
  300. package/build/features/connectExpress/screens/DOB/index.js +2 -0
  301. package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
  302. package/build/features/connectExpress/screens/DOB/validation.js +4 -0
  303. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +3 -0
  304. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.js +9 -0
  305. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.d.ts +2 -0
  306. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.js +2 -0
  307. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
  308. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
  309. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
  310. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
  311. package/build/features/connectExpress/screens/Mobile/Mobile.js +10 -3
  312. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -8
  313. package/build/features/connectExpress/screens/Mobile/validation.js +21 -6
  314. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  315. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
  316. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  317. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
  318. package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
  319. package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
  320. package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
  321. package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
  322. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
  323. package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
  324. package/build/features/connectExpress/screens/NID/NID.js +10 -10
  325. package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
  326. package/build/features/connectExpress/screens/NID/TAC.js +2 -2
  327. package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
  328. package/build/features/connectExpress/screens/NID/validation.js +0 -2
  329. package/build/features/connectExpress/screens/NIDMissed/NID.js +3 -3
  330. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +0 -3
  331. package/build/features/connectExpress/screens/NIDMissed/validation.js +0 -1
  332. package/build/features/connectExpress/screens/OTP/OTP.js +13 -15
  333. package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
  334. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  335. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  336. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  337. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  338. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
  339. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
  340. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
  341. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
  342. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -3
  343. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  344. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +41 -0
  345. package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
  346. package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
  347. package/build/features/entity/Entity.d.ts +4 -1
  348. package/build/features/entity/Entity.js +22 -9
  349. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
  350. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
  351. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
  352. package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
  353. package/build/features/entity/screens/EntityName/EntityName.js +31 -14
  354. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +5 -5
  355. package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
  356. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
  357. package/build/features/entity/screens/EntityName/ExpiryDate.js +13 -8
  358. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
  359. package/build/features/entity/screens/EntityName/IssuingDate.js +15 -8
  360. package/build/features/entity/screens/EntityName/LegalName.js +1 -13
  361. package/build/features/entity/screens/EntityName/LicenseNumber.js +6 -8
  362. package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
  363. package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
  364. package/build/features/entity/screens/EntityName/validation.js +1 -10
  365. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  366. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  367. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  368. package/build/features/entity/screens/OperatorError/index.js +2 -0
  369. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  370. package/build/features/entity/screens/Verify/Verify.js +3 -2
  371. package/build/features/featuresScreens.d.ts +1 -0
  372. package/build/features/featuresScreens.js +211 -13
  373. package/build/features/individual/Individual.d.ts +4 -1
  374. package/build/features/individual/Individual.js +22 -9
  375. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
  376. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +44 -11
  377. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
  378. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
  379. package/build/features/individual/screens/IndividualList/Email.js +2 -3
  380. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
  381. package/build/features/individual/screens/IndividualList/IndividualList.js +18 -5
  382. package/build/features/individual/screens/IndividualList/MobileNumber.js +8 -10
  383. package/build/features/individual/screens/IndividualList/UserList.js +7 -7
  384. package/build/features/individual/screens/IndividualList/validation.js +11 -4
  385. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
  386. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
  387. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +73 -18
  388. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -5
  389. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +11 -3
  390. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +9 -11
  391. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +11 -3
  392. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  393. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  394. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  395. package/build/features/individual/screens/OperatorError/index.js +2 -0
  396. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  397. package/build/features/individual/screens/Verify/Verify.js +3 -2
  398. package/build/features/kyc/KYC.d.ts +11 -0
  399. package/build/features/kyc/KYC.js +99 -0
  400. package/build/features/kyc/index.d.ts +1 -0
  401. package/build/features/kyc/index.js +1 -0
  402. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
  403. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
  404. package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
  405. package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
  406. package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
  407. package/build/features/kyc/screens/Loading/Loading.js +10 -0
  408. package/build/features/kyc/screens/Loading/index.d.ts +2 -0
  409. package/build/features/kyc/screens/Loading/index.js +2 -0
  410. package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
  411. package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
  412. package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
  413. package/build/features/kyc/screens/OperatorError/index.js +2 -0
  414. package/build/features/kyc/screens/Success/Success.d.ts +5 -0
  415. package/build/features/kyc/screens/Success/Success.js +32 -0
  416. package/build/features/kyc/screens/Success/index.d.ts +2 -0
  417. package/build/features/kyc/screens/Success/index.js +2 -0
  418. package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
  419. package/build/features/kyc/screens/Terms/Header.js +36 -0
  420. package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
  421. package/build/features/kyc/screens/Terms/Terms.js +87 -0
  422. package/build/features/kyc/screens/Terms/index.d.ts +2 -0
  423. package/build/features/kyc/screens/Terms/index.js +2 -0
  424. package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
  425. package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
  426. package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
  427. package/build/features/kyc/screens/TokenError/index.js +2 -0
  428. package/build/features/kyc/screens/Users/Users.d.ts +3 -0
  429. package/build/features/kyc/screens/Users/Users.js +76 -0
  430. package/build/features/kyc/screens/Users/index.d.ts +2 -0
  431. package/build/features/kyc/screens/Users/index.js +2 -0
  432. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  433. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
  434. package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
  435. package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
  436. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
  437. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
  438. package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
  439. package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
  440. package/build/features/password/Password.d.ts +4 -1
  441. package/build/features/password/Password.js +88 -31
  442. package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -4
  443. package/build/features/password/screens/OTP/OTP.js +3 -3
  444. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  445. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  446. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  447. package/build/features/password/screens/OperatorError/index.js +2 -0
  448. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  449. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  450. package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
  451. package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
  452. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  453. package/build/features/password/screens/Verify/Verify.js +7 -6
  454. package/build/features/shared/Address/CountryList.d.ts +5 -5
  455. package/build/features/shared/Address/InputSelect.d.ts +5 -5
  456. package/build/features/shared/Background/Background.js +1 -1
  457. package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
  458. package/build/features/shared/Button/Button.js +3 -1
  459. package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
  460. package/build/features/shared/Button/FlowsButtons.js +18 -4
  461. package/build/features/shared/Button/NafathButton.d.ts +8 -0
  462. package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
  463. package/build/features/shared/Button/index.d.ts +2 -2
  464. package/build/features/shared/Button/index.js +2 -2
  465. package/build/features/shared/Calender/Calender.d.ts +2 -1
  466. package/build/features/shared/Calender/Calender.js +3 -3
  467. package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
  468. package/build/features/shared/Containers/FeatureContainer.js +5 -3
  469. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  470. package/build/features/shared/Dialog/DialogContainer.js +5 -4
  471. package/build/features/shared/Input/Input.d.ts +2 -2
  472. package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
  473. package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
  474. package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
  475. package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
  476. package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
  477. package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
  478. package/build/features/shared/NafathVerification/index.d.ts +2 -0
  479. package/build/features/shared/NafathVerification/index.js +2 -0
  480. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
  481. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
  482. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  483. package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
  484. package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
  485. package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
  486. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
  487. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
  488. package/build/features/signIn/SignIn.js +18 -7
  489. package/build/features/signIn/screens/Mobile/MobileNumber.js +8 -7
  490. package/build/features/signIn/screens/Mobile/validation.js +11 -3
  491. package/build/features/signIn/screens/OTP/OTP.js +5 -4
  492. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  493. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  494. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  495. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  496. package/build/features/tax/Tax.d.ts +4 -1
  497. package/build/features/tax/Tax.js +22 -9
  498. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  499. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  500. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  501. package/build/features/tax/screens/OperatorError/index.js +2 -0
  502. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  503. package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
  504. package/build/features/tax/screens/Verify/Verify.js +7 -6
  505. package/build/hooks/index.d.ts +3 -0
  506. package/build/hooks/index.js +3 -0
  507. package/build/hooks/useAppConfig.d.ts +1 -1
  508. package/build/hooks/useAppConfig.js +2 -2
  509. package/build/hooks/useAppDispatch.d.ts +1 -0
  510. package/build/hooks/useAppTheme.js +4 -3
  511. package/build/hooks/useCountDown.d.ts +10 -0
  512. package/build/hooks/useCountDown.js +17 -0
  513. package/build/hooks/useFormDirtyCheck.d.ts +10 -0
  514. package/build/hooks/useFormDirtyCheck.js +66 -0
  515. package/build/hooks/useSanitizedTranslation.d.ts +2 -0
  516. package/build/hooks/useSanitizedTranslation.js +15 -0
  517. package/build/hooks/useVerifyToken.d.ts +4 -2
  518. package/build/hooks/useVerifyToken.js +9 -4
  519. package/build/index.css +360 -120
  520. package/build/index.d.ts +3 -2
  521. package/build/index.js +4 -2
  522. package/build/theme/components.js +7 -0
  523. package/build/theme/palette.js +2 -1
  524. package/build/theme/shadows.js +1 -1
  525. package/build/theme/theme.d.ts +1 -1
  526. package/build/theme/theme.js +2 -2
  527. package/build/utils/array.js +2 -2
  528. package/build/utils/common.d.ts +1 -0
  529. package/build/utils/common.js +16 -3
  530. package/build/utils/error.d.ts +1 -0
  531. package/build/utils/error.js +3 -0
  532. package/build/utils/object.d.ts +1 -0
  533. package/build/utils/object.js +3 -0
  534. package/build/utils/string.d.ts +6 -2
  535. package/build/utils/string.js +28 -3
  536. package/build/utils/validation.d.ts +2 -0
  537. package/build/utils/validation.js +6 -0
  538. package/package.json +3 -4
  539. package/build/features/business/screens/OTP/OTP.d.ts +0 -8
  540. package/build/features/business/screens/OTP/OTP.js +0 -90
  541. package/build/features/business/screens/OTP/OTPInput.d.ts +0 -5
  542. package/build/features/business/screens/OTP/OTPInput.js +0 -49
  543. package/build/features/business/screens/OTP/index.d.ts +0 -3
  544. package/build/features/business/screens/OTP/index.js +0 -2
  545. package/build/features/business/screens/OTP/validation.js +0 -4
  546. package/build/features/connectExpress/screens/IdentityOTP/OTP.js +0 -87
  547. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +0 -5
  548. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +0 -54
  549. package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
  550. package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
  551. package/build/features/connectExpress/screens/IdentityOTP/validation.js +0 -4
  552. package/build/features/shared/Button/AbsherButton.d.ts +0 -8
  553. /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
@@ -68,10 +68,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
68
68
  var _a;
69
69
  import API from '../../../api';
70
70
  import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
71
- import { CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, OTHER_BRAND } from '../../../constants';
71
+ import { COLLECT_DOB_INFO_NAFATH, CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, OTHER_BRAND } from '../../../constants';
72
72
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
73
73
  import { AuthForType, FlowsTypes } from '../../../@types';
74
- import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2 } from '../../../utils';
74
+ import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isNetworkError, isTimeoutError } from '../../../utils';
75
75
  export var updateBusinessCountry = createAsyncThunk('connect/updateBusinessCountry', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
76
76
  var connect, payload, data;
77
77
  return __generator(this, function (_a) {
@@ -91,18 +91,20 @@ export var updateBusinessCountry = createAsyncThunk('connect/updateBusinessCount
91
91
  });
92
92
  }); });
93
93
  export var createMobileAuth = createAsyncThunk('createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
94
- var settings, requestBody, data;
95
- var _a, _b;
96
- return __generator(this, function (_c) {
97
- switch (_c.label) {
94
+ var settings, isStartWithZero, mobileNumber, requestBody, data;
95
+ var _a, _b, _c;
96
+ return __generator(this, function (_d) {
97
+ switch (_d.label) {
98
98
  case 0:
99
99
  settings = thunkApi.getState().settings;
100
+ isStartWithZero = (_a = params.mobile) === null || _a === void 0 ? void 0 : _a.startsWith('0');
101
+ mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
100
102
  requestBody = {
101
103
  country: settings.data.businessCountry.iso2,
102
104
  scope: settings.data.appConfig.scope,
103
105
  lang: settings.data.language,
104
106
  user_credentail: {
105
- phone: params.mobile || '',
107
+ phone: mobileNumber || '',
106
108
  code: params.countryCode.idd_prefix.toString()
107
109
  },
108
110
  sign_in: false,
@@ -112,9 +114,9 @@ export var createMobileAuth = createAsyncThunk('createMobileAuth', function (par
112
114
  };
113
115
  return [4, API.authService.createAuth(requestBody)];
114
116
  case 1:
115
- data = _c.sent();
117
+ data = _d.sent();
116
118
  thunkApi.dispatch(handleNextScreenStep());
117
- (_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
119
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
118
120
  return [2, { response: data, formData: params }];
119
121
  }
120
122
  });
@@ -149,18 +151,20 @@ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (p
149
151
  });
150
152
  }); });
151
153
  export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
152
- var _a, settings, connect, _b, mobile, countryCode, requestBody;
154
+ var _a, settings, connect, _b, mobile, countryCode, isStartWithZero, mobileNumber, requestBody;
153
155
  return __generator(this, function (_c) {
154
156
  switch (_c.label) {
155
157
  case 0:
156
158
  _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
157
159
  _b = connect.data.mobileData, mobile = _b.mobile, countryCode = _b.countryCode;
160
+ isStartWithZero = mobile === null || mobile === void 0 ? void 0 : mobile.startsWith('0');
161
+ mobileNumber = isStartWithZero ? mobile.slice(1) : mobile;
158
162
  requestBody = {
159
163
  country: settings.data.businessCountry.iso2,
160
164
  scope: settings.data.appConfig.scope,
161
165
  lang: settings.data.language,
162
166
  user_credentail: {
163
- phone: mobile || '',
167
+ phone: mobileNumber || '',
164
168
  code: countryCode.idd_prefix.toString()
165
169
  },
166
170
  sign_in: false,
@@ -173,75 +177,33 @@ export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (param
173
177
  }
174
178
  });
175
179
  }); });
176
- export var resendOTPNID = createAsyncThunk('resendOTPNID', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
177
- var _a, settings, connect, _b, nid, dob, identification_id_type, requestBody, data;
178
- return __generator(this, function (_c) {
179
- switch (_c.label) {
180
- case 0:
181
- _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
182
- _b = connect.data.nidData, nid = _b.nid, dob = _b.dob;
183
- identification_id_type = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
184
- requestBody = {
185
- country: settings.data.businessCountry.iso2,
186
- scope: settings.data.appConfig.scope,
187
- lang: settings.data.language,
188
- user_credentail: {
189
- identification_id: nid,
190
- identification_id_type: identification_id_type,
191
- date_of_birth: dob,
192
- country_code: settings.data.businessCountry.iso2
193
- },
194
- sign_in: false,
195
- is_lead: true,
196
- step_name: CONNECT_STEP_NAMES.CREATE_AUTH_NID,
197
- encryption_contract: [
198
- 'user_credentail.country_code',
199
- 'user_credentail.identification_id',
200
- 'user_credentail.identification_id_type',
201
- 'user_credentail.date_of_birth'
202
- ]
203
- };
204
- return [4, API.authService.createAuth(requestBody)];
205
- case 1:
206
- data = _c.sent();
207
- return [2, data];
208
- }
209
- });
210
- }); });
211
- export var createNIDAuth = createAsyncThunk('createNIDAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
212
- var settings, identification_id_type, requestBody, data;
180
+ export var createNafathAuth = createAsyncThunk('connect/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
181
+ var settings, requestBody, data;
213
182
  var _a, _b;
214
183
  return __generator(this, function (_c) {
215
184
  switch (_c.label) {
216
185
  case 0:
217
186
  settings = thunkApi.getState().settings;
218
- identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
219
187
  requestBody = {
220
188
  country: settings.data.businessCountry.iso2,
221
189
  scope: settings.data.appConfig.scope,
222
190
  lang: settings.data.language,
223
191
  user_credentail: {
224
192
  identification_id: params.nid,
225
- identification_id_type: identification_id_type,
226
- date_of_birth: params.dob,
193
+ identification_id_type: IDENTIFICATION_TYPE.NAFATH,
227
194
  country_code: settings.data.businessCountry.iso2
228
195
  },
229
196
  sign_in: false,
230
197
  is_lead: true,
231
198
  step_name: CONNECT_STEP_NAMES.CREATE_AUTH_NID,
232
- encryption_contract: [
233
- 'user_credentail.country_code',
234
- 'user_credentail.identification_id',
235
- 'user_credentail.identification_id_type',
236
- 'user_credentail.date_of_birth'
237
- ]
199
+ encryption_contract: ['user_credentail.country_code', 'user_credentail.identification_id', 'user_credentail.identification_id_type']
238
200
  };
239
- return [4, API.authService.createAuth(requestBody)];
201
+ return [4, API.authService.createAuthKitNID(requestBody)];
240
202
  case 1:
241
203
  data = _c.sent();
242
204
  thunkApi.dispatch(handleNextScreenStep());
243
- (_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
244
- return [2, { response: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
205
+ (_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody);
206
+ return [2, { response: data, formData: __assign(__assign({}, params), { type: IDENTIFICATION_TYPE.NAFATH }) }];
245
207
  }
246
208
  });
247
209
  }); });
@@ -322,7 +284,7 @@ export var verifyAuth = createAsyncThunk('connect/verifyAuth', function (params,
322
284
  });
323
285
  }); });
324
286
  export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
325
- var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, isSuccess, lead_id, leadResponse, countryCode, channels, brand, err_3, brands, err_4, phone;
287
+ var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, error_1, isSuccess, lead_id, leadResponse, countryCode, channels, brand, err_3, brands, err_4, phone;
326
288
  var _b, _c, _d, _e, _f;
327
289
  return __generator(this, function (_g) {
328
290
  switch (_g.label) {
@@ -335,53 +297,65 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
335
297
  count = 1;
336
298
  _g.label = 1;
337
299
  case 1:
338
- if (!(count <= maxCalls)) return [3, 16];
300
+ if (!(count <= maxCalls)) return [3, 19];
339
301
  if (thunkApi.signal.aborted) {
340
- return [3, 16];
302
+ return [3, 19];
341
303
  }
342
- return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token)];
304
+ authResponse = void 0;
305
+ _g.label = 2;
343
306
  case 2:
307
+ _g.trys.push([2, 4, , 5]);
308
+ return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token, { timeout: NAFATH_PACI_TIMEOUT_DURATION })];
309
+ case 3:
344
310
  authResponse = _g.sent();
345
- isSuccess = ((_b = authResponse.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
346
- if (!isSuccess) return [3, 13];
311
+ return [3, 5];
312
+ case 4:
313
+ error_1 = _g.sent();
314
+ if (!isNetworkError(error_1.message) && !isTimeoutError(error_1.message)) {
315
+ throw new Error(error_1);
316
+ }
317
+ return [3, 5];
318
+ case 5:
319
+ isSuccess = ((_b = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
320
+ if (!isSuccess) return [3, 16];
347
321
  lead_id = authResponse.lead_id;
348
322
  if (!lead_id)
349
323
  throw new Error('Lead id is missing');
350
324
  return [4, API.leadService.retrieveLead(lead_id)];
351
- case 3:
325
+ case 6:
352
326
  leadResponse = (_g.sent()).data;
353
327
  if ((_c = leadResponse.errors) === null || _c === void 0 ? void 0 : _c.length)
354
328
  throw new Error(leadResponse.errors[0].description);
355
329
  countryCode = settings.data.businessCountry;
356
330
  return [4, API.dataService.getChannelsOfServices({ page: 0 })];
357
- case 4:
331
+ case 7:
358
332
  channels = (_g.sent()).list;
359
333
  leadResponse.channel_list = channels;
360
- _g.label = 5;
361
- case 5:
362
- _g.trys.push([5, 7, , 8]);
334
+ _g.label = 8;
335
+ case 8:
336
+ _g.trys.push([8, 10, , 11]);
363
337
  return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
364
- case 6:
338
+ case 9:
365
339
  brand = (_g.sent()).brand;
366
340
  leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
367
- return [3, 8];
368
- case 7:
341
+ return [3, 11];
342
+ case 10:
369
343
  err_3 = _g.sent();
370
- return [3, 8];
371
- case 8:
372
- _g.trys.push([8, 10, , 11]);
344
+ return [3, 11];
345
+ case 11:
346
+ _g.trys.push([11, 13, , 14]);
373
347
  return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
374
- case 9:
348
+ case 12:
375
349
  brands = (_g.sent()).brands;
376
350
  leadResponse.brand_list = fixBrandList(brands, channels);
377
- return [3, 11];
378
- case 10:
351
+ return [3, 14];
352
+ case 13:
379
353
  err_4 = _g.sent();
380
- return [3, 11];
381
- case 11:
354
+ return [3, 14];
355
+ case 14:
382
356
  (_d = params.onSuccess) === null || _d === void 0 ? void 0 : _d.call(params);
383
357
  return [4, sleep(3000)];
384
- case 12:
358
+ case 15:
385
359
  _g.sent();
386
360
  phone = (leadResponse.contact || {}).phone;
387
361
  if (phone === null || phone === void 0 ? void 0 : phone.country_code)
@@ -389,14 +363,137 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
389
363
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
390
364
  thunkApi.dispatch(handleNextScreenStep());
391
365
  return [2, { authResponse: authResponse, leadResponse: leadResponse, countryCode: countryCode }];
392
- case 13: return [4, sleep(interval * 1000)];
393
- case 14:
366
+ case 16: return [4, sleep(interval * 1000)];
367
+ case 17:
394
368
  _g.sent();
395
- _g.label = 15;
369
+ _g.label = 18;
370
+ case 18:
371
+ count++;
372
+ return [3, 1];
373
+ case 19: throw new Error('paci_verification_failed');
374
+ }
375
+ });
376
+ }); });
377
+ export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
378
+ var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, error_2, isSuccess, isFailed, countryCode, lead_id, leadResponse, channels, brand, err_5, brands, err_6, phone, isNextScreenDob, stepName;
379
+ var _b, _c, _d, _e, _f, _g, _h;
380
+ return __generator(this, function (_j) {
381
+ switch (_j.label) {
382
+ case 0:
383
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
384
+ responseBody = connect.data.nidData.responseBody;
385
+ expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
386
+ interval = 3;
387
+ maxCalls = Math.floor(expiry / interval);
388
+ count = 1;
389
+ _j.label = 1;
390
+ case 1:
391
+ if (!(count <= maxCalls)) return [3, 19];
392
+ if (thunkApi.signal.aborted) {
393
+ return [3, 19];
394
+ }
395
+ authResponse = void 0;
396
+ _j.label = 2;
397
+ case 2:
398
+ _j.trys.push([2, 4, , 5]);
399
+ return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token, { timeout: NAFATH_PACI_TIMEOUT_DURATION })];
400
+ case 3:
401
+ authResponse = _j.sent();
402
+ return [3, 5];
403
+ case 4:
404
+ error_2 = _j.sent();
405
+ if (!isNetworkError(error_2.message) && !isTimeoutError(error_2.message)) {
406
+ throw new Error(error_2);
407
+ }
408
+ return [3, 5];
409
+ case 5:
410
+ isSuccess = ((_b = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
411
+ isFailed = ((_c = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'failed';
412
+ countryCode = settings.data.businessCountry;
413
+ if (isFailed) {
414
+ (_d = params.onFailure) === null || _d === void 0 ? void 0 : _d.call(params);
415
+ return [2, { authResponse: authResponse, countryCode: countryCode }];
416
+ }
417
+ if (!isSuccess) return [3, 16];
418
+ lead_id = authResponse.lead_id;
419
+ if (!lead_id)
420
+ throw new Error('Lead id is missing');
421
+ return [4, API.leadService.retrieveLead(lead_id)];
422
+ case 6:
423
+ leadResponse = (_j.sent()).data;
424
+ if ((_e = leadResponse.errors) === null || _e === void 0 ? void 0 : _e.length)
425
+ throw new Error(leadResponse.errors[0].description);
426
+ return [4, API.dataService.getChannelsOfServices({ page: 0 })];
427
+ case 7:
428
+ channels = (_j.sent()).list;
429
+ leadResponse.channel_list = channels;
430
+ _j.label = 8;
431
+ case 8:
432
+ _j.trys.push([8, 10, , 11]);
433
+ return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
434
+ case 9:
435
+ brand = (_j.sent()).brand;
436
+ leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
437
+ return [3, 11];
438
+ case 10:
439
+ err_5 = _j.sent();
440
+ return [3, 11];
441
+ case 11:
442
+ _j.trys.push([11, 13, , 14]);
443
+ return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
444
+ case 12:
445
+ brands = (_j.sent()).brands;
446
+ leadResponse.brand_list = fixBrandList(brands, channels);
447
+ return [3, 14];
448
+ case 13:
449
+ err_6 = _j.sent();
450
+ return [3, 14];
451
+ case 14:
452
+ (_f = params.onSuccess) === null || _f === void 0 ? void 0 : _f.call(params);
453
+ return [4, sleep(3000)];
396
454
  case 15:
455
+ _j.sent();
456
+ phone = (leadResponse.contact || {}).phone;
457
+ if (phone === null || phone === void 0 ? void 0 : phone.country_code)
458
+ countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
459
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, {});
460
+ isNextScreenDob = (authResponse === null || authResponse === void 0 ? void 0 : authResponse.step_name) === COLLECT_DOB_INFO_NAFATH;
461
+ stepName = isNextScreenDob ? 'CONNECT_DOB_STEP' : 'CONNECT_INDIVIDUAL_STEP';
462
+ thunkApi.dispatch(handleNextScreenStep(stepName));
463
+ return [2, { authResponse: authResponse, leadResponse: leadResponse, countryCode: countryCode, isNextScreenDob: isNextScreenDob }];
464
+ case 16: return [4, sleep(interval * 1000)];
465
+ case 17:
466
+ _j.sent();
467
+ _j.label = 18;
468
+ case 18:
397
469
  count++;
398
470
  return [3, 1];
399
- case 16: throw new Error('paci_verification_failed');
471
+ case 19: throw new Error(NAFATH_VERIFICATION_FAILED);
472
+ }
473
+ });
474
+ }); });
475
+ export var updateLeadDOB = createAsyncThunk('connect/updateLeadDOB', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
476
+ var _a, settings, connect, lead_id, brandData, payload, leadResponse;
477
+ var _b, _c;
478
+ return __generator(this, function (_d) {
479
+ switch (_d.label) {
480
+ case 0:
481
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
482
+ lead_id = (connect.data.otpData.responseBody || {}).lead_id;
483
+ brandData = (connect.data.brandData.responseBody || {}).brandData;
484
+ payload = {
485
+ id: lead_id || '',
486
+ date_of_birth: params.dob,
487
+ step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_DOB,
488
+ encryption_contract: ['date_of_birth']
489
+ };
490
+ return [4, API.leadService.updateLead(payload)];
491
+ case 1:
492
+ leadResponse = _d.sent();
493
+ leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
494
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
495
+ thunkApi.dispatch(handleNextScreenStep());
496
+ return [2, { leadResponse: leadResponse, formData: params }];
400
497
  }
401
498
  });
402
499
  }); });
@@ -415,6 +512,7 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
415
512
  country_code: (_d = settings.data.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2,
416
513
  name: getIndividualName(params.name),
417
514
  contact: __assign({ email: params.email }, (params.mobile && { phone: { country_code: phoneCountry, number: params.mobile } })),
515
+ metadata: getMetaData(),
418
516
  step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL,
419
517
  encryption_contract: ['name.first', 'name.middle', 'name.last', 'contact.email', 'contact.phone.country_code', 'contact.phone.number']
420
518
  };
@@ -423,7 +521,12 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
423
521
  leadResponse = _g.sent();
424
522
  leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
425
523
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
426
- thunkApi.dispatch(handleNextScreenStep());
524
+ if (leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
525
+ thunkApi.dispatch(handleNextScreenStep('CONNECT_MOBILE_OWNERSHIP'));
526
+ }
527
+ else {
528
+ thunkApi.dispatch(handleNextScreenStep('CONNECT_MERCHANT_INFO_STEP'));
529
+ }
427
530
  return [2, { leadResponse: leadResponse, formData: params }];
428
531
  }
429
532
  });
@@ -463,7 +566,7 @@ export var retrieveLead = createAsyncThunk('connect/retrieveLead', function (par
463
566
  });
464
567
  }); });
465
568
  export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
466
- var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, teamSize, err_5, brandNameBody, payload, lead, brandReqBody, brand, teamSize, err_6;
569
+ var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, team, err_7, brandNameBody, payload, lead, brandReqBody, brand, team, err_8;
467
570
  var _b, _c, _d, _e, _f;
468
571
  return __generator(this, function (_g) {
469
572
  switch (_g.label) {
@@ -516,13 +619,13 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
516
619
  _g.label = 4;
517
620
  case 4:
518
621
  _g.trys.push([4, 6, , 7]);
519
- return [4, API.dataService.getTeamSize({ page: 0 })];
622
+ return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
520
623
  case 5:
521
- teamSize = _g.sent();
522
- brand_1.team_size_list = teamSize.list;
624
+ team = (_g.sent()).team;
625
+ brand_1.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
523
626
  return [3, 7];
524
627
  case 6:
525
- err_5 = _g.sent();
628
+ err_7 = _g.sent();
526
629
  return [3, 7];
527
630
  case 7:
528
631
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
@@ -562,13 +665,13 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
562
665
  _g.label = 11;
563
666
  case 11:
564
667
  _g.trys.push([11, 13, , 14]);
565
- return [4, API.dataService.getTeamSize({ page: 0 })];
668
+ return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
566
669
  case 12:
567
- teamSize = _g.sent();
568
- brand.team_size_list = teamSize.list;
670
+ team = (_g.sent()).team;
671
+ brand.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
569
672
  return [3, 14];
570
673
  case 13:
571
- err_6 = _g.sent();
674
+ err_8 = _g.sent();
572
675
  return [3, 14];
573
676
  case 14:
574
677
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
@@ -604,6 +707,59 @@ export var updateLeadBrandSegment = createAsyncThunk('updateLeadBrandSegment', f
604
707
  }
605
708
  });
606
709
  }); });
710
+ export var updateLeadMobile = createAsyncThunk('connect/updateLeadMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
711
+ var _a, settings, connect, lead_id, payload, leadResponse;
712
+ var _b, _c;
713
+ return __generator(this, function (_d) {
714
+ switch (_d.label) {
715
+ case 0:
716
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
717
+ lead_id = (connect.data.otpData.responseBody || {}).lead_id;
718
+ payload = {
719
+ id: lead_id || '',
720
+ contact: {
721
+ phone: {
722
+ country_code: params.countryCode.idd_prefix.toString(),
723
+ number: params.mobile
724
+ }
725
+ },
726
+ step_name: CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP,
727
+ encryption_contract: ['contact.phone.country_code', 'contact.phone.number']
728
+ };
729
+ return [4, API.leadService.updateLead(payload)];
730
+ case 1:
731
+ leadResponse = _d.sent();
732
+ if (leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
733
+ throw new Error("The new mobile number doesn't match the national ID, please update the mobile to the correct one");
734
+ }
735
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
736
+ thunkApi.dispatch(handleNextScreenStep());
737
+ return [2, { leadResponse: leadResponse, formData: params }];
738
+ }
739
+ });
740
+ }); });
741
+ export var skipUpdateLeadMobile = createAsyncThunk('connect/skipUpdateLeadMobile', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
742
+ var _a, settings, connect, lead_id, payload, leadResponse;
743
+ var _b, _c;
744
+ return __generator(this, function (_d) {
745
+ switch (_d.label) {
746
+ case 0:
747
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
748
+ lead_id = (connect.data.otpData.responseBody || {}).lead_id;
749
+ payload = {
750
+ id: lead_id || '',
751
+ step_name: CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP_SKIPPED,
752
+ encryption_contract: []
753
+ };
754
+ return [4, API.leadService.updateLead(payload)];
755
+ case 1:
756
+ leadResponse = _d.sent();
757
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, {});
758
+ thunkApi.dispatch(handleNextScreenStep());
759
+ return [2, { leadResponse: leadResponse }];
760
+ }
761
+ });
762
+ }); });
607
763
  export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
608
764
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
609
765
  return __awaiter(void 0, void 0, void 0, function () {
@@ -691,7 +847,6 @@ var initialState = {
691
847
  },
692
848
  nidData: {
693
849
  nid: '',
694
- dob: '',
695
850
  type: ''
696
851
  },
697
852
  civilIdData: {
@@ -701,7 +856,11 @@ var initialState = {
701
856
  otp: '',
702
857
  authFor: AuthForType.MOBILE
703
858
  },
859
+ dobData: {
860
+ dob: ''
861
+ },
704
862
  individualData: {
863
+ isPrevDob: false,
705
864
  name: '',
706
865
  email: '',
707
866
  mobile: '',
@@ -858,6 +1017,70 @@ export var connectSlice = createSlice({
858
1017
  if (error !== 'Aborted') {
859
1018
  state.error = error;
860
1019
  }
1020
+ })
1021
+ .addCase(createNafathAuth.fulfilled, function (state, action) {
1022
+ state.loading = false;
1023
+ state.error = null;
1024
+ var _a = action.payload, formData = _a.formData, response = _a.response;
1025
+ state.data.nidData = formData;
1026
+ state.data.nidData.responseBody = response;
1027
+ state.data.otpData.authFor = AuthForType.NATIONAL_ID;
1028
+ })
1029
+ .addCase(createNafathAuth.pending, function (state) {
1030
+ state.loading = true;
1031
+ state.error = null;
1032
+ })
1033
+ .addCase(createNafathAuth.rejected, function (state, action) {
1034
+ state.loading = false;
1035
+ state.error = action.error.message;
1036
+ })
1037
+ .addCase(verifyNafath.pending, function (state) {
1038
+ state.loading = true;
1039
+ state.error = null;
1040
+ })
1041
+ .addCase(verifyNafath.fulfilled, function (state, action) {
1042
+ var _a;
1043
+ state.loading = false;
1044
+ state.error = null;
1045
+ var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, countryCode = _b.countryCode, isNextScreenDob = _b.isNextScreenDob;
1046
+ var _c = leadResponse || {}, name = _c.name, contact = _c.contact, brand = _c.brand, brand_list = _c.brand_list, channel_list = _c.channel_list, is_new_individual = _c.is_new_individual, id = _c.id;
1047
+ var _d = contact || {}, email = _d.email, phone = _d.phone;
1048
+ var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
1049
+ if (!!fullName) {
1050
+ var capitalizedName = capitalizeTheFirstLetterOfEachWord(fullName);
1051
+ state.data.individualData.name = capitalizedName;
1052
+ }
1053
+ if (email)
1054
+ state.data.individualData.email = email;
1055
+ if (phone === null || phone === void 0 ? void 0 : phone.number)
1056
+ state.data.individualData.mobile = phone.number;
1057
+ if (!!countryCode)
1058
+ state.data.individualData.countryCode = countryCode;
1059
+ if ((_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en)
1060
+ state.data.brandData.brandName = brand.name.en;
1061
+ state.data.individualData.isPrevDob = isNextScreenDob || false;
1062
+ var brandList = [];
1063
+ if ((brand_list === null || brand_list === void 0 ? void 0 : brand_list.length) > 0) {
1064
+ var isBrandExist = brand_list.find(function (item) { return item.id === (brand === null || brand === void 0 ? void 0 : brand.id); });
1065
+ brandList = __spreadArray([], brand_list, true);
1066
+ if (!isBrandExist && brand)
1067
+ brandList = __spreadArray(__spreadArray([], brandList, true), [__assign(__assign({}, brand), { channel_services: (brand === null || brand === void 0 ? void 0 : brand.channel_services) || [] })], false);
1068
+ brandList = __spreadArray(__spreadArray([], brandList, true), [OTHER_BRAND], false);
1069
+ state.data.brandData.selectedBrandItem = brandList[0];
1070
+ }
1071
+ state.data.brandData.responseBody = {
1072
+ brand_list: brandList,
1073
+ channel_list: channel_list,
1074
+ brandData: brand
1075
+ };
1076
+ state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact, leadData: leadResponse });
1077
+ })
1078
+ .addCase(verifyNafath.rejected, function (state, action) {
1079
+ state.loading = false;
1080
+ var error = action.error.message;
1081
+ if (error !== 'Aborted') {
1082
+ state.error = error;
1083
+ }
861
1084
  })
862
1085
  .addCase(verifyAuth.fulfilled, function (state, action) {
863
1086
  var _a;
@@ -903,33 +1126,20 @@ export var connectSlice = createSlice({
903
1126
  state.loading = false;
904
1127
  state.error = action.error.message;
905
1128
  })
906
- .addCase(createNIDAuth.fulfilled, function (state, action) {
1129
+ .addCase(updateLeadDOB.fulfilled, function (state, action) {
907
1130
  state.loading = false;
908
1131
  state.error = null;
909
- var _a = action.payload, formData = _a.formData, response = _a.response;
910
- state.data.nidData = formData;
911
- state.data.nidData.responseBody = response;
912
- state.data.otpData.authFor = AuthForType.NATIONAL_ID;
1132
+ var _a = action.payload, formData = _a.formData, leadResponse = _a.leadResponse;
1133
+ state.data.dobData = formData;
1134
+ state.data.dobData.responseBody = leadResponse;
913
1135
  })
914
- .addCase(createNIDAuth.pending, function (state) {
1136
+ .addCase(updateLeadDOB.pending, function (state) {
915
1137
  state.loading = true;
916
1138
  state.error = null;
917
1139
  })
918
- .addCase(createNIDAuth.rejected, function (state, action) {
1140
+ .addCase(updateLeadDOB.rejected, function (state, action) {
919
1141
  state.loading = false;
920
1142
  state.error = action.error.message;
921
- })
922
- .addCase(resendOTPNID.fulfilled, function (state, action) {
923
- state.error = null;
924
- var response = action.payload;
925
- state.data.nidData.responseBody = response;
926
- state.data.otpData.authFor = AuthForType.NATIONAL_ID;
927
- })
928
- .addCase(resendOTPNID.pending, function (state) {
929
- state.error = null;
930
- })
931
- .addCase(resendOTPNID.rejected, function (state, action) {
932
- state.error = action.error.message;
933
1143
  })
934
1144
  .addCase(updateLeadIndividual.fulfilled, function (state, action) {
935
1145
  var _a, _b, _c;
@@ -995,6 +1205,33 @@ export var connectSlice = createSlice({
995
1205
  .addCase(updateLeadBrandSegment.rejected, function (state, action) {
996
1206
  state.loading = false;
997
1207
  state.error = action.error.message;
1208
+ })
1209
+ .addCase(updateLeadMobile.fulfilled, function (state, action) {
1210
+ state.loading = false;
1211
+ state.error = null;
1212
+ state.data.individualData.mobile = action.payload.leadResponse.contact.phone.number;
1213
+ state.data.individualData.responseBody = action.payload.leadResponse;
1214
+ })
1215
+ .addCase(updateLeadMobile.pending, function (state) {
1216
+ state.loading = true;
1217
+ state.error = null;
1218
+ })
1219
+ .addCase(updateLeadMobile.rejected, function (state, action) {
1220
+ state.loading = false;
1221
+ state.error = action.error.message;
1222
+ })
1223
+ .addCase(skipUpdateLeadMobile.fulfilled, function (state, action) {
1224
+ state.loading = false;
1225
+ state.error = null;
1226
+ state.data.individualData.responseBody = action.payload.leadResponse;
1227
+ })
1228
+ .addCase(skipUpdateLeadMobile.pending, function (state) {
1229
+ state.loading = true;
1230
+ state.error = null;
1231
+ })
1232
+ .addCase(skipUpdateLeadMobile.rejected, function (state, action) {
1233
+ state.loading = false;
1234
+ state.error = action.error.message;
998
1235
  })
999
1236
  .addCase(checkEmailAvailability.fulfilled, function (state, action) {
1000
1237
  var _a;
@@ -1046,7 +1283,7 @@ export var connectSlice = createSlice({
1046
1283
  state.customLoading = false;
1047
1284
  state.error = null;
1048
1285
  var _b = action.payload, data = _b.data, countryCode = _b.countryCode;
1049
- var _c = data || {}, name = _c.name, contact = _c.contact, brand = _c.brand, identification = _c.identification, date_of_birth = _c.date_of_birth;
1286
+ var _c = data || {}, name = _c.name, contact = _c.contact, brand = _c.brand, identification = _c.identification;
1050
1287
  var _d = contact || {}, email = _d.email, phone = _d.phone;
1051
1288
  var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
1052
1289
  if (!!fullName) {
@@ -1067,8 +1304,6 @@ export var connectSlice = createSlice({
1067
1304
  state.data.brandData.brandName = brand.name.en;
1068
1305
  if (identification === null || identification === void 0 ? void 0 : identification.id)
1069
1306
  state.data.nidData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
1070
- if (date_of_birth)
1071
- state.data.nidData.dob = date_of_birth;
1072
1307
  })
1073
1308
  .addCase(retrieveLead.pending, function (state) {
1074
1309
  state.customLoading = true;