@tap-payments/auth-jsconnect 2.6.102-test → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (555) hide show
  1. package/build/@types/app.d.ts +47 -14
  2. package/build/@types/app.js +16 -0
  3. package/build/@types/config.d.ts +49 -0
  4. package/build/@types/config.js +1 -0
  5. package/build/@types/form.d.ts +11 -1
  6. package/build/@types/index.d.ts +1 -0
  7. package/build/@types/index.js +1 -0
  8. package/build/@types/redux.d.ts +1 -0
  9. package/build/@types/theme.d.ts +4 -0
  10. package/build/@types/theme.js +5 -0
  11. package/build/api/account.d.ts +4 -0
  12. package/build/api/account.js +9 -2
  13. package/build/api/auth.d.ts +35 -20
  14. package/build/api/auth.js +1 -1
  15. package/build/api/data.d.ts +4 -17
  16. package/build/api/data.js +5 -45
  17. package/build/api/entity.d.ts +5 -2
  18. package/build/api/entity.js +12 -4
  19. package/build/api/firebase.js +68 -8
  20. package/build/api/index.d.ts +13 -25
  21. package/build/api/lead.d.ts +16 -3
  22. package/build/api/lead.js +16 -0
  23. package/build/api/user.d.ts +7 -0
  24. package/build/api/user.js +9 -1
  25. package/build/app/rootReducer.d.ts +1 -0
  26. package/build/app/rootReducer.js +3 -1
  27. package/build/app/settings.d.ts +3 -2
  28. package/build/app/settings.js +64 -31
  29. package/build/app/store.d.ts +2 -0
  30. package/build/assets/locales/ar.json +353 -151
  31. package/build/assets/locales/en.json +349 -150
  32. package/build/components/AnimationFlow/AnimationFlow.d.ts +11 -6
  33. package/build/components/AnimationFlow/AnimationFlow.js +5 -5
  34. package/build/components/AnimationFlow/BottomSheet.d.ts +5 -2
  35. package/build/components/AnimationFlow/BottomSheet.js +43 -14
  36. package/build/components/AnimationFlow/Dialog.d.ts +6 -4
  37. package/build/components/AnimationFlow/Dialog.js +9 -7
  38. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
  39. package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
  40. package/build/components/ArabicDatePicker/style.css +32 -3
  41. package/build/components/DatePicker/DatePicker.d.ts +1 -1
  42. package/build/components/DatePicker/DatePicker.js +2 -2
  43. package/build/components/Footer/Footer.js +2 -1
  44. package/build/components/Input/Input.js +1 -1
  45. package/build/components/Providers/ThemeProvider.js +3 -3
  46. package/build/components/Tooltip/Tooltip.js +1 -1
  47. package/build/constants/api.d.ts +5 -7
  48. package/build/constants/api.js +11 -15
  49. package/build/constants/app.d.ts +39 -0
  50. package/build/constants/app.js +345 -35
  51. package/build/constants/assets.d.ts +3 -0
  52. package/build/constants/assets.js +4 -1
  53. package/build/constants/dummy.d.ts +4 -219
  54. package/build/constants/dummy.js +64 -6194
  55. package/build/constants/flows.d.ts +26 -0
  56. package/build/constants/flows.js +27 -0
  57. package/build/constants/index.d.ts +1 -0
  58. package/build/constants/index.js +1 -0
  59. package/build/constants/validation.d.ts +2 -0
  60. package/build/constants/validation.js +2 -0
  61. package/build/features/app/auth/authStore.d.ts +29 -8
  62. package/build/features/app/auth/authStore.js +454 -136
  63. package/build/features/app/bank/bankStore.d.ts +13 -18
  64. package/build/features/app/bank/bankStore.js +186 -153
  65. package/build/features/app/board/boardStore.d.ts +5 -1
  66. package/build/features/app/board/boardStore.js +82 -51
  67. package/build/features/app/brand/brandStore.d.ts +17 -33
  68. package/build/features/app/brand/brandStore.js +254 -257
  69. package/build/features/app/business/businessStore.d.ts +37 -15
  70. package/build/features/app/business/businessStore.js +407 -223
  71. package/build/features/app/connect/connectStore.d.ts +33 -5
  72. package/build/features/app/connect/connectStore.js +316 -93
  73. package/build/features/app/connectExpress/connectExpressStore.d.ts +53 -23
  74. package/build/features/app/connectExpress/connectExpressStore.js +604 -345
  75. package/build/features/app/entity/entityStore.d.ts +20 -36
  76. package/build/features/app/entity/entityStore.js +204 -238
  77. package/build/features/app/individual/individualStore.d.ts +18 -34
  78. package/build/features/app/individual/individualStore.js +269 -292
  79. package/build/features/app/kyc/kycStore.d.ts +67 -0
  80. package/build/features/app/kyc/kycStore.js +408 -0
  81. package/build/features/app/password/passwordStore.d.ts +33 -18
  82. package/build/features/app/password/passwordStore.js +260 -219
  83. package/build/features/app/signIn/signInStore.js +19 -15
  84. package/build/features/app/tax/taxStore.d.ts +13 -7
  85. package/build/features/app/tax/taxStore.js +170 -136
  86. package/build/features/auth/Auth.d.ts +5 -6
  87. package/build/features/auth/Auth.js +44 -20
  88. package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +2 -5
  89. package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
  90. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
  91. package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
  92. package/build/features/auth/screens/AuthSwitch/index.js +2 -0
  93. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +2 -8
  94. package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +2 -2
  95. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +8 -2
  96. package/build/features/auth/screens/CivilID/CivilID.js +4 -35
  97. package/build/features/auth/screens/{NID → DOB}/DOB.js +3 -3
  98. package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
  99. package/build/features/auth/screens/DOB/DOBForm.js +59 -0
  100. package/build/features/auth/screens/DOB/index.d.ts +3 -0
  101. package/build/features/auth/screens/DOB/index.js +2 -0
  102. package/build/features/{business/screens/OTP → auth/screens/DOB}/validation.d.ts +4 -4
  103. package/build/features/auth/screens/DOB/validation.js +4 -0
  104. package/build/features/auth/screens/Email/Email.d.ts +5 -0
  105. package/build/features/auth/screens/Email/Email.js +57 -0
  106. package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
  107. package/build/features/auth/screens/Email/EmailField.js +52 -0
  108. package/build/features/auth/screens/Email/index.d.ts +3 -0
  109. package/build/features/auth/screens/Email/index.js +2 -0
  110. package/build/features/auth/screens/Email/validation.d.ts +8 -0
  111. package/build/features/auth/screens/Email/validation.js +4 -0
  112. package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
  113. package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
  114. package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
  115. package/build/features/auth/screens/EmailSent/index.js +2 -0
  116. package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
  117. package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
  118. package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
  119. package/build/features/auth/screens/MigratingData/index.js +2 -0
  120. package/build/features/auth/screens/Mobile/Mobile.js +6 -38
  121. package/build/features/auth/screens/Mobile/MobileNumber.js +13 -15
  122. package/build/features/auth/screens/Mobile/validation.js +11 -3
  123. package/build/features/auth/screens/NID/IDNumber.js +1 -1
  124. package/build/features/auth/screens/NID/NID.js +7 -43
  125. package/build/features/auth/screens/NID/validation.d.ts +0 -3
  126. package/build/features/auth/screens/NID/validation.js +0 -1
  127. package/build/features/auth/screens/OTP/OTP.js +41 -10
  128. package/build/features/auth/screens/OTP/OTPInput.js +23 -6
  129. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  130. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  131. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  132. package/build/features/auth/screens/OperatorError/index.js +2 -0
  133. package/build/features/auth/screens/Password/Password.d.ts +5 -0
  134. package/build/features/auth/screens/Password/Password.js +61 -0
  135. package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
  136. package/build/features/auth/screens/Password/PasswordField.js +28 -0
  137. package/build/features/auth/screens/Password/index.d.ts +3 -0
  138. package/build/features/auth/screens/Password/index.js +2 -0
  139. package/build/features/auth/screens/Password/validation.d.ts +8 -0
  140. package/build/features/auth/screens/Password/validation.js +4 -0
  141. package/build/features/auth/screens/PreparingData/PreparingData.js +3 -0
  142. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
  143. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
  144. package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
  145. package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
  146. package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  147. package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
  148. package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
  149. package/build/features/auth/screens/VerifyNafath/index.js +2 -0
  150. package/build/features/bank/Bank.d.ts +5 -1
  151. package/build/features/bank/Bank.js +22 -9
  152. package/build/features/bank/screens/BankDetails/BankDetails.js +20 -6
  153. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  154. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  155. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  156. package/build/features/bank/screens/OperatorError/index.js +2 -0
  157. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  158. package/build/features/bank/screens/Verify/Verify.js +7 -6
  159. package/build/features/board/Board.d.ts +2 -0
  160. package/build/features/board/Board.js +24 -13
  161. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  162. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  163. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  164. package/build/features/board/screens/OperatorError/index.js +2 -0
  165. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  166. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  167. package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
  168. package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
  169. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -4
  170. package/build/features/board/screens/Verify/Verify.js +3 -2
  171. package/build/features/brand/Brand.d.ts +5 -1
  172. package/build/features/brand/Brand.js +22 -9
  173. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +5 -5
  174. package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
  175. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
  176. package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
  177. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
  178. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +4 -4
  179. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  180. package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
  181. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  182. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  183. package/build/features/brand/screens/BrandInfo/BrandInfo.js +26 -6
  184. package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
  185. package/build/features/brand/screens/BrandInfo/validation.js +2 -2
  186. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +22 -6
  187. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  188. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  189. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  190. package/build/features/brand/screens/OperatorError/index.js +2 -0
  191. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  192. package/build/features/brand/screens/Verify/Verify.js +3 -2
  193. package/build/features/business/Business.js +20 -12
  194. package/build/features/business/screens/Activities/Activities.js +26 -9
  195. package/build/features/business/screens/Activities/ActivitiesList.d.ts +4 -4
  196. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  197. package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
  198. package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
  199. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
  200. package/build/features/business/screens/BusinessType/BusinessType.js +11 -3
  201. package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
  202. package/build/features/business/screens/Customers/CustomerLocations.d.ts +10 -8
  203. package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
  204. package/build/features/business/screens/Customers/Customers.js +50 -10
  205. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
  206. package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
  207. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
  208. package/build/features/business/screens/Customers/ExpectedSalesRange.js +11 -5
  209. package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -5
  210. package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
  211. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
  212. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
  213. package/build/features/business/screens/Customers/validation.d.ts +6 -6
  214. package/build/features/business/screens/Customers/validation.js +3 -8
  215. package/build/features/business/screens/DOB/DOB.d.ts +6 -0
  216. package/build/features/business/screens/DOB/DOB.js +45 -0
  217. package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
  218. package/build/features/business/screens/DOB/DOBForm.js +72 -0
  219. package/build/features/business/screens/DOB/index.d.ts +3 -0
  220. package/build/features/business/screens/DOB/index.js +2 -0
  221. package/build/features/{connectExpress/screens/IdentityOTP → business/screens/DOB}/validation.d.ts +4 -4
  222. package/build/features/business/screens/DOB/validation.js +4 -0
  223. package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
  224. package/build/features/business/screens/IDBOD/validation.d.ts +0 -3
  225. package/build/features/business/screens/IDBOD/validation.js +0 -1
  226. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  227. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +105 -0
  228. package/build/features/{connectExpress/screens/IdentityOTP/OTP.d.ts → business/screens/MobileOwnership/MobileNumber.d.ts} +0 -2
  229. package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
  230. package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
  231. package/build/features/business/screens/MobileOwnership/index.js +2 -0
  232. package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
  233. package/build/features/business/screens/MobileOwnership/validation.js +38 -0
  234. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  235. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  236. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  237. package/build/features/business/screens/OperatorError/index.js +2 -0
  238. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
  239. package/build/features/business/screens/Verify/Verify.js +15 -4
  240. package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  241. package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
  242. package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
  243. package/build/features/business/screens/VerifyNafath/index.js +2 -0
  244. package/build/features/connect/Connect.d.ts +5 -1
  245. package/build/features/connect/Connect.js +21 -14
  246. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
  247. package/build/features/connect/screens/CivilID/CivilID.js +6 -1
  248. package/build/features/{auth/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
  249. package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
  250. package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
  251. package/build/features/connect/screens/DOB/DOBForm.js +59 -0
  252. package/build/features/connect/screens/DOB/index.d.ts +3 -0
  253. package/build/features/connect/screens/DOB/index.js +2 -0
  254. package/build/features/connect/screens/DOB/validation.d.ts +8 -0
  255. package/build/features/connect/screens/DOB/validation.js +4 -0
  256. package/build/features/connect/screens/Individual/Email.js +1 -3
  257. package/build/features/connect/screens/Individual/Individual.js +11 -5
  258. package/build/features/connect/screens/Individual/MobileNumber.js +8 -7
  259. package/build/features/connect/screens/Individual/validation.js +11 -3
  260. package/build/features/connect/screens/Merchant/BrandName.js +5 -2
  261. package/build/features/connect/screens/Merchant/validation.js +2 -2
  262. package/build/features/connect/screens/Mobile/Mobile.js +12 -9
  263. package/build/features/connect/screens/Mobile/MobileNumber.js +8 -7
  264. package/build/features/connect/screens/Mobile/validation.js +11 -3
  265. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  266. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
  267. package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  268. package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
  269. package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
  270. package/build/features/connect/screens/MobileOwnership/index.js +2 -0
  271. package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
  272. package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
  273. package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
  274. package/build/features/connect/screens/NID/IDNumber.js +2 -2
  275. package/build/features/connect/screens/NID/NID.js +5 -11
  276. package/build/features/connect/screens/NID/validation.d.ts +0 -3
  277. package/build/features/connect/screens/NID/validation.js +0 -1
  278. package/build/features/connect/screens/OTP/OTP.js +6 -6
  279. package/build/features/connect/screens/OTP/OTPInput.js +3 -11
  280. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  281. package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  282. package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
  283. package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
  284. package/build/features/connect/screens/VerifyNafath/index.js +2 -0
  285. package/build/features/connectExpress/ConnectExpress.d.ts +5 -2
  286. package/build/features/connectExpress/ConnectExpress.js +64 -41
  287. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
  288. package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +2 -2
  289. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
  290. package/build/features/connectExpress/screens/CivilID/CivilID.js +6 -1
  291. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
  292. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +8 -1
  293. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  294. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
  295. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +2 -2
  296. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +30 -7
  297. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
  298. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +9 -8
  299. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +11 -3
  300. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
  301. package/build/features/connectExpress/screens/{NID → DOB}/DOB.d.ts +1 -2
  302. package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
  303. package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
  304. package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
  305. package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
  306. package/build/features/connectExpress/screens/DOB/index.js +2 -0
  307. package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
  308. package/build/features/connectExpress/screens/DOB/validation.js +4 -0
  309. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
  310. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
  311. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
  312. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
  313. package/build/features/connectExpress/screens/Mobile/Mobile.js +10 -3
  314. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -8
  315. package/build/features/connectExpress/screens/Mobile/validation.js +21 -6
  316. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  317. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +108 -0
  318. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  319. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
  320. package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
  321. package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
  322. package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
  323. package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
  324. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
  325. package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
  326. package/build/features/connectExpress/screens/NID/NID.js +10 -10
  327. package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
  328. package/build/features/connectExpress/screens/NID/TAC.js +2 -2
  329. package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
  330. package/build/features/connectExpress/screens/NID/validation.js +0 -2
  331. package/build/features/connectExpress/screens/NIDMissed/NID.js +3 -3
  332. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +0 -3
  333. package/build/features/connectExpress/screens/NIDMissed/validation.js +0 -1
  334. package/build/features/connectExpress/screens/OTP/OTP.js +13 -15
  335. package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
  336. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  337. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  338. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  339. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  340. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
  341. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
  342. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
  343. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
  344. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -3
  345. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  346. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -0
  347. package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
  348. package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
  349. package/build/features/entity/Entity.d.ts +4 -1
  350. package/build/features/entity/Entity.js +22 -9
  351. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
  352. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
  353. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
  354. package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
  355. package/build/features/entity/screens/EntityName/EntityName.js +33 -15
  356. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +5 -5
  357. package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
  358. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
  359. package/build/features/entity/screens/EntityName/ExpiryDate.js +13 -8
  360. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
  361. package/build/features/entity/screens/EntityName/IssuingDate.js +15 -8
  362. package/build/features/entity/screens/EntityName/LegalName.js +1 -13
  363. package/build/features/entity/screens/EntityName/LicenseNumber.js +6 -8
  364. package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
  365. package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
  366. package/build/features/entity/screens/EntityName/validation.js +1 -10
  367. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  368. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  369. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  370. package/build/features/entity/screens/OperatorError/index.js +2 -0
  371. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  372. package/build/features/entity/screens/Verify/Verify.js +3 -2
  373. package/build/features/featuresScreens.d.ts +1 -0
  374. package/build/features/featuresScreens.js +211 -13
  375. package/build/features/individual/Individual.d.ts +4 -1
  376. package/build/features/individual/Individual.js +22 -9
  377. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
  378. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +44 -11
  379. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
  380. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
  381. package/build/features/individual/screens/IndividualList/Email.js +2 -3
  382. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
  383. package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
  384. package/build/features/individual/screens/IndividualList/MobileNumber.js +8 -10
  385. package/build/features/individual/screens/IndividualList/UserList.js +7 -7
  386. package/build/features/individual/screens/IndividualList/validation.js +11 -4
  387. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
  388. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
  389. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +76 -20
  390. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -5
  391. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +11 -3
  392. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +9 -11
  393. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +11 -3
  394. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  395. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  396. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  397. package/build/features/individual/screens/OperatorError/index.js +2 -0
  398. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  399. package/build/features/individual/screens/Verify/Verify.js +3 -2
  400. package/build/features/kyc/KYC.d.ts +11 -0
  401. package/build/features/kyc/KYC.js +99 -0
  402. package/build/features/kyc/index.d.ts +1 -0
  403. package/build/features/kyc/index.js +1 -0
  404. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
  405. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
  406. package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
  407. package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
  408. package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
  409. package/build/features/kyc/screens/Loading/Loading.js +10 -0
  410. package/build/features/kyc/screens/Loading/index.d.ts +2 -0
  411. package/build/features/kyc/screens/Loading/index.js +2 -0
  412. package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
  413. package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
  414. package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
  415. package/build/features/kyc/screens/OperatorError/index.js +2 -0
  416. package/build/features/kyc/screens/Success/Success.d.ts +5 -0
  417. package/build/features/kyc/screens/Success/Success.js +32 -0
  418. package/build/features/kyc/screens/Success/index.d.ts +2 -0
  419. package/build/features/kyc/screens/Success/index.js +2 -0
  420. package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
  421. package/build/features/kyc/screens/Terms/Header.js +36 -0
  422. package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
  423. package/build/features/kyc/screens/Terms/Terms.js +81 -0
  424. package/build/features/kyc/screens/Terms/index.d.ts +2 -0
  425. package/build/features/kyc/screens/Terms/index.js +2 -0
  426. package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
  427. package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
  428. package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
  429. package/build/features/kyc/screens/TokenError/index.js +2 -0
  430. package/build/features/kyc/screens/Users/Users.d.ts +3 -0
  431. package/build/features/kyc/screens/Users/Users.js +76 -0
  432. package/build/features/kyc/screens/Users/index.d.ts +2 -0
  433. package/build/features/kyc/screens/Users/index.js +2 -0
  434. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  435. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
  436. package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
  437. package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
  438. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
  439. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
  440. package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
  441. package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
  442. package/build/features/password/Password.d.ts +4 -1
  443. package/build/features/password/Password.js +88 -31
  444. package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
  445. package/build/features/password/screens/OTP/OTP.js +3 -3
  446. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  447. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  448. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  449. package/build/features/password/screens/OperatorError/index.js +2 -0
  450. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  451. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  452. package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
  453. package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
  454. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  455. package/build/features/password/screens/Verify/Verify.js +7 -6
  456. package/build/features/shared/Address/CountryList.d.ts +5 -5
  457. package/build/features/shared/Address/InputSelect.d.ts +5 -5
  458. package/build/features/shared/Background/Background.js +1 -1
  459. package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
  460. package/build/features/shared/Button/Button.js +3 -1
  461. package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
  462. package/build/features/shared/Button/FlowsButtons.js +18 -4
  463. package/build/features/shared/Button/NafathButton.d.ts +8 -0
  464. package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
  465. package/build/features/shared/Button/index.d.ts +2 -2
  466. package/build/features/shared/Button/index.js +2 -2
  467. package/build/features/shared/Calender/Calender.d.ts +2 -1
  468. package/build/features/shared/Calender/Calender.js +3 -3
  469. package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
  470. package/build/features/shared/Containers/FeatureContainer.js +5 -3
  471. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  472. package/build/features/shared/Dialog/DialogContainer.js +5 -4
  473. package/build/features/shared/Input/Input.d.ts +2 -2
  474. package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
  475. package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
  476. package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
  477. package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
  478. package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
  479. package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
  480. package/build/features/shared/NafathVerification/index.d.ts +2 -0
  481. package/build/features/shared/NafathVerification/index.js +2 -0
  482. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
  483. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
  484. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  485. package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
  486. package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
  487. package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
  488. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
  489. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
  490. package/build/features/signIn/SignIn.js +18 -7
  491. package/build/features/signIn/screens/Mobile/MobileNumber.js +8 -7
  492. package/build/features/signIn/screens/Mobile/validation.js +11 -3
  493. package/build/features/signIn/screens/OTP/OTP.js +5 -4
  494. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  495. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  496. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  497. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  498. package/build/features/tax/Tax.d.ts +4 -1
  499. package/build/features/tax/Tax.js +22 -9
  500. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  501. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  502. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  503. package/build/features/tax/screens/OperatorError/index.js +2 -0
  504. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  505. package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
  506. package/build/features/tax/screens/Verify/Verify.js +7 -6
  507. package/build/hooks/index.d.ts +3 -0
  508. package/build/hooks/index.js +3 -0
  509. package/build/hooks/useAppConfig.d.ts +3 -3
  510. package/build/hooks/useAppConfig.js +4 -3
  511. package/build/hooks/useAppDispatch.d.ts +1 -0
  512. package/build/hooks/useAppTheme.js +4 -3
  513. package/build/hooks/useCountDown.d.ts +10 -0
  514. package/build/hooks/useCountDown.js +17 -0
  515. package/build/hooks/useFormDirtyCheck.d.ts +10 -0
  516. package/build/hooks/useFormDirtyCheck.js +66 -0
  517. package/build/hooks/useSanitizedTranslation.d.ts +2 -0
  518. package/build/hooks/useSanitizedTranslation.js +15 -0
  519. package/build/hooks/useVerifyToken.d.ts +4 -2
  520. package/build/hooks/useVerifyToken.js +9 -4
  521. package/build/index.css +360 -120
  522. package/build/index.d.ts +3 -2
  523. package/build/index.js +4 -2
  524. package/build/theme/components.js +7 -0
  525. package/build/theme/palette.js +2 -1
  526. package/build/theme/shadows.js +1 -1
  527. package/build/theme/theme.d.ts +1 -1
  528. package/build/theme/theme.js +2 -2
  529. package/build/utils/array.js +2 -2
  530. package/build/utils/common.d.ts +1 -0
  531. package/build/utils/common.js +16 -3
  532. package/build/utils/device.d.ts +2 -0
  533. package/build/utils/device.js +6 -0
  534. package/build/utils/object.d.ts +1 -0
  535. package/build/utils/object.js +3 -0
  536. package/build/utils/string.d.ts +6 -2
  537. package/build/utils/string.js +28 -3
  538. package/build/utils/validation.d.ts +2 -0
  539. package/build/utils/validation.js +6 -0
  540. package/package.json +2 -2
  541. package/build/features/business/screens/OTP/OTP.d.ts +0 -8
  542. package/build/features/business/screens/OTP/OTP.js +0 -90
  543. package/build/features/business/screens/OTP/OTPInput.d.ts +0 -5
  544. package/build/features/business/screens/OTP/OTPInput.js +0 -49
  545. package/build/features/business/screens/OTP/index.d.ts +0 -3
  546. package/build/features/business/screens/OTP/index.js +0 -2
  547. package/build/features/business/screens/OTP/validation.js +0 -4
  548. package/build/features/connectExpress/screens/IdentityOTP/OTP.js +0 -87
  549. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +0 -5
  550. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +0 -54
  551. package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
  552. package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
  553. package/build/features/connectExpress/screens/IdentityOTP/validation.js +0 -4
  554. package/build/features/shared/Button/AbsherButton.d.ts +0 -8
  555. /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { RootState } from '../../../app/store';
2
- import { ActionState, AuthForType, CivilFormValues, CountryCode, FlowsTypes, IndividualFormValues, MobileFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, BrandFormValues, BrandSegmentFormValues } from '../../../@types';
2
+ import { ActionState, AuthForType, CivilFormValues, CountryCode, FlowsTypes, IndividualFormValues, MobileFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, BrandFormValues, BrandSegmentFormValues, DOBFormValues, MobileOwnershipFormValues } from '../../../@types';
3
3
  import { CancelToken } from 'axios';
4
4
  export declare const updateBusinessCountry: import("@reduxjs/toolkit").AsyncThunk<any, string, {}>;
5
5
  export declare const createMobileAuth: import("@reduxjs/toolkit").AsyncThunk<{
@@ -11,13 +11,12 @@ export declare const createCivilIdAuth: import("@reduxjs/toolkit").AsyncThunk<{
11
11
  formData: CivilFormValues;
12
12
  }, CivilFormValues, {}>;
13
13
  export declare const resendOTPMobile: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
14
- export declare const resendOTPNID: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
15
- export declare const createNIDAuth: import("@reduxjs/toolkit").AsyncThunk<{
14
+ export declare const createNafathAuth: import("@reduxjs/toolkit").AsyncThunk<{
16
15
  response: any;
17
16
  formData: {
18
17
  type: string;
19
18
  nid: string;
20
- dob: string;
19
+ dob?: any;
21
20
  termAndConditionChecked?: boolean | undefined;
22
21
  };
23
22
  }, NIDFormValues, {}>;
@@ -34,6 +33,25 @@ export declare const verifyPACI: import("@reduxjs/toolkit").AsyncThunk<{
34
33
  leadResponse: any;
35
34
  countryCode: CountryCode;
36
35
  }, verifyPACIParams, {}>;
36
+ interface verifyNafathParams {
37
+ onSuccess?: () => void;
38
+ onFailure?: () => void;
39
+ }
40
+ export declare const verifyNafath: import("@reduxjs/toolkit").AsyncThunk<{
41
+ authResponse: any;
42
+ countryCode: CountryCode;
43
+ leadResponse?: undefined;
44
+ isNextScreenDob?: undefined;
45
+ } | {
46
+ authResponse: any;
47
+ leadResponse: any;
48
+ countryCode: CountryCode;
49
+ isNextScreenDob: boolean;
50
+ }, verifyNafathParams, {}>;
51
+ export declare const updateLeadDOB: import("@reduxjs/toolkit").AsyncThunk<{
52
+ leadResponse: any;
53
+ formData: DOBFormValues;
54
+ }, DOBFormValues, {}>;
37
55
  export declare const updateLeadIndividual: import("@reduxjs/toolkit").AsyncThunk<{
38
56
  leadResponse: any;
39
57
  formData: IndividualFormValues;
@@ -57,6 +75,13 @@ export declare const updateLeadBrandSegment: import("@reduxjs/toolkit").AsyncThu
57
75
  response: any;
58
76
  formData: Pick<BrandSegmentFormValues, "teamSize">;
59
77
  }, Pick<BrandSegmentFormValues, "teamSize">, {}>;
78
+ export declare const updateLeadMobile: import("@reduxjs/toolkit").AsyncThunk<{
79
+ leadResponse: any;
80
+ formData: MobileOwnershipFormValues;
81
+ }, MobileOwnershipFormValues, {}>;
82
+ export declare const skipUpdateLeadMobile: import("@reduxjs/toolkit").AsyncThunk<{
83
+ leadResponse: any;
84
+ }, void, {}>;
60
85
  export declare const checkEmailAvailability: import("@reduxjs/toolkit").AsyncThunk<{
61
86
  response: any;
62
87
  formData: string;
@@ -89,7 +114,10 @@ export interface ConnectData {
89
114
  otpData: OTPFormValues & ResponseData & {
90
115
  authFor: AuthForType;
91
116
  };
92
- individualData: IndividualFormValues & ResponseData;
117
+ dobData: DOBFormValues & ResponseData;
118
+ individualData: IndividualFormValues & ResponseData & {
119
+ isPrevDob?: boolean;
120
+ };
93
121
  brandData: BrandFormValues & ResponseData;
94
122
  brandSegmentData: Pick<BrandSegmentFormValues, 'teamSize'> & ResponseData;
95
123
  flowName: FlowsTypes;
@@ -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_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 } 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
  }); });
