@tap-payments/auth-jsconnect 2.6.56-test → 2.6.59-test

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 (455) hide show
  1. package/build/@types/app.d.ts +21 -19
  2. package/build/@types/app.js +1 -1
  3. package/build/@types/form.d.ts +21 -21
  4. package/build/@types/theme.d.ts +1 -1
  5. package/build/api/account.d.ts +3 -2
  6. package/build/api/account.js +8 -1
  7. package/build/api/auth.d.ts +18 -11
  8. package/build/api/auth.js +6 -1
  9. package/build/api/availabilityServices.d.ts +3 -3
  10. package/build/api/axios.js +1 -1
  11. package/build/api/board.d.ts +3 -3
  12. package/build/api/brand.d.ts +1 -1
  13. package/build/api/country.d.ts +1 -1
  14. package/build/api/data.d.ts +11 -11
  15. package/build/api/document.d.ts +2 -2
  16. package/build/api/entity.d.ts +8 -8
  17. package/build/api/file.d.ts +1 -1
  18. package/build/api/index.d.ts +5 -3
  19. package/build/api/individual.d.ts +5 -5
  20. package/build/api/init.d.ts +1 -1
  21. package/build/api/lead.d.ts +14 -11
  22. package/build/api/lead.js +1 -1
  23. package/build/api/operator.d.ts +4 -3
  24. package/build/api/operator.js +3 -3
  25. package/build/api/user.d.ts +2 -2
  26. package/build/app/rootReducer.d.ts +1 -0
  27. package/build/app/rootReducer.js +2 -0
  28. package/build/app/settings.d.ts +21 -3
  29. package/build/app/settings.js +4 -3
  30. package/build/app/store.d.ts +6 -4
  31. package/build/components/AnimationFlow/AnimationFlow.d.ts +1 -1
  32. package/build/components/AnimationFlow/BottomSheet.d.ts +1 -1
  33. package/build/components/AnimationFlow/Dialog.d.ts +1 -1
  34. package/build/components/AnimationFlow/Error.d.ts +1 -2
  35. package/build/components/AnimationFlow/Loader.d.ts +1 -2
  36. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
  37. package/build/components/Button/Button.d.ts +1 -1
  38. package/build/components/CheckBox/CheckBox.d.ts +1 -1
  39. package/build/components/Collapse/Collapse.d.ts +1 -2
  40. package/build/components/DatePicker/DatePicker.d.ts +1 -1
  41. package/build/components/ExpandIcon/ExpandIcon.d.ts +1 -2
  42. package/build/components/FileInput/DragAndDrop.d.ts +1 -2
  43. package/build/components/FileInput/UploadInput.d.ts +1 -2
  44. package/build/components/Footer/Footer.d.ts +1 -1
  45. package/build/components/Form/Form.d.ts +1 -1
  46. package/build/components/Input/Input.d.ts +1 -1
  47. package/build/components/InputAdornment/InputAdornment.d.ts +1 -1
  48. package/build/components/List/List.d.ts +1 -1
  49. package/build/components/ListItem/ListItem.d.ts +1 -1
  50. package/build/components/Loader/Loader.d.ts +1 -1
  51. package/build/components/LogoBadge/LogoBadge.d.ts +1 -1
  52. package/build/components/OTPField/OTPField.d.ts +1 -1
  53. package/build/components/OTPTimer/OTPTimer.d.ts +1 -1
  54. package/build/components/ProgressBar/CircularProgressBar.d.ts +1 -2
  55. package/build/components/ProgressBar/ProgressBar.d.ts +1 -1
  56. package/build/components/Providers/ReduxProvider.d.ts +1 -1
  57. package/build/components/Providers/ThemeProvider.d.ts +1 -1
  58. package/build/components/Radio/Radio.d.ts +1 -1
  59. package/build/components/RadioGroup/RadioGroup.d.ts +1 -1
  60. package/build/components/RadioLabel/RadioLabel.d.ts +1 -1
  61. package/build/components/SimpleList/SimpleList.d.ts +1 -1
  62. package/build/components/Slide/Slide.d.ts +1 -1
  63. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
  64. package/build/components/Text/Text.d.ts +1 -1
  65. package/build/components/ToggleButton/ToggleButton.d.ts +1 -1
  66. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
  67. package/build/components/Tooltip/Tooltip.d.ts +1 -1
  68. package/build/components/Warning/Warning.d.ts +1 -1
  69. package/build/constants/api.d.ts +1 -0
  70. package/build/constants/api.js +2 -0
  71. package/build/constants/app.d.ts +11 -1
  72. package/build/constants/app.js +53 -0
  73. package/build/features/app/auth/authStore.d.ts +189 -0
  74. package/build/features/app/auth/authStore.js +729 -0
  75. package/build/features/app/bank/bankStore.d.ts +92 -11
  76. package/build/features/app/bank/bankStore.js +6 -5
  77. package/build/features/app/board/boardStore.d.ts +41 -5
  78. package/build/features/app/board/boardStore.js +1 -1
  79. package/build/features/app/brand/brandStore.d.ts +142 -16
  80. package/build/features/app/brand/brandStore.js +6 -5
  81. package/build/features/app/business/businessStore.d.ts +162 -18
  82. package/build/features/app/business/businessStore.js +38 -29
  83. package/build/features/app/connect/connectStore.d.ts +151 -16
  84. package/build/features/app/connect/connectStore.js +1 -1
  85. package/build/features/app/connectExpress/connectExpressStore.d.ts +261 -27
  86. package/build/features/app/connectExpress/connectExpressStore.js +50 -40
  87. package/build/features/app/entity/entityStore.d.ts +92 -11
  88. package/build/features/app/entity/entityStore.js +6 -5
  89. package/build/features/app/individual/individualStore.d.ts +185 -23
  90. package/build/features/app/individual/individualStore.js +6 -5
  91. package/build/features/app/password/passwordStore.d.ts +112 -13
  92. package/build/features/app/password/passwordStore.js +1 -1
  93. package/build/features/app/signIn/signInStore.d.ts +61 -7
  94. package/build/features/app/signIn/signInStore.js +1 -1
  95. package/build/features/app/tax/taxStore.d.ts +82 -10
  96. package/build/features/app/tax/taxStore.js +6 -5
  97. package/build/features/auth/Auth.d.ts +8 -0
  98. package/build/features/auth/Auth.js +93 -0
  99. package/build/features/auth/index.d.ts +1 -0
  100. package/build/features/auth/index.js +1 -0
  101. package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
  102. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +91 -0
  103. package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +10 -0
  104. package/build/features/auth/screens/AuthenticationList/BrandList.js +81 -0
  105. package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +11 -0
  106. package/build/features/auth/screens/AuthenticationList/EntityList.js +96 -0
  107. package/build/features/auth/screens/AuthenticationList/MerchantList.d.ts +10 -0
  108. package/build/features/auth/screens/AuthenticationList/MerchantList.js +107 -0
  109. package/build/features/auth/screens/AuthenticationList/index.d.ts +3 -0
  110. package/build/features/auth/screens/AuthenticationList/index.js +2 -0
  111. package/build/features/auth/screens/AuthenticationList/validation.d.ts +14 -0
  112. package/build/features/auth/screens/AuthenticationList/validation.js +8 -0
  113. package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
  114. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +105 -0
  115. package/build/features/auth/screens/BusinessCountry/index.d.ts +3 -0
  116. package/build/features/auth/screens/BusinessCountry/index.js +2 -0
  117. package/build/features/auth/screens/CivilID/CivilID.d.ts +5 -0
  118. package/build/features/auth/screens/CivilID/CivilID.js +88 -0
  119. package/build/features/auth/screens/CivilID/IDNumber.d.ts +8 -0
  120. package/build/features/auth/screens/CivilID/IDNumber.js +54 -0
  121. package/build/features/auth/screens/CivilID/index.d.ts +3 -0
  122. package/build/features/auth/screens/CivilID/index.js +2 -0
  123. package/build/features/auth/screens/CivilID/validation.d.ts +8 -0
  124. package/build/features/auth/screens/CivilID/validation.js +4 -0
  125. package/build/features/auth/screens/Mobile/Mobile.d.ts +5 -0
  126. package/build/features/auth/screens/Mobile/Mobile.js +108 -0
  127. package/build/features/auth/screens/Mobile/MobileNumber.d.ts +13 -0
  128. package/build/features/auth/screens/Mobile/MobileNumber.js +158 -0
  129. package/build/features/auth/screens/Mobile/index.d.ts +3 -0
  130. package/build/features/auth/screens/Mobile/index.js +2 -0
  131. package/build/features/auth/screens/Mobile/validation.d.ts +8 -0
  132. package/build/features/auth/screens/Mobile/validation.js +30 -0
  133. package/build/features/auth/screens/NID/DOB.d.ts +6 -0
  134. package/build/features/auth/screens/NID/DOB.js +47 -0
  135. package/build/features/auth/screens/NID/IDNumber.d.ts +7 -0
  136. package/build/features/auth/screens/NID/IDNumber.js +55 -0
  137. package/build/features/auth/screens/NID/NID.d.ts +5 -0
  138. package/build/features/auth/screens/NID/NID.js +92 -0
  139. package/build/features/auth/screens/NID/index.d.ts +3 -0
  140. package/build/features/auth/screens/NID/index.js +2 -0
  141. package/build/features/auth/screens/NID/validation.d.ts +11 -0
  142. package/build/features/auth/screens/NID/validation.js +11 -0
  143. package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
  144. package/build/features/auth/screens/OTP/OTP.js +87 -0
  145. package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
  146. package/build/features/auth/screens/OTP/OTPInput.js +57 -0
  147. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  148. package/build/features/auth/screens/OTP/index.js +2 -0
  149. package/build/features/auth/screens/OTP/validation.d.ts +8 -0
  150. package/build/features/auth/screens/OTP/validation.js +4 -0
  151. package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  152. package/build/features/auth/screens/VerifyPACI/VerifyPACI.js +34 -0
  153. package/build/features/auth/screens/VerifyPACI/index.d.ts +3 -0
  154. package/build/features/auth/screens/VerifyPACI/index.js +2 -0
  155. package/build/features/bank/Bank.d.ts +1 -2
  156. package/build/features/bank/screens/BankDetails/BankDetails.d.ts +1 -2
  157. package/build/features/bank/screens/BankDetails/BankName.d.ts +2 -3
  158. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +2 -3
  159. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +1 -2
  160. package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +2 -3
  161. package/build/features/bank/screens/BankDetails/IBAN.d.ts +1 -2
  162. package/build/features/bank/screens/BankDetails/IBAN.js +1 -1
  163. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  164. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  165. package/build/features/bank/screens/Success/Success.d.ts +1 -1
  166. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  167. package/build/features/bank/screens/Verify/OTPInput.d.ts +1 -1
  168. package/build/features/bank/screens/Verify/Verify.d.ts +1 -1
  169. package/build/features/board/Board.d.ts +1 -2
  170. package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  171. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  172. package/build/features/board/screens/Verify/OTPInput.d.ts +1 -1
  173. package/build/features/board/screens/Verify/Verify.d.ts +1 -1
  174. package/build/features/brand/Brand.d.ts +1 -2
  175. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +15 -58
  176. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +1 -2
  177. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +13 -37
  178. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +1 -2
  179. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +1 -2
  180. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +10 -31
  181. package/build/features/brand/screens/BrandActivities/TAC.d.ts +3 -8
  182. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +2 -3
  183. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +1 -2
  184. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +2 -3
  185. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +1 -1
  186. package/build/features/brand/screens/BrandInfo/BrandName.js +1 -1
  187. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +1 -2
  188. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +1 -2
  189. package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +1 -2
  190. package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +1 -2
  191. package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +1 -2
  192. package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +1 -2
  193. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  194. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  195. package/build/features/brand/screens/Success/Success.d.ts +1 -1
  196. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  197. package/build/features/brand/screens/Verify/OTPInput.d.ts +1 -1
  198. package/build/features/brand/screens/Verify/Verify.d.ts +1 -1
  199. package/build/features/business/Business.d.ts +1 -2
  200. package/build/features/business/screens/Activities/Activities.d.ts +1 -2
  201. package/build/features/business/screens/Activities/ActivitiesList.d.ts +9 -25
  202. package/build/features/business/screens/Activities/LicenseName.d.ts +1 -1
  203. package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -13
  204. package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +1 -1
  205. package/build/features/business/screens/BrandDetails/BrandName.d.ts +1 -1
  206. package/build/features/business/screens/BrandDetails/Header.d.ts +1 -1
  207. package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +1 -1
  208. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +5 -13
  209. package/build/features/business/screens/BusinessType/Article.d.ts +2 -3
  210. package/build/features/business/screens/BusinessType/BusinessType.d.ts +1 -1
  211. package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +1 -1
  212. package/build/features/business/screens/BusinessType/EntityName.d.ts +1 -2
  213. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +1 -2
  214. package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -1
  215. package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -1
  216. package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -28
  217. package/build/features/business/screens/BusinessType/SelectType.d.ts +1 -1
  218. package/build/features/business/screens/BusinessType/Switch.d.ts +1 -1
  219. package/build/features/business/screens/CivilID/CivilID.d.ts +1 -1
  220. package/build/features/business/screens/Customers/CustomerLocations.d.ts +19 -70
  221. package/build/features/business/screens/Customers/Customers.d.ts +1 -1
  222. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +1 -2
  223. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +1 -2
  224. package/build/features/business/screens/Customers/RefundPolicy.d.ts +9 -30
  225. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +1 -2
  226. package/build/features/business/screens/IDBOD/DOB.d.ts +1 -1
  227. package/build/features/business/screens/IDBOD/ID.d.ts +1 -1
  228. package/build/features/business/screens/IDBOD/IDBOD.d.ts +1 -1
  229. package/build/features/business/screens/OTP/OTP.d.ts +1 -1
  230. package/build/features/business/screens/OTP/OTPInput.d.ts +1 -1
  231. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  232. package/build/features/business/screens/Success/Success.d.ts +1 -1
  233. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  234. package/build/features/business/screens/Verify/OTPInput.d.ts +1 -1
  235. package/build/features/business/screens/Verify/Verify.d.ts +1 -1
  236. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  237. package/build/features/connect/Connect.d.ts +1 -2
  238. package/build/features/connect/Connect.js +1 -1
  239. package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +1 -1
  240. package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +1 -2
  241. package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
  242. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +1 -1
  243. package/build/features/connect/screens/CivilID/CivilID.d.ts +1 -1
  244. package/build/features/connect/screens/Individual/Email.d.ts +1 -1
  245. package/build/features/connect/screens/Individual/Email.js +1 -1
  246. package/build/features/connect/screens/Individual/Individual.d.ts +1 -1
  247. package/build/features/connect/screens/Individual/Name.d.ts +1 -1
  248. package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
  249. package/build/features/connect/screens/Merchant/BrandName.d.ts +1 -1
  250. package/build/features/connect/screens/Merchant/BrandName.js +1 -1
  251. package/build/features/connect/screens/Merchant/Merchant.d.ts +1 -1
  252. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -2
  253. package/build/features/connect/screens/Merchant/TAC.d.ts +1 -1
  254. package/build/features/connect/screens/Mobile/Mobile.d.ts +1 -1
  255. package/build/features/connect/screens/Mobile/Title.d.ts +1 -1
  256. package/build/features/connect/screens/NID/DOB.d.ts +1 -2
  257. package/build/features/connect/screens/NID/NID.d.ts +1 -1
  258. package/build/features/connect/screens/OTP/OTP.d.ts +1 -1
  259. package/build/features/connect/screens/OTP/OTPInput.d.ts +1 -1
  260. package/build/features/connect/screens/OperatorError/OperatorError.d.ts +1 -1
  261. package/build/features/connect/screens/ThankYou/ThankYou.d.ts +1 -1
  262. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  263. package/build/features/connectExpress/ConnectExpress.d.ts +1 -2
  264. package/build/features/connectExpress/ConnectExpress.js +1 -1
  265. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +1 -1
  266. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +1 -1
  267. package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +1 -1
  268. package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +1 -1
  269. package/build/features/connectExpress/screens/Brand/Brand.d.ts +1 -1
  270. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
  271. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -1
  272. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +1 -1
  273. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +1 -1
  274. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
  275. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +1 -1
  276. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -1
  277. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +1 -1
  278. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +1 -1
  279. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
  280. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +6 -28
  281. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +3 -8
  282. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +1 -1
  283. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +1 -1
  284. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -1
  285. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +1 -1
  286. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +1 -1
  287. package/build/features/connectExpress/screens/IdentityOTP/OTP.d.ts +1 -1
  288. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +1 -1
  289. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +1 -1
  290. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +2 -2
  291. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +1 -1
  292. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +2 -2
  293. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +1 -1
  294. package/build/features/connectExpress/screens/Mobile/Title.d.ts +1 -1
  295. package/build/features/connectExpress/screens/NID/DOB.d.ts +1 -2
  296. package/build/features/connectExpress/screens/NID/NID.d.ts +1 -1
  297. package/build/features/connectExpress/screens/NID/TAC.d.ts +3 -8
  298. package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -2
  299. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +1 -1
  300. package/build/features/connectExpress/screens/OTP/OTP.d.ts +1 -1
  301. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +1 -1
  302. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  303. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  304. package/build/features/entity/Entity.d.ts +1 -2
  305. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +9 -25
  306. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +1 -1
  307. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +1 -1
  308. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +1 -1
  309. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +1 -2
  310. package/build/features/entity/screens/EntityName/Article.d.ts +2 -3
  311. package/build/features/entity/screens/EntityName/EntityName.d.ts +1 -2
  312. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +15 -58
  313. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +5 -13
  314. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +5 -13
  315. package/build/features/entity/screens/EntityName/LegalName.d.ts +1 -1
  316. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +1 -2
  317. package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +1 -1
  318. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +1 -1
  319. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  320. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  321. package/build/features/entity/screens/Success/Success.d.ts +1 -1
  322. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  323. package/build/features/entity/screens/Verify/OTPInput.d.ts +1 -1
  324. package/build/features/entity/screens/Verify/Verify.d.ts +1 -1
  325. package/build/features/featuresScreens.d.ts +1 -0
  326. package/build/features/featuresScreens.js +40 -3
  327. package/build/features/individual/Individual.d.ts +1 -2
  328. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +5 -13
  329. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +2 -3
  330. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +1 -1
  331. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
  332. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -2
  333. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +5 -27
  334. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +1 -1
  335. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +1 -1
  336. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +1 -2
  337. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
  338. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +1 -1
  339. package/build/features/individual/screens/IndividualList/Email.d.ts +1 -1
  340. package/build/features/individual/screens/IndividualList/Email.js +1 -1
  341. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +9 -25
  342. package/build/features/individual/screens/IndividualList/UserList.d.ts +1 -2
  343. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
  344. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +1 -1
  345. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
  346. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +6 -28
  347. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +1 -1
  348. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +5 -13
  349. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +1 -1
  350. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +1 -1
  351. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  352. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  353. package/build/features/individual/screens/Success/Success.d.ts +1 -1
  354. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  355. package/build/features/individual/screens/Verify/OTPInput.d.ts +1 -1
  356. package/build/features/individual/screens/Verify/Verify.d.ts +1 -1
  357. package/build/features/password/Password.d.ts +1 -2
  358. package/build/features/password/screens/CreatePassword/ConditionText.d.ts +1 -2
  359. package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +1 -1
  360. package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +1 -1
  361. package/build/features/password/screens/CreatePassword/Password.d.ts +1 -1
  362. package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +1 -2
  363. package/build/features/password/screens/OTP/OTP.d.ts +1 -1
  364. package/build/features/password/screens/OTP/OTPInput.d.ts +1 -1
  365. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  366. package/build/features/password/screens/Success/Success.d.ts +1 -1
  367. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  368. package/build/features/password/screens/Verify/OTPInput.d.ts +1 -1
  369. package/build/features/password/screens/Verify/Verify.d.ts +1 -1
  370. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.d.ts +1 -2
  371. package/build/features/shared/Address/Address.d.ts +1 -2
  372. package/build/features/shared/Address/CountryList.d.ts +14 -46
  373. package/build/features/shared/Address/InputSelect.d.ts +14 -46
  374. package/build/features/shared/Address/InputSelect.js +1 -1
  375. package/build/features/shared/Address/InputText.d.ts +1 -1
  376. package/build/features/shared/Background/Background.d.ts +1 -1
  377. package/build/features/shared/Background/LogoBackground.d.ts +1 -1
  378. package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.d.ts +1 -2
  379. package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +1 -2
  380. package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
  381. package/build/features/shared/Button/AbsherButton.d.ts +1 -2
  382. package/build/features/shared/Button/Button.d.ts +1 -2
  383. package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -3
  384. package/build/features/shared/Button/FlowsButtons.d.ts +2 -3
  385. package/build/features/shared/Button/FlowsButtons.js +1 -1
  386. package/build/features/shared/Button/IndividualActionButtons.d.ts +2 -2
  387. package/build/features/shared/Button/MobileButton.d.ts +1 -2
  388. package/build/features/shared/Button/SuccessButton.d.ts +1 -2
  389. package/build/features/shared/Calender/Calender.d.ts +1 -2
  390. package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -3
  391. package/build/features/shared/Chip/Chip.d.ts +1 -2
  392. package/build/features/shared/ClearIcon/ClearIcon.d.ts +1 -2
  393. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
  394. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  395. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +1 -1
  396. package/build/features/shared/DataLoading/DataLoading.d.ts +1 -1
  397. package/build/features/shared/Dialog/CloseDialog.d.ts +1 -2
  398. package/build/features/shared/Dialog/DialogContainer.d.ts +1 -1
  399. package/build/features/shared/Dot/Dot.d.ts +1 -2
  400. package/build/features/shared/EndAdornment/EndAdornment.d.ts +1 -2
  401. package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +1 -2
  402. package/build/features/shared/Footer/Footer.d.ts +1 -2
  403. package/build/features/shared/Footer/PoweredByFooter.d.ts +2 -3
  404. package/build/features/shared/GenericError/GenericError.d.ts +1 -1
  405. package/build/features/shared/Input/Input.d.ts +6 -14
  406. package/build/features/shared/InputSelect/InputSelect.d.ts +1 -2
  407. package/build/features/shared/Mandatory/Mandatory.d.ts +1 -2
  408. package/build/features/shared/OTP/OTP.d.ts +1 -1
  409. package/build/features/shared/PaciVerification/PaciVerification.d.ts +1 -1
  410. package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +1 -2
  411. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +1 -2
  412. package/build/features/shared/SalesChannels/SalesChannel.d.ts +1 -1
  413. package/build/features/shared/Search/Search.d.ts +1 -2
  414. package/build/features/shared/SearchIcon/SearchIcon.d.ts +1 -2
  415. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -1
  416. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
  417. package/build/features/shared/UploadFile/FileUpload.d.ts +4 -9
  418. package/build/features/shared/UploadFile/FileUpload.js +1 -1
  419. package/build/features/shared/UploadFile/UploadFile.d.ts +3 -8
  420. package/build/features/shared/UploadFile/UploadWrapper.d.ts +3 -8
  421. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +4 -9
  422. package/build/features/shared/UploadMultipleFile/UploadFile.js +1 -1
  423. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +3 -8
  424. package/build/features/signIn/SignIn.d.ts +1 -2
  425. package/build/features/signIn/screens/Email/Email.d.ts +1 -1
  426. package/build/features/signIn/screens/Mobile/Mobile.d.ts +1 -1
  427. package/build/features/signIn/screens/OTP/OTP.d.ts +1 -1
  428. package/build/features/signIn/screens/OTP/OTPInput.d.ts +1 -1
  429. package/build/features/signIn/screens/Password/Password.d.ts +1 -1
  430. package/build/features/signIn/screens/Password/PasswordInput.d.ts +1 -1
  431. package/build/features/tax/Tax.d.ts +1 -2
  432. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  433. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  434. package/build/features/tax/screens/Success/Success.d.ts +1 -1
  435. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  436. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +2 -3
  437. package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +1 -2
  438. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +1 -2
  439. package/build/features/tax/screens/TaxDetails/VATId.d.ts +2 -3
  440. package/build/features/tax/screens/Verify/OTPInput.d.ts +1 -1
  441. package/build/features/tax/screens/Verify/Verify.d.ts +1 -1
  442. package/build/hooks/useAppDispatch.d.ts +1 -0
  443. package/build/hooks/useDataVerified.d.ts +1 -1
  444. package/build/hooks/useExcludeReadOnlyFelids.d.ts +2 -2
  445. package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +2 -2
  446. package/build/hooks/useFormReadOnly.d.ts +2 -2
  447. package/build/hooks/useSetFromDefaultValues.d.ts +1 -1
  448. package/build/index.d.ts +3 -2
  449. package/build/index.js +3 -1
  450. package/build/utils/array.js +1 -1
  451. package/build/utils/common.d.ts +1 -0
  452. package/build/utils/common.js +8 -1
  453. package/build/utils/string.d.ts +1 -0
  454. package/build/utils/string.js +3 -0
  455. package/package.json +1 -1
