@tap-payments/auth-jsconnect 2.0.51 → 2.0.52

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 (292) hide show
  1. package/build/@types/app.d.ts +90 -7
  2. package/build/@types/app.js +7 -0
  3. package/build/@types/form.d.ts +21 -20
  4. package/build/@types/theme.d.ts +1 -1
  5. package/build/api/account.d.ts +2 -2
  6. package/build/api/auth.d.ts +11 -11
  7. package/build/api/availabilityServices.d.ts +3 -3
  8. package/build/api/axios.js +1 -1
  9. package/build/api/board.d.ts +3 -3
  10. package/build/api/country.d.ts +1 -1
  11. package/build/api/data.d.ts +10 -10
  12. package/build/api/document.d.ts +2 -2
  13. package/build/api/entity.d.ts +12 -12
  14. package/build/api/file.d.ts +1 -1
  15. package/build/api/individual.d.ts +5 -5
  16. package/build/api/lead.d.ts +10 -10
  17. package/build/api/operator.d.ts +1 -1
  18. package/build/api/operator.js +1 -1
  19. package/build/api/user.d.ts +2 -2
  20. package/build/app/settings.d.ts +4 -11
  21. package/build/app/settings.js +13 -5
  22. package/build/app/store.d.ts +4 -4
  23. package/build/assets/locales/ar.json +3 -1
  24. package/build/assets/locales/en.json +3 -1
  25. package/build/components/DatePicker/DatePicker.js +1 -0
  26. package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
  27. package/build/components/RadioGroup/RadioGroup.js +5 -9
  28. package/build/components/RadioGroup/index.d.ts +1 -1
  29. package/build/components/Slide/Slide.d.ts +1 -1
  30. package/build/constants/app.d.ts +3 -2
  31. package/build/constants/app.js +1 -0
  32. package/build/constants/validation.d.ts +1 -0
  33. package/build/constants/validation.js +1 -0
  34. package/build/features/app/bank/bankStore.d.ts +9 -73
  35. package/build/features/app/bank/bankStore.js +68 -91
  36. package/build/features/app/brand/brandStore.d.ts +16 -103
  37. package/build/features/app/brand/brandStore.js +62 -49
  38. package/build/features/app/business/businessStore.d.ts +18 -162
  39. package/build/features/app/business/businessStore.js +4 -3
  40. package/build/features/app/connect/connectStore.d.ts +13 -121
  41. package/build/features/app/connect/connectStore.js +5 -4
  42. package/build/features/app/connectExpress/connectExpressStore.d.ts +22 -211
  43. package/build/features/app/connectExpress/connectExpressStore.js +9 -10
  44. package/build/features/app/entity/entityStore.d.ts +9 -74
  45. package/build/features/app/entity/entityStore.js +129 -152
  46. package/build/features/app/individual/individualStore.d.ts +21 -167
  47. package/build/features/app/individual/individualStore.js +176 -202
  48. package/build/features/app/password/passwordStore.d.ts +12 -102
  49. package/build/features/app/password/passwordStore.js +1 -1
  50. package/build/features/app/signIn/signInStore.d.ts +7 -61
  51. package/build/features/app/signIn/signInStore.js +1 -1
  52. package/build/features/app/tax/taxStore.d.ts +8 -62
  53. package/build/features/app/tax/taxStore.js +48 -62
  54. package/build/features/bank/screens/BankDetails/BankDetails.js +20 -5
  55. package/build/features/bank/screens/BankDetails/BankName.d.ts +4 -1
  56. package/build/features/bank/screens/BankDetails/BankName.js +8 -7
  57. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +5 -2
  58. package/build/features/bank/screens/BankDetails/BankStatement.js +3 -8
  59. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +2 -1
  60. package/build/features/bank/screens/BankDetails/Beneficiary.js +8 -7
  61. package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +4 -1
  62. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +12 -13
  63. package/build/features/bank/screens/BankDetails/IBAN.d.ts +2 -1
  64. package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
  65. package/build/features/bank/screens/BankDetails/validation.d.ts +14 -14
  66. package/build/features/bank/screens/BankDetails/validation.js +16 -21
  67. package/build/features/bank/screens/Verify/OTPInput.js +5 -3
  68. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +15 -18
  69. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +14 -9
  70. package/build/features/brand/screens/BrandActivities/BrandActivities.js +14 -5
  71. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +12 -16
  72. package/build/features/brand/screens/BrandActivities/CustomerBase.js +16 -13
  73. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
  74. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +22 -9
  75. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +2 -1
  76. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +20 -7
  77. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +13 -6
  78. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +23 -12
  79. package/build/features/brand/screens/BrandActivities/TAC.d.ts +14 -1
  80. package/build/features/brand/screens/BrandActivities/TAC.js +21 -12
  81. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +4 -1
  82. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +18 -4
  83. package/build/features/brand/screens/BrandActivities/validation.d.ts +7 -7
  84. package/build/features/brand/screens/BrandActivities/validation.js +10 -19
  85. package/build/features/brand/screens/BrandInfo/BrandInfo.js +20 -12
  86. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +9 -0
  87. package/build/features/brand/screens/BrandInfo/BrandLogo.js +52 -0
  88. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +2 -1
  89. package/build/features/brand/screens/BrandInfo/BrandName.js +3 -3
  90. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +2 -1
  91. package/build/features/brand/screens/BrandInfo/SalesChannels.js +2 -1
  92. package/build/features/brand/screens/BrandInfo/Segments.d.ts +2 -1
  93. package/build/features/brand/screens/BrandInfo/Segments.js +12 -2
  94. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +2 -1
  95. package/build/features/brand/screens/BrandInfo/TeamSize.js +12 -2
  96. package/build/features/brand/screens/BrandInfo/validation.d.ts +6 -6
  97. package/build/features/brand/screens/BrandInfo/validation.js +36 -42
  98. package/build/features/brand/screens/Verify/OTPInput.js +5 -3
  99. package/build/features/business/screens/Activities/ActivitiesList.d.ts +12 -17
  100. package/build/features/business/screens/Activities/ActivitiesList.js +5 -5
  101. package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
  102. package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
  103. package/build/features/business/screens/BusinessType/Article.d.ts +1 -1
  104. package/build/features/business/screens/BusinessType/LicenseList.js +1 -1
  105. package/build/features/business/screens/BusinessType/LicenseType.d.ts +5 -5
  106. package/build/features/business/screens/Customers/CustomerLocations.d.ts +10 -15
  107. package/build/features/business/screens/Customers/CustomerLocations.js +5 -5
  108. package/build/features/business/screens/Customers/ExpectedCustomers.js +12 -2
  109. package/build/features/business/screens/Customers/ExpectedSalesRange.js +12 -2
  110. package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
  111. package/build/features/business/screens/IDBOD/DOB.js +1 -1
  112. package/build/features/business/screens/Verify/OTPInput.js +5 -3
  113. package/build/features/connect/screens/Individual/Email.js +1 -1
  114. package/build/features/connect/screens/Merchant/BrandList.js +1 -1
  115. package/build/features/connect/screens/Merchant/BrandName.js +1 -1
  116. package/build/features/connect/screens/Merchant/Segments.js +6 -1
  117. package/build/features/connect/screens/Merchant/TeamSize.js +6 -1
  118. package/build/features/connect/screens/Merchant/validation.js +5 -5
  119. package/build/features/connectExpress/screens/Brand/Brand.js +1 -1
  120. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +2 -1
  121. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +3 -3
  122. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +5 -3
  123. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
  124. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +7 -5
  125. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
  126. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +1 -1
  127. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +7 -6
  128. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +4 -2
  129. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +14 -1
  130. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -10
  131. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +9 -5
  132. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +2 -1
  133. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -3
  134. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
  135. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +6 -2
  136. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +2 -1
  137. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +2 -2
  138. package/build/features/connectExpress/screens/Mobile/Mobile.js +4 -2
  139. package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
  140. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +6 -2
  141. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +2 -1
  142. package/build/features/connectExpress/screens/Mobile/TAC.js +3 -1
  143. package/build/features/connectExpress/screens/NID/DOB.d.ts +2 -1
  144. package/build/features/connectExpress/screens/NID/DOB.js +2 -2
  145. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
  146. package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
  147. package/build/features/connectExpress/screens/NID/NID.js +4 -2
  148. package/build/features/connectExpress/screens/NID/TAC.d.ts +14 -1
  149. package/build/features/connectExpress/screens/NID/TAC.js +9 -10
  150. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +14 -18
  151. package/build/features/entity/screens/EntityCapital/ActivityList.js +20 -27
  152. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +2 -1
  153. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +7 -3
  154. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +2 -1
  155. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +7 -3
  156. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +2 -1
  157. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -3
  158. package/build/features/entity/screens/EntityCapital/EntityCapital.js +19 -17
  159. package/build/features/entity/screens/EntityCapital/validation.d.ts +10 -10
  160. package/build/features/entity/screens/EntityCapital/validation.js +4 -10
  161. package/build/features/entity/screens/EntityName/Article.d.ts +5 -2
  162. package/build/features/entity/screens/EntityName/Article.js +9 -6
  163. package/build/features/entity/screens/EntityName/EntityName.js +20 -5
  164. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +14 -18
  165. package/build/features/entity/screens/EntityName/EntityTypeList.js +24 -27
  166. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +4 -3
  167. package/build/features/entity/screens/EntityName/ExpiryDate.js +2 -2
  168. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +4 -3
  169. package/build/features/entity/screens/EntityName/IssuingDate.js +2 -2
  170. package/build/features/entity/screens/EntityName/LegalName.d.ts +2 -1
  171. package/build/features/entity/screens/EntityName/LegalName.js +8 -4
  172. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +4 -1
  173. package/build/features/entity/screens/EntityName/LicenseCertificate.js +8 -9
  174. package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +2 -1
  175. package/build/features/entity/screens/EntityName/LicenseNumber.js +8 -5
  176. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +2 -1
  177. package/build/features/entity/screens/EntityName/UnifiedNumber.js +8 -5
  178. package/build/features/entity/screens/EntityName/validation.d.ts +35 -35
  179. package/build/features/entity/screens/EntityName/validation.js +68 -93
  180. package/build/features/entity/screens/Verify/OTPInput.js +5 -3
  181. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
  182. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +25 -6
  183. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +7 -1
  184. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +21 -9
  185. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +2 -1
  186. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +8 -6
  187. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +2 -1
  188. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +25 -25
  189. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +2 -1
  190. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +25 -25
  191. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +6 -5
  192. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +8 -6
  193. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +2 -1
  194. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +8 -2
  195. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +2 -1
  196. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
  197. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +4 -1
  198. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +8 -9
  199. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +2 -1
  200. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +25 -25
  201. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +2 -2
  202. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +6 -11
  203. package/build/features/individual/screens/IndividualList/Email.js +1 -1
  204. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
  205. package/build/features/individual/screens/IndividualList/MobileNumber.js +0 -1
  206. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
  207. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +12 -2
  208. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
  209. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +12 -2
  210. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +2 -1
  211. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +3 -3
  212. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +2 -1
  213. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
  214. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +2 -1
  215. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +4 -5
  216. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +7 -6
  217. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +4 -2
  218. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +2 -1
  219. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +2 -7
  220. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
  221. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -4
  222. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
  223. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +13 -7
  224. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
  225. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +11 -10
  226. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +2 -1
  227. package/build/features/individual/screens/IndividualPersonalInfo/Name.js +2 -2
  228. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
  229. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +13 -7
  230. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
  231. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +6 -3
  232. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +4 -2
  233. package/build/features/individual/screens/Verify/OTPInput.js +5 -3
  234. package/build/features/password/screens/Verify/OTPInput.js +5 -3
  235. package/build/features/shared/Address/CountryList.d.ts +9 -9
  236. package/build/features/shared/Address/CountryList.js +1 -1
  237. package/build/features/shared/Address/InputSelect.d.ts +9 -9
  238. package/build/features/shared/Address/InputSelect.js +2 -2
  239. package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
  240. package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
  241. package/build/features/shared/Button/FlowsButtons.js +15 -20
  242. package/build/features/shared/Button/IndividualActionButtons.d.ts +1 -1
  243. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
  244. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  245. package/build/features/shared/GenericError/GenericError.js +1 -1
  246. package/build/features/shared/Input/Input.d.ts +3 -3
  247. package/build/features/shared/Input/Input.js +2 -3
  248. package/build/features/shared/OTP/OTP.d.ts +2 -1
  249. package/build/features/shared/OTP/OTP.js +2 -2
  250. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +2 -1
  251. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +5 -4
  252. package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
  253. package/build/features/shared/SalesChannels/SalesChannel.js +5 -4
  254. package/build/features/shared/UploadFile/FileUpload.d.ts +6 -4
  255. package/build/features/shared/UploadFile/FileUpload.js +19 -15
  256. package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
  257. package/build/features/shared/UploadFile/UploadFile.js +7 -7
  258. package/build/features/shared/UploadFile/UploadWrapper.d.ts +5 -3
  259. package/build/features/shared/UploadFile/UploadWrapper.js +3 -2
  260. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +5 -4
  261. package/build/features/shared/UploadMultipleFile/UploadFile.js +14 -10
  262. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +4 -3
  263. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +3 -3
  264. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +4 -1
  265. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +12 -12
  266. package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -4
  267. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +4 -1
  268. package/build/features/tax/screens/TaxDetails/TaxDocument.js +3 -8
  269. package/build/features/tax/screens/TaxDetails/VATId.d.ts +4 -1
  270. package/build/features/tax/screens/TaxDetails/VATId.js +5 -7
  271. package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -4
  272. package/build/features/tax/screens/TaxDetails/validation.js +2 -5
  273. package/build/features/tax/screens/Verify/OTPInput.js +5 -3
  274. package/build/hooks/index.d.ts +3 -0
  275. package/build/hooks/index.js +3 -0
  276. package/build/hooks/useAppConfig.d.ts +1 -1
  277. package/build/hooks/useAppConfig.js +4 -2
  278. package/build/hooks/useDataNoneEditable.d.ts +2 -0
  279. package/build/hooks/useDataNoneEditable.js +19 -0
  280. package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
  281. package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
  282. package/build/hooks/useFormReadOnly.d.ts +6 -0
  283. package/build/hooks/useFormReadOnly.js +40 -0
  284. package/build/utils/error.d.ts +1 -0
  285. package/build/utils/error.js +3 -0
  286. package/build/utils/object.d.ts +4 -0
  287. package/build/utils/object.js +17 -0
  288. package/build/utils/string.d.ts +1 -1
  289. package/build/utils/string.js +13 -7
  290. package/package.json +2 -2
  291. package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +0 -20
  292. package/build/features/brand/screens/BrandActivities/OperationStartDate.js +0 -45