@@ -400,6 +362,129 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
400
362
  }
401
363
  });
402
364
  }); });
365
+ export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
366
+ var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, error_1, isSuccess, isFailed, countryCode, lead_id, leadResponse, channels, brand, err_5, brands, err_6, phone, isNextScreenDob, stepName;
367
+ var _b, _c, _d, _e, _f, _g, _h;
368
+ return __generator(this, function (_j) {
369
+ switch (_j.label) {
370
+ case 0:
371
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
372
+ responseBody = connect.data.nidData.responseBody;
373
+ expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
374
+ interval = 3;
375
+ maxCalls = Math.floor(expiry / interval);
376
+ count = 1;
377
+ _j.label = 1;
378
+ case 1:
379
+ if (!(count <= maxCalls)) return [3, 19];
380
+ if (thunkApi.signal.aborted) {
381
+ return [3, 19];
382
+ }
383
+ authResponse = void 0;
384
+ _j.label = 2;
385
+ case 2:
386
+ _j.trys.push([2, 4, , 5]);
387
+ return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token)];
388
+ case 3:
389
+ authResponse = _j.sent();
390
+ return [3, 5];
391
+ case 4:
392
+ error_1 = _j.sent();
393
+ if (!isNetworkError(error_1.message)) {
394
+ throw new Error(error_1);
395
+ }
396
+ return [3, 5];
397
+ case 5:
398
+ isSuccess = ((_b = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
399
+ isFailed = ((_c = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'failed';
400
+ countryCode = settings.data.businessCountry;
401
+ if (isFailed) {
402
+ (_d = params.onFailure) === null || _d === void 0 ? void 0 : _d.call(params);
403
+ return [2, { authResponse: authResponse, countryCode: countryCode }];
404
+ }
405
+ if (!isSuccess) return [3, 16];
406
+ lead_id = authResponse.lead_id;
407
+ if (!lead_id)
408
+ throw new Error('Lead id is missing');
409
+ return [4, API.leadService.retrieveLead(lead_id)];
410
+ case 6:
411
+ leadResponse = (_j.sent()).data;
412
+ if ((_e = leadResponse.errors) === null || _e === void 0 ? void 0 : _e.length)
413
+ throw new Error(leadResponse.errors[0].description);
414
+ return [4, API.dataService.getChannelsOfServices({ page: 0 })];
415
+ case 7:
416
+ channels = (_j.sent()).list;
417
+ leadResponse.channel_list = channels;
418
+ _j.label = 8;
419
+ case 8:
420
+ _j.trys.push([8, 10, , 11]);
421
+ return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
422
+ case 9:
423
+ brand = (_j.sent()).brand;
424
+ leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
425
+ return [3, 11];
426
+ case 10:
427
+ err_5 = _j.sent();
428
+ return [3, 11];
429
+ case 11:
430
+ _j.trys.push([11, 13, , 14]);
431
+ return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
432
+ case 12:
433
+ brands = (_j.sent()).brands;
434
+ leadResponse.brand_list = fixBrandList(brands, channels);
435
+ return [3, 14];
436
+ case 13:
437
+ err_6 = _j.sent();
438
+ return [3, 14];
439
+ case 14:
440
+ (_f = params.onSuccess) === null || _f === void 0 ? void 0 : _f.call(params);
441
+ return [4, sleep(3000)];
442
+ case 15:
443
+ _j.sent();
444
+ phone = (leadResponse.contact || {}).phone;
445
+ if (phone === null || phone === void 0 ? void 0 : phone.country_code)
446
+ countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
447
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, {});
448
+ isNextScreenDob = (authResponse === null || authResponse === void 0 ? void 0 : authResponse.step_name) === COLLECT_DOB_INFO_NAFATH;
449
+ stepName = isNextScreenDob ? 'CONNECT_DOB_STEP' : 'CONNECT_INDIVIDUAL_STEP';
450
+ thunkApi.dispatch(handleNextScreenStep(stepName));
451
+ return [2, { authResponse: authResponse, leadResponse: leadResponse, countryCode: countryCode, isNextScreenDob: isNextScreenDob }];
452
+ case 16: return [4, sleep(interval * 1000)];
453
+ case 17:
454
+ _j.sent();
455
+ _j.label = 18;
456
+ case 18:
457
+ count++;
458
+ return [3, 1];
459
+ case 19: throw new Error(NAFATH_VERIFICATION_FAILED);
460
+ }
461
+ });
462
+ }); });
463
+ export var updateLeadDOB = createAsyncThunk('connect/updateLeadDOB', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
464
+ var _a, settings, connect, lead_id, brandData, payload, leadResponse;
465
+ var _b, _c;
466
+ return __generator(this, function (_d) {
467
+ switch (_d.label) {
468
+ case 0:
469
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
470
+ lead_id = (connect.data.otpData.responseBody || {}).lead_id;
471
+ brandData = (connect.data.brandData.responseBody || {}).brandData;
472
+ payload = {
473
+ id: lead_id || '',
474
+ date_of_birth: params.dob,
475
+ step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_DOB,
476
+ encryption_contract: ['date_of_birth']
477
+ };
478
+ return [4, API.leadService.updateLead(payload)];
479
+ case 1:
480
+ leadResponse = _d.sent();
481
+ leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
482
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
483
+ thunkApi.dispatch(handleNextScreenStep());
484
+ return [2, { leadResponse: leadResponse, formData: params }];
485
+ }
486
+ });
487
+ }); });
403
488
  export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
