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

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 (357) 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/getLink.d.ts +1 -1
  6. package/bundle/api/RetailAPI/getTaskStatus.d.ts +2 -3
  7. package/bundle/api/RetailAPI/regionOffices.d.ts +1 -1
  8. package/bundle/api/RetailAPI/sendCode.d.ts +1 -4
  9. package/bundle/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  10. package/bundle/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  11. package/bundle/api/RetailAPI/updateUserProfile.d.ts +1 -1
  12. package/bundle/api/RetailAPI/updateUserTask.d.ts +1 -1
  13. package/bundle/bundle.umd.js +93 -96
  14. package/bundle/bundle.umd.min.js +1 -1
  15. package/dist/api/RetailAPI/checkCaptcha.d.ts +1 -1
  16. package/dist/api/RetailAPI/checkCaptcha.js +3 -1
  17. package/dist/api/RetailAPI/checkCaptcha.js.map +1 -1
  18. package/dist/api/RetailAPI/checkCode.js +5 -3
  19. package/dist/api/RetailAPI/checkCode.js.map +1 -1
  20. package/dist/api/RetailAPI/createCaptcha.d.ts +1 -1
  21. package/dist/api/RetailAPI/createCaptcha.js +1 -1
  22. package/dist/api/RetailAPI/createCaptcha.js.map +1 -1
  23. package/dist/api/RetailAPI/createDraftTask.js +4 -1
  24. package/dist/api/RetailAPI/createDraftTask.js.map +1 -1
  25. package/dist/api/RetailAPI/createUserProfile.d.ts +1 -1
  26. package/dist/api/RetailAPI/createUserProfile.js +1 -1
  27. package/dist/api/RetailAPI/createUserProfile.js.map +1 -1
  28. package/dist/api/RetailAPI/doRequest.d.ts +2 -1
  29. package/dist/api/RetailAPI/doRequest.js +13 -6
  30. package/dist/api/RetailAPI/doRequest.js.map +1 -1
  31. package/dist/api/RetailAPI/feedbackById.js +1 -1
  32. package/dist/api/RetailAPI/feedbackById.js.map +1 -1
  33. package/dist/api/RetailAPI/getLink.d.ts +1 -1
  34. package/dist/api/RetailAPI/getLink.js +1 -1
  35. package/dist/api/RetailAPI/getLink.js.map +1 -1
  36. package/dist/api/RetailAPI/getTaskStatus.d.ts +2 -3
  37. package/dist/api/RetailAPI/getTaskStatus.js +1 -1
  38. package/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  39. package/dist/api/RetailAPI/regionOffices.d.ts +1 -1
  40. package/dist/api/RetailAPI/regionOffices.js +9 -8
  41. package/dist/api/RetailAPI/regionOffices.js.map +1 -1
  42. package/dist/api/RetailAPI/sendCode.d.ts +1 -4
  43. package/dist/api/RetailAPI/sendCode.js +4 -1
  44. package/dist/api/RetailAPI/sendCode.js.map +1 -1
  45. package/dist/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  46. package/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  47. package/dist/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  48. package/dist/api/RetailAPI/updateProfileEsia.js +1 -1
  49. package/dist/api/RetailAPI/updateProfileEsia.js.map +1 -1
  50. package/dist/api/RetailAPI/updateRefreshToken.js +4 -4
  51. package/dist/api/RetailAPI/updateRefreshToken.js.map +1 -1
  52. package/dist/api/RetailAPI/updateUserProfile.d.ts +1 -1
  53. package/dist/api/RetailAPI/updateUserProfile.js +1 -1
  54. package/dist/api/RetailAPI/updateUserProfile.js.map +1 -1
  55. package/dist/api/RetailAPI/updateUserTask.d.ts +1 -1
  56. package/dist/api/RetailAPI/updateUserTask.js +1 -1
  57. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  58. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  59. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  60. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  61. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  62. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +4 -3
  63. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  64. package/dist/components/CreditForm/CreditFormStatusTracker.js +1 -1
  65. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  66. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +16 -5
  67. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  68. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  69. package/dist/ui-kit/FormField/Fields/AddressRetailField.js +2 -3
  70. package/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  71. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  72. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  73. package/lib/api/RetailAPI/checkCaptcha.d.ts +1 -1
  74. package/lib/api/RetailAPI/checkCaptcha.js +3 -1
  75. package/lib/api/RetailAPI/checkCaptcha.js.map +1 -1
  76. package/lib/api/RetailAPI/checkCode.js +6 -4
  77. package/lib/api/RetailAPI/checkCode.js.map +1 -1
  78. package/lib/api/RetailAPI/createCaptcha.d.ts +1 -1
  79. package/lib/api/RetailAPI/createCaptcha.js +1 -1
  80. package/lib/api/RetailAPI/createCaptcha.js.map +1 -1
  81. package/lib/api/RetailAPI/createDraftTask.js +5 -2
  82. package/lib/api/RetailAPI/createDraftTask.js.map +1 -1
  83. package/lib/api/RetailAPI/createUserProfile.d.ts +1 -1
  84. package/lib/api/RetailAPI/createUserProfile.js +2 -2
  85. package/lib/api/RetailAPI/createUserProfile.js.map +1 -1
  86. package/lib/api/RetailAPI/doRequest.d.ts +2 -1
  87. package/lib/api/RetailAPI/doRequest.js +11 -5
  88. package/lib/api/RetailAPI/doRequest.js.map +1 -1
  89. package/lib/api/RetailAPI/feedbackById.js +1 -1
  90. package/lib/api/RetailAPI/feedbackById.js.map +1 -1
  91. package/lib/api/RetailAPI/getLink.d.ts +1 -1
  92. package/lib/api/RetailAPI/getLink.js +2 -2
  93. package/lib/api/RetailAPI/getLink.js.map +1 -1
  94. package/lib/api/RetailAPI/getTaskStatus.d.ts +2 -3
  95. package/lib/api/RetailAPI/getTaskStatus.js +2 -2
  96. package/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  97. package/lib/api/RetailAPI/regionOffices.d.ts +1 -1
  98. package/lib/api/RetailAPI/regionOffices.js +8 -7
  99. package/lib/api/RetailAPI/regionOffices.js.map +1 -1
  100. package/lib/api/RetailAPI/sendCode.d.ts +1 -4
  101. package/lib/api/RetailAPI/sendCode.js +5 -2
  102. package/lib/api/RetailAPI/sendCode.js.map +1 -1
  103. package/lib/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  104. package/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  105. package/lib/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  106. package/lib/api/RetailAPI/updateProfileEsia.js +2 -2
  107. package/lib/api/RetailAPI/updateProfileEsia.js.map +1 -1
  108. package/lib/api/RetailAPI/updateRefreshToken.js +4 -4
  109. package/lib/api/RetailAPI/updateRefreshToken.js.map +1 -1
  110. package/lib/api/RetailAPI/updateUserProfile.d.ts +1 -1
  111. package/lib/api/RetailAPI/updateUserProfile.js +2 -2
  112. package/lib/api/RetailAPI/updateUserProfile.js.map +1 -1
  113. package/lib/api/RetailAPI/updateUserTask.d.ts +1 -1
  114. package/lib/api/RetailAPI/updateUserTask.js +2 -2
  115. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  116. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  117. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  118. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  119. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  120. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -4
  121. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  122. package/lib/components/CreditForm/CreditFormStatusTracker.js +1 -1
  123. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  124. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +17 -6
  125. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  126. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  127. package/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -4
  128. package/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  129. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  130. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  131. package/mobile/bundle/api/RetailAPI/checkCaptcha.d.ts +1 -1
  132. package/mobile/bundle/api/RetailAPI/createCaptcha.d.ts +1 -1
  133. package/mobile/bundle/api/RetailAPI/createUserProfile.d.ts +1 -1
  134. package/mobile/bundle/api/RetailAPI/doRequest.d.ts +2 -1
  135. package/mobile/bundle/api/RetailAPI/getLink.d.ts +1 -1
  136. package/mobile/bundle/api/RetailAPI/getTaskStatus.d.ts +2 -3
  137. package/mobile/bundle/api/RetailAPI/regionOffices.d.ts +1 -1
  138. package/mobile/bundle/api/RetailAPI/sendCode.d.ts +1 -4
  139. package/mobile/bundle/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  140. package/mobile/bundle/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  141. package/mobile/bundle/api/RetailAPI/updateUserProfile.d.ts +1 -1
  142. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +1 -1
  143. package/mobile/bundle/bundle.umd.js +93 -96
  144. package/mobile/bundle/bundle.umd.min.js +1 -1
  145. package/mobile/dist/api/RetailAPI/checkCaptcha.d.ts +1 -1
  146. package/mobile/dist/api/RetailAPI/checkCaptcha.js +3 -1
  147. package/mobile/dist/api/RetailAPI/checkCaptcha.js.map +1 -1
  148. package/mobile/dist/api/RetailAPI/checkCode.js +5 -3
  149. package/mobile/dist/api/RetailAPI/checkCode.js.map +1 -1
  150. package/mobile/dist/api/RetailAPI/createCaptcha.d.ts +1 -1
  151. package/mobile/dist/api/RetailAPI/createCaptcha.js +1 -1
  152. package/mobile/dist/api/RetailAPI/createCaptcha.js.map +1 -1
  153. package/mobile/dist/api/RetailAPI/createDraftTask.js +4 -1
  154. package/mobile/dist/api/RetailAPI/createDraftTask.js.map +1 -1
  155. package/mobile/dist/api/RetailAPI/createUserProfile.d.ts +1 -1
  156. package/mobile/dist/api/RetailAPI/createUserProfile.js +1 -1
  157. package/mobile/dist/api/RetailAPI/createUserProfile.js.map +1 -1
  158. package/mobile/dist/api/RetailAPI/doRequest.d.ts +2 -1
  159. package/mobile/dist/api/RetailAPI/doRequest.js +13 -6
  160. package/mobile/dist/api/RetailAPI/doRequest.js.map +1 -1
  161. package/mobile/dist/api/RetailAPI/feedbackById.js +1 -1
  162. package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -1
  163. package/mobile/dist/api/RetailAPI/getLink.d.ts +1 -1
  164. package/mobile/dist/api/RetailAPI/getLink.js +1 -1
  165. package/mobile/dist/api/RetailAPI/getLink.js.map +1 -1
  166. package/mobile/dist/api/RetailAPI/getTaskStatus.d.ts +2 -3
  167. package/mobile/dist/api/RetailAPI/getTaskStatus.js +1 -1
  168. package/mobile/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  169. package/mobile/dist/api/RetailAPI/regionOffices.d.ts +1 -1
  170. package/mobile/dist/api/RetailAPI/regionOffices.js +9 -8
  171. package/mobile/dist/api/RetailAPI/regionOffices.js.map +1 -1
  172. package/mobile/dist/api/RetailAPI/sendCode.d.ts +1 -4
  173. package/mobile/dist/api/RetailAPI/sendCode.js +4 -1
  174. package/mobile/dist/api/RetailAPI/sendCode.js.map +1 -1
  175. package/mobile/dist/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  176. package/mobile/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  177. package/mobile/dist/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  178. package/mobile/dist/api/RetailAPI/updateProfileEsia.js +1 -1
  179. package/mobile/dist/api/RetailAPI/updateProfileEsia.js.map +1 -1
  180. package/mobile/dist/api/RetailAPI/updateRefreshToken.js +4 -4
  181. package/mobile/dist/api/RetailAPI/updateRefreshToken.js.map +1 -1
  182. package/mobile/dist/api/RetailAPI/updateUserProfile.d.ts +1 -1
  183. package/mobile/dist/api/RetailAPI/updateUserProfile.js +1 -1
  184. package/mobile/dist/api/RetailAPI/updateUserProfile.js.map +1 -1
  185. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +1 -1
  186. package/mobile/dist/api/RetailAPI/updateUserTask.js +1 -1
  187. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  188. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  189. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  190. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  191. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  192. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +4 -3
  193. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  194. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +1 -1
  195. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  196. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +16 -5
  197. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  198. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  199. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js +2 -3
  200. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  201. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  202. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  203. package/mobile/lib/api/RetailAPI/checkCaptcha.d.ts +1 -1
  204. package/mobile/lib/api/RetailAPI/checkCaptcha.js +3 -1
  205. package/mobile/lib/api/RetailAPI/checkCaptcha.js.map +1 -1
  206. package/mobile/lib/api/RetailAPI/checkCode.js +6 -4
  207. package/mobile/lib/api/RetailAPI/checkCode.js.map +1 -1
  208. package/mobile/lib/api/RetailAPI/createCaptcha.d.ts +1 -1
  209. package/mobile/lib/api/RetailAPI/createCaptcha.js +1 -1
  210. package/mobile/lib/api/RetailAPI/createCaptcha.js.map +1 -1
  211. package/mobile/lib/api/RetailAPI/createDraftTask.js +5 -2
  212. package/mobile/lib/api/RetailAPI/createDraftTask.js.map +1 -1
  213. package/mobile/lib/api/RetailAPI/createUserProfile.d.ts +1 -1
  214. package/mobile/lib/api/RetailAPI/createUserProfile.js +2 -2
  215. package/mobile/lib/api/RetailAPI/createUserProfile.js.map +1 -1
  216. package/mobile/lib/api/RetailAPI/doRequest.d.ts +2 -1
  217. package/mobile/lib/api/RetailAPI/doRequest.js +11 -5
  218. package/mobile/lib/api/RetailAPI/doRequest.js.map +1 -1
  219. package/mobile/lib/api/RetailAPI/feedbackById.js +1 -1
  220. package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -1
  221. package/mobile/lib/api/RetailAPI/getLink.d.ts +1 -1
  222. package/mobile/lib/api/RetailAPI/getLink.js +2 -2
  223. package/mobile/lib/api/RetailAPI/getLink.js.map +1 -1
  224. package/mobile/lib/api/RetailAPI/getTaskStatus.d.ts +2 -3
  225. package/mobile/lib/api/RetailAPI/getTaskStatus.js +2 -2
  226. package/mobile/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  227. package/mobile/lib/api/RetailAPI/regionOffices.d.ts +1 -1
  228. package/mobile/lib/api/RetailAPI/regionOffices.js +8 -7
  229. package/mobile/lib/api/RetailAPI/regionOffices.js.map +1 -1
  230. package/mobile/lib/api/RetailAPI/sendCode.d.ts +1 -4
  231. package/mobile/lib/api/RetailAPI/sendCode.js +5 -2
  232. package/mobile/lib/api/RetailAPI/sendCode.js.map +1 -1
  233. package/mobile/lib/api/RetailAPI/sendSignalToProcess.d.ts +1 -5
  234. package/mobile/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -1
  235. package/mobile/lib/api/RetailAPI/updateProfileEsia.d.ts +1 -1
  236. package/mobile/lib/api/RetailAPI/updateProfileEsia.js +2 -2
  237. package/mobile/lib/api/RetailAPI/updateProfileEsia.js.map +1 -1
  238. package/mobile/lib/api/RetailAPI/updateRefreshToken.js +4 -4
  239. package/mobile/lib/api/RetailAPI/updateRefreshToken.js.map +1 -1
  240. package/mobile/lib/api/RetailAPI/updateUserProfile.d.ts +1 -1
  241. package/mobile/lib/api/RetailAPI/updateUserProfile.js +2 -2
  242. package/mobile/lib/api/RetailAPI/updateUserProfile.js.map +1 -1
  243. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +1 -1
  244. package/mobile/lib/api/RetailAPI/updateUserTask.js +2 -2
  245. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  246. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  247. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  248. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -4
  249. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  250. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -4
  251. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  252. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +1 -1
  253. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  254. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +17 -6
  255. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  256. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  257. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -4
  258. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  259. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +17 -12
  260. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  261. package/mobile/src/api/RetailAPI/checkCaptcha.ts +3 -1
  262. package/mobile/src/api/RetailAPI/checkCode.ts +7 -5
  263. package/mobile/src/api/RetailAPI/createCaptcha.ts +3 -1
  264. package/mobile/src/api/RetailAPI/createDraftTask.ts +12 -3
  265. package/mobile/src/api/RetailAPI/createUserProfile.ts +4 -2
  266. package/mobile/src/api/RetailAPI/doRequest.ts +19 -9
  267. package/mobile/src/api/RetailAPI/feedbackById.ts +2 -2
  268. package/mobile/src/api/RetailAPI/getLink.ts +2 -2
  269. package/mobile/src/api/RetailAPI/getTaskStatus.ts +3 -3
  270. package/mobile/src/api/RetailAPI/regionOffices.ts +18 -12
  271. package/mobile/src/api/RetailAPI/sendCode.ts +14 -2
  272. package/mobile/src/api/RetailAPI/sendSignalToProcess.ts +1 -6
  273. package/mobile/src/api/RetailAPI/updateProfileEsia.ts +2 -2
  274. package/mobile/src/api/RetailAPI/updateRefreshToken.ts +6 -6
  275. package/mobile/src/api/RetailAPI/updateUserProfile.ts +2 -2
  276. package/mobile/src/api/RetailAPI/updateUserTask.ts +2 -2
  277. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -3
  278. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +5 -4
  279. package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +9 -8
  280. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -1
  281. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +20 -12
  282. package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  283. package/mobile/src/ui-kit/FormField/Fields/AddressRetailField.tsx +3 -4
  284. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
  285. package/package.json +1 -1
  286. package/src/api/RetailAPI/checkCaptcha.ts +3 -1
  287. package/src/api/RetailAPI/checkCode.ts +7 -5
  288. package/src/api/RetailAPI/createCaptcha.ts +3 -1
  289. package/src/api/RetailAPI/createDraftTask.ts +12 -3
  290. package/src/api/RetailAPI/createUserProfile.ts +4 -2
  291. package/src/api/RetailAPI/doRequest.ts +19 -9
  292. package/src/api/RetailAPI/feedbackById.ts +2 -2
  293. package/src/api/RetailAPI/getLink.ts +2 -2
  294. package/src/api/RetailAPI/getTaskStatus.ts +3 -3
  295. package/src/api/RetailAPI/regionOffices.ts +18 -12
  296. package/src/api/RetailAPI/sendCode.ts +14 -2
  297. package/src/api/RetailAPI/sendSignalToProcess.ts +1 -6
  298. package/src/api/RetailAPI/updateProfileEsia.ts +2 -2
  299. package/src/api/RetailAPI/updateRefreshToken.ts +6 -6
  300. package/src/api/RetailAPI/updateUserProfile.ts +2 -2
  301. package/src/api/RetailAPI/updateUserTask.ts +2 -2
  302. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -3
  303. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +5 -4
  304. package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +9 -8
  305. package/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -1
  306. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +20 -12
  307. package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  308. package/src/ui-kit/FormField/Fields/AddressRetailField.tsx +3 -4
  309. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
  310. package/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  311. package/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  312. package/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  313. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  314. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -16
  315. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  316. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  317. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -9
  318. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  319. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  320. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -25
  321. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  322. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  323. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -13
  324. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  325. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  326. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -6
  327. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  328. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  329. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -22
  330. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  331. package/mobile/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  332. package/mobile/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  333. package/mobile/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  334. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  335. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -16
  336. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  337. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  338. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -9
  339. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  340. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  341. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -25
  342. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  343. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +0 -8
  344. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +0 -13
  345. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +0 -1
  346. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +0 -1
  347. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +0 -6
  348. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +0 -1
  349. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +0 -15
  350. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +0 -22
  351. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +0 -1
  352. package/mobile/src/ui-kit/CaptchaDialog/handleCheckCaptcha.ts +0 -25
  353. package/mobile/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +0 -9
  354. package/mobile/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +0 -43
  355. package/src/ui-kit/CaptchaDialog/handleCheckCaptcha.ts +0 -25
  356. package/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +0 -9
  357. package/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +0 -43