@@ -4,81 +4,27 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
4
4
  data: any;
5
5
  boardResponse: any;
6
6
  token: string;
7
- }, string, {
8
- state?: unknown;
9
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
10
- extra?: unknown;
11
- rejectValue?: unknown;
12
- serializedErrorType?: unknown;
13
- pendingMeta?: unknown;
14
- fulfilledMeta?: unknown;
15
- rejectedMeta?: unknown;
16
- }>;
7
+ }, string, {}>;
17
8
  export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
18
9
  data: any;
19
- }, void, {
20
- state?: unknown;
21
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
22
- extra?: unknown;
23
- rejectValue?: unknown;
24
- serializedErrorType?: unknown;
25
- pendingMeta?: unknown;
26
- fulfilledMeta?: unknown;
27
- rejectedMeta?: unknown;
28
- }>;
10
+ }, void, {}>;
29
11
  export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
30
12
  data: any;
31
- }, string, {
32
- state?: unknown;
33
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
34
- extra?: unknown;
35
- rejectValue?: unknown;
36
- serializedErrorType?: unknown;
37
- pendingMeta?: unknown;
38
- fulfilledMeta?: unknown;
39
- rejectedMeta?: unknown;
40
- }>;
13
+ }, string, {}>;
41
14
  export declare const verifyPasswordLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