404
489
  var _a, settings, connect, lead_id, brandData, phoneCountry, payload, leadResponse;
405
490
  var _b, _c, _d, _e, _f;
@@ -415,6 +500,7 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
415
500
  country_code: (_d = settings.data.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2,
416
501
  name: getIndividualName(params.name),
417
502
  contact: __assign({ email: params.email }, (params.mobile && { phone: { country_code: phoneCountry, number: params.mobile } })),
503
+ metadata: getMetaData(),
418
504
  step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL,
419
505
  encryption_contract: ['name.first', 'name.middle', 'name.last', 'contact.email', 'contact.phone.country_code', 'contact.phone.number']
420
506
  };
@@ -423,7 +509,12 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
423
509
  leadResponse = _g.sent();
424
510
  leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
425
511
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
426
- thunkApi.dispatch(handleNextScreenStep());
512
+ if (leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
513
+ thunkApi.dispatch(handleNextScreenStep('CONNECT_MOBILE_OWNERSHIP'));
514
+ }
515
+ else {
516
+ thunkApi.dispatch(handleNextScreenStep('CONNECT_MERCHANT_INFO_STEP'));
517
+ }
427
518
  return [2, { leadResponse: leadResponse, formData: params }];
428
519
  }
429
520
  });
@@ -463,7 +554,7 @@ export var retrieveLead = createAsyncThunk('connect/retrieveLead', function (par
463
554
  });