@@ -1,4 +1,4 @@
1
1
  export declare type CapchaTextType = {
2
2
  captchaText: string;
3
3
  };
4
- export declare const checkCaptcha: (body: CapchaTextType) => Promise<Response>;
4
+ export declare const checkCaptcha: (body: CapchaTextType) => Promise<boolean>;
@@ -1 +1 @@
1
- export declare const createCaptcha: (phoneNumber: string) => Promise<Response>;
1
+ export declare const createCaptcha: (phoneNumber: string) => Promise<Blob>;
@@ -5,5 +5,5 @@ export interface RetailUserProfile {
5
5
  interface CreateUserProfileType {
6
6
  profile: RetailUserProfile;
7
7
  }
8
- export declare const createUserProfile: (body: CreateUserProfileType) => Promise<CreateUserProfileType>;
8
+ export declare const createUserProfile: (body: CreateUserProfileType) => Promise<number | null>;
9
9
  export {};
@@ -1 +1,2 @@
1
- export declare function doRequest<R>(url: string, method: 'POST' | 'GET' | 'PUT', body?: any): Promise<R>;
1
+ export declare const fetchRetailJSON: <R>(url: string, method: 'POST' | 'GET' | 'PUT', body?: any) => Promise<R | null>;
2
+ export declare function doRequest(url: string, method: 'POST' | 'GET' | 'PUT', body?: any): Promise<Response>;
@@ -4,4 +4,4 @@ export declare type GetLinkBody = {
4
4
  export declare type GetLinkResponse = {
5
5
  link: string;
6
6
  };
7
- export declare const getLink: (body: GetLinkBody) => Promise<GetLinkResponse>;
7
+ export declare const getLink: (body: GetLinkBody) => Promise<GetLinkResponse | null>;
@@ -4,11 +4,10 @@ export declare enum STATUS_TYPE {
4
4
  fail = "CANCELLED",
5
5
  rework = "REVISION"
6
6
  }
7
- interface GetTaskStatusResponse {
7
+ export interface GetTaskStatusResponse {
8
8
  statusCd: STATUS_TYPE;
9
9
  taskId: number;
10
10
  }
11
11
  export declare const getTaskStatus: (body: {
12
12
  taskId: number | null;
13
- }) => Promise<GetTaskStatusResponse>;
14
- export {};
13
+ }) => Promise<GetTaskStatusResponse | null>;
@@ -13,4 +13,4 @@ export declare type OfficeType = {
13
13
  export interface RegionOfficesResponseType {
14
14
  offices: OfficeType[];
15
15
  }
16
- export declare const regionOffices: (regionKey: string) => Promise<any>;
16
+ export declare const fetchRegionOffices: (regionKey: string) => Promise<OfficeType[]>;
@@ -1,10 +1,7 @@
1
- import { type StatusType } from './StatusType';
2
1
  export declare type SendCodeBody = {
3
2
  phoneNumber: string;
4
3
  smsCodesSetName: {
5
4
  key: 'AUTHENTICATION' | 'SEND_TASK';
6
5
  };
7
6
  };
8
- export declare const sendCode: (body: SendCodeBody) => Promise<StatusType | {
9
- errorMessage: string;
10
- }>;
7
+ export declare const sendCode: (body: SendCodeBody) => Promise<boolean>;
@@ -3,9 +3,5 @@ interface SendSignalToProcess {
3
3
  signalType: SignalType;
4
4
  taskId: number | null;
5
5
  }
6
- interface SendSignalToProcessResponse {
7
- statusCd: string;
8
- taskId: number;
9
- }
10
- export declare const sendSignalToProcess: (body: SendSignalToProcess) => Promise<SendSignalToProcessResponse>;
6
+ export declare const sendSignalToProcess: (body: SendSignalToProcess) => Promise<Response>;
11
7
  export {};
@@ -63,4 +63,4 @@ export declare type UpdateProfileEsiaResponse = {
63
63
  apartment: string;
64
64
  };
65
65
  };
66
- export declare const updateProfileEsia: (body: UpdateProfileEsiaBody) => Promise<UpdateProfileEsiaResponse>;
66
+ export declare const updateProfileEsia: (body: UpdateProfileEsiaBody) => Promise<UpdateProfileEsiaResponse | null>;
@@ -19,4 +19,4 @@ export declare type UpdateUserProfileBody = {
19
19
  smsConsentBki?: string;
20
20
  };
21
21
  };
