@redneckz/wildless-cms-uni-blocks 0.14.670 → 0.14.672

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 (425) hide show
  1. package/bundle/api/RetailAPI/checkCaptcha.d.ts +1 -1
  2. package/bundle/api/RetailAPI/createCaptcha.d.ts +1 -1
  3. package/bundle/api/RetailAPI/createUserProfile.d.ts +1 -1
  4. package/bundle/api/RetailAPI/doRequest.d.ts +2 -1
  5. package/bundle/api/RetailAPI/getCardTypes.d.ts +8 -0
  6. package/bundle/api/RetailAPI/getLink.d.ts +1 -1
  7. package/bundle/api/RetailAPI/getPaymentSystems.d.ts +4 -0
  8. package/bundle/api/RetailAPI/getTaskStatus.d.ts +2 -3
  9. package/bundle/api/RetailAPI/regionOffices.d.ts +1 -1
  10. package/bundle/api/RetailAPI/sendCode.d.ts +1 -4
  11. package/bundle/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  12. package/bundle/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  13. package/bundle/api/RetailAPI/updateUserProfile.d.ts +1 -1
  14. package/bundle/api/RetailAPI/updateUserTask.d.ts +1 -1
  15. package/bundle/bundle.umd.js +131 -104
  16. package/bundle/bundle.umd.min.js +1 -1
  17. package/bundle/ui-kit/FormField/Fields/PaymentSystemField.d.ts +0 -2
  18. package/dist/api/RetailAPI/checkCaptcha.d.ts +1 -1
  19. package/dist/api/RetailAPI/checkCaptcha.js +3 -1
  20. package/dist/api/RetailAPI/checkCaptcha.js.map +1 -1
  21. package/dist/api/RetailAPI/checkCode.js +5 -3
  22. package/dist/api/RetailAPI/checkCode.js.map +1 -1
  23. package/dist/api/RetailAPI/createCaptcha.d.ts +1 -1
  24. package/dist/api/RetailAPI/createCaptcha.js +1 -1
  25. package/dist/api/RetailAPI/createCaptcha.js.map +1 -1
  26. package/dist/api/RetailAPI/createDraftTask.js +4 -1
  27. package/dist/api/RetailAPI/createDraftTask.js.map +1 -1
  28. package/dist/api/RetailAPI/createUserProfile.d.ts +1 -1
  29. package/dist/api/RetailAPI/createUserProfile.js +1 -1
  30. package/dist/api/RetailAPI/createUserProfile.js.map +1 -1
  31. package/dist/api/RetailAPI/doRequest.d.ts +2 -1
  32. package/dist/api/RetailAPI/doRequest.js +13 -6
  33. package/dist/api/RetailAPI/doRequest.js.map +1 -1
  34. package/dist/api/RetailAPI/feedbackById.js +1 -1
  35. package/dist/api/RetailAPI/feedbackById.js.map +1 -1
  36. package/dist/api/RetailAPI/getCardTypes.d.ts +8 -0
  37. package/dist/api/RetailAPI/getCardTypes.js +13 -0
  38. package/dist/api/RetailAPI/getCardTypes.js.map +1 -0
  39. package/dist/api/RetailAPI/getLink.d.ts +1 -1
  40. package/dist/api/RetailAPI/getLink.js +1 -1
  41. package/dist/api/RetailAPI/getLink.js.map +1 -1
  42. package/dist/api/RetailAPI/getPaymentSystems.d.ts +4 -0
  43. package/dist/api/RetailAPI/getPaymentSystems.js +15 -0
  44. package/dist/api/RetailAPI/getPaymentSystems.js.map +1 -0
  45. package/dist/api/RetailAPI/getTaskStatus.d.ts +2 -3
  46. package/dist/api/RetailAPI/getTaskStatus.js +1 -1
  47. package/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  48. package/dist/api/RetailAPI/regionOffices.d.ts +1 -1
  49. package/dist/api/RetailAPI/regionOffices.js +9 -8
  50. package/dist/api/RetailAPI/regionOffices.js.map +1 -1
  51. package/dist/api/RetailAPI/sendCode.d.ts +1 -4
  52. package/dist/api/RetailAPI/sendCode.js +4 -1
  53. package/dist/api/RetailAPI/sendCode.js.map +1 -1
  54. package/dist/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  55. package/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  56. package/dist/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  57. package/dist/api/RetailAPI/updateProfileEsia.js +1 -1
  58. package/dist/api/RetailAPI/updateProfileEsia.js.map +1 -1
  59. package/dist/api/RetailAPI/updateRefreshToken.js +4 -4
  60. package/dist/api/RetailAPI/updateRefreshToken.js.map +1 -1
  61. package/dist/api/RetailAPI/updateUserProfile.d.ts +1 -1
  62. package/dist/api/RetailAPI/updateUserProfile.js +1 -1
  63. package/dist/api/RetailAPI/updateUserProfile.js.map +1 -1
  64. package/dist/api/RetailAPI/updateUserTask.d.ts +1 -1
  65. package/dist/api/RetailAPI/updateUserTask.js +1 -1
  66. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  67. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  68. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  69. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  70. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  71. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +4 -3
  72. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  73. package/dist/components/CreditCardForm/formStateMap.js +1 -2
  74. package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  75. package/dist/components/CreditForm/CreditFormStatusTracker.js +1 -1
  76. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  77. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +16 -5
  78. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  79. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  80. package/dist/ui-kit/FormField/Fields/AddressRetailField.js +2 -3
  81. package/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  82. package/dist/ui-kit/FormField/Fields/CardCategoryField.js +11 -3
  83. package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  84. package/dist/ui-kit/FormField/Fields/PaymentSystemField.d.ts +0 -2
  85. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +11 -6
  86. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  87. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  88. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  89. package/lib/api/RetailAPI/checkCaptcha.d.ts +1 -1
  90. package/lib/api/RetailAPI/checkCaptcha.js +3 -1
  91. package/lib/api/RetailAPI/checkCaptcha.js.map +1 -1
  92. package/lib/api/RetailAPI/checkCode.js +6 -4
  93. package/lib/api/RetailAPI/checkCode.js.map +1 -1
  94. package/lib/api/RetailAPI/createCaptcha.d.ts +1 -1
  95. package/lib/api/RetailAPI/createCaptcha.js +1 -1
  96. package/lib/api/RetailAPI/createCaptcha.js.map +1 -1
  97. package/lib/api/RetailAPI/createDraftTask.js +5 -2
  98. package/lib/api/RetailAPI/createDraftTask.js.map +1 -1
  99. package/lib/api/RetailAPI/createUserProfile.d.ts +1 -1
  100. package/lib/api/RetailAPI/createUserProfile.js +2 -2
  101. package/lib/api/RetailAPI/createUserProfile.js.map +1 -1
  102. package/lib/api/RetailAPI/doRequest.d.ts +2 -1
  103. package/lib/api/RetailAPI/doRequest.js +11 -5
  104. package/lib/api/RetailAPI/doRequest.js.map +1 -1
  105. package/lib/api/RetailAPI/feedbackById.js +1 -1
  106. package/lib/api/RetailAPI/feedbackById.js.map +1 -1
  107. package/lib/api/RetailAPI/getCardTypes.d.ts +8 -0
  108. package/lib/api/RetailAPI/getCardTypes.js +10 -0
  109. package/lib/api/RetailAPI/getCardTypes.js.map +1 -0
  110. package/lib/api/RetailAPI/getLink.d.ts +1 -1
  111. package/lib/api/RetailAPI/getLink.js +2 -2
  112. package/lib/api/RetailAPI/getLink.js.map +1 -1
  113. package/lib/api/RetailAPI/getPaymentSystems.d.ts +4 -0
  114. package/lib/api/RetailAPI/getPaymentSystems.js +12 -0
  115. package/lib/api/RetailAPI/getPaymentSystems.js.map +1 -0
  116. package/lib/api/RetailAPI/getTaskStatus.d.ts +2 -3
  117. package/lib/api/RetailAPI/getTaskStatus.js +2 -2
  118. package/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  119. package/lib/api/RetailAPI/regionOffices.d.ts +1 -1
  120. package/lib/api/RetailAPI/regionOffices.js +8 -7
  121. package/lib/api/RetailAPI/regionOffices.js.map +1 -1
  122. package/lib/api/RetailAPI/sendCode.d.ts +1 -4
  123. package/lib/api/RetailAPI/sendCode.js +5 -2
  124. package/lib/api/RetailAPI/sendCode.js.map +1 -1
  125. package/lib/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  126. package/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  127. package/lib/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  128. package/lib/api/RetailAPI/updateProfileEsia.js +2 -2
  129. package/lib/api/RetailAPI/updateProfileEsia.js.map +1 -1
  130. package/lib/api/RetailAPI/updateRefreshToken.js +4 -4
  131. package/lib/api/RetailAPI/updateRefreshToken.js.map +1 -1
  132. package/lib/api/RetailAPI/updateUserProfile.d.ts +1 -1
  133. package/lib/api/RetailAPI/updateUserProfile.js +2 -2
  134. package/lib/api/RetailAPI/updateUserProfile.js.map +1 -1
  135. package/lib/api/RetailAPI/updateUserTask.d.ts +1 -1
  136. package/lib/api/RetailAPI/updateUserTask.js +2 -2
  137. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  138. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  139. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  140. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  141. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  142. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -4
  143. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  144. package/lib/components/CreditCardForm/formStateMap.js +1 -2
  145. package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  146. package/lib/components/CreditForm/CreditFormStatusTracker.js +1 -1
  147. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  148. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +17 -6
  149. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  150. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  151. package/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -4
  152. package/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  153. package/lib/ui-kit/FormField/Fields/CardCategoryField.js +11 -3
  154. package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  155. package/lib/ui-kit/FormField/Fields/PaymentSystemField.d.ts +0 -2
  156. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +10 -5
  157. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  158. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  159. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  160. package/mobile/bundle/api/RetailAPI/checkCaptcha.d.ts +1 -1
  161. package/mobile/bundle/api/RetailAPI/createCaptcha.d.ts +1 -1
  162. package/mobile/bundle/api/RetailAPI/createUserProfile.d.ts +1 -1
  163. package/mobile/bundle/api/RetailAPI/doRequest.d.ts +2 -1
  164. package/mobile/bundle/api/RetailAPI/getCardTypes.d.ts +8 -0
  165. package/mobile/bundle/api/RetailAPI/getLink.d.ts +1 -1
  166. package/mobile/bundle/api/RetailAPI/getPaymentSystems.d.ts +4 -0
  167. package/mobile/bundle/api/RetailAPI/getTaskStatus.d.ts +2 -3
  168. package/mobile/bundle/api/RetailAPI/regionOffices.d.ts +1 -1
  169. package/mobile/bundle/api/RetailAPI/sendCode.d.ts +1 -4
  170. package/mobile/bundle/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  171. package/mobile/bundle/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  172. package/mobile/bundle/api/RetailAPI/updateUserProfile.d.ts +1 -1
  173. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +1 -1
  174. package/mobile/bundle/bundle.umd.js +131 -104
  175. package/mobile/bundle/bundle.umd.min.js +1 -1
  176. package/mobile/bundle/ui-kit/FormField/Fields/PaymentSystemField.d.ts +0 -2
  177. package/mobile/dist/api/RetailAPI/checkCaptcha.d.ts +1 -1
  178. package/mobile/dist/api/RetailAPI/checkCaptcha.js +3 -1
  179. package/mobile/dist/api/RetailAPI/checkCaptcha.js.map +1 -1
  180. package/mobile/dist/api/RetailAPI/checkCode.js +5 -3
  181. package/mobile/dist/api/RetailAPI/checkCode.js.map +1 -1
  182. package/mobile/dist/api/RetailAPI/createCaptcha.d.ts +1 -1
  183. package/mobile/dist/api/RetailAPI/createCaptcha.js +1 -1
  184. package/mobile/dist/api/RetailAPI/createCaptcha.js.map +1 -1
  185. package/mobile/dist/api/RetailAPI/createDraftTask.js +4 -1
  186. package/mobile/dist/api/RetailAPI/createDraftTask.js.map +1 -1
  187. package/mobile/dist/api/RetailAPI/createUserProfile.d.ts +1 -1
  188. package/mobile/dist/api/RetailAPI/createUserProfile.js +1 -1
  189. package/mobile/dist/api/RetailAPI/createUserProfile.js.map +1 -1
  190. package/mobile/dist/api/RetailAPI/doRequest.d.ts +2 -1
  191. package/mobile/dist/api/RetailAPI/doRequest.js +13 -6
  192. package/mobile/dist/api/RetailAPI/doRequest.js.map +1 -1
  193. package/mobile/dist/api/RetailAPI/feedbackById.js +1 -1
  194. package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -1
  195. package/mobile/dist/api/RetailAPI/getCardTypes.d.ts +8 -0
  196. package/mobile/dist/api/RetailAPI/getCardTypes.js +13 -0
  197. package/mobile/dist/api/RetailAPI/getCardTypes.js.map +1 -0
  198. package/mobile/dist/api/RetailAPI/getLink.d.ts +1 -1
  199. package/mobile/dist/api/RetailAPI/getLink.js +1 -1
  200. package/mobile/dist/api/RetailAPI/getLink.js.map +1 -1
  201. package/mobile/dist/api/RetailAPI/getPaymentSystems.d.ts +4 -0
  202. package/mobile/dist/api/RetailAPI/getPaymentSystems.js +15 -0
  203. package/mobile/dist/api/RetailAPI/getPaymentSystems.js.map +1 -0
  204. package/mobile/dist/api/RetailAPI/getTaskStatus.d.ts +2 -3
  205. package/mobile/dist/api/RetailAPI/getTaskStatus.js +1 -1
  206. package/mobile/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  207. package/mobile/dist/api/RetailAPI/regionOffices.d.ts +1 -1
  208. package/mobile/dist/api/RetailAPI/regionOffices.js +9 -8
  209. package/mobile/dist/api/RetailAPI/regionOffices.js.map +1 -1
  210. package/mobile/dist/api/RetailAPI/sendCode.d.ts +1 -4
  211. package/mobile/dist/api/RetailAPI/sendCode.js +4 -1
  212. package/mobile/dist/api/RetailAPI/sendCode.js.map +1 -1
  213. package/mobile/dist/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  214. package/mobile/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  215. package/mobile/dist/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  216. package/mobile/dist/api/RetailAPI/updateProfileEsia.js +1 -1
  217. package/mobile/dist/api/RetailAPI/updateProfileEsia.js.map +1 -1
  218. package/mobile/dist/api/RetailAPI/updateRefreshToken.js +4 -4
  219. package/mobile/dist/api/RetailAPI/updateRefreshToken.js.map +1 -1
  220. package/mobile/dist/api/RetailAPI/updateUserProfile.d.ts +1 -1
  221. package/mobile/dist/api/RetailAPI/updateUserProfile.js +1 -1
  222. package/mobile/dist/api/RetailAPI/updateUserProfile.js.map +1 -1
  223. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +1 -1
  224. package/mobile/dist/api/RetailAPI/updateUserTask.js +1 -1
  225. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  226. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  227. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  228. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  229. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  230. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +4 -3
  231. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  232. package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -2
  233. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  234. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +1 -1
  235. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  236. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +16 -5
  237. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  238. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  239. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js +2 -3
  240. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  241. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +11 -3
  242. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  243. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.d.ts +0 -2
  244. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +11 -6
  245. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  246. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  247. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  248. package/mobile/lib/api/RetailAPI/checkCaptcha.d.ts +1 -1
  249. package/mobile/lib/api/RetailAPI/checkCaptcha.js +3 -1
  250. package/mobile/lib/api/RetailAPI/checkCaptcha.js.map +1 -1
  251. package/mobile/lib/api/RetailAPI/checkCode.js +6 -4
  252. package/mobile/lib/api/RetailAPI/checkCode.js.map +1 -1
  253. package/mobile/lib/api/RetailAPI/createCaptcha.d.ts +1 -1
  254. package/mobile/lib/api/RetailAPI/createCaptcha.js +1 -1
  255. package/mobile/lib/api/RetailAPI/createCaptcha.js.map +1 -1
  256. package/mobile/lib/api/RetailAPI/createDraftTask.js +5 -2
  257. package/mobile/lib/api/RetailAPI/createDraftTask.js.map +1 -1
  258. package/mobile/lib/api/RetailAPI/createUserProfile.d.ts +1 -1
  259. package/mobile/lib/api/RetailAPI/createUserProfile.js +2 -2
  260. package/mobile/lib/api/RetailAPI/createUserProfile.js.map +1 -1
  261. package/mobile/lib/api/RetailAPI/doRequest.d.ts +2 -1
  262. package/mobile/lib/api/RetailAPI/doRequest.js +11 -5
  263. package/mobile/lib/api/RetailAPI/doRequest.js.map +1 -1
  264. package/mobile/lib/api/RetailAPI/feedbackById.js +1 -1
  265. package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -1
  266. package/mobile/lib/api/RetailAPI/getCardTypes.d.ts +8 -0
  267. package/mobile/lib/api/RetailAPI/getCardTypes.js +10 -0
  268. package/mobile/lib/api/RetailAPI/getCardTypes.js.map +1 -0
  269. package/mobile/lib/api/RetailAPI/getLink.d.ts +1 -1
  270. package/mobile/lib/api/RetailAPI/getLink.js +2 -2
  271. package/mobile/lib/api/RetailAPI/getLink.js.map +1 -1
  272. package/mobile/lib/api/RetailAPI/getPaymentSystems.d.ts +4 -0
  273. package/mobile/lib/api/RetailAPI/getPaymentSystems.js +12 -0
  274. package/mobile/lib/api/RetailAPI/getPaymentSystems.js.map +1 -0
  275. package/mobile/lib/api/RetailAPI/getTaskStatus.d.ts +2 -3
  276. package/mobile/lib/api/RetailAPI/getTaskStatus.js +2 -2
  277. package/mobile/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  278. package/mobile/lib/api/RetailAPI/regionOffices.d.ts +1 -1
  279. package/mobile/lib/api/RetailAPI/regionOffices.js +8 -7
  280. package/mobile/lib/api/RetailAPI/regionOffices.js.map +1 -1
  281. package/mobile/lib/api/RetailAPI/sendCode.d.ts +1 -4
  282. package/mobile/lib/api/RetailAPI/sendCode.js +5 -2
  283. package/mobile/lib/api/RetailAPI/sendCode.js.map +1 -1
  284. package/mobile/lib/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  285. package/mobile/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  286. package/mobile/lib/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  287. package/mobile/lib/api/RetailAPI/updateProfileEsia.js +2 -2
  288. package/mobile/lib/api/RetailAPI/updateProfileEsia.js.map +1 -1
  289. package/mobile/lib/api/RetailAPI/updateRefreshToken.js +4 -4
  290. package/mobile/lib/api/RetailAPI/updateRefreshToken.js.map +1 -1
  291. package/mobile/lib/api/RetailAPI/updateUserProfile.d.ts +1 -1
  292. package/mobile/lib/api/RetailAPI/updateUserProfile.js +2 -2
  293. package/mobile/lib/api/RetailAPI/updateUserProfile.js.map +1 -1
  294. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +1 -1
  295. package/mobile/lib/api/RetailAPI/updateUserTask.js +2 -2
  296. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  297. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  298. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  299. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  300. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  301. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -4
  302. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  303. package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -2
  304. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  305. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +1 -1
  306. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  307. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +17 -6
  308. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  309. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  310. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -4
  311. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  312. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +11 -3
  313. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  314. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.d.ts +0 -2
  315. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +10 -5
  316. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  317. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  318. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  319. package/mobile/src/api/RetailAPI/checkCaptcha.ts +3 -1
  320. package/mobile/src/api/RetailAPI/checkCode.ts +7 -5
  321. package/mobile/src/api/RetailAPI/createCaptcha.ts +3 -1
  322. package/mobile/src/api/RetailAPI/createDraftTask.ts +12 -3
  323. package/mobile/src/api/RetailAPI/createUserProfile.ts +4 -2
  324. package/mobile/src/api/RetailAPI/doRequest.ts +19 -9
  325. package/mobile/src/api/RetailAPI/feedbackById.ts +2 -2
  326. package/mobile/src/api/RetailAPI/getCardTypes.ts +20 -0
  327. package/mobile/src/api/RetailAPI/getLink.ts +2 -2
  328. package/mobile/src/api/RetailAPI/getPaymentSystems.ts +21 -0
  329. package/mobile/src/api/RetailAPI/getTaskStatus.ts +3 -3
  330. package/mobile/src/api/RetailAPI/regionOffices.ts +18 -12
  331. package/mobile/src/api/RetailAPI/sendCode.ts +14 -2
  332. package/mobile/src/api/RetailAPI/sendSignalToProcess.ts +1 -6
  333. package/mobile/src/api/RetailAPI/updateProfileEsia.ts +2 -2
  334. package/mobile/src/api/RetailAPI/updateRefreshToken.ts +6 -6
  335. package/mobile/src/api/RetailAPI/updateUserProfile.ts +2 -2
  336. package/mobile/src/api/RetailAPI/updateUserTask.ts +2 -2
  337. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -3
  338. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +5 -4
  339. package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +9 -8
  340. package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -2
  341. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -1
  342. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +20 -12
  343. package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  344. package/mobile/src/ui-kit/FormField/Fields/AddressRetailField.tsx +3 -4
  345. package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +12 -3
  346. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +12 -6
  347. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
  348. package/package.json +1 -1
  349. package/src/api/RetailAPI/checkCaptcha.ts +3 -1
  350. package/src/api/RetailAPI/checkCode.ts +7 -5
  351. package/src/api/RetailAPI/createCaptcha.ts +3 -1
  352. package/src/api/RetailAPI/createDraftTask.ts +12 -3
  353. package/src/api/RetailAPI/createUserProfile.ts +4 -2
  354. package/src/api/RetailAPI/doRequest.ts +19 -9
  355. package/src/api/RetailAPI/feedbackById.ts +2 -2
  356. package/src/api/RetailAPI/getCardTypes.ts +20 -0
  357. package/src/api/RetailAPI/getLink.ts +2 -2
  358. package/src/api/RetailAPI/getPaymentSystems.ts +21 -0
  359. package/src/api/RetailAPI/getTaskStatus.ts +3 -3
  360. package/src/api/RetailAPI/regionOffices.ts +18 -12
  361. package/src/api/RetailAPI/sendCode.ts +14 -2
  362. package/src/api/RetailAPI/sendSignalToProcess.ts +1 -6
  363. package/src/api/RetailAPI/updateProfileEsia.ts +2 -2
  364. package/src/api/RetailAPI/updateRefreshToken.ts +6 -6
  365. package/src/api/RetailAPI/updateUserProfile.ts +2 -2
  366. package/src/api/RetailAPI/updateUserTask.ts +2 -2
  367. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -3
  368. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +5 -4
  369. package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +9 -8
  370. package/src/components/CreditCardForm/formStateMap.tsx +1 -2
  371. package/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -1
  372. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +20 -12
  373. package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  374. package/src/ui-kit/FormField/Fields/AddressRetailField.tsx +3 -4
  375. package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +12 -3
  376. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +12 -6
  377. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
  378. package/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  379. package/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  380. package/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  381. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  382. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -16
  383. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  384. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  385. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -9
  386. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  387. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  388. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -25
  389. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  390. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  391. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -13
  392. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  393. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  394. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -6
  395. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  396. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  397. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -22
  398. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  399. package/mobile/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  400. package/mobile/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  401. package/mobile/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  402. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  403. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -16
  404. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  405. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  406. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -9
  407. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  408. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  409. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -25
  410. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  411. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  412. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -13
  413. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  414. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  415. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -6
  416. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  417. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  418. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -22
  419. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  420. package/mobile/src/ui-kit/CaptchaDialog/handleCheckCaptcha.ts +0 -25
  421. package/mobile/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +0 -9
  422. package/mobile/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +0 -43
  423. package/src/ui-kit/CaptchaDialog/handleCheckCaptcha.ts +0 -25
  424. package/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +0 -9
  425. package/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +0 -43