@@ -0,0 +1,729 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ var _a;
49
+ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
+ import { AuthForType, FlowsTypes } from '../../../@types';
51
+ import { AUTH_STEP_NAMES, IDENTIFICATION_TYPE, defaultCountry } from '../../../constants';
52
+ import API from '../../../api';
53
+ import { handleCurrentActiveScreen, handleNextScreenStep, handleOpen, handleSetCountryByIso2 } from '../../../app/settings';
54
+ import { findCountryByIddPrefix, isSA, openConnect, sleep } from '../../../utils';
55
+ export var updateBusinessCountry = createAsyncThunk('auth/updateBusinessCountry', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
+ var auth, payload, data;
57
+ return __generator(this, function (_a) {
58
+ switch (_a.label) {
59
+ case 0:
60
+ auth = thunkApi.getState().auth;
61
+ payload = {
62
+ id: auth.data.leadId || '',
63
+ country_code: countryCode,
64
+ encryption_contract: []
65
+ };
66
+ return [4, API.leadService.updateLead(payload)];
67
+ case 1:
68
+ data = _a.sent();
69
+ return [2, data];
70
+ }
71
+ });
72
+ }); });
73
+ export var retrieveLeadIdentityByIdAsync = createAsyncThunk('auth/retrieveLeadIdentityByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
74
+ var settingData, countryCode, data, _a, country_code, contact, phone;
75
+ var _b, _c;
76
+ return __generator(this, function (_d) {
77
+ switch (_d.label) {
78
+ case 0:
79
+ settingData = thunkApi.getState().settings.data;
80
+ countryCode = settingData.businessCountry;
81
+ return [4, API.leadService.retrieveLeadIdentity(leadId)];
82
+ case 1:
83
+ data = _d.sent();
84
+ _a = data || {}, country_code = _a.country_code, contact = _a.contact;
85
+ if (country_code)
86
+ thunkApi.dispatch(handleSetCountryByIso2(country_code));
87
+ phone = (contact || {}).phone;
88
+ if (phone === null || phone === void 0 ? void 0 : phone.country_code)
89
+ countryCode = findCountryByIddPrefix(settingData.countries, phone.country_code);
90
+ if (!(data === null || data === void 0 ? void 0 : data.country_code) && !((_b = settingData.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2)) {
91
+ thunkApi.dispatch(handleCurrentActiveScreen('AUTH_BUSINESS_COUNTRY_STEP'));
92
+ return [2, { data: data, countryCode: countryCode }];
93
+ }
94
+ if ((data === null || data === void 0 ? void 0 : data.country_code) && !((_c = settingData.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2)) {
95
+ thunkApi.dispatch(handleSetCountryByIso2(data.country_code));
96
+ if (!isSA(data.country_code))
97
+ thunkApi.dispatch(handleCurrentActiveScreen('AUTH_MOBILE_STEP'));
98
+ return [2, { data: data, countryCode: countryCode }];
99
+ }
100
+ if (!isSA(settingData.businessCountry.iso2)) {
101
+ thunkApi.dispatch(handleCurrentActiveScreen('AUTH_MOBILE_STEP'));
102
+ return [2, { data: data, countryCode: countryCode }];
103
+ }
104
+ return [2, { data: data, countryCode: countryCode }];
105
+ }
106
+ });
107
+ }); });
108
+ export var createMobileAuth = createAsyncThunk('auth/createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
109
+ var _a, settings, auth, requestBody, data;
110
+ var _b, _c;
111
+ return __generator(this, function (_d) {
112
+ switch (_d.label) {
113
+ case 0:
114
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
115
+ requestBody = {
116
+ country: settings.data.businessCountry.iso2,
117
+ scope: settings.data.appConfig.scope,
118
+ lang: settings.data.language,
119
+ lead_id: auth.data.leadId,
120
+ user_credentail: {
121
+ phone: params.mobile || '',
122
+ code: params.countryCode.idd_prefix.toString()
123
+ },
124
+ sign_in: false,
125
+ is_lead: true,
126
+ step_name: AUTH_STEP_NAMES.CREATE_AUTH_MOBILE,
127
+ encryption_contract: ['user_credentail.phone', 'user_credentail.code']
128
+ };
129
+ return [4, API.authService.createAuth(requestBody)];
130
+ case 1:
131
+ data = _d.sent();
132
+ thunkApi.dispatch(handleNextScreenStep());
133
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
134
+ return [2, { response: data, formData: params }];
135
+ }
136
+ });
137
+ }); });
138
+ export var resendMobileAuthOTP = createAsyncThunk('auth/resendMobileAuthOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
139
+ var _a, settings, auth, requestBody, data;
140
+ return __generator(this, function (_b) {
141
+ switch (_b.label) {
142
+ case 0:
143
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
144
+ requestBody = {
145
+ country: settings.data.businessCountry.iso2,
146
+ scope: settings.data.appConfig.scope,
147
+ lang: settings.data.language,
148
+ lead_id: auth.data.leadId,
149
+ user_credentail: {
150
+ phone: params.mobile,
151
+ code: params.countryCode.idd_prefix.toString()
152
+ },
153
+ sign_in: false,
154
+ is_lead: true,
155
+ step_name: AUTH_STEP_NAMES.CREATE_AUTH_MOBILE,
156
+ encryption_contract: ['user_credentail.phone', 'user_credentail.code']
157
+ };
158
+ return [4, API.authService.createAuth(requestBody)];
159
+ case 1:
160
+ data = _b.sent();
161
+ return [2, { response: data, formData: params }];
162
+ }
163
+ });
164
+ }); });
165
+ export var verifyMobileOtp = createAsyncThunk('auth/verifyMobileOtp', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
166
+ var _a, settings, auth, _b, responseData, leadId, _c, auth_token, device_token, service_name, authData, isDataHasIndividualOnly, payload, data, accountData, _d, step_name, brands, entities, brandList, entityList, isExistingUser, authId;
167
+ var _e, _f, _g, _h;
168
+ return __generator(this, function (_j) {
169
+ switch (_j.label) {
170
+ case 0:
171
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
172
+ _b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
173
+ _c = (_e = responseData === null || responseData === void 0 ? void 0 : responseData.authResponse) !== null && _e !== void 0 ? _e : {}, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name;
174
+ if (!auth_token)
175
+ throw new Error('Auth token is missing');
176
+ authData = settings.data.appConfig.data;
177
+ isDataHasIndividualOnly = (authData === null || authData === void 0 ? void 0 : authData.length) === 1 && authData.includes('individual');
178
+ payload = {
179
+ auth_token: auth_token,
180
+ lead_id: leadId,
181
+ data: params.otp,
182
+ auth_type: 2,
183
+ device_token: device_token,
184
+ service_name: service_name,
185
+ sign_in: false,
186
+ step_name: AUTH_STEP_NAMES.VERIFY_AUTH_MOBILE,
187
+ encryption_contract: ['data']
188
+ };
189
+ return [4, API.authService.verifyAuth(payload)];
190
+ case 1:
191
+ data = (_j.sent()).data;
192
+ if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
193
+ throw new Error(data.errors[0].description);
194
+ return [4, API.accountService.checkAccountAvailability(data.individual_id)];
195
+ case 2:
196
+ accountData = _j.sent();
197
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, params);
198
+ _d = accountData || {}, step_name = _d.step_name, brands = _d.brands, entities = _d.entities;
199
+ brandList = brands || [];
200
+ entityList = entities || [];
201
+ isExistingUser = step_name === 'select_account';
202
+ authId = data.id;
203
+ if (!(isExistingUser && isDataHasIndividualOnly && authId)) return [3, 4];
204
+ return [4, thunkApi.dispatch(confirmInfo({ authId: authId }))];
205
+ case 3:
206
+ _j.sent();
207
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
208
+ case 4:
209
+ if (isExistingUser && !isDataHasIndividualOnly && brandList.length && entityList.length) {
210
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_AUTHENTICATION_LIST_STEP')); });
211
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
212
+ }
213
+ openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
214
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
215
+ }
216
+ });
217
+ }); });
218
+ export var createNIDAuth = createAsyncThunk('auth/createNIDAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
219
+ var _a, settings, auth, dob, nid, nidType, countryCode, requestBody, data;
220
+ var _b, _c;
221
+ return __generator(this, function (_d) {
222
+ switch (_d.label) {
223
+ case 0:
224
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
225
+ dob = params.dob, nid = params.nid;
226
+ nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
227
+ countryCode = settings.data.businessCountry.iso2;
228
+ requestBody = {
229
+ country: countryCode,
230
+ scope: settings.data.appConfig.scope,
231
+ lang: settings.data.language,
232
+ lead_id: auth.data.leadId,
233
+ user_credentail: {
234
+ identification_id: nid,
235
+ identification_id_type: nidType,
236
+ date_of_birth: dob,
237
+ country_code: countryCode
238
+ },
239
+ sign_in: false,
240
+ is_lead: true,
241
+ step_name: AUTH_STEP_NAMES.CREATE_AUTH_NID,
242
+ encryption_contract: [
243
+ 'user_credentail.country_code',
244
+ 'user_credentail.identification_id',
245
+ 'user_credentail.identification_id_type',
246
+ 'user_credentail.date_of_birth'
247
+ ]
248
+ };
249
+ return [4, API.authService.createAuth(requestBody)];
250
+ case 1:
251
+ data = _d.sent();
252
+ thunkApi.dispatch(handleNextScreenStep());
253
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
254
+ return [2, { response: data, formData: params }];
255
+ }
256
+ });
257
+ }); });
258
+ export var resendNIDAuthOTP = createAsyncThunk('auth/resendNIDAuthOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
259
+ var _a, settings, auth, dob, nid, nidType, countryCode, requestBody, data;
260
+ return __generator(this, function (_b) {
261
+ switch (_b.label) {
262
+ case 0:
263
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
264
+ dob = params.dob, nid = params.nid;
265
+ nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
266
+ countryCode = settings.data.businessCountry.iso2;
267
+ requestBody = {
268
+ country: countryCode,
269
+ scope: settings.data.appConfig.scope,
270
+ lang: settings.data.language,
271
+ lead_id: auth.data.leadId,
272
+ user_credentail: {
273
+ identification_id: nid,
274
+ identification_id_type: nidType,
275
+ date_of_birth: dob,
276
+ country_code: countryCode
277
+ },
278
+ sign_in: false,
279
+ is_lead: true,
280
+ step_name: AUTH_STEP_NAMES.CREATE_AUTH_NID,
281
+ encryption_contract: [
282
+ 'user_credentail.country_code',
283
+ 'user_credentail.identification_id',
284
+ 'user_credentail.identification_id_type',
285
+ 'user_credentail.date_of_birth'
286
+ ]
287
+ };
288
+ return [4, API.authService.createAuth(requestBody)];
289
+ case 1:
290
+ data = _b.sent();
291
+ return [2, { response: data, formData: params }];
292
+ }
293
+ });
294
+ }); });
295
+ export var verifyNIDOtp = createAsyncThunk('auth/verifyNIDOtp', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
296
+ var _a, settings, auth, _b, responseData, leadId, _c, auth_token, device_token, service_name, authData, isDataHasIndividualOnly, payload, data, accountData, _d, step_name, brands, entities, brandList, entityList, isExistingUser, authId;
297
+ var _e, _f, _g, _h;
298
+ return __generator(this, function (_j) {
299
+ switch (_j.label) {
300
+ case 0:
301
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
302
+ _b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
303
+ _c = (_e = responseData === null || responseData === void 0 ? void 0 : responseData.authResponse) !== null && _e !== void 0 ? _e : {}, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name;
304
+ if (!auth_token)
305
+ throw new Error('Auth token is missing');
306
+ authData = settings.data.appConfig.data;
307
+ isDataHasIndividualOnly = (authData === null || authData === void 0 ? void 0 : authData.length) === 1 && authData.includes('individual');
308
+ payload = {
309
+ auth_token: auth_token,
310
+ lead_id: leadId,
311
+ data: params.otp,
312
+ auth_type: 2,
313
+ device_token: device_token,
314
+ service_name: service_name || 'ABSHER',
315
+ sign_in: false,
316
+ step_name: AUTH_STEP_NAMES.VERIFY_AUTH_NID,
317
+ encryption_contract: ['data']
318
+ };
319
+ return [4, API.authService.verifyAuth(payload)];
320
+ case 1:
321
+ data = (_j.sent()).data;
322
+ if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
323
+ throw new Error(data.errors[0].description);
324
+ return [4, API.accountService.checkAccountAvailability(data.individual_id)];
325
+ case 2:
326
+ accountData = _j.sent();
327
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, params);
328
+ _d = accountData || {}, step_name = _d.step_name, brands = _d.brands, entities = _d.entities;
329
+ brandList = brands || [];
330
+ entityList = entities || [];
331
+ isExistingUser = step_name === 'select_account';
332
+ authId = data.id;
333
+ if (!(isExistingUser && isDataHasIndividualOnly && authId)) return [3, 4];
334
+ return [4, thunkApi.dispatch(confirmInfo({ authId: authId }))];
335
+ case 3:
336
+ _j.sent();
337
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
338
+ case 4:
339
+ if (isExistingUser && !isDataHasIndividualOnly && brandList.length && entityList.length) {
340
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_AUTHENTICATION_LIST_STEP')); });
341
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
342
+ }
343
+ openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
344
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
345
+ }
346
+ });
347
+ }); });
348
+ export var createCivilIdAuth = createAsyncThunk('auth/createCivilAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
349
+ var settings, countryCode, requestBody, data;
350
+ var _a, _b;
351
+ return __generator(this, function (_c) {
352
+ switch (_c.label) {
353
+ case 0:
354
+ settings = thunkApi.getState().settings;
355
+ countryCode = settings.data.businessCountry.iso2;
356
+ requestBody = {
357
+ country: settings.data.businessCountry.iso2,
358
+ scope: settings.data.appConfig.scope,
359
+ lang: settings.data.language,
360
+ user_credentail: {
361
+ identification_id: params.civilId,
362
+ country_code: countryCode
363
+ },
364
+ sign_in: false,
365
+ is_lead: true,
366
+ step_name: AUTH_STEP_NAMES.CREATE_AUTH_CIVIL_ID,
367
+ encryption_contract: ['user_credentail.identification_id']
368
+ };
369
+ return [4, API.authService.createAuth(requestBody)];
370
+ case 1:
371
+ data = _c.sent();
372
+ thunkApi.dispatch(handleNextScreenStep());
373
+ (_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
374
+ return [2, { response: data, formData: params }];
375
+ }
376
+ });
377
+ }); });
378
+ export var verifyPACI = createAsyncThunk('auth/verifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
379
+ var _a, settings, auth, authResponse, authConfigData, isDataHasIndividualOnly, expiry, interval, maxCalls, count, data, isSuccess, authId, accountData, _b, step_name, brands, entities, brandList, entityList, isExistingUser;
380
+ var _c;
381
+ return __generator(this, function (_d) {
382
+ switch (_d.label) {
383
+ case 0:
384
+ _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
385
+ authResponse = (auth.data.responseData || {}).authResponse;
386
+ authConfigData = settings.data.appConfig.data;
387
+ isDataHasIndividualOnly = (authConfigData === null || authConfigData === void 0 ? void 0 : authConfigData.length) === 1 && authConfigData.includes('individual');
388
+ expiry = (authResponse === null || authResponse === void 0 ? void 0 : authResponse.expiry) || 120;
389
+ interval = 3;
390
+ maxCalls = Math.floor(expiry / interval);
391
+ count = 1;
392
+ _d.label = 1;
393
+ case 1:
394
+ if (!(count <= maxCalls)) return [3, 9];
395
+ if (thunkApi.signal.aborted) {
396
+ return [3, 9];
397
+ }
398
+ return [4, API.authService.getVerifyAuth(authResponse === null || authResponse === void 0 ? void 0 : authResponse.auth_token)];
399
+ case 2:
400
+ data = _d.sent();
401
+ isSuccess = ((_c = data === null || data === void 0 ? void 0 : data.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'success';
402
+ if (!isSuccess) return [3, 6];
403
+ authId = data.id;
404
+ return [4, API.accountService.checkAccountAvailability(data.individual_id)];
405
+ case 3:
406
+ accountData = _d.sent();
407
+ _b = accountData || {}, step_name = _b.step_name, brands = _b.brands, entities = _b.entities;
408
+ brandList = brands || [];
409
+ entityList = entities || [];
410
+ isExistingUser = step_name === 'select_account';
411
+ if (!(isExistingUser && isDataHasIndividualOnly && authId)) return [3, 5];
412
+ return [4, thunkApi.dispatch(confirmInfo({ authId: authId }))];
413
+ case 4:
414
+ _d.sent();
415
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
416
+ case 5:
417
+ if (isExistingUser && !isDataHasIndividualOnly && brandList.length && entityList.length) {
418
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_AUTHENTICATION_LIST_STEP')); });
419
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
420
+ }
421
+ openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
422
+ return [2, { data: data, brandList: brandList, entityList: entityList }];
423
+ case 6: return [4, sleep(interval * 1000)];
424
+ case 7:
425
+ _d.sent();
426
+ _d.label = 8;
427
+ case 8:
428
+ count++;
429
+ return [3, 1];
430
+ case 9: throw new Error('paci_verification_failed');
431
+ }
432
+ });
433
+ }); });
434
+ export var getMerchantList = createAsyncThunk('auth/getMerchantList', function (entityId) { return __awaiter(void 0, void 0, void 0, function () {
435
+ var merchants;
436
+ return __generator(this, function (_a) {
437
+ switch (_a.label) {
438
+ case 0: return [4, API.entityService.getMerchantListUsingEntityId(entityId)];
439
+ case 1:
440
+ merchants = (_a.sent()).merchants;
441
+ return [2, merchants || []];
442
+ }
443
+ });
444
+ }); });
445
+ export var confirmInfo = createAsyncThunk('auth/confirmInfo', function (_a, thunkApi) {
446
+ var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo, authId = _a.authId;
447
+ return __awaiter(void 0, void 0, void 0, function () {
448
+ var _b, auth, settings, authResponse, _c, postURL, redirectUrl, bi, authenticationId, body, data, urlQueryStart;
449
+ var _d, _e, _f;
450
+ return __generator(this, function (_g) {
451
+ switch (_g.label) {
452
+ case 0:
453
+ _b = thunkApi.getState(), auth = _b.auth, settings = _b.settings;
454
+ authResponse = ((_d = auth.data.responseData) !== null && _d !== void 0 ? _d : {}).authResponse;
455
+ _c = settings.data.appConfig, postURL = _c.postURL, redirectUrl = _c.redirectUrl;
456
+ bi = settings.data.deviceInfo.browser.browser_id;
457
+ authenticationId = authId || (authResponse === null || authResponse === void 0 ? void 0 : authResponse.id);
458
+ body = {
459
+ post_url: postURL || '',
460
+ authentication_id: authenticationId,
461
+ bi: bi,
462
+ brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
463
+ merchant_id: (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.id) || '',
464
+ entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
465
+ data: settings.data.appConfig.data || []
466
+ };
467
+ return [4, API.operatorService.confirm(body)];
468
+ case 1:
469
+ data = _g.sent();
470
+ (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, data);
471
+ if (authenticationId) {
472
+ if (settings.data.appConfig.mode === 'popup') {
473
+ settings.data.appConfig.onFlowCompleted({ auth_id: authenticationId, bi: bi });
474
+ thunkApi.dispatch(handleOpen(false));
475
+ return [2];
476
+ }
477
+ if (redirectUrl) {
478
+ urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
479
+ window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authenticationId, "&bi=").concat(bi), '_self');
480
+ }
481
+ }
482
+ return [2];
483
+ }
484
+ });
485
+ });
486
+ });
487
+ var initialState = {
488
+ error: null,
489
+ loading: false,
490
+ customLoading: false,
491
+ data: {
492
+ isStartFromBusinessCountry: false,
493
+ flowName: FlowsTypes.AUTH,
494
+ mobileData: {
495
+ countryCode: defaultCountry,
496
+ mobile: '',
497
+ termAndConditionChecked: false
498
+ },
499
+ nidData: {
500
+ nid: '',
501
+ dob: '',
502
+ termAndConditionChecked: false
503
+ },
504
+ civilIdData: {
505
+ civilId: ''
506
+ },
507
+ otpData: {
508
+ otp: '',
509
+ authFor: AuthForType.MOBILE
510
+ },
511
+ authenticationData: {
512
+ brandInfo: undefined,
513
+ entityInfo: undefined,
514
+ merchantInfo: undefined
515
+ }
516
+ }
517
+ };
518
+ export var authSlice = createSlice({
519
+ name: 'auth/store',
520
+ initialState: initialState,
521
+ reducers: {
522
+ setLeadId: function (state, action) {
523
+ state.data.leadId = action.payload;
524
+ },
525
+ setMobileCountryCode: function (state, action) {
526
+ state.data.mobileData.countryCode = action.payload;
527
+ },
528
+ clearError: function (state) {
529
+ state.error = null;
530
+ },
531
+ storeIsStartFromBusinessCountry: function (state, action) {
532
+ state.data.isStartFromBusinessCountry = action.payload;
533
+ },
534
+ resetStore: function (state) {
535
+ state.data = __assign(__assign({}, state.data), { responseData: undefined });
536
+ },
537
+ resetOTPValue: function (state) {
538
+ state.data.otpData.otp = '';
539
+ }
540
+ },
541
+ extraReducers: function (builder) {
542
+ builder
543
+ .addCase(updateBusinessCountry.pending, function (state) {
544
+ state.loading = true;
545
+ state.error = null;
546
+ })
547
+ .addCase(updateBusinessCountry.rejected, function (state, action) {
548
+ state.loading = false;
549
+ state.error = action.error.message;
550
+ })
551
+ .addCase(updateBusinessCountry.fulfilled, function (state) {
552
+ state.loading = false;
553
+ state.error = null;
554
+ })
555
+ .addCase(retrieveLeadIdentityByIdAsync.pending, function (state) {
556
+ state.error = null;
557
+ state.customLoading = true;
558
+ })
559
+ .addCase(retrieveLeadIdentityByIdAsync.fulfilled, function (state, action) {
560
+ state.customLoading = false;
561
+ var _a = action.payload, data = _a.data, countryCode = _a.countryCode;
562
+ var _b = data || {}, identification = _b.identification, date_of_birth = _b.date_of_birth, contact = _b.contact;
563
+ if (identification === null || identification === void 0 ? void 0 : identification.id)
564
+ state.data.nidData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
565
+ if (date_of_birth)
566
+ state.data.nidData.dob = date_of_birth;
567
+ var phone = (contact || {}).phone;
568
+ if (phone) {
569
+ state.data.mobileData.mobile = phone === null || phone === void 0 ? void 0 : phone.number;
570
+ state.data.mobileData.countryCode = countryCode;
571
+ }
572
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { leadResponse: data });
573
+ })
574
+ .addCase(retrieveLeadIdentityByIdAsync.rejected, function (state, action) {
575
+ state.customLoading = false;
576
+ state.error = action.error.message;
577
+ })
578
+ .addCase(createMobileAuth.pending, function (state) {
579
+ state.loading = true;
580
+ state.error = null;
581
+ })
582
+ .addCase(createMobileAuth.fulfilled, function (state, action) {
583
+ state.loading = false;
584
+ state.data.mobileData = action.payload.formData;
585
+ state.data.otpData.authFor = AuthForType.MOBILE;
586
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
587
+ })
588
+ .addCase(createMobileAuth.rejected, function (state, action) {
589
+ state.loading = false;
590
+ state.error = action.error.message;
591
+ })
592
+ .addCase(resendMobileAuthOTP.pending, function (state) {
593
+ state.error = null;
594
+ })
595
+ .addCase(resendMobileAuthOTP.fulfilled, function (state, action) {
596
+ state.data.mobileData = action.payload.formData;
597
+ state.data.otpData.authFor = AuthForType.MOBILE;
598
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
599
+ })
600
+ .addCase(resendMobileAuthOTP.rejected, function (state, action) {
601
+ state.error = action.error.message;
602
+ })
603
+ .addCase(verifyMobileOtp.pending, function (state) {
604
+ state.loading = true;
605
+ state.error = null;
606
+ })
607
+ .addCase(verifyMobileOtp.fulfilled, function (state, action) {
608
+ var _a;
609
+ state.loading = false;
610
+ var _b = action.payload, data = _b.data, brandList = _b.brandList, entityList = _b.entityList;
611
+ if (brandList === null || brandList === void 0 ? void 0 : brandList.length)
612
+ state.data.authenticationData.brandInfo = brandList[0];
613
+ if (entityList === null || entityList === void 0 ? void 0 : entityList.length)
614
+ state.data.authenticationData.entityInfo = entityList[0];
615
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authResponse), data), brandList: brandList, entityList: entityList });
616
+ })
617
+ .addCase(verifyMobileOtp.rejected, function (state, action) {
618
+ state.loading = false;
619
+ state.error = action.error.message;
620
+ })
621
+ .addCase(createNIDAuth.pending, function (state) {
622
+ state.loading = true;
623
+ state.error = null;
624
+ })
625
+ .addCase(createNIDAuth.fulfilled, function (state, action) {
626
+ state.loading = false;
627
+ state.data.nidData = action.payload.formData;
628
+ state.data.otpData.authFor = AuthForType.NATIONAL_ID;
629
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
630
+ })
631
+ .addCase(createNIDAuth.rejected, function (state, action) {
632
+ state.loading = false;
633
+ state.error = action.error.message;
634
+ })
635
+ .addCase(resendNIDAuthOTP.pending, function (state) {
636
+ state.error = null;
637
+ })
638
+ .addCase(resendNIDAuthOTP.fulfilled, function (state, action) {
639
+ state.data.nidData = action.payload.formData;
640
+ state.data.otpData.authFor = AuthForType.NATIONAL_ID;
641
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
642
+ })
643
+ .addCase(resendNIDAuthOTP.rejected, function (state, action) {
644
+ state.error = action.error.message;
645
+ })
646
+ .addCase(verifyNIDOtp.pending, function (state) {
647
+ state.loading = true;
648
+ state.error = null;
649
+ })
650
+ .addCase(verifyNIDOtp.fulfilled, function (state, action) {
651
+ var _a;
652
+ state.loading = false;
653
+ var _b = action.payload, data = _b.data, brandList = _b.brandList, entityList = _b.entityList;
654
+ if (brandList === null || brandList === void 0 ? void 0 : brandList.length)
655
+ state.data.authenticationData.brandInfo = brandList[0];
656
+ if (entityList === null || entityList === void 0 ? void 0 : entityList.length)
657
+ state.data.authenticationData.entityInfo = entityList[0];
658
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authResponse), data), brandList: brandList, entityList: entityList });
659
+ })
660
+ .addCase(verifyNIDOtp.rejected, function (state, action) {
661
+ state.loading = false;
662
+ state.error = action.error.message;
663
+ })
664
+ .addCase(createCivilIdAuth.pending, function (state) {
665
+ state.loading = true;
666
+ state.error = null;
667
+ })
668
+ .addCase(createCivilIdAuth.fulfilled, function (state, action) {
669
+ state.loading = false;
670
+ state.data.civilIdData = action.payload.formData;
671
+ state.data.otpData.authFor = AuthForType.NATIONAL_ID;
672
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
673
+ })
674
+ .addCase(createCivilIdAuth.rejected, function (state, action) {
675
+ state.loading = false;
676
+ state.error = action.error.message;
677
+ })
678
+ .addCase(verifyPACI.pending, function (state) {
679
+ state.loading = true;
680
+ state.error = null;
681
+ })
682
+ .addCase(verifyPACI.fulfilled, function (state, action) {
683
+ var _a;
684
+ state.loading = false;
685
+ var _b = action.payload, data = _b.data, brandList = _b.brandList, entityList = _b.entityList;
686
+ if (brandList === null || brandList === void 0 ? void 0 : brandList.length)
687
+ state.data.authenticationData.brandInfo = brandList[0];
688
+ if (entityList === null || entityList === void 0 ? void 0 : entityList.length)
689
+ state.data.authenticationData.entityInfo = entityList[0];
690
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authResponse), data), brandList: brandList, entityList: entityList });
691
+ })
692
+ .addCase(verifyPACI.rejected, function (state, action) {
693
+ state.loading = false;
694
+ state.error = action.error.message;
695
+ })
696
+ .addCase(getMerchantList.pending, function (state) {
697
+ state.merchantLoading = true;
698
+ state.error = null;
699
+ })
700
+ .addCase(getMerchantList.fulfilled, function (state, action) {
701
+ state.merchantLoading = false;
702
+ state.error = null;
703
+ var merchantList = action.payload;
704
+ if (merchantList === null || merchantList === void 0 ? void 0 : merchantList.length) {
705
+ state.data.authenticationData.merchantInfo = merchantList[0];
706
+ }
707
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { merchantList: merchantList });
708
+ })
709
+ .addCase(getMerchantList.rejected, function (state, action) {
710
+ state.merchantLoading = false;
711
+ state.error = action.error.message;
712
+ })
713
+ .addCase(confirmInfo.pending, function (state) {
714
+ state.loading = true;
715
+ state.error = null;
716
+ })
717
+ .addCase(confirmInfo.fulfilled, function (state) {
718
+ state.loading = false;
719
+ state.error = null;
720
+ })
721
+ .addCase(confirmInfo.rejected, function (state, action) {
722
+ state.loading = false;
723
+ state.error = action.error.message;
724
+ });
725
+ }
726
+ });
727
+ export var clearError = (_a = authSlice.actions, _a.clearError), resetStore = _a.resetStore, setMobileCountryCode = _a.setMobileCountryCode, setLeadId = _a.setLeadId, resetOTPValue = _a.resetOTPValue, storeIsStartFromBusinessCountry = _a.storeIsStartFromBusinessCountry;
728
+ export default authSlice.reducer;
729
+ export var authSelector = function (state) { return state.auth; };