464
555
  }); });
465
556
  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;
557
+ 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
558
  var _b, _c, _d, _e, _f;
468
559
  return __generator(this, function (_g) {
469
560
  switch (_g.label) {
@@ -516,13 +607,13 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
516
607
  _g.label = 4;
517
608
  case 4:
518
609
  _g.trys.push([4, 6, , 7]);
519
- return [4, API.dataService.getTeamSize({ page: 0 })];
610
+ return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
520
611
  case 5:
521
- teamSize = _g.sent();
522
- brand_1.team_size_list = teamSize.list;
612
+ team = (_g.sent()).team;
613
+ brand_1.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
523
614
  return [3, 7];
524
615
  case 6:
525
- err_5 = _g.sent();
616
+ err_7 = _g.sent();
526
617
  return [3, 7];
527
618
  case 7:
528
619
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
@@ -562,13 +653,13 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
562
653
  _g.label = 11;
563
654
  case 11:
564
655
  _g.trys.push([11, 13, , 14]);
565
- return [4, API.dataService.getTeamSize({ page: 0 })];
656
+ return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
566
657
  case 12:
567
- teamSize = _g.sent();
568
- brand.team_size_list = teamSize.list;
658
+ team = (_g.sent()).team;
659
+ brand.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
569
660
  return [3, 14];
570
661
  case 13:
571
- err_6 = _g.sent();
662
+ err_8 = _g.sent();
572
663
  return [3, 14];
573
664
  case 14:
574
665
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
@@ -604,6 +695,59 @@ export var updateLeadBrandSegment = createAsyncThunk('updateLeadBrandSegment', f
604
695
  }
605
696
  });
606
697
  }); });