42
15
  data: any;
43
16
  formData: {
44
17
  otp: string;
45
18
  };
46
- }, OTPFormValues, {
47
- state?: unknown;
48
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
49
- extra?: unknown;
50
- rejectValue?: unknown;
51
- serializedErrorType?: unknown;
52
- pendingMeta?: unknown;
53
- fulfilledMeta?: unknown;
54
- rejectedMeta?: unknown;
55
- }>;
19
+ }, OTPFormValues, {}>;
56
20
  export declare const createPassword: import("@reduxjs/toolkit").AsyncThunk<{
57
21
  data: any;
58
22
  formData: PasswordCreateFormValues;
59
- }, PasswordCreateFormValues, {
60
- state?: unknown;
61
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
62
- extra?: unknown;
63
- rejectValue?: unknown;
64
- serializedErrorType?: unknown;
65
- pendingMeta?: unknown;
66
- fulfilledMeta?: unknown;
67
- rejectedMeta?: unknown;
68
- }>;
23
+ }, PasswordCreateFormValues, {}>;
69
24
  export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
70
25
  response: any;
71
26
  formData: void;
72
- } | undefined, void, {
73
- state?: unknown;
74
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
75
- extra?: unknown;
76
- rejectValue?: unknown;
77
- serializedErrorType?: unknown;
78
- pendingMeta?: unknown;
79
- fulfilledMeta?: unknown;
80
- rejectedMeta?: unknown;
81
- }>;
27
+ } | undefined, void, {}>;
82
28
  export declare const verifyOperationToken: import("@reduxjs/toolkit").AsyncThunk<{
83
29
  data: any;
84
30
  token: string;
@@ -88,28 +34,10 @@ export declare const verifyOperationToken: import("@reduxjs/toolkit").AsyncThunk
88
34
  token: string;
89
35
  boardId: string;
90
36
  boardInfoId: string;
91
- }, {
92
- state?: unknown;
93
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
94
- extra?: unknown;
95
- rejectValue?: unknown;
96
- serializedErrorType?: unknown;
97
- pendingMeta?: unknown;
98
- fulfilledMeta?: unknown;
99
- rejectedMeta?: unknown;
100
- }>;
37
+ }, {}>;
101
38
  export declare const resendOperationOTP: import("@reduxjs/toolkit").AsyncThunk<{
102
39
  data: any;
103
- }, void, {
104
- state?: unknown;
105
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
106
- extra?: unknown;
107
- rejectValue?: unknown;
108
- serializedErrorType?: unknown;
109
- pendingMeta?: unknown;
110
- fulfilledMeta?: unknown;
111
- rejectedMeta?: unknown;
112
- }>;
40
+ }, void, {}>;
113
41
  export declare const resetPassword: import("@reduxjs/toolkit").AsyncThunk<{
114
42
  data: any;
115
43
  formData: {
@@ -120,32 +48,14 @@ export declare const resetPassword: import("@reduxjs/toolkit").AsyncThunk<{
120
48
  } | undefined;
121
49
  otp: string;
122
50
  };
123
- }, OTPFormValues, {
124
- state?: unknown;
125
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
126
- extra?: unknown;
127
- rejectValue?: unknown;
128
- serializedErrorType?: unknown;
129
- pendingMeta?: unknown;
130
- fulfilledMeta?: unknown;
131
- rejectedMeta?: unknown;
132
- }>;
51
+ }, OTPFormValues, {}>;
133
52
  export declare const retrieveBoardResetPasswordSuccess: import("@reduxjs/toolkit").AsyncThunk<{
134
53
  id: any;
135
54
  response: {
136
55
  flows: any;
137
56
  };
138
- }, void, {
139
- state?: unknown;
140
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
141
- extra?: unknown;
142
- rejectValue?: unknown;
143
- serializedErrorType?: unknown;
144
- pendingMeta?: unknown;
145
- fulfilledMeta?: unknown;
146
- rejectedMeta?: unknown;
147
- }>;
148
- type VerifyData = {
57
+ }, void, {}>;
58
+ declare type VerifyData = {
149
59
  token: string;
150
60
  operationType?: string;
151
61
  };