22
- export declare const updateUserProfile: (body: UpdateUserProfileBody) => Promise<CreateUserProfileResponse>;
22
+ export declare const updateUserProfile: (body: UpdateUserProfileBody) => Promise<CreateUserProfileResponse | null>;
@@ -123,5 +123,5 @@ export declare type CreateUserProfileResponse = {
123
123
  id: number;
124
124
  };
125
125
  };
126
- export declare const updateUserTask: (body: UpdateUserTaskBody) => Promise<CreateUserProfileResponse>;
126
+ export declare const updateUserTask: (body: UpdateUserTaskBody) => Promise<CreateUserProfileResponse | null>;
127
127
  export {};
@@ -2016,8 +2016,18 @@
2016
2016
  const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
2017
2017
  const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
2018
2018
 
2019
+ const fetchRetailJSON = async (url, method, body) => {
2020
+ try {
2021
+ const response = await doRequest(url, method, body);
2022
+ return response.json();
2023
+ }
2024
+ catch (err) {
2025
+ console.error(err);
2026
+ return null;
2027
+ }
2028
+ };
2019
2029
  async function doRequest(url, method, body) {
2020
- const response = await fetch(`${API_BASE_URI}${url}`, {
2030
+ return await fetch(`${API_BASE_URI}${url}`, {
2021
2031
  method,
2022
2032
  headers: {
2023
2033
  'Content-Type': 'application/json',
@@ -2026,29 +2036,26 @@
2026
2036
  credentials: 'include',
2027
2037
  body: body ? JSON.stringify(body) : null,
2028
2038
  });
2029
- // TODO: add error handling
2030
- return isJSON(response) ? response.json() : response;
2031
2039
  }
2032
- // TODO: Need delete isJSON
2033
- const isJSON = (response) => response.headers.get('Content-Type') === 'application/json';
2034
2040
  const getAuthorizationHeaders = () => {
2035
2041
  const token = sessionStorage.getItem('accessToken');
2036
2042
  return token ? { Authorization: `Bearer ${token}` } : null;
2037
2043
  };
2038
2044
 
2039
- const regionOffices = async (regionKey) => {
2040
- const response = await doRequest('/public-data/regionOffices', 'POST', {
2045
+ const fetchRegionOffices = async (regionKey) => {
2046
+ const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
2041
2047
  regionRfCd: {
2042
2048
  key: regionKey,
2043
2049
  },
2044
2050
  cashCardFlg: true,
2045
2051
  });
2046
- return await response.json().then((_) => _?.offices?.map((office) => ({
2052
+ return (response?.offices?.map((office) => ({
2047
2053
  ...office,
2048
- gpsLatitude: (office.latitude ?? DEFAULT_CENTER_COORDS[0]).toString().replace(',', '.'),
2049
- gpsLongitude: (office.longitude ?? DEFAULT_CENTER_COORDS[1]).toString().replace(',', '.'),
2050
- })));
2054
+ gpsLatitude: formatCoordinate(office.latitude ?? DEFAULT_CENTER_COORDS[0]),
2055
+ gpsLongitude: formatCoordinate(office.longitude ?? DEFAULT_CENTER_COORDS[1]),
2056
+ })) || []);
2051
2057
  };
2058
+ const formatCoordinate = (coordinate) => Number(coordinate.toString().replace(',', '.'));
2052
2059
 
2053
2060
  const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
2054
2061
  const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
@@ -2471,9 +2478,8 @@
2471
2478
  field('addressRetail');
2472
2479
  useEffect(() => {
2473
2480
  (async () => {
2474
- const officesList = await regionOffices(regionValue?.key ?? '');
2475
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
2476
- setOffices(officesList || []);
2481
+ const officesList = await fetchRegionOffices(regionValue?.key ?? '');
2482
+ setOffices(officesList);
2477
2483
  })();
2478
2484
  if (regionValue?.key) {
2479
2485
  field?.('addressRetail')?.onChange?.('');
@@ -2930,7 +2936,7 @@
2930
2936
 
2931
2937
  const feedbackById = async (id, convertToPng = false) => {
2932
2938
  const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
2933
- return await response.blob();
2939
+ return response ? await response.blob() : new Blob();
2934
2940
  };
2935
2941
 
2936
2942
  const getDocument = async (id, convertToPng = false) => {
@@ -3694,13 +3700,16 @@
3694
3700
 
3695
3701
  const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
3696
3702
 
3697
- const createDraftTask = (body) => doRequest('/user-data/createDraftTask', 'POST', body);
3703
+ const createDraftTask = async (body) => {
3704
+ const res = await fetchRetailJSON('/user-data/createDraftTask', 'POST', body);
3705
+ return res || {};
3706
+ };
3698
3707
 
3699
- const createUserProfile = (body) => doRequest('/public-data/createUserProfile', 'POST', body);
3708
+ const createUserProfile = (body) => fetchRetailJSON('/public-data/createUserProfile', 'POST', body).then((res) => res?.profile?.id || null);
3700
3709
 
3701
- const updateUserProfile = (body) => doRequest('/user-data/updateUserProfile', 'PUT', body);
3710
+ const updateUserProfile = (body) => fetchRetailJSON('/user-data/updateUserProfile', 'PUT', body);
3702
3711
 
3703
- const updateUserTask = (body) => doRequest('/user-data/updateUserTask', 'PUT', body);
3712
+ const updateUserTask = (body) => fetchRetailJSON('/user-data/updateUserTask', 'PUT', body);
3704
3713
 
3705
3714
  const getUpdateUserProfileData = (profileId, formData) => {
3706
3715
  const { name = '', surname = '', middleName = '', birthday = '', phone = '', email = '', processPersonalDataFlg, consentProviderFlg, consentPfrFlg, consentPhotoFlg, consentAssignmentClaimsFlg, consentCollectionFlg, consentInformFlg, } = formData;
@@ -3724,6 +3733,17 @@
3724
3733
  };
3725
3734
  };
3726
3735
 
3736
+ const sendCode = (body) => fetchRetailJSON('/sms/sendCode', 'POST', body).then((res) => !isErrorResult(res, body.phoneNumber));
3737
+ const isErrorResult = (res, phoneNumber) => Boolean(res) &&
3738
+ typeof res !== 'string' &&
3739
+ Boolean(res?.errorMessage.startsWith(`Too many request for phoneNumber [${phoneNumber}]`));
3740
+
3741
+ const checkCaptcha = (body) => doRequest('/sms/checkCaptcha', 'POST', body)
3742
+ .then((res) => res.text())
3743
+ .then((text) => text !== 'ERROR');
3744
+
3745
+ const createCaptcha = (phoneNumber) => doRequest(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(phoneNumber)}`, 'GET').then(async (res) => (res ? await res.blob() : new Blob()));
3746
+
3727
3747
  const ICON_SIZE$1 = { width: '118', height: '24' };
3728
3748
 
3729
3749
  const logoTitleSizeStyle = '';
@@ -3754,34 +3774,25 @@
3754
3774
  ? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
3755
3775
  : null] })));
3756
3776
 
3757
- const checkCaptcha = (body) => doRequest('/sms/checkCaptcha', 'POST', body);
3758
-
3759
- const handleCheckCaptcha = async ({ code, setHasError, close, sendCode = noop, }) => {
3760
- const response = await checkCaptcha({ captchaText: code });
3761
- if ((await response.text()) === 'ERROR') {
3762
- setHasError(true);
3763
- }
3764
- else {
3765
- sendCode();
3766
- close?.();
3767
- }
3768
- };
3769
-
3770
- const createCaptcha = (phoneNumber) => doRequest(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(phoneNumber)}`, 'GET');
3771
-
3772
- const handleCreateCaptcha = async (setCaptcha, phoneNumber) => {
3773
- const response = await createCaptcha(phoneNumber);
3774
- setCaptcha(URL.createObjectURL(await response.blob()));
3775
- };
3776
-
3777
3777
  const CaptchaDialog = JSX(({ phoneNumber, close, sendCode, onClose }) => {
3778
3778
  const [captcha, setCaptcha] = useState('');
3779
3779
  const [code, setCode] = useState('');
3780
3780
  const [hasError, setHasError] = useState(false);
3781
- useEffect(() => {
3782
- handleCreateCaptcha(setCaptcha, phoneNumber);
3781
+ const handleCheckCaptcha = useCallback(async () => {
3782
+ const isValidCode = await checkCaptcha({ captchaText: code });
3783
+ if (isValidCode) {
3784
+ sendCode?.();
3785
+ close?.();
3786
+ }
3787
+ else {
3788
+ setHasError(isValidCode);
3789
+ }
3790
+ }, []);
3791
+ const handleCreateCaptcha = useCallback(() => {
3792
+ (async () => setCaptcha(URL.createObjectURL(await createCaptcha(phoneNumber))))();
3783
3793
  }, []);
3784
- return (jsx(Dialog, { head: jsx(Logo, {}), onClose: onClose, className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex h-36 w-72", children: [jsx("img", { className: "grow", src: captcha }), jsx("div", { onClick: () => handleCreateCaptcha(setCaptcha, phoneNumber), className: "flex w-8 items-center justify-center cursor-pointer", children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-[300px]", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-[310px] justify-between", children: [jsx(Button, { onClick: close, version: "secondary", children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(Button, { type: "submit", disabled: !code, onClick: () => handleCheckCaptcha({ code, setHasError, close, sendCode }), version: "secondary", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] })] }) }));
3794
+ useEffect(handleCreateCaptcha, []);
3795
+ return (jsx(Dialog, { head: jsx(Logo, {}), onClose: onClose, className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex h-36 w-72", children: [jsx("img", { className: "grow", src: captcha }), jsx("div", { onClick: handleCreateCaptcha, className: "flex w-8 items-center justify-center cursor-pointer", children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-[300px]", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-[310px] justify-between", children: [jsx(Button, { onClick: close, version: "secondary", children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(Button, { type: "submit", disabled: !code, onClick: handleCheckCaptcha, version: "secondary", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] })] }) }));
3785
3796
  });
3786
3797
 
3787
3798
  const useCaptchaDialog = (initialProps, onClose) => {
@@ -3813,29 +3824,6 @@
3813
3824
  return `${minutes}:${seconds}`;
3814
3825
  };
3815
3826
 
3816
- const sendCode = (body) => doRequest('/sms/sendCode', 'POST', body);
3817
-
3818
- const handleSendCode = async ({ phoneNumber, captchaDialog, setTimeNextReq, setIsTimerStarted, setAttemps, }) => {
3819
- try {
3820
- await sendCode({
3821
- phoneNumber: phoneNumber,
3822
- smsCodesSetName: { key: 'AUTHENTICATION' },
3823
- }).then((res) => {
3824
- if (typeof res !== 'string' &&
3825
- res.errorMessage &&
3826
- res.errorMessage.startsWith(`Too many request for phoneNumber [${phoneNumber}]`)) {
3827
- throw res;
3828
- }
3829
- });
3830
- setAttemps(0);
3831
- setTimeNextReq(180);
3832
- setIsTimerStarted(true);
3833
- }
3834
- catch (e) {
3835
- captchaDialog.open();
3836
- }
3837
- };
3838
-
3839
3827
  const InputCode = JSX(({ values, setValues, hasError, errorText }) => {
3840
3828
  const [activeIndex, setActiveIndex] = useState(0);
3841
3829
  const inputRefs = useRef([]);
@@ -3880,10 +3868,12 @@
3880
3868
  return (jsx(Button, { type: "button", onClick: onClick, disabled: isDisabled, children: jsx(Text, { font: "font-normal", children: text }) }));
3881
3869
  });
3882
3870
 
3883
- const checkCode = async (body) => doRequest('/sms/checkCode', 'POST', body).then(saveToken);
3871
+ const checkCode = async (body) => fetchRetailJSON('/sms/checkCode', 'POST', body).then(saveToken);
3884
3872
  const saveToken = (data) => {
3885
- globalThis.sessionStorage.setItem('accessToken', data.access_token);
3886
- globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
3873
+ if (data) {
3874
+ globalThis.sessionStorage.setItem('accessToken', data.access_token);
3875
+ globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
3876
+ }
3887
3877
  };
3888
3878
 
3889
3879
  const useVerifyPhoneDialogSubmit = ({ close, values }) => {
@@ -3943,23 +3933,28 @@
3943
3933
  const VerifyPhoneDialog = JSX(({ close = noop, onClose = noop, title, description, __html, code = true, codeLength = 4, textButton = '', phoneNumber = '+79999999999', }) => {
3944
3934
  const [values, setValues] = useState(Array(codeLength).fill(''));
3945
3935
  const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttemps, } = useVerifyPhoneDialogSubmit({ values, close });
3946
- const sendCode = useCallback(() => {
3947
- handleSendCode({
3948
- phoneNumber,
3949
- captchaDialog,
3950
- setTimeNextReq,
3951
- setIsTimerStarted,
3952
- setAttemps,
3936
+ const handleSendCode = useCallback(async () => {
3937
+ const isSuccessSendCode = await sendCode({
3938
+ phoneNumber: phoneNumber,
3939
+ smsCodesSetName: { key: 'AUTHENTICATION' },
3953
3940
  });
3941
+ if (isSuccessSendCode) {
3942
+ setAttemps(0);
3943
+ setTimeNextReq(180);
3944
+ setIsTimerStarted(true);
3945
+ }
3946
+ else {
3947
+ captchaDialog.open();
3948
+ }
3954
3949
  }, []);
3955
- const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode }, onClose);
3950
+ const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode: handleSendCode }, onClose);
3956
3951
  useEffect(() => {
3957
- sendCode();
3952
+ handleSendCode();
3958
3953
  }, []);
3959
- return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0", children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: title, description: description, headlineVersion: "XS", isEmbedded: true, as: "h6" }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$1(timeNextReq, setTimeNextReq, sendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
3954
+ return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0", children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: title, description: description, headlineVersion: "XS", isEmbedded: true, as: "h6" }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$1(timeNextReq, setTimeNextReq, handleSendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
3960
3955
  });
3961
3956
  const renderTextButton = (textButton, isDisabled, handleSubmit) => textButton ? (jsx(SubmitButton, { isDisabled: isDisabled, onClick: handleSubmit, text: textButton })) : null;
3962
- const renderText$1 = (timeNextReq, setTimeNextReq, sendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-base", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-base ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { onClick: sendCode, className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }));
3957
+ const renderText$1 = (timeNextReq, setTimeNextReq, handleSendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-base", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-base ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { onClick: handleSendCode, className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }));
3963
3958
 
3964
3959
  const useVerifyPhoneDialog = () => {
3965
3960
  const { open, close } = useDialogManager();
@@ -4038,7 +4033,7 @@
4038
4033
  <ul><li>согласие на запрос информации в БКИ</li></ul>`,
4039
4034
  });
4040
4035
 
4041
- const getLink = (body) => doRequest('/esia/getLink', 'POST', body);
4036
+ const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
4042
4037
 
4043
4038
  const EsiaLoginDialog = JSX(function ({ handleClose }) {
4044
4039
  const handleAuth = useCallback(async () => {
@@ -4182,7 +4177,7 @@
4182
4177
  return console.warn('validation fail');
4183
4178
  }
4184
4179
  try {
4185
- const { profile: { id: profileId }, } = await createUserProfile({
4180
+ const profileId = await createUserProfile({
4186
4181
  profile: { phone: formatPhone(formData.phone) },
4187
4182
  });
4188
4183
  if (profileId && formData?.phone) {
@@ -4251,7 +4246,7 @@
4251
4246
  };
4252
4247
  };
4253
4248
 
4254
- const updateProfileEsia = (body) => doRequest('/esia/updateProfileEsia', 'POST', body);
4249
+ const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
4255
4250
 
4256
4251
  const parseEsiaProfile = (esiaProfile) => {
4257
4252
  const { profile, addInfo, document, addressRegistration, addressFact } = esiaProfile;
@@ -4317,10 +4312,11 @@
4317
4312
  state,
4318
4313
  redirectUri: globalThis.location?.href,
4319
4314
  });
4320
- setLeadForm({
4321
- ...leadForm,
4322
- ...parseEsiaProfile(data),
4323
- });
4315
+ data &&
4316
+ setLeadForm({
4317
+ ...leadForm,
4318
+ ...parseEsiaProfile(data),
4319
+ });
4324
4320
  globalThis.location.href = nextStepLink;
4325
4321
  }
4326
4322
  }, []);
@@ -6036,12 +6032,12 @@
6036
6032
  // eslint-disable-next-line camelcase
6037
6033
  access_token: accessToken,
6038
6034
  });
6039
- if (res instanceof Response) {
6035
+ if (res) {
6040
6036
  handleStatus(res.status);
6041
- return;
6037
+ const data = await res.json();
6038
+ globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
6039
+ globalThis.sessionStorage.setItem('accessToken', data.access_token);
6042
6040
  }
6043
- globalThis.sessionStorage.setItem('refreshToken', res.refresh_token);
6044
- globalThis.sessionStorage.setItem('accessToken', res.access_token);
6045
6041
  };
6046
6042
  updateTokenRequest();
6047
6043
  const timer = setInterval(updateTokenRequest, UPDATING_INTERVAL);
@@ -6067,7 +6063,7 @@
6067
6063
  STATUS_TYPE["fail"] = "CANCELLED";
6068
6064
  STATUS_TYPE["rework"] = "REVISION";
6069
6065
  })(STATUS_TYPE || (STATUS_TYPE = {}));
6070
- const getTaskStatus = (body) => doRequest('/user-data/getTaskStatus', 'POST', body);
6066
+ const getTaskStatus = (body) => fetchRetailJSON('/user-data/getTaskStatus', 'POST', body);
6071
6067
 
6072
6068
  const sendSignalToProcess = (body) => doRequest('/user-data/sendSignalToProcess', 'POST', body);
6073
6069
 
@@ -6157,12 +6153,13 @@
6157
6153
  await sendSignalToProcess({ signalType, taskId });
6158
6154
  }
6159
6155
  })();
6160
- const trackStatus = () => getTaskStatus({ taskId }).then((res) => {
6161
- if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
6156
+ const trackStatus = useCallback(async () => {
6157
+ const res = await getTaskStatus({ taskId });
6158
+ if (res && res?.statusCd !== STATUS_TYPE.process) {
6162
6159
  clearInterval(pullingInterval);
6163
6160
  setStatus(res.statusCd);
6164
6161
  }
6165
- });
6162
+ }, []);
6166
6163
  const pullingInterval = setInterval(trackStatus, 30000);
6167
6164
  }, []);
6168
6165
  return renderStatus$1(status);
@@ -7035,7 +7032,7 @@
7035
7032
  })();
7036
7033
  const trackStatus = () => taskId &&
7037
7034
  getTaskStatus({ taskId }).then((res) => {
7038
- if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
7035
+ if (res?.statusCd && res.statusCd !== STATUS_TYPE.process) {
7039
7036
  clearInterval(pullingInterval);
7040
7037
  setStatus(res.statusCd);
7041
7038
  }
@@ -9985,7 +9982,7 @@
9985
9982
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
9986
9983
  });
9987
9984
 
9988
- const packageVersion = "0.14.669";
9985
+ const packageVersion = "0.14.670";
9989
9986
 
9990
9987
  exports.Blocks = Blocks;
9991
9988
  exports.ContentPage = ContentPage;