@@ -1,4 +1,4 @@
1
- import { doRequest } from './doRequest';
1
+ import { fetchRetailJSON } from './doRequest';
2
2
 
3
3
  export type CreateDraftTaskBody = {
4
4
  profileId: number;
@@ -10,5 +10,14 @@ export type CreateDraftTaskResponse = {
10
10
  participantId: number;
11
11
  };
12
12
 
13
- export const createDraftTask = (body: CreateDraftTaskBody) =>
14
- doRequest<CreateDraftTaskResponse>('/user-data/createDraftTask', 'POST', body);
13
+ export const createDraftTask = async (
14
+ body: CreateDraftTaskBody,
15
+ ): Promise<CreateDraftTaskResponse> => {
16
+ const res = await fetchRetailJSON<CreateDraftTaskResponse>(
17
+ '/user-data/createDraftTask',
18
+ 'POST',
19
+ body,
20
+ );
21
+
22
+ return res || ({} as CreateDraftTaskResponse);
23
+ };
@@ -1,4 +1,4 @@
1
- import { doRequest } from './doRequest';
1
+ import { fetchRetailJSON } from './doRequest';
2
2
 
3
3
  export interface RetailUserProfile {
4
4
  id?: number;
@@ -10,4 +10,6 @@ interface CreateUserProfileType {
10
10
  }
11
11
 
12
12
  export const createUserProfile = (body: CreateUserProfileType) =>
13
- doRequest<CreateUserProfileType>('/public-data/createUserProfile', 'POST', body);
13
+ fetchRetailJSON<CreateUserProfileType>('/public-data/createUserProfile', 'POST', body).then(
14
+ (res) => res?.profile?.id || null,
15
+ );
@@ -1,11 +1,27 @@
1
1
  import { API_BASE_URI } from '../apiBaseUrl';
2
2
 
3
- export async function doRequest<R>(
3
+ export const fetchRetailJSON = async <R>(
4
4
  url: string,
5
5
  method: 'POST' | 'GET' | 'PUT',
6
6
  body?: any,
7
- ): Promise<R> {
8
- const response = await fetch(`${API_BASE_URI}${url}`, {
7
+ ): Promise<R | null> => {
8
+ try {
9
+ const response = await doRequest(url, method, body);
10
+
11
+ return response.json();
12
+ } catch (err) {
13
+ console.error(err);
14
+
15
+ return null;
16
+ }
17
+ };
18
+
19
+ export async function doRequest(
20
+ url: string,
21
+ method: 'POST' | 'GET' | 'PUT',
22
+ body?: any,
23
+ ): Promise<Response> {
24
+ return globalThis?.fetch?.(`${API_BASE_URI}${url}`, {
9
25
  method,
10
26
  headers: {
11
27
  'Content-Type': 'application/json',
@@ -14,14 +30,8 @@ export async function doRequest<R>(
14
30
  credentials: 'include',
15
31
  body: body ? JSON.stringify(body) : null,
16
32
  });
17
-
18
- // TODO: add error handling
19
- return isJSON(response) ? response.json() : response;
20
33
  }
21
34
 
22
- // TODO: Need delete isJSON
23
- const isJSON = (response: Response) => response.headers.get('Content-Type') === 'application/json';
24
-
25
35
  const getAuthorizationHeaders = () => {
26
36
  const token = sessionStorage.getItem('accessToken');
27
37
 
@@ -1,10 +1,10 @@
1
1
  import { doRequest } from './doRequest';
2
2
 
3
3
  export const feedbackById = async (id: number, convertToPng = false) => {
4
- const response: Response = await doRequest(
4
+ const response = await doRequest(
5
5
  `/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`,
6
6
  'GET',
7
7
  );
8
8
 
9
- return await response.blob();
9
+ return response ? await response.blob() : new Blob();
10
10
  };
@@ -0,0 +1,20 @@
1
+ import { doRequest } from './doRequest';
2
+
3
+ export type CardTypeData = {
4
+ type: string;
5
+ key: string;
6
+ value: string;
7
+ displayOrder: number;
8
+ description: string;
9
+ };
10
+
11
+ export const getCardTypes = async (paymentSystemType: string) => {
12
+ const response: Response = await doRequest('/dictionaryFiltered', 'POST', {
13
+ type: 'CARD_TYPE',
14
+ presets: { paymentSystemType, creditProgramId: 13 },
15
+ });
16
+
17
+ const data: CardTypeData[] = await response?.json();
18
+
19
+ return data;
20
+ };
@@ -1,4 +1,4 @@
1
- import { doRequest } from './doRequest';
1
+ import { fetchRetailJSON } from './doRequest';
2
2
 
3
3
  export type GetLinkBody = {
4
4
  redirectUri: string;
@@ -9,4 +9,4 @@ export type GetLinkResponse = {
9
9
  };
10
10
 
11
11
  export const getLink = (body: GetLinkBody) =>
12
- doRequest<GetLinkResponse>('/esia/getLink', 'POST', body);
12
+ fetchRetailJSON<GetLinkResponse>('/esia/getLink', 'POST', body);
@@ -0,0 +1,21 @@
1
+ import { doRequest } from './doRequest';
2
+
3
+ type PaymentSystemResponse = {
4
+ paymentSystems?: {
5
+ name: string;
6
+ type: string;
7
+ }[];
8
+ };
9
+
10
+ export const getPaymentSystems = async () => {
11
+ const response: Response = await doRequest('/public-data/creditProgramConditions', 'POST', {
12
+ creditProgramId: 13,
13
+ });
14
+
15
+ const data: PaymentSystemResponse = await response?.json();
16
+
17
+ return data?.paymentSystems?.map((paymentSystem) => ({
18
+ id: paymentSystem.type,
19
+ text: paymentSystem.name,
20
+ }));
21
+ };
@@ -1,4 +1,4 @@
1
- import { doRequest } from './doRequest';
1
+ import { fetchRetailJSON } from './doRequest';
2
2
 
3
3
  export enum STATUS_TYPE {
4
4
  process = 'IN_PROCESS',
@@ -7,10 +7,10 @@ export enum STATUS_TYPE {
7
7
  rework = 'REVISION',
8
8
  }
9
9
 
10
- interface GetTaskStatusResponse {
10
+ export interface GetTaskStatusResponse {
11
11
  statusCd: STATUS_TYPE;
12
12
  taskId: number;
13
13
  }
14
14
 
15
15
  export const getTaskStatus = (body: { taskId: number | null }) =>
16
- doRequest<GetTaskStatusResponse>('/user-data/getTaskStatus', 'POST', body);
16
+ fetchRetailJSON<GetTaskStatusResponse>('/user-data/getTaskStatus', 'POST', body);
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_CENTER_COORDS } from './../../ui-kit/YandexMap/YandexMap';
2
- import { doRequest } from './doRequest';
2
+ import { fetchRetailJSON } from './doRequest';
3
3
 
4
4
  export type OfficeType = {
5
5
  address?: string;
@@ -18,19 +18,25 @@ export interface RegionOfficesResponseType {
18
18
  offices: OfficeType[];
19
19
  }
20
20
 
21
- export const regionOffices = async (regionKey: string) => {
22
- const response: Response = await doRequest('/public-data/regionOffices', 'POST', {
23
- regionRfCd: {
24
- key: regionKey,
21
+ export const fetchRegionOffices = async (regionKey: string): Promise<OfficeType[]> => {
22
+ const response = await fetchRetailJSON<RegionOfficesResponseType>(
23
+ '/public-data/regionOffices',
24
+ 'POST',
25
+ {
26
+ regionRfCd: {
27
+ key: regionKey,
28
+ },
29
+ cashCardFlg: true,
25
30
  },
26
- cashCardFlg: true,
27
- });
31
+ );
28
32
 
29
- return await response.json().then((_) =>
30
- _?.offices?.map((office: OfficeType) => ({
33
+ return (
34
+ response?.offices?.map((office: OfficeType) => ({
31
35
  ...office,
32
- gpsLatitude: (office.latitude ?? DEFAULT_CENTER_COORDS[0]).toString().replace(',', '.'),
33
- gpsLongitude: (office.longitude ?? DEFAULT_CENTER_COORDS[1]).toString().replace(',', '.'),
34
- })),
36
+ gpsLatitude: formatCoordinate(office.latitude ?? DEFAULT_CENTER_COORDS[0]),
37
+ gpsLongitude: formatCoordinate(office.longitude ?? DEFAULT_CENTER_COORDS[1]),
38
+ })) || []
35
39
  );
36
40
  };
41
+
42
+ const formatCoordinate = (coordinate: number) => Number(coordinate.toString().replace(',', '.'));
@@ -1,4 +1,4 @@
1
- import { doRequest } from './doRequest';
1
+ import { fetchRetailJSON } from './doRequest';
2
2
  import { type StatusType } from './StatusType';
3
3
 
4
4
  export type SendCodeBody = {
@@ -8,5 +8,17 @@ export type SendCodeBody = {
8
8
  };
9
9
  };
10
10
 
11
+ type SendCodeErrorResult = { errorMessage: string };
12
+
11
13
  export const sendCode = (body: SendCodeBody) =>
12
- doRequest<StatusType | { errorMessage: string }>('/sms/sendCode', 'POST', body);
14
+ fetchRetailJSON<StatusType | SendCodeErrorResult>('/sms/sendCode', 'POST', body).then(
15
+ (res) => !isErrorResult(res, body.phoneNumber),
16
+ );
17
+
18
+ const isErrorResult = (
19
+ res: StatusType | SendCodeErrorResult | null,
20
+ phoneNumber: string,
21
+ ): res is SendCodeErrorResult =>
22
+ Boolean(res) &&
23
+ typeof res !== 'string' &&
24
+ Boolean(res?.errorMessage.startsWith(`Too many request for phoneNumber [${phoneNumber}]`));
@@ -10,10 +10,5 @@ interface SendSignalToProcess {
10
10
  taskId: number | null;
11
11
  }
12
12
 
13
- interface SendSignalToProcessResponse {
14
- statusCd: string;
15
- taskId: number;
16
- }
17
-
18
13
  export const sendSignalToProcess = (body: SendSignalToProcess) =>
19
- doRequest<SendSignalToProcessResponse>('/user-data/sendSignalToProcess', 'POST', body);
14
+ doRequest('/user-data/sendSignalToProcess', 'POST', body);
@@ -1,4 +1,4 @@
1
- import { doRequest } from './doRequest';
1
+ import { fetchRetailJSON } from './doRequest';
2
2
 
3
3
  export type UpdateProfileEsiaBody = {
4
4
  code: string;
@@ -68,4 +68,4 @@ export type UpdateProfileEsiaResponse = {
68
68
  };
69
69
 
70
70
  export const updateProfileEsia = (body: UpdateProfileEsiaBody) =>
71
- doRequest<UpdateProfileEsiaResponse>('/esia/updateProfileEsia', 'POST', body);
71
+ fetchRetailJSON<UpdateProfileEsiaResponse>('/esia/updateProfileEsia', 'POST', body);
@@ -21,21 +21,21 @@ export const updateRefreshToken = () => {
21
21
  }
22
22
 
23
23
  const updateTokenRequest = async () => {
24
- const res = await doRequest<UpdateRefreshTokenBody | Response>('/auth/refresh', 'POST', {
24
+ const res = await doRequest('/auth/refresh', 'POST', {
25
25
  // eslint-disable-next-line camelcase
26
26
  refresh_token: refreshToken,
27
27
  // eslint-disable-next-line camelcase
28
28
  access_token: accessToken,
29
29
  });
30
30
 
31
- if (res instanceof Response) {
31
+ if (res) {
32
32
  handleStatus(res.status);
33
33
 
34
- return;
35
- }
34
+ const data: UpdateRefreshTokenBody = await res.json();
36
35
 
37
- globalThis.sessionStorage.setItem('refreshToken', res.refresh_token);
38
- globalThis.sessionStorage.setItem('accessToken', res.access_token);
36
+ globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
37
+ globalThis.sessionStorage.setItem('accessToken', data.access_token);
38
+ }
39
39
  };
40
40
 
41
41
  updateTokenRequest();
@@ -1,4 +1,4 @@
1
- import { doRequest } from './doRequest';
1
+ import { fetchRetailJSON } from './doRequest';
2
2
  import { type CreateUserProfileResponse } from './updateUserTask';
3
3
 
4
4
  export type UpdateUserProfileBody = {
@@ -23,4 +23,4 @@ export type UpdateUserProfileBody = {
23
23
  };
24
24
 
25
25
  export const updateUserProfile = (body: UpdateUserProfileBody) =>
26
- doRequest<CreateUserProfileResponse>('/user-data/updateUserProfile', 'PUT', body);
26
+ fetchRetailJSON<CreateUserProfileResponse>('/user-data/updateUserProfile', 'PUT', body);
@@ -1,5 +1,5 @@
1
1
  import { type Option } from '../../ui-kit/Select/Option';
2
- import { doRequest } from './doRequest';
2
+ import { fetchRetailJSON } from './doRequest';
3
3
 
4
4
  type ParticipantAddress = {
5
5
  addressType: {
@@ -140,4 +140,4 @@ export type CreateUserProfileResponse = {
140
140
  };
141
141
 
142
142
  export const updateUserTask = (body: UpdateUserTaskBody) =>
143
- doRequest<CreateUserProfileResponse>('/user-data/updateUserTask', 'PUT', body);
143
+ fetchRetailJSON<CreateUserProfileResponse>('/user-data/updateUserTask', 'PUT', body);
@@ -52,9 +52,7 @@ export const useApplicationLeadApi = ({
52
52
  }
53
53
 
54
54
  try {
55
- const {
56
- profile: { id: profileId },
57
- } = await createUserProfile({
55
+ const profileId = await createUserProfile({
58
56
  profile: { phone: formatPhone(formData.phone as string) },
59
57
  });
60
58
 
@@ -111,6 +109,7 @@ const updateUserData = async ({
111
109
  const transformedForm = transformOtherConsentsField(formData);
112
110
 
113
111
  await updateUserProfile(getUpdateUserProfileData(profileId, transformedForm));
112
+
114
113
  const { taskId, participantId } = await createDraftTask({
115
114
  profileId,
116
115
  programId,
@@ -124,6 +123,7 @@ const updateUserData = async ({
124
123
  formData: transformedForm,
125
124
  }),
126
125
  );
126
+
127
127
  saveUserData(participantId, taskId, profileId);
128
128
  saveForm(formData);
129
129
  };
@@ -22,10 +22,11 @@ export const useInitApplicationLead = (nextStepLink: string) => {
22
22
  redirectUri: globalThis.location?.href,
23
23
  });
24
24
 
25
- setLeadForm({
26
- ...leadForm,
27
- ...parseEsiaProfile(data),
28
- });
25
+ data &&
26
+ setLeadForm({
27
+ ...leadForm,
28
+ ...parseEsiaProfile(data),
29
+ });
29
30
 
30
31
  globalThis.location.href = nextStepLink;
31
32
  }
@@ -1,5 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { getTaskStatus, STATUS_TYPE } from '../../api/RetailAPI/getTaskStatus';
4
4
  import { sendSignalToProcess, type SignalType } from '../../api/RetailAPI/sendSignalToProcess';
5
5
  import { useLocalStorage } from '../../hooks/useLocalStorage';
@@ -24,13 +24,14 @@ export const CreditCardFormStatusTracker = JSX(() => {
24
24
  }
25
25
  })();
26
26
 
27
- const trackStatus = () =>
28
- getTaskStatus({ taskId }).then((res) => {
29
- if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
30
- clearInterval(pullingInterval);
31
- setStatus(res.statusCd);
32
- }
33
- });
27
+ const trackStatus = useCallback(async () => {
28
+ const res = await getTaskStatus({ taskId });
29
+
30
+ if (res && res?.statusCd !== STATUS_TYPE.process) {
31
+ clearInterval(pullingInterval);
32
+ setStatus(res.statusCd);
33
+ }
34
+ }, []);
34
35
 
35
36
  const pullingInterval = setInterval(trackStatus, 30000);
36
37
  }, []);
@@ -1,9 +1,8 @@
1
- import { PAYMENT_SYSTEM_TYPES } from '../../ui-kit/FormField/Fields/PaymentSystemField';
2
1
  import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
3
2
 
4
3
  export const formStateMap: Partial<FormState>[] = [
5
4
  {
6
- paymentSystem: PAYMENT_SYSTEM_TYPES[0].id,
5
+ paymentSystem: '',
7
6
  currency: 'rub',
8
7
  codeWord: '',
9
8
  },
@@ -27,7 +27,7 @@ export const CreditFormStatusTracker = JSX(() => {
27
27
  const trackStatus = () =>
28
28
  taskId &&
29
29
  getTaskStatus({ taskId }).then((res) => {
30
- if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
30
+ if (res?.statusCd && res.statusCd !== STATUS_TYPE.process) {
31
31
  clearInterval(pullingInterval);
32
32
  setStatus(res.statusCd);
33
33
  }
@@ -1,12 +1,12 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { checkCaptcha } from '../../api/RetailAPI/checkCaptcha';
4
+ import { createCaptcha } from '../../api/RetailAPI/createCaptcha';
3
5
  import { Button } from '../Button/Button';
4
6
  import { Dialog } from '../DialogManager/Dialog';
5
7
  import { Icon } from '../Icon/Icon';
6
8
  import { Input } from '../Input/Input';
7
9
  import { Logo } from '../Logo/Logo';
8
- import { handleCheckCaptcha } from './handleCheckCaptcha';
9
- import { handleCreateCaptcha } from './handleCreateCaptcha';
10
10
 
11
11
  export interface CaptchaDialogProps {
12
12
  phoneNumber: string;
@@ -21,10 +21,23 @@ export const CaptchaDialog = JSX<CaptchaDialogProps>(
21
21
  const [code, setCode] = useState('');
22
22
  const [hasError, setHasError] = useState(false);
23
23
 
24
- useEffect(() => {
25
- handleCreateCaptcha(setCaptcha, phoneNumber);
24
+ const handleCheckCaptcha = useCallback(async () => {
25
+ const isValidCode = await checkCaptcha({ captchaText: code });
26
+
27
+ if (isValidCode) {
28
+ sendCode?.();
29
+ close?.();
30
+ } else {
31
+ setHasError(isValidCode);
32
+ }
33
+ }, []);
34
+
35
+ const handleCreateCaptcha = useCallback(() => {
36
+ (async () => setCaptcha(URL.createObjectURL(await createCaptcha(phoneNumber))))();
26
37
  }, []);
27
38
 
39
+ useEffect(handleCreateCaptcha, []);
40
+
28
41
  return (
29
42
  <Dialog
30
43
  head={<Logo />}
@@ -35,7 +48,7 @@ export const CaptchaDialog = JSX<CaptchaDialogProps>(
35
48
  <div className="flex h-36 w-72">
36
49
  <img className="grow" src={captcha}></img>
37
50
  <div
38
- onClick={() => handleCreateCaptcha(setCaptcha, phoneNumber)}
51
+ onClick={handleCreateCaptcha}
39
52
  className="flex w-8 items-center justify-center cursor-pointer"
40
53
  >
41
54
  <Icon iconVersion="normal" name="RefreshIcon" />
@@ -52,12 +65,7 @@ export const CaptchaDialog = JSX<CaptchaDialogProps>(
52
65
  <Button onClick={close} version="secondary">
53
66
  Вернуться
54
67
  </Button>
55
- <Button
56
- type="submit"
57
- disabled={!code}
58
- onClick={() => handleCheckCaptcha({ code, setHasError, close, sendCode })}
59
- version="secondary"
60
- >
68
+ <Button type="submit" disabled={!code} onClick={handleCheckCaptcha} version="secondary">
61
69
  Отправить
62
70
  </Button>
63
71
  </div>
@@ -14,6 +14,7 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(function ({ handleClose
14
14
  const resp = await getLink({
15
15
  redirectUri: globalThis.location.href,
16
16
  });
17
+
17
18
  if (resp) {
18
19
  globalThis.location.href = resp.link;
19
20
  }
@@ -1,6 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
- import { regionOffices, type OfficeType } from '../../../api/RetailAPI/regionOffices';
3
+ import { fetchRegionOffices, type OfficeType } from '../../../api/RetailAPI/regionOffices';
4
4
  import { getOfficePoint } from '../../../components/OfficesAtmsMap/renderOfficeCard';
5
5
  import { useOfficesAtmsMapData } from '../../../components/OfficesAtmsMap/useOfficesAtmsMapData';
6
6
  import { useLeadFormData } from '../../../hooks/useLeadFormData';
@@ -21,9 +21,8 @@ export const AddressRetailField = JSX<CustomFieldProps>(({ field, input }) => {
21
21
 
22
22
  useEffect(() => {
23
23
  (async () => {
24
- const officesList = await regionOffices((regionValue?.key as string) ?? '');
25
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
26
- setOffices(officesList || []);
24
+ const officesList = await fetchRegionOffices((regionValue?.key as string) ?? '');
25
+ setOffices(officesList);
27
26
  })();
28
27
 
29
28
  if (regionValue?.key) {
@@ -1,15 +1,24 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useLeadFormData } from '../../../hooks/useLeadFormData';
2
+ import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { getCardTypes, type CardTypeData } from '../../../api/RetailAPI/getCardTypes';
3
4
  import { type CustomFieldProps } from '../CustomFieldProps';
4
5
  import { SelectField } from '../SelectField';
5
6
 
6
7
  export const CardCategoryField = JSX<CustomFieldProps>(({ field, input }) => {
7
- const { data: cardCategory } = useLeadFormData('CARD_TYPE');
8
+ const [cardTypes, setCardTypes] = useState<CardTypeData[]>([]);
9
+ const selectedPaymentSystem = field('paymentSystem').value;
10
+
11
+ useEffect(() => {
12
+ (async () => {
13
+ const fetchedCardTypes = await getCardTypes(selectedPaymentSystem as string);
14
+ setCardTypes(fetchedCardTypes);
15
+ })();
16
+ }, [selectedPaymentSystem]);
8
17
 
9
18
  return (
10
19
  <SelectField
11
20
  field={field}
12
- source={cardCategory}
21
+ source={cardTypes}
13
22
  label="Категория карты"
14
23
  fieldName="cardCategory"
15
24
  input={input}
@@ -1,23 +1,29 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { getPaymentSystems } from '../../../api/RetailAPI/getPaymentSystems';
2
4
  import { type RadioButtonItem } from '../../RadioButtonGroup/RadioButtonGroup';
3
5
  import { RadioButtonGroupControl } from '../../RadioButtonGroup/RadioButtonGroupControl';
4
6
  import { type CustomFieldProps } from '../CustomFieldProps';
5
7
  import { validatorObj } from '../getObjectValidator';
6
8
  import { getValidation } from '../getValidation';
7
9
 
8
- export const PAYMENT_SYSTEM_TYPES: RadioButtonItem[] = [
9
- { id: 'mir', text: 'Карта МИР' },
10
- { id: 'union_pay', text: 'UnionPay' },
11
- ];
12
-
13
10
  export const PaymentSystemField = JSX<CustomFieldProps>(({ field, input }) => {
14
11
  const { value, onChange } = field('paymentSystem');
15
12
 
13
+ const [paymentSystemOptions, setPaymentSystemOptions] = useState<RadioButtonItem[]>([]);
14
+
15
+ useEffect(() => {
16
+ (async () => {
17
+ const fetchedPaymentSystems = await getPaymentSystems();
18
+ setPaymentSystemOptions(fetchedPaymentSystems || []);
19
+ })();
20
+ }, []);
21
+
16
22
  return (
17
23
  <RadioButtonGroupControl
18
24
  label="Платежная система"
19
25
  orientation="horizontal"
20
- items={PAYMENT_SYSTEM_TYPES}
26
+ items={paymentSystemOptions}
21
27
  value={value}
22
28
  onChange={(_) => onChange?.(_)}
23
29
  {...getValidation(field('paymentSystem'), validatorObj.paymentSystem, input?.required)}
@@ -1,5 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { sendCode } from '../../api/RetailAPI/sendCode';
3
4
  import { Headline } from '../../components/Headline/Headline';
4
5
  import { noop } from '../../utils/noop';
5
6
  import { useCaptchaDialog } from '../CaptchaDialog/useCaptchaDialog';
@@ -8,7 +9,6 @@ import { LinkButton } from '../LinkButton/LinkButton';
8
9
  import { Loader } from '../Loader/Loader';
9
10
  import { RichText } from '../RichText/RichText';
10
11
  import { Timer } from '../TimerCircle/Timer';
11
- import { handleSendCode } from './handleSendCode';
12
12
  import { InputCode } from './InputCode';
13
13
  import { SubmitButton } from './SubmitButton';
14
14
  import { useVerifyPhoneDialogSubmit } from './useVerifyPhoneDialogSubmit';
@@ -51,19 +51,24 @@ export const VerifyPhoneDialog = JSX<VerifyPhoneDialogProps>(
51
51
  setAttemps,
52
52
  } = useVerifyPhoneDialogSubmit({ values, close });
53
53
 
54
- const sendCode = useCallback(() => {
55
- handleSendCode({
56
- phoneNumber,
57
- captchaDialog,
58
- setTimeNextReq,
59
- setIsTimerStarted,
60
- setAttemps,
54
+ const handleSendCode = useCallback(async () => {
55
+ const isSuccessSendCode = await sendCode({
56
+ phoneNumber: phoneNumber,
57
+ smsCodesSetName: { key: 'AUTHENTICATION' },
61
58
  });
59
+
60
+ if (isSuccessSendCode) {
61
+ setAttemps(0);
62
+ setTimeNextReq(180);
63
+ setIsTimerStarted(true);
64
+ } else {
65
+ captchaDialog.open();
66
+ }
62
67
  }, []);
63
- const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode }, onClose);
68
+ const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode: handleSendCode }, onClose);
64
69
 
65
70
  useEffect(() => {
66
- sendCode();
71
+ handleSendCode();
67
72
  }, []);
68
73
 
69
74
  return (
@@ -85,7 +90,7 @@ export const VerifyPhoneDialog = JSX<VerifyPhoneDialogProps>(
85
90
  hasError={hasError}
86
91
  />
87
92
  ) : null}
88
- {renderText(timeNextReq, setTimeNextReq, sendCode)}
93
+ {renderText(timeNextReq, setTimeNextReq, handleSendCode)}
89
94
 
90
95
  <RichText itemSize="list-s" __html={__html} />
91
96
 
@@ -106,7 +111,7 @@ const renderTextButton = (textButton: string, isDisabled: boolean, handleSubmit:
106
111
  const renderText = (
107
112
  timeNextReq: number,
108
113
  setTimeNextReq: React.Dispatch<React.SetStateAction<number>>,
109
- sendCode: () => void,
114
+ handleSendCode: () => void,
110
115
  ) =>
111
116
  timeNextReq ? (
112
117
  <div className="flex flex-row text-l font-light text-base">
@@ -114,7 +119,7 @@ const renderText = (
114
119
  <Timer className="text-base ml-1" time={timeNextReq} setTime={setTimeNextReq} />
115
120
  </div>
116
121
  ) : (
117
- <LinkButton onClick={sendCode} className="text-primary-main">
122
+ <LinkButton onClick={handleSendCode} className="text-primary-main">
118
123
  Получить новый код
119
124
  </LinkButton>
120
125
  );