@@ -167,7 +77,7 @@ export declare const passwordSlice: import("@reduxjs/toolkit").Slice<PasswordSta
167
77
  type: string;
168
78
  }) => void;
169
79
  }, "password/store">;
170
- export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"password/store/clearError">, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"password/store/stopLoader">, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"password/store/resetOTPScreen">, storePasswordScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "password/store/storePasswordScreen">;
80
+ export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, storePasswordScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
171
81
  declare const _default: import("redux").Reducer<PasswordState, import("redux").AnyAction>;
172
82
  export default _default;
173
83
  export declare const passwordSelector: (state: RootState) => PasswordState;
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
27
+ while (_) try {
28
28
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -3,72 +3,18 @@ import { MobileFormValues, SharedState, EmailFormValues, ResponseData, OTPFormVa
3
3
  export declare const createMobileAuth: import("@reduxjs/toolkit").AsyncThunk<{
4
4
  data: any;
5
5
  formData: MobileFormValues;
6
- }, MobileFormValues, {
7
- state?: unknown;
8
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
9
- extra?: unknown;
10
- rejectValue?: unknown;
11
- serializedErrorType?: unknown;
12
- pendingMeta?: unknown;
13
- fulfilledMeta?: unknown;
14
- rejectedMeta?: unknown;
15
- }>;
16
- export declare const resendOTPMobile: import("@reduxjs/toolkit").AsyncThunk<any, void, {
17
- state?: unknown;
18
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
19
- extra?: unknown;
20
- rejectValue?: unknown;
21
- serializedErrorType?: unknown;
22
- pendingMeta?: unknown;
23
- fulfilledMeta?: unknown;
24
- rejectedMeta?: unknown;
25
- }>;
6
+ }, MobileFormValues, {}>;
7
+ export declare const resendOTPMobile: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
26
8
  export declare const createEmailAuth: import("@reduxjs/toolkit").AsyncThunk<{
27
9
  data: any;
28
10
  formData: EmailFormValues;
29
- }, EmailFormValues, {
30
- state?: unknown;
31
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
32
- extra?: unknown;
33
- rejectValue?: unknown;
34
- serializedErrorType?: unknown;
35
- pendingMeta?: unknown;
36
- fulfilledMeta?: unknown;
37
- rejectedMeta?: unknown;
38
- }>;
39
- export declare const resendOTPEmail: import("@reduxjs/toolkit").AsyncThunk<any, void, {
40
- state?: unknown;
41
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
42
- extra?: unknown;
43
- rejectValue?: unknown;
44
- serializedErrorType?: unknown;
45
- pendingMeta?: unknown;
46
- fulfilledMeta?: unknown;
47
- rejectedMeta?: unknown;
48
- }>;
11
+ }, EmailFormValues, {}>;
12
+ export declare const resendOTPEmail: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
49
13
  export declare const verifyAuthOTP: import("@reduxjs/toolkit").AsyncThunk<{
50
14
  data: any;
51
15
  formData: OTPFormValues;
52
- }, OTPFormValues, {
53
- state?: unknown;
54
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
55
- extra?: unknown;
56
- rejectValue?: unknown;
57
- serializedErrorType?: unknown;
58
- pendingMeta?: unknown;
59
- fulfilledMeta?: unknown;
60
- rejectedMeta?: unknown;
61
- }>;
62
- export declare const verifyAuthPassword: import("@reduxjs/toolkit").AsyncThunk<any, PasswordFormValues, {
63
- state?: unknown;
64
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
65
- extra?: unknown;
66
- rejectValue?: unknown;
67
- serializedErrorType?: unknown;
68
- pendingMeta?: unknown;
69
- fulfilledMeta?: unknown;
70
- rejectedMeta?: unknown;
71
- }>;
16
+ }, OTPFormValues, {}>;
17
+ export declare const verifyAuthPassword: import("@reduxjs/toolkit").AsyncThunk<any, PasswordFormValues, {}>;
72
18
  export interface SignInData {
73
19
  auth: Partial<MobileFormValues & EmailFormValues> & ResponseData;
74
20
  otpData: OTPFormValues & ResponseData;
@@ -81,7 +27,7 @@ export declare const signInSlice: import("@reduxjs/toolkit").Slice<SignInState,
81
27
  stopLoader: (state: SignInState) => void;
82
28
  resetOTPScreen: (state: SignInState) => void;
83
29
  }, "signIsn/store">;