698
+ export var updateLeadMobile = createAsyncThunk('connect/updateLeadMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
699
+ var _a, settings, connect, lead_id, payload, leadResponse;
700
+ var _b, _c;
701
+ return __generator(this, function (_d) {
702
+ switch (_d.label) {
703
+ case 0:
704
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
705
+ lead_id = (connect.data.otpData.responseBody || {}).lead_id;
706
+ payload = {
707
+ id: lead_id || '',
708
+ contact: {
709
+ phone: {
710
+ country_code: params.countryCode.idd_prefix.toString(),
711
+ number: params.mobile
712
+ }
713
+ },
714
+ step_name: CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP,
715
+ encryption_contract: ['contact.phone.country_code', 'contact.phone.number']
716
+ };
717
+ return [4, API.leadService.updateLead(payload)];
718
+ case 1:
719
+ leadResponse = _d.sent();
720
+ if (leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
721
+ throw new Error("The new mobile number doesn't match the national ID, please update the mobile to the correct one");
722
+ }
723
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
724
+ thunkApi.dispatch(handleNextScreenStep());
725
+ return [2, { leadResponse: leadResponse, formData: params }];
726
+ }
727
+ });
728
+ }); });
729
+ export var skipUpdateLeadMobile = createAsyncThunk('connect/skipUpdateLeadMobile', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
730
+ var _a, settings, connect, lead_id, payload, leadResponse;
731
+ var _b, _c;
732
+ return __generator(this, function (_d) {
733
+ switch (_d.label) {
734
+ case 0:
735
+ _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
736
+ lead_id = (connect.data.otpData.responseBody || {}).lead_id;
737
+ payload = {
738
+ id: lead_id || '',
739
+ step_name: CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP_SKIPPED,
740
+ encryption_contract: []
741
+ };
742
+ return [4, API.leadService.updateLead(payload)];
743
+ case 1:
744
+ leadResponse = _d.sent();
745
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, {});
746
+ thunkApi.dispatch(handleNextScreenStep());
747
+ return [2, { leadResponse: leadResponse }];
748
+ }
749
+ });
750
+ }); });
607
751
  export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