84
- export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"signIsn/store/clearError">, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"signIsn/store/stopLoader">, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"signIsn/store/resetOTPScreen">;
30
+ export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
85
31
  declare const _default: import("redux").Reducer<SignInState, import("redux").AnyAction>;
86
32
  export default _default;
87
33
  export declare const signInSelector: (state: RootState) => SignInState;
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
27
+ while (_) try {
28
28
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -8,80 +8,26 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
8
8
  data: any;
9
9
  boardResponse: any;
10
10
  token: string;
11
- }, VerifyLeadTokenProps, {
12
- state?: unknown;
13
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
14
- extra?: unknown;
15
- rejectValue?: unknown;
16
- serializedErrorType?: unknown;
17
- pendingMeta?: unknown;
18
- fulfilledMeta?: unknown;
19
- rejectedMeta?: unknown;
20
- }>;
11
+ }, VerifyLeadTokenProps, {}>;
21
12
  export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
22
13
  data: any;
23
- }, void, {
24
- state?: unknown;
25
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
26
- extra?: unknown;
27
- rejectValue?: unknown;
28
- serializedErrorType?: unknown;
29
- pendingMeta?: unknown;
30
- fulfilledMeta?: unknown;
31
- rejectedMeta?: unknown;
32
- }>;
14
+ }, void, {}>;
33
15
  export declare const retrieveEntityInfo: import("@reduxjs/toolkit").AsyncThunk<{
34
16
  data: any;
35
- }, string, {
36
- state?: unknown;
37
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
38
- extra?: unknown;
39
- rejectValue?: unknown;
40
- serializedErrorType?: unknown;
41
- pendingMeta?: unknown;
42
- fulfilledMeta?: unknown;
43
- rejectedMeta?: unknown;
44
- }>;
17
+ }, string, {}>;
45
18
  export declare const verifyTaxLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
46
19
  data: any;
47
20
  formData: OTPFormValues;
48
- }, OTPFormValues, {
49
- state?: unknown;
50
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
51
- extra?: unknown;
52
- rejectValue?: unknown;
53
- serializedErrorType?: unknown;
54
- pendingMeta?: unknown;
55
- fulfilledMeta?: unknown;
56
- rejectedMeta?: unknown;
57
- }>;
21
+ }, OTPFormValues, {}>;
58
22
  export declare const updateTaxInfo: import("@reduxjs/toolkit").AsyncThunk<{
59
23
  data: any;
60
24
  formData: TaxFormValues;
61
- }, TaxFormValues, {
62
- state?: unknown;
63
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
64
- extra?: unknown;
65
- rejectValue?: unknown;
66
- serializedErrorType?: unknown;
67
- pendingMeta?: unknown;
68
- fulfilledMeta?: unknown;
69
- rejectedMeta?: unknown;
70
- }>;
25
+ }, TaxFormValues, {}>;
71
26
  export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
72
27
  response: any;
73
28
  formData: void;
74
- } | undefined, void, {
75
- state?: unknown;
76
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
77
- extra?: unknown;
78
- rejectValue?: unknown;
79
- serializedErrorType?: unknown;
80
- pendingMeta?: unknown;
81
- fulfilledMeta?: unknown;
82
- rejectedMeta?: unknown;
83
- }>;
84
- type VerifyData = {
29
+ } | undefined, void, {}>;
30
+ declare type VerifyData = {
85
31
  token: string;
86
32
  };
87
33
  export interface TaxData {
@@ -100,7 +46,7 @@ export declare const taxSlice: import("@reduxjs/toolkit").Slice<TaxState, {
100
46
  resetOTPScreen: (state: TaxState) => void;
101
47
  uploadingStatus: (state: TaxState, action: ActionState<boolean>) => void;
102
48
  }, "tax/store">;
103
- export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tax/store/clearError">, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tax/store/stopLoader">, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tax/store/resetOTPScreen">, uploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "tax/store/uploadingStatus">;
49
+ export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, uploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
104
50
  declare const _default: import("redux").Reducer<TaxState, import("redux").AnyAction>;
105
51
  export default _default;
106
52
  export declare const taxSelector: (state: RootState) => TaxState;
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
27
+ while (_) try {
28
28
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -51,14 +51,14 @@ import API from '../../../api';
51
51
  import { DocumentPurpose, FlowsTypes } from '../../../@types';
52
52
  import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2 } from '../../../app/settings';
53
53
  import { TAX_STEP_NAMES } from '../../../constants';
54
- import { getRecentDocumentBasedOnPurpose } from '../../../utils';
54
+ import { getRecentDocumentBasedOnPurpose, hasNoneEditableValue, sleep } from '../../../utils';
55
55
  export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
56
56
  var token = _a.token, isInternally = _a.isInternally;
57
57
  return __awaiter(void 0, void 0, void 0, function () {
58
- var payload, data, boardData, boardInfoData, info, countryIso2, hasTaxCompleted;
59
- var _b, _c, _d, _e;
60
- return __generator(this, function (_f) {
61
- switch (_f.label) {
58
+ var payload, data, boardData, countryIso2;
59
+ var _b, _c, _d;
60
+ return __generator(this, function (_e) {
61
+ switch (_e.label) {
62
62
  case 0:
63
63
  payload = {
64
64
  service_name: 'tap_email',
@@ -66,38 +66,30 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
66
66
  };
67
67
  return [4, API.leadService.verifyLeadToken(payload)];
68
68
  case 1:
69
- data = (_f.sent()).data;
70
- boardInfoData = undefined;
69
+ data = (_e.sent()).data;
70
+ boardData = undefined;
71
71
  if (((_b = data.errors) === null || _b === void 0 ? void 0 : _b.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
72
72
  throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
73
73
  if (isInternally)
74
74
  data.step_name = TAX_STEP_NAMES.TAX_INFO;
75
- if (!data.id) return [3, 4];
76
- return [4, API.boardService.retrieveBoardInfoStatus(data.id)];
77
- case 2:
78
- boardInfoData = _f.sent();
75
+ if (!data.id) return [3, 3];
79
76
  return [4, API.boardService.retrieveBoardDetails(data === null || data === void 0 ? void 0 : data.id)];
77
+ case 2:
78
+ boardData = _e.sent();
79
+ _e.label = 3;
80
80
  case 3:
81
- boardData = _f.sent();
82
- _f.label = 4;
83
- case 4:
84
- info = (boardInfoData || {}).info;
85
81
  countryIso2 = (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.country;
86
82
  if (countryIso2)
87
83
  thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
88
- hasTaxCompleted = ((_d = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'tax'; })) === null || _d === void 0 ? void 0 : _d.status) === 'completed';
89
- if (hasTaxCompleted) {
90
- thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
91
- }
92
- else if (data.step_name === TAX_STEP_NAMES.PHONE_AUTH) {
84
+ if (data.step_name === TAX_STEP_NAMES.PHONE_AUTH) {
93
85
  thunkApi.dispatch(handleCurrentActiveScreen('TAX_VERIFY_STEP'));
94
86
  }
95
87
  else if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
96
- thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
88
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP')); });
97
89
  }
98
90
  return [2, {
99
91
  data: data,
100
- boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
92
+ boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _d === void 0 ? void 0 : _d.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
101
93
  token: token
102
94
  }];
103
95
  }
@@ -133,10 +125,10 @@ export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', functi
133
125
  });
134
126
  }); });
135
127
  export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
136
- var _a, tax, settings, responseBody, payload, data, flows, hasTaxCompleted;
137
- var _b, _c, _d, _e, _f, _g;
138
- return __generator(this, function (_h) {
139
- switch (_h.label) {
128
+ var _a, tax, settings, responseBody, payload, data;
129
+ var _b, _c, _d, _e;
130
+ return __generator(this, function (_f) {
131
+ switch (_f.label) {
140
132
  case 0:
141
133
  _a = thunkApi.getState(), tax = _a.tax, settings = _a.settings;
142
134
  responseBody = tax.data.verify.responseBody;
@@ -149,75 +141,67 @@ export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (par
149
141
  };
150
142
  return [4, API.leadService.verifyLeadOTP(payload)];
151
143
  case 1:
152
- data = (_h.sent()).data;
144
+ data = (_f.sent()).data;
153
145
  if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
154
146
  throw new Error(data.errors[0].description);
155
147
  (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
156
- flows = (responseBody || {}).flows;
157
- hasTaxCompleted = ((_f = flows === null || flows === void 0 ? void 0 : flows.find(function (flow) { return flow.name === 'tax'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
158
- if (!hasTaxCompleted) return [3, 3];
159
- return [4, thunkApi.dispatch(retrieveEntityInfo((_g = responseBody === null || responseBody === void 0 ? void 0 : responseBody.entity) === null || _g === void 0 ? void 0 : _g.id))];
160
- case 2:
161
- _h.sent();
162
- thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
163
- return [3, 4];
164
- case 3:
165
- thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
166
- _h.label = 4;
167
- case 4: return [2, { data: data, formData: params }];
148
+ sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP')); });
149
+ return [2, { data: data, formData: params }];
168
150
  }
169
151
  });
170
152
  }); });
171
153
  export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
172
- var _a, settings, tax, entity, entityId, isTaxNumberEditable, document, requestBody, data, documentBody, _b, documentBody, _c;
173
- var _d, _e, _f;
174
- return __generator(this, function (_g) {
175
- switch (_g.label) {
154
+ var _a, settings, tax, _b, id, data_status, documents, isTaxNumberNonEditable, isConfirmPolicyNonEditable, isDocumentsNonEditable, document, requestBody, data, documentBody, _c, documentBody, _d;
155
+ var _e, _f, _g, _h;
156
+ return __generator(this, function (_j) {
157
+ switch (_j.label) {
176
158
  case 0:
177
159
  _a = thunkApi.getState(), settings = _a.settings, tax = _a.tax;
178
- entity = (tax.data.verify.responseBody || {}).entity;
179
- entityId = entity === null || entity === void 0 ? void 0 : entity.id;
180
- isTaxNumberEditable = true;
181
- document = getRecentDocumentBasedOnPurpose(entity === null || entity === void 0 ? void 0 : entity.documents, DocumentPurpose.TAX_DOCUMENT);
160
+ _b = ((_e = tax.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.entity) || {}, id = _b.id, data_status = _b.data_status, documents = _b.documents;
161
+ isTaxNumberNonEditable = hasNoneEditableValue(data_status, 'tax_number');
162
+ isConfirmPolicyNonEditable = hasNoneEditableValue(data_status, 'is_vat_acknowledged');
163
+ isDocumentsNonEditable = hasNoneEditableValue(data_status, 'documents');
164
+ document = getRecentDocumentBasedOnPurpose(documents, DocumentPurpose.TAX_DOCUMENT);
182
165
  requestBody = {
183
- id: entityId,
184
- vat_id: isTaxNumberEditable ? params.vatId : undefined,
166
+ id: id,
167
+ vat_id: isTaxNumberNonEditable ? undefined : params.vatId,
185
168
  step_name: TAX_STEP_NAMES.TAX_INFO,
186
- is_vat_acknowledged: params.confirmPolicy
169
+ is_vat_acknowledged: isConfirmPolicyNonEditable ? undefined : params.confirmPolicy
187
170
  };
188
171
  return [4, API.entityService.updateEntityInfo(requestBody)];
189
172
  case 1:
190
- data = (_g.sent()).data;
191
- if ((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length)
173
+ data = (_j.sent()).data;
174
+ if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
192
175
  throw new Error(data.errors[0].description);
193
- if (!((params.documentId || []).length > 0)) return [3, 5];
176
+ if (!(!isDocumentsNonEditable && (params.documentId || []).length > 0)) return [3, 5];
194
177
  if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 3];
195
178
  documentBody = {
196
179
  id: document === null || document === void 0 ? void 0 : document.id,
197
180
  images: params.documentId
198
181
  };
199
- _b = data;
182
+ _c = data;
200
183
  return [4, API.documentService.addFilesToExistingDocument(documentBody)];
201
184
  case 2:
202
- _b.documentData = _g.sent();
185
+ _c.documentData = _j.sent();
203
186
  return [3, 5];
204
187
  case 3:
205
188
  documentBody = {
206
- entity_id: entityId || '',
189
+ entity_id: id || '',
207
190
  documents: [
208
191
  {
192
+ type: DocumentPurpose.TAX_DOCUMENT,
209
193
  images: params.documentId
210
194
  }
211
195
  ]
212
196
  };
213
- _c = data;
197
+ _d = data;
214
198
  return [4, API.documentService.updateDocumentInfo(documentBody)];
215
199
  case 4:
216
- _c.documentData = _g.sent();
217
- _g.label = 5;
200
+ _d.documentData = _j.sent();
201
+ _j.label = 5;
218
202
  case 5:
219
203
  thunkApi.dispatch(handleNextScreenStep());
220
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
204
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, requestBody);
221
205
  return [2, { data: data, formData: params }];
222
206
  }
223
207
  });
@@ -296,10 +280,12 @@ export var taxSlice = createSlice({
296
280
  state.error = null;
297
281
  state.customLoading = false;
298
282
  var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse;
299
- var user = boardResponse.user, bank_account = boardResponse.bank_account, vatID = boardResponse.vatID, merchant = boardResponse.merchant, individuals = boardResponse.individuals;
283
+ var user = boardResponse.user, bank_account = boardResponse.bank_account, vatID = boardResponse.vatID, merchant = boardResponse.merchant, individuals = boardResponse.individuals, entity = boardResponse.entity;
300
284
  state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, name: user === null || user === void 0 ? void 0 : user.names, bank_account: bank_account, vatID: vatID, merchant: merchant, individuals: individuals });
301
285
  state.data.verify.token = token;
302
286
  state.data.taxData.vatId = vatID;
287
+ if (entity === null || entity === void 0 ? void 0 : entity.is_vat_acknowledged)
288
+ state.data.taxData.confirmPolicy = entity === null || entity === void 0 ? void 0 : entity.is_vat_acknowledged;
303
289
  })
304
290
  .addCase(verifyLeadToken.pending, function (state) {
305
291
  state.error = null;
@@ -16,20 +16,20 @@ import Beneficiary from './Beneficiary';
16
16
  import IBAN from './IBAN';
17
17
  import BankName from './BankName';
18
18
  import Button from '../../../shared/Button';
19
- import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
19
+ import { useAppDispatch, useAppSelector, useFormReadOnly, useSetFromDefaultValues, useDataNoneEditable, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
20
20
  import { BankKWFLValidation, BankValidation } from './validation';
21
21
  import { useTranslation } from 'react-i18next';
22
22
  import { useForm, FormProvider } from 'react-hook-form';
23
23
  import { yupResolver } from '@hookform/resolvers/yup';
24
24
  import { useLanguage } from '../../../../hooks';
25
25
  import { styled } from '@mui/material/styles';
26
- import { BusinessType } from '../../../../@types';
26
+ import { BusinessType, DocumentPurpose } from '../../../../@types';
27
27
  import { bankSelector, clearError, createBankAccount } from '../../../app/bank/bankStore';
28
28
  import Form from '../../../../components/Form';
29
29
  import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
30
30
  import ConfirmPolicy from './ConfirmPolicy';
31
31
  import BankStatement from './BankStatement';
32
- import { isKW } from '../../../../utils';
32
+ import { getFileDetailsFromDocument, isKW } from '../../../../utils';
33
33
  var FormStyled = styled(Form)(function () { return ({
34
34
  display: 'flex',
35
35
  flexDirection: 'column',
@@ -54,7 +54,7 @@ var BankDetails = function () {
54
54
  var isFL = ((_a = entity === null || entity === void 0 ? void 0 : entity.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === BusinessType.FL ? true : false;
55
55
  var bankHasDocument = ((_c = (_b = bank_account === null || bank_account === void 0 ? void 0 : bank_account.document) === null || _b === void 0 ? void 0 : _b.file_details) === null || _c === void 0 ? void 0 : _c.length) > 0;
56
56
  var methods = useForm({
57
- resolver: yupResolver(isKWCountry && isFL && !bankHasDocument ? BankKWFLValidation(bank_account) : BankValidation(bank_account)),
57
+ resolver: yupResolver(isKWCountry && isFL && !bankHasDocument ? BankKWFLValidation() : BankValidation()),
58
58
  defaultValues: {
59
59
  iban: iban,
60
60
  beneficiaryName: beneficiaryName,
@@ -79,6 +79,21 @@ var BankDetails = function () {
79
79
  if (error)
80
80
  dispatch(clearError());
81
81
  }, [methods.formState.isValid, methods.watch('bankStatementId')]);
82
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, { required: isKWCountry && isFL && !bankHasDocument }), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, disableBack: true, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
82
+ var defaultBankFiles = React.useMemo(function () {
83
+ if (!(bank_account === null || bank_account === void 0 ? void 0 : bank_account.document))
84
+ return [];
85
+ return getFileDetailsFromDocument([bank_account.document], DocumentPurpose.BANK_STATEMENT);
86
+ }, [bank_account === null || bank_account === void 0 ? void 0 : bank_account.document]);
87
+ var originalReadOnly = useFormReadOnly(methods, { bankStatementId: defaultBankFiles });
88
+ var noneEditable = useDataNoneEditable(bank_account === null || bank_account === void 0 ? void 0 : bank_account.data_status, [
89
+ 'beneficiary_name',
90
+ 'bank_name',
91
+ 'iban',
92
+ 'beneficiary_name',
93
+ 'bank_statement_file_id',
94
+ 'is_acknowledged'
95
+ ]);
96
+ var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
97
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, { readOnly: readOnly['beneficiaryName'] || noneEditable['beneficiary_name'] }), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking, readOnly: readOnly['iban'] || noneEditable['iban'] }), _jsx(BankName, { readOnly: readOnly['bankName'] || noneEditable['bank_name'] }), _jsx(BankStatement, { required: isKWCountry && isFL && !bankHasDocument, defaultFiles: defaultBankFiles, readOnly: readOnly['bankStatementId'] || noneEditable['bank_statement_file_id'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['confirmPolicy'] || noneEditable['is_acknowledged'] }), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, disableBack: true, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
83
98
  };
84
99
  export default BankDetails;
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" />
2
- declare const BankName: () => JSX.Element;
2
+ declare type BankNameProps = {
3
+ readOnly?: boolean;
4
+ };
5
+ declare const BankName: ({ readOnly }: BankNameProps) => JSX.Element;
3
6
  export default BankName;