608
752
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
609
753
  return __awaiter(void 0, void 0, void 0, function () {
@@ -691,7 +835,6 @@ var initialState = {
691
835
  },
692
836
  nidData: {
693
837
  nid: '',
694
- dob: '',
695
838
  type: ''
696
839
  },
697
840
  civilIdData: {
@@ -701,7 +844,11 @@ var initialState = {
701
844
  otp: '',
702
845
  authFor: AuthForType.MOBILE
703
846
  },
847
+ dobData: {
848
+ dob: ''
849
+ },
704
850
  individualData: {
851
+ isPrevDob: false,
705
852
  name: '',
706
853
  email: '',
707
854
  mobile: '',
@@ -858,6 +1005,70 @@ export var connectSlice = createSlice({
858
1005
  if (error !== 'Aborted') {
859
1006
  state.error = error;
860
1007
  }
1008
+ })
1009
+ .addCase(createNafathAuth.fulfilled, function (state, action) {
1010
+ state.loading = false;
1011
+ state.error = null;
1012
+ var _a = action.payload, formData = _a.formData, response = _a.response;
1013
+ state.data.nidData = formData;
1014
+ state.data.nidData.responseBody = response;
1015
+ state.data.otpData.authFor = AuthForType.NATIONAL_ID;
1016
+ })
1017
+ .addCase(createNafathAuth.pending, function (state) {
1018
+ state.loading = true;
1019
+ state.error = null;
1020
+ })
1021
+ .addCase(createNafathAuth.rejected, function (state, action) {
1022
+ state.loading = false;
1023
+ state.error = action.error.message;
1024
+ })
1025
+ .addCase(verifyNafath.pending, function (state) {
1026
+ state.loading = true;
1027
+ state.error = null;
1028
+ })
1029
+ .addCase(verifyNafath.fulfilled, function (state, action) {
1030
+ var _a;
1031
+ state.loading = false;
1032
+ state.error = null;
1033
+ var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, countryCode = _b.countryCode, isNextScreenDob = _b.isNextScreenDob;
1034
+ 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;
1035
+ var _d = contact || {}, email = _d.email, phone = _d.phone;
1036
+ var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
1037
+ if (!!fullName) {
1038
+ var capitalizedName = capitalizeTheFirstLetterOfEachWord(fullName);
1039
+ state.data.individualData.name = capitalizedName;
1040
+ }
1041
+ if (email)
1042
+ state.data.individualData.email = email;
1043
+ if (phone === null || phone === void 0 ? void 0 : phone.number)
1044
+ state.data.individualData.mobile = phone.number;
1045
+ if (!!countryCode)
1046
+ state.data.individualData.countryCode = countryCode;
1047
+ if ((_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en)
1048
+ state.data.brandData.brandName = brand.name.en;
1049
+ state.data.individualData.isPrevDob = isNextScreenDob || false;
1050
+ var brandList = [];
1051
+ if ((brand_list === null || brand_list === void 0 ? void 0 : brand_list.length) > 0) {
1052
+ var isBrandExist = brand_list.find(function (item) { return item.id === (brand === null || brand === void 0 ? void 0 : brand.id); });
1053
+ brandList = __spreadArray([], brand_list, true);
1054
+ if (!isBrandExist && brand)
1055
+ brandList = __spreadArray(__spreadArray([], brandList, true), [__assign(__assign({}, brand), { channel_services: (brand === null || brand === void 0 ? void 0 : brand.channel_services) || [] })], false);
1056
+ brandList = __spreadArray(__spreadArray([], brandList, true), [OTHER_BRAND], false);
1057
+ state.data.brandData.selectedBrandItem = brandList[0];
1058
+ }
1059
+ state.data.brandData.responseBody = {
1060
+ brand_list: brandList,
1061
+ channel_list: channel_list,
1062
+ brandData: brand
1063
+ };
1064
+ 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 });
1065
+ })
1066
+ .addCase(verifyNafath.rejected, function (state, action) {
1067
+ state.loading = false;
1068
+ var error = action.error.message;
1069
+ if (error !== 'Aborted') {
1070
+ state.error = error;
1071
+ }
861
1072
  })
862
1073
  .addCase(verifyAuth.fulfilled, function (state, action) {
863
1074
  var _a;
@@ -903,33 +1114,20 @@ export var connectSlice = createSlice({
903
1114
  state.loading = false;
904
1115
  state.error = action.error.message;
905
1116
  })
906
- .addCase(createNIDAuth.fulfilled, function (state, action) {
1117
+ .addCase(updateLeadDOB.fulfilled, function (state, action) {
907
1118
  state.loading = false;
908
1119
  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;
1120
+ var _a = action.payload, formData = _a.formData, leadResponse = _a.leadResponse;
1121
+ state.data.dobData = formData;
1122
+ state.data.dobData.responseBody = leadResponse;
913
1123
  })
914
- .addCase(createNIDAuth.pending, function (state) {
1124
+ .addCase(updateLeadDOB.pending, function (state) {
915
1125
  state.loading = true;
916
1126
  state.error = null;
917
1127
  })
918
- .addCase(createNIDAuth.rejected, function (state, action) {
1128
+ .addCase(updateLeadDOB.rejected, function (state, action) {
919
1129
  state.loading = false;
920
1130
  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
1131
  })
934
1132
  .addCase(updateLeadIndividual.fulfilled, function (state, action) {
935
1133
  var _a, _b, _c;
@@ -995,6 +1193,33 @@ export var connectSlice = createSlice({
995
1193
  .addCase(updateLeadBrandSegment.rejected, function (state, action) {
996
1194
  state.loading = false;
997
1195
  state.error = action.error.message;
1196
+ })
1197
+ .addCase(updateLeadMobile.fulfilled, function (state, action) {
1198
+ state.loading = false;
1199
+ state.error = null;
1200
+ state.data.individualData.mobile = action.payload.leadResponse.contact.phone.number;
1201
+ state.data.individualData.responseBody = action.payload.leadResponse;
1202
+ })
1203
+ .addCase(updateLeadMobile.pending, function (state) {
1204
+ state.loading = true;
1205
+ state.error = null;
1206
+ })
1207
+ .addCase(updateLeadMobile.rejected, function (state, action) {
1208
+ state.loading = false;
1209
+ state.error = action.error.message;
1210
+ })
1211
+ .addCase(skipUpdateLeadMobile.fulfilled, function (state, action) {
1212
+ state.loading = false;
1213
+ state.error = null;
1214
+ state.data.individualData.responseBody = action.payload.leadResponse;
1215
+ })
1216
+ .addCase(skipUpdateLeadMobile.pending, function (state) {
1217
+ state.loading = true;
1218
+ state.error = null;
1219
+ })
1220
+ .addCase(skipUpdateLeadMobile.rejected, function (state, action) {
1221
+ state.loading = false;
1222
+ state.error = action.error.message;
998
1223
  })
999
1224
  .addCase(checkEmailAvailability.fulfilled, function (state, action) {
1000
1225
  var _a;
@@ -1046,7 +1271,7 @@ export var connectSlice = createSlice({
1046
1271
  state.customLoading = false;
1047
1272
  state.error = null;
1048
1273
  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;
1274
+ var _c = data || {}, name = _c.name, contact = _c.contact, brand = _c.brand, identification = _c.identification;
1050
1275
  var _d = contact || {}, email = _d.email, phone = _d.phone;
1051
1276
  var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
1052
1277
  if (!!fullName) {
@@ -1067,8 +1292,6 @@ export var connectSlice = createSlice({
1067
1292
  state.data.brandData.brandName = brand.name.en;
1068
1293
  if (identification === null || identification === void 0 ? void 0 : identification.id)
1069
1294
  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
1295
  })
1073
1296
  .addCase(retrieveLead.pending, function (state) {
1074
1297
  state.customLoading = true;