@redneckz/wildless-cms-uni-blocks 0.14.950 → 0.14.952

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 (512) hide show
  1. package/bundle/api/apiBaseUrl.d.ts +0 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +318 -121
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  6. package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
  7. package/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
  8. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  9. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  10. package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
  11. package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
  12. package/bundle/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
  13. package/bundle/retail/api/apiBaseUrl.d.ts +2 -1
  14. package/bundle/retail/api/checkCaptcha.d.ts +1 -0
  15. package/bundle/retail/api/checkCode.d.ts +1 -0
  16. package/bundle/retail/api/createDraftTask.d.ts +2 -1
  17. package/bundle/retail/api/createParticipant.d.ts +6 -0
  18. package/bundle/retail/api/sendMessage.d.ts +7 -0
  19. package/bundle/retail/api/updateUserTask.d.ts +14 -8
  20. package/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
  21. package/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
  22. package/bundle/retail/hooks/useRetailFormStore.d.ts +1 -1
  23. package/bundle/retail/model/LeadFormState.d.ts +2 -4
  24. package/bundle/retail/utils/checkNewMicroservice.d.ts +1 -0
  25. package/bundle/ui-kit/SearchBar/SearchBar.d.ts +1 -2
  26. package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
  27. package/dist/api/apiBaseUrl.d.ts +0 -1
  28. package/dist/api/apiBaseUrl.js +1 -2
  29. package/dist/api/apiBaseUrl.js.map +1 -1
  30. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  31. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  32. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  33. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
  34. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +35 -24
  35. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  36. package/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
  37. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
  38. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  39. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  40. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +98 -4
  41. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  42. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  43. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
  44. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  45. package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
  46. package/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  47. package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
  48. package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  49. package/dist/components/CreditForm/CreditFormStatusTracker.js +16 -2
  50. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  51. package/dist/components/CreditForm/useCreditFormAPI.js +1 -1
  52. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  53. package/dist/components/Footer/Footer.js +1 -1
  54. package/dist/components/Footer/Footer.js.map +1 -1
  55. package/dist/components/Footer/renderLogoSearchBar.js +2 -2
  56. package/dist/components/Footer/renderLogoSearchBar.js.map +1 -1
  57. package/dist/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
  58. package/dist/retail/adaptors/getCreditFormTaskData.js +36 -25
  59. package/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  60. package/dist/retail/adaptors/utils.js +1 -1
  61. package/dist/retail/adaptors/utils.js.map +1 -1
  62. package/dist/retail/api/apiBaseUrl.d.ts +2 -1
  63. package/dist/retail/api/apiBaseUrl.js +3 -2
  64. package/dist/retail/api/apiBaseUrl.js.map +1 -1
  65. package/dist/retail/api/checkCaptcha.d.ts +1 -0
  66. package/dist/retail/api/checkCaptcha.js +10 -3
  67. package/dist/retail/api/checkCaptcha.js.map +1 -1
  68. package/dist/retail/api/checkCode.d.ts +1 -0
  69. package/dist/retail/api/checkCode.js +9 -1
  70. package/dist/retail/api/checkCode.js.map +1 -1
  71. package/dist/retail/api/createCaptcha.js +5 -1
  72. package/dist/retail/api/createCaptcha.js.map +1 -1
  73. package/dist/retail/api/createDraftTask.d.ts +2 -1
  74. package/dist/retail/api/createDraftTask.js.map +1 -1
  75. package/dist/retail/api/createParticipant.d.ts +6 -0
  76. package/dist/retail/api/createParticipant.js +6 -0
  77. package/dist/retail/api/createParticipant.js.map +1 -0
  78. package/dist/retail/api/doRequest.js +4 -2
  79. package/dist/retail/api/doRequest.js.map +1 -1
  80. package/dist/retail/api/esiaRequestProfile.js +11 -7
  81. package/dist/retail/api/esiaRequestProfile.js.map +1 -1
  82. package/dist/retail/api/getDictionaries.js +3 -1
  83. package/dist/retail/api/getDictionaries.js.map +1 -1
  84. package/dist/retail/api/getLink.js +5 -1
  85. package/dist/retail/api/getLink.js.map +1 -1
  86. package/dist/retail/api/sendCode.js +8 -1
  87. package/dist/retail/api/sendCode.js.map +1 -1
  88. package/dist/retail/api/sendMessage.d.ts +7 -0
  89. package/dist/retail/api/sendMessage.js +8 -0
  90. package/dist/retail/api/sendMessage.js.map +1 -0
  91. package/dist/retail/api/updateUserTask.d.ts +14 -8
  92. package/dist/retail/api/updateUserTask.js.map +1 -1
  93. package/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  94. package/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  95. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
  96. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
  97. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  98. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
  99. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  100. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
  101. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
  102. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  103. package/dist/retail/hooks/useLeadFormData.js +3 -1
  104. package/dist/retail/hooks/useLeadFormData.js.map +1 -1
  105. package/dist/retail/hooks/useRetailFormStore.d.ts +1 -1
  106. package/dist/retail/model/LeadFormState.d.ts +2 -4
  107. package/dist/retail/utils/checkNewMicroservice.d.ts +1 -0
  108. package/dist/retail/utils/checkNewMicroservice.js +8 -0
  109. package/dist/retail/utils/checkNewMicroservice.js.map +1 -0
  110. package/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -2
  111. package/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  112. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  113. package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
  114. package/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
  115. package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  116. package/dist/ui-kit/YandexMap/useYandexMaps.js +1 -2
  117. package/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
  118. package/dist/wlc.json +1 -2
  119. package/lib/api/apiBaseUrl.d.ts +0 -1
  120. package/lib/api/apiBaseUrl.js +0 -1
  121. package/lib/api/apiBaseUrl.js.map +1 -1
  122. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.d.ts +1 -0
  123. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  124. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  125. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  126. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
  127. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +33 -23
  128. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  129. package/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
  130. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
  131. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  132. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  133. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +98 -4
  134. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  135. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  136. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
  137. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  138. package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
  139. package/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  140. package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
  141. package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  142. package/lib/components/CreditForm/CreditFormStatusTracker.js +16 -2
  143. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  144. package/lib/components/CreditForm/useCreditFormAPI.js +1 -1
  145. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  146. package/lib/components/Footer/Footer.js +1 -1
  147. package/lib/components/Footer/Footer.js.map +1 -1
  148. package/lib/components/Footer/renderLogoSearchBar.js +2 -2
  149. package/lib/components/Footer/renderLogoSearchBar.js.map +1 -1
  150. package/lib/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
  151. package/lib/retail/adaptors/getCreditFormTaskData.js +36 -25
  152. package/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  153. package/lib/retail/adaptors/utils.js +1 -1
  154. package/lib/retail/adaptors/utils.js.map +1 -1
  155. package/lib/retail/api/apiBaseUrl.d.ts +2 -1
  156. package/lib/retail/api/apiBaseUrl.js +2 -1
  157. package/lib/retail/api/apiBaseUrl.js.map +1 -1
  158. package/lib/retail/api/checkCaptcha.d.ts +1 -0
  159. package/lib/retail/api/checkCaptcha.js +10 -3
  160. package/lib/retail/api/checkCaptcha.js.map +1 -1
  161. package/lib/retail/api/checkCode.d.ts +1 -0
  162. package/lib/retail/api/checkCode.js +9 -1
  163. package/lib/retail/api/checkCode.js.map +1 -1
  164. package/lib/retail/api/createCaptcha.js +5 -1
  165. package/lib/retail/api/createCaptcha.js.map +1 -1
  166. package/lib/retail/api/createDraftTask.d.ts +2 -1
  167. package/lib/retail/api/createDraftTask.js.map +1 -1
  168. package/lib/retail/api/createParticipant.d.ts +6 -0
  169. package/lib/retail/api/createParticipant.js +3 -0
  170. package/lib/retail/api/createParticipant.js.map +1 -0
  171. package/lib/retail/api/doRequest.js +4 -2
  172. package/lib/retail/api/doRequest.js.map +1 -1
  173. package/lib/retail/api/esiaRequestProfile.js +11 -7
  174. package/lib/retail/api/esiaRequestProfile.js.map +1 -1
  175. package/lib/retail/api/getDictionaries.js +3 -1
  176. package/lib/retail/api/getDictionaries.js.map +1 -1
  177. package/lib/retail/api/getLink.js +5 -1
  178. package/lib/retail/api/getLink.js.map +1 -1
  179. package/lib/retail/api/sendCode.js +8 -1
  180. package/lib/retail/api/sendCode.js.map +1 -1
  181. package/lib/retail/api/sendMessage.d.ts +7 -0
  182. package/lib/retail/api/sendMessage.js +5 -0
  183. package/lib/retail/api/sendMessage.js.map +1 -0
  184. package/lib/retail/api/updateUserTask.d.ts +14 -8
  185. package/lib/retail/api/updateUserTask.js.map +1 -1
  186. package/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  187. package/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  188. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
  189. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
  190. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  191. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
  192. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  193. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
  194. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
  195. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  196. package/lib/retail/hooks/useLeadFormData.js +4 -2
  197. package/lib/retail/hooks/useLeadFormData.js.map +1 -1
  198. package/lib/retail/hooks/useRetailFormStore.d.ts +1 -1
  199. package/lib/retail/model/LeadFormState.d.ts +2 -4
  200. package/lib/retail/utils/checkNewMicroservice.d.ts +1 -0
  201. package/lib/retail/utils/checkNewMicroservice.js +5 -0
  202. package/lib/retail/utils/checkNewMicroservice.js.map +1 -0
  203. package/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -2
  204. package/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  205. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  206. package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
  207. package/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
  208. package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  209. package/lib/ui-kit/YandexMap/useYandexMaps.js +1 -2
  210. package/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
  211. package/lib/wlc.json +1 -2
  212. package/mobile/bundle/api/apiBaseUrl.d.ts +0 -1
  213. package/mobile/bundle/bundle.umd.js +313 -116
  214. package/mobile/bundle/bundle.umd.min.js +1 -1
  215. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  216. package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
  217. package/mobile/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
  218. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  219. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  220. package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
  221. package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
  222. package/mobile/bundle/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
  223. package/mobile/bundle/retail/api/apiBaseUrl.d.ts +2 -1
  224. package/mobile/bundle/retail/api/checkCaptcha.d.ts +1 -0
  225. package/mobile/bundle/retail/api/checkCode.d.ts +1 -0
  226. package/mobile/bundle/retail/api/createDraftTask.d.ts +2 -1
  227. package/mobile/bundle/retail/api/createParticipant.d.ts +6 -0
  228. package/mobile/bundle/retail/api/sendMessage.d.ts +7 -0
  229. package/mobile/bundle/retail/api/updateUserTask.d.ts +14 -8
  230. package/mobile/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
  231. package/mobile/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
  232. package/mobile/bundle/retail/hooks/useRetailFormStore.d.ts +1 -1
  233. package/mobile/bundle/retail/model/LeadFormState.d.ts +2 -4
  234. package/mobile/bundle/retail/utils/checkNewMicroservice.d.ts +1 -0
  235. package/mobile/bundle/ui-kit/SearchBar/SearchBar.d.ts +1 -2
  236. package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
  237. package/mobile/dist/api/apiBaseUrl.d.ts +0 -1
  238. package/mobile/dist/api/apiBaseUrl.js +1 -2
  239. package/mobile/dist/api/apiBaseUrl.js.map +1 -1
  240. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  241. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  242. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  243. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
  244. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +35 -24
  245. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  246. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
  247. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
  248. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  249. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  250. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +98 -4
  251. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  252. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  253. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
  254. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  255. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
  256. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  257. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
  258. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  259. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +16 -2
  260. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  261. package/mobile/dist/components/CreditForm/useCreditFormAPI.js +1 -1
  262. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  263. package/mobile/dist/components/Footer/Footer.js +1 -1
  264. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  265. package/mobile/dist/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
  266. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js +36 -25
  267. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  268. package/mobile/dist/retail/adaptors/utils.js +1 -1
  269. package/mobile/dist/retail/adaptors/utils.js.map +1 -1
  270. package/mobile/dist/retail/api/apiBaseUrl.d.ts +2 -1
  271. package/mobile/dist/retail/api/apiBaseUrl.js +3 -2
  272. package/mobile/dist/retail/api/apiBaseUrl.js.map +1 -1
  273. package/mobile/dist/retail/api/checkCaptcha.d.ts +1 -0
  274. package/mobile/dist/retail/api/checkCaptcha.js +10 -3
  275. package/mobile/dist/retail/api/checkCaptcha.js.map +1 -1
  276. package/mobile/dist/retail/api/checkCode.d.ts +1 -0
  277. package/mobile/dist/retail/api/checkCode.js +9 -1
  278. package/mobile/dist/retail/api/checkCode.js.map +1 -1
  279. package/mobile/dist/retail/api/createCaptcha.js +5 -1
  280. package/mobile/dist/retail/api/createCaptcha.js.map +1 -1
  281. package/mobile/dist/retail/api/createDraftTask.d.ts +2 -1
  282. package/mobile/dist/retail/api/createDraftTask.js.map +1 -1
  283. package/mobile/dist/retail/api/createParticipant.d.ts +6 -0
  284. package/mobile/dist/retail/api/createParticipant.js +6 -0
  285. package/mobile/dist/retail/api/createParticipant.js.map +1 -0
  286. package/mobile/dist/retail/api/doRequest.js +4 -2
  287. package/mobile/dist/retail/api/doRequest.js.map +1 -1
  288. package/mobile/dist/retail/api/esiaRequestProfile.js +11 -7
  289. package/mobile/dist/retail/api/esiaRequestProfile.js.map +1 -1
  290. package/mobile/dist/retail/api/getDictionaries.js +3 -1
  291. package/mobile/dist/retail/api/getDictionaries.js.map +1 -1
  292. package/mobile/dist/retail/api/getLink.js +5 -1
  293. package/mobile/dist/retail/api/getLink.js.map +1 -1
  294. package/mobile/dist/retail/api/sendCode.js +8 -1
  295. package/mobile/dist/retail/api/sendCode.js.map +1 -1
  296. package/mobile/dist/retail/api/sendMessage.d.ts +7 -0
  297. package/mobile/dist/retail/api/sendMessage.js +8 -0
  298. package/mobile/dist/retail/api/sendMessage.js.map +1 -0
  299. package/mobile/dist/retail/api/updateUserTask.d.ts +14 -8
  300. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  301. package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  302. package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  303. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
  304. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
  305. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  306. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
  307. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  308. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
  309. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
  310. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  311. package/mobile/dist/retail/hooks/useLeadFormData.js +3 -1
  312. package/mobile/dist/retail/hooks/useLeadFormData.js.map +1 -1
  313. package/mobile/dist/retail/hooks/useRetailFormStore.d.ts +1 -1
  314. package/mobile/dist/retail/model/LeadFormState.d.ts +2 -4
  315. package/mobile/dist/retail/utils/checkNewMicroservice.d.ts +1 -0
  316. package/mobile/dist/retail/utils/checkNewMicroservice.js +8 -0
  317. package/mobile/dist/retail/utils/checkNewMicroservice.js.map +1 -0
  318. package/mobile/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -2
  319. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  320. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  321. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
  322. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
  323. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  324. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js +1 -2
  325. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
  326. package/mobile/dist/wlc.json +1 -2
  327. package/mobile/lib/api/apiBaseUrl.d.ts +0 -1
  328. package/mobile/lib/api/apiBaseUrl.js +0 -1
  329. package/mobile/lib/api/apiBaseUrl.js.map +1 -1
  330. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  331. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  332. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  333. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +6 -4
  334. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +33 -23
  335. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  336. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +1 -1
  337. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +13 -11
  338. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  339. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  340. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +98 -4
  341. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  342. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  343. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +3 -2
  344. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  345. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +3 -2
  346. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  347. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +2 -1
  348. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  349. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +16 -2
  350. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  351. package/mobile/lib/components/CreditForm/useCreditFormAPI.js +1 -1
  352. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  353. package/mobile/lib/components/Footer/Footer.js +1 -1
  354. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  355. package/mobile/lib/retail/adaptors/getCreditFormTaskData.d.ts +3 -2
  356. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js +36 -25
  357. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  358. package/mobile/lib/retail/adaptors/utils.js +1 -1
  359. package/mobile/lib/retail/adaptors/utils.js.map +1 -1
  360. package/mobile/lib/retail/api/apiBaseUrl.d.ts +2 -1
  361. package/mobile/lib/retail/api/apiBaseUrl.js +2 -1
  362. package/mobile/lib/retail/api/apiBaseUrl.js.map +1 -1
  363. package/mobile/lib/retail/api/checkCaptcha.d.ts +1 -0
  364. package/mobile/lib/retail/api/checkCaptcha.js +10 -3
  365. package/mobile/lib/retail/api/checkCaptcha.js.map +1 -1
  366. package/mobile/lib/retail/api/checkCode.d.ts +1 -0
  367. package/mobile/lib/retail/api/checkCode.js +9 -1
  368. package/mobile/lib/retail/api/checkCode.js.map +1 -1
  369. package/mobile/lib/retail/api/createCaptcha.js +5 -1
  370. package/mobile/lib/retail/api/createCaptcha.js.map +1 -1
  371. package/mobile/lib/retail/api/createDraftTask.d.ts +2 -1
  372. package/mobile/lib/retail/api/createDraftTask.js.map +1 -1
  373. package/mobile/lib/retail/api/createParticipant.d.ts +6 -0
  374. package/mobile/lib/retail/api/createParticipant.js +3 -0
  375. package/mobile/lib/retail/api/createParticipant.js.map +1 -0
  376. package/mobile/lib/retail/api/doRequest.js +4 -2
  377. package/mobile/lib/retail/api/doRequest.js.map +1 -1
  378. package/mobile/lib/retail/api/esiaRequestProfile.js +11 -7
  379. package/mobile/lib/retail/api/esiaRequestProfile.js.map +1 -1
  380. package/mobile/lib/retail/api/getDictionaries.js +3 -1
  381. package/mobile/lib/retail/api/getDictionaries.js.map +1 -1
  382. package/mobile/lib/retail/api/getLink.js +5 -1
  383. package/mobile/lib/retail/api/getLink.js.map +1 -1
  384. package/mobile/lib/retail/api/sendCode.js +8 -1
  385. package/mobile/lib/retail/api/sendCode.js.map +1 -1
  386. package/mobile/lib/retail/api/sendMessage.d.ts +7 -0
  387. package/mobile/lib/retail/api/sendMessage.js +5 -0
  388. package/mobile/lib/retail/api/sendMessage.js.map +1 -0
  389. package/mobile/lib/retail/api/updateUserTask.d.ts +14 -8
  390. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  391. package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  392. package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  393. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +9 -1
  394. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +28 -4
  395. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  396. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -1
  397. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  398. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +2 -1
  399. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -1
  400. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  401. package/mobile/lib/retail/hooks/useLeadFormData.js +4 -2
  402. package/mobile/lib/retail/hooks/useLeadFormData.js.map +1 -1
  403. package/mobile/lib/retail/hooks/useRetailFormStore.d.ts +1 -1
  404. package/mobile/lib/retail/model/LeadFormState.d.ts +2 -4
  405. package/mobile/lib/retail/utils/checkNewMicroservice.d.ts +1 -0
  406. package/mobile/lib/retail/utils/checkNewMicroservice.js +5 -0
  407. package/mobile/lib/retail/utils/checkNewMicroservice.js.map +1 -0
  408. package/mobile/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -2
  409. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  410. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  411. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +0 -2
  412. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
  413. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  414. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js +1 -2
  415. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
  416. package/mobile/lib/wlc.json +1 -2
  417. package/mobile/src/api/apiBaseUrl.ts +0 -1
  418. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -0
  419. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
  420. package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +50 -24
  421. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +17 -11
  422. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +129 -3
  423. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +9 -1
  424. package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
  425. package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -1
  426. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +16 -2
  427. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +1 -1
  428. package/mobile/src/components/Footer/Footer.tsx +3 -5
  429. package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +42 -28
  430. package/mobile/src/retail/adaptors/utils.ts +1 -1
  431. package/mobile/src/retail/api/apiBaseUrl.ts +2 -1
  432. package/mobile/src/retail/api/checkCaptcha.ts +10 -2
  433. package/mobile/src/retail/api/checkCode.ts +11 -2
  434. package/mobile/src/retail/api/createCaptcha.ts +11 -4
  435. package/mobile/src/retail/api/createDraftTask.ts +2 -1
  436. package/mobile/src/retail/api/createParticipant.ts +17 -0
  437. package/mobile/src/retail/api/doRequest.ts +17 -12
  438. package/mobile/src/retail/api/esiaRequestProfile.ts +10 -2
  439. package/mobile/src/retail/api/getDictionaries.ts +6 -1
  440. package/mobile/src/retail/api/getLink.ts +10 -2
  441. package/mobile/src/retail/api/sendCode.ts +9 -1
  442. package/mobile/src/retail/api/sendMessage.ts +12 -0
  443. package/mobile/src/retail/api/updateUserTask.ts +14 -9
  444. package/mobile/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
  445. package/mobile/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +54 -21
  446. package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +2 -1
  447. package/mobile/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +3 -0
  448. package/mobile/src/retail/hooks/useLeadFormData.ts +7 -2
  449. package/mobile/src/retail/model/LeadFormState.ts +2 -4
  450. package/mobile/src/retail/utils/checkNewMicroservice.ts +5 -0
  451. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -3
  452. package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +28 -39
  453. package/mobile/src/ui-kit/YandexMap/useYandexMaps.ts +1 -4
  454. package/mobile/src/wlc.json +2 -2
  455. package/package.json +1 -1
  456. package/src/api/apiBaseUrl.ts +0 -1
  457. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +15 -0
  458. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -0
  459. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
  460. package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +50 -24
  461. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +17 -11
  462. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +129 -3
  463. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +9 -1
  464. package/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
  465. package/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -1
  466. package/src/components/CreditForm/CreditForm.fixture.tsx +12 -18
  467. package/src/components/CreditForm/CreditFormStatusTracker.tsx +16 -2
  468. package/src/components/CreditForm/useCreditFormAPI.tsx +1 -1
  469. package/src/components/Footer/Footer.tsx +3 -5
  470. package/src/components/Footer/renderLogoSearchBar.tsx +2 -7
  471. package/src/retail/adaptors/getCreditFormTaskData.ts +42 -28
  472. package/src/retail/adaptors/utils.ts +1 -1
  473. package/src/retail/api/apiBaseUrl.ts +2 -1
  474. package/src/retail/api/checkCaptcha.ts +10 -2
  475. package/src/retail/api/checkCode.ts +11 -2
  476. package/src/retail/api/createCaptcha.ts +11 -4
  477. package/src/retail/api/createDraftTask.ts +2 -1
  478. package/src/retail/api/createParticipant.ts +17 -0
  479. package/src/retail/api/doRequest.ts +17 -12
  480. package/src/retail/api/esiaRequestProfile.ts +10 -2
  481. package/src/retail/api/getDictionaries.ts +6 -1
  482. package/src/retail/api/getLink.ts +10 -2
  483. package/src/retail/api/sendCode.ts +9 -1
  484. package/src/retail/api/sendMessage.ts +12 -0
  485. package/src/retail/api/updateUserTask.ts +14 -9
  486. package/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
  487. package/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +54 -21
  488. package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +2 -1
  489. package/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +3 -0
  490. package/src/retail/hooks/useLeadFormData.ts +7 -2
  491. package/src/retail/model/LeadFormState.ts +2 -4
  492. package/src/retail/utils/checkNewMicroservice.ts +5 -0
  493. package/src/ui-kit/SearchBar/SearchBar.tsx +1 -3
  494. package/src/ui-kit/SearchDialog/SearchDialog.tsx +28 -39
  495. package/src/ui-kit/YandexMap/useYandexMaps.ts +1 -4
  496. package/src/wlc.json +2 -2
  497. package/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
  498. package/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
  499. package/dist/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -14
  500. package/dist/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
  501. package/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
  502. package/lib/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -11
  503. package/lib/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
  504. package/mobile/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
  505. package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
  506. package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -14
  507. package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
  508. package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +0 -8
  509. package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.js +0 -11
  510. package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.js.map +0 -1
  511. package/mobile/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +0 -32
  512. package/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +0 -32
@@ -1727,8 +1727,7 @@
1727
1727
  return `GMT${sign}${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
1728
1728
  };
1729
1729
 
1730
- const API_BASE_URI$1 = '/api/v1';
1731
- const RETAIL_API_BASE_URI = '/light-api-cash/v1';
1730
+ const API_BASE_URI = '/api/v1';
1732
1731
 
1733
1732
  const formatDate = (date, toTimeStamp = false) => {
1734
1733
  if (typeof date === 'string') {
@@ -1804,7 +1803,7 @@
1804
1803
  async function send(body, router, isIndividualType = false) {
1805
1804
  const { serviceDirection } = body;
1806
1805
  const isNaturalPerson = isIndividualType && serviceDirection !== 'Юридическое лицо / ИП';
1807
- const url = `${API_BASE_URI$1}${isNaturalPerson ? '/lead' : '/sendcorporatelead'}`;
1806
+ const url = `${API_BASE_URI}${isNaturalPerson ? '/lead' : '/sendcorporatelead'}`;
1808
1807
  const submitBody = getSubmitBody(body, isNaturalPerson, router);
1809
1808
  try {
1810
1809
  const response = await LeadServiceFetch(url, submitBody);
@@ -1820,7 +1819,7 @@
1820
1819
  async function sendCode({ phone }) {
1821
1820
  const submitBody = getPhoneBody(phone);
1822
1821
  try {
1823
- const response = LeadServiceFetch(`${API_BASE_URI$1}/initCorporateLead`, submitBody).then(async (res) => {
1822
+ const response = LeadServiceFetch(`${API_BASE_URI}/initCorporateLead`, submitBody).then(async (res) => {
1824
1823
  if (!res.ok) {
1825
1824
  throw new Error(`Ошибка HTTP: ${res.status}`);
1826
1825
  }
@@ -1839,7 +1838,7 @@
1839
1838
  leadRequest: getSubmitBody(body, false),
1840
1839
  };
1841
1840
  try {
1842
- const response = await LeadServiceFetch(`${API_BASE_URI$1}/confirmCorporateLead`, submitBody);
1841
+ const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
1843
1842
  return await response.json();
1844
1843
  }
1845
1844
  catch (e) {
@@ -1851,7 +1850,7 @@
1851
1850
  const submitBody = getSubmitBody(body, isNaturalPerson);
1852
1851
  const formatSubmitBody = getFormatCallbackSubmitBody(submitBody);
1853
1852
  try {
1854
- const response = await LeadServiceFetch(`${API_BASE_URI$1}/callback`, formatSubmitBody);
1853
+ const response = await LeadServiceFetch(`${API_BASE_URI}/callback`, formatSubmitBody);
1855
1854
  if (!response?.ok) {
1856
1855
  return null;
1857
1856
  }
@@ -2051,7 +2050,7 @@
2051
2050
  }
2052
2051
  }
2053
2052
 
2054
- const BRANCHES_URL = `${API_BASE_URI$1}/branches`;
2053
+ const BRANCHES_URL = `${API_BASE_URI}/branches`;
2055
2054
  const EMPTY_VALUE$2 = [];
2056
2055
  function useBranches(regionCode) {
2057
2056
  const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes);
@@ -2065,7 +2064,7 @@
2065
2064
  const REGIONS_URL$1 = '/branchesByRegions';
2066
2065
  const PREMIUM_REGIONS_URL = '/premiumBranchesByRegions';
2067
2066
  function useBranchesByRegions(isPremium = false) {
2068
- const { data } = useAsyncData(`${API_BASE_URI$1}${isPremium ? PREMIUM_REGIONS_URL : REGIONS_URL$1}`, fetchJSONUnsafe);
2067
+ const { data } = useAsyncData(`${API_BASE_URI}${isPremium ? PREMIUM_REGIONS_URL : REGIONS_URL$1}`, fetchJSONUnsafe);
2069
2068
  return Array.isArray(data) ? data : [];
2070
2069
  }
2071
2070
 
@@ -2631,7 +2630,7 @@
2631
2630
 
2632
2631
  const IsClientField = JSX(({ field, input }) => (jsx(CheckboxWithError, { ...field(input?.name ?? ''), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })));
2633
2632
 
2634
- const OUT_SERVICE_BASE_URL = `${API_BASE_URI$1}/outservice`;
2633
+ const OUT_SERVICE_BASE_URL = `${API_BASE_URI}/outservice`;
2635
2634
  const EMPTY_REGIONS$1 = [];
2636
2635
  async function getOutServiceRegions() {
2637
2636
  const data = await fetchJSON(`${OUT_SERVICE_BASE_URL}/outserviceregions`);
@@ -2741,7 +2740,7 @@
2741
2740
  ];
2742
2741
  const QuestionProductField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041A\u0430\u043A\u043E\u0439 \u0443 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441?", options: QUESTION_PRODUCT_TYPES, ...field(input?.name ?? '') })));
2743
2742
 
2744
- const REGIONS_URL = `${API_BASE_URI$1}/regions`;
2743
+ const REGIONS_URL = `${API_BASE_URI}/regions`;
2745
2744
  const EMPTY_REGIONS = [];
2746
2745
  // TODO Почему url можно менять? Разве смысл не в инкапсуляции api url. Тоже под рефакторинг попадает
2747
2746
  function useRegions(url = REGIONS_URL) {
@@ -2749,7 +2748,7 @@
2749
2748
  return Array.isArray(data) ? data : EMPTY_REGIONS;
2750
2749
  }
2751
2750
 
2752
- const OUT_SERVICE_URL = `${API_BASE_URI$1}/outservice/outserviceregions`;
2751
+ const OUT_SERVICE_URL = `${API_BASE_URI}/outservice/outserviceregions`;
2753
2752
  const getRegionUrl = (typeForm) => typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
2754
2753
 
2755
2754
  const RegionField = JSX(({ field, input, params }) => {
@@ -3623,6 +3622,14 @@
3623
3622
  EsiaStatuses["Pending"] = "PENDING";
3624
3623
  })(EsiaStatuses || (EsiaStatuses = {}));
3625
3624
 
3625
+ const checkNewMicroservice = () => {
3626
+ const isNewMicroservice = globalThis.sessionStorage?.getItem('isNewMicroservice');
3627
+ return Boolean(isNewMicroservice);
3628
+ };
3629
+
3630
+ const RETAIL_API_BASE_URI = '/light-api-cash/v1';
3631
+ const NEW_RETAIL_API_BASE_URI = '/api/credit-application';
3632
+
3626
3633
  const getTraceId = () => {
3627
3634
  const result = new Uint8Array(8);
3628
3635
  globalThis.crypto.getRandomValues(result);
@@ -3640,8 +3647,9 @@
3640
3647
  }
3641
3648
  };
3642
3649
  async function doRequest(url, method, body) {
3650
+ const isNewMicroservice = checkNewMicroservice();
3643
3651
  const traceId = getTraceId();
3644
- return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
3652
+ return globalThis?.fetch?.(`${isNewMicroservice ? NEW_RETAIL_API_BASE_URI : RETAIL_API_BASE_URI}${url}`, {
3645
3653
  method,
3646
3654
  headers: {
3647
3655
  'Content-Type': 'application/json',
@@ -3659,7 +3667,10 @@
3659
3667
  return token ? { Authorization: `Bearer ${token}` } : null;
3660
3668
  };
3661
3669
 
3662
- const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
3670
+ const getLink = async (body) => {
3671
+ const isNewMicroservice = checkNewMicroservice();
3672
+ return await fetchRetailJSON(`${isNewMicroservice ? '/user-data' : ''}/esia/getLink`, 'POST', body);
3673
+ };
3663
3674
 
3664
3675
  const EsiaLoginBanner = JSX(({ onChangeEsiaStatus, productType }) => {
3665
3676
  const navigator = locationNavigator();
@@ -4447,7 +4458,7 @@
4447
4458
 
4448
4459
  const YMAPS_NAMESPACE = 'ymaps';
4449
4460
  const useYandexMaps = () => {
4450
- const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY || ''}&lang=ru_RU`;
4461
+ const url = `https://api-maps.yandex.ru/2.1/?lang=ru_RU`;
4451
4462
  return useExternalNS(YMAPS_NAMESPACE, url, false);
4452
4463
  };
4453
4464
 
@@ -4537,10 +4548,9 @@
4537
4548
  };
4538
4549
  const formatCoordinate = (coordinate) => Number(coordinate.toString().replace(',', '.'));
4539
4550
 
4540
- const API_BASE_URI = '/light-api-cash/v1';
4541
-
4542
4551
  const useLeadFormData = (typeField) => {
4543
- const { data, error } = useAsyncData(`${API_BASE_URI}/dictionary?dictionaryType=${encodeURIComponent(typeField)}`, fetchData);
4552
+ const isNewMicroservice = checkNewMicroservice();
4553
+ const { data, error } = useAsyncData(`${isNewMicroservice ? `${NEW_RETAIL_API_BASE_URI}/public-data` : RETAIL_API_BASE_URI}/dictionary?dictionaryType=${encodeURIComponent(typeField)}`, fetchData);
4544
4554
  if (data && 'errorMessage' in data) {
4545
4555
  return { error };
4546
4556
  }
@@ -5093,9 +5103,10 @@
5093
5103
  });
5094
5104
 
5095
5105
  const getDictionaries = async (dictionaries, store) => {
5106
+ const isNewMicroservice = checkNewMicroservice();
5096
5107
  await Promise.all(Object.entries(dictionaries).map((dictionary) => {
5097
5108
  const [fieldName, dictionaryName] = dictionary;
5098
- fetchRetailJSON(`/dictionary?dictionaryType=${encodeURIComponent(dictionaryName)}`, 'POST').then((res) => {
5109
+ fetchRetailJSON(`${isNewMicroservice ? '/public-data' : ''}/dictionary?dictionaryType=${encodeURIComponent(dictionaryName)}`, 'POST').then((res) => {
5099
5110
  store[fieldName] = res;
5100
5111
  });
5101
5112
  }));
@@ -5851,6 +5862,8 @@
5851
5862
  return res || {};
5852
5863
  };
5853
5864
 
5865
+ const createParticipant = (body) => fetchRetailJSON('/public-data/createParticipant', 'POST', body).then((res) => res?.participantId || null);
5866
+
5854
5867
  const createUserProfile = (body) => fetchRetailJSON('/public-data/createUserProfile', 'POST', body).then((res) => res?.profile?.id || null);
5855
5868
 
5856
5869
  const createUserTaskDebit = async (body) => {
@@ -5874,7 +5887,13 @@
5874
5887
 
5875
5888
  const updateUserTask = (body) => doRequest('/user-data/updateUserTask', 'PUT', body);
5876
5889
 
5877
- const sendCode = (body) => doRequest('/sms/sendCode', 'POST', body);
5890
+ const sendCode = async (body) => {
5891
+ const isNewMicroservice = checkNewMicroservice();
5892
+ return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/sendCode`, 'POST', {
5893
+ phoneNumber: body.phoneNumber,
5894
+ smsCodesSetName: isNewMicroservice ? body.smsCodesSetName.key : body.smsCodesSetName,
5895
+ });
5896
+ };
5878
5897
 
5879
5898
  const ICON_SIZE = { width: '103', height: '21' };
5880
5899
 
@@ -5906,11 +5925,20 @@
5906
5925
  ? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
5907
5926
  : null] })));
5908
5927
 
5909
- const checkCaptcha = (body) => doRequest('/sms/checkCaptcha', 'POST', body)
5910
- .then((res) => res.text())
5911
- .then((text) => text !== 'ERROR');
5928
+ const checkCaptcha = async (body) => {
5929
+ const isNewMicroservice = checkNewMicroservice();
5930
+ return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/checkCaptcha`, 'POST', {
5931
+ captchaText: body.captchaText,
5932
+ ...(isNewMicroservice && { phoneNumber: body?.phoneNumber }),
5933
+ })
5934
+ .then((res) => res.text())
5935
+ .then((text) => text !== 'ERROR');
5936
+ };
5912
5937
 
5913
- const createCaptcha = (phoneNumber) => doRequest(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(phoneNumber)}`, 'GET').then(async (res) => (res ? res.blob() : new Blob()));
5938
+ const createCaptcha = async (phoneNumber) => {
5939
+ const isNewMicroservice = checkNewMicroservice();
5940
+ return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/createCaptcha?phoneNumber=${encodeURIComponent(phoneNumber)}`, 'GET').then(async (res) => (res ? res.blob() : new Blob()));
5941
+ };
5914
5942
 
5915
5943
  const CaptchaDialog = JSX(({ phoneNumber, sendCode, onClose }) => {
5916
5944
  const [captcha, setCaptcha] = useState('');
@@ -5920,7 +5948,7 @@
5920
5948
  const { closeAll } = useDialogManager();
5921
5949
  const handleCheckCaptcha = useCallback(async () => {
5922
5950
  startLoading();
5923
- const isValidCode = await checkCaptcha({ captchaText: code });
5951
+ const isValidCode = await checkCaptcha({ captchaText: code, phoneNumber });
5924
5952
  if (isValidCode) {
5925
5953
  onClose?.();
5926
5954
  sendCode?.();
@@ -5937,7 +5965,14 @@
5937
5965
  return (jsx(Dialog, { head: jsx(Logo, {}), onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center", children: [jsxs("div", { className: "flex", children: [jsx("img", { className: "grow", src: captcha }), jsx(Button, { className: "w-8", embedded: true, onClick: handleCreateCaptcha, children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-80", 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-80 justify-between", children: [jsx(Button, { version: "secondary", onClick: closeAll, children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(SubmitButton$1, { version: "secondary", disabled: !code, onClick: handleCheckCaptcha, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] }), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
5938
5966
  });
5939
5967
 
5940
- const checkCode = async (body) => await doRequest('/sms/checkCode', 'POST', body);
5968
+ const checkCode = async (body) => {
5969
+ const isNewMicroservice = checkNewMicroservice();
5970
+ return await doRequest(`${isNewMicroservice ? '/user-data' : ''}/sms/checkCode`, 'POST', {
5971
+ smsText: body.smsText,
5972
+ smsCodesSetName: isNewMicroservice ? body.smsCodesSetName.key : body.smsCodesSetName,
5973
+ ...(isNewMicroservice && { phoneNumber: body?.phoneNumber }),
5974
+ });
5975
+ };
5941
5976
 
5942
5977
  const saveToken = (data) => {
5943
5978
  globalThis.sessionStorage.setItem('accessToken', data.access_token);
@@ -5945,7 +5980,7 @@
5945
5980
  };
5946
5981
 
5947
5982
  const TIME_TO_RESEND = 180;
5948
- const useVerifyPhoneDialogSubmit = ({ values, onSuccess, onFail, }) => {
5983
+ const useVerifyPhoneDialogSubmit = ({ values, phoneNumber, onSuccess, onFail, }) => {
5949
5984
  const sessionStore = useSessionStore();
5950
5985
  const attempts = sessionStore.smsCode?.attempts || 0;
5951
5986
  const timer = Math.max(getTimer(sessionStore.smsCode?.sendTime || Date.now()), 0);
@@ -5964,6 +5999,7 @@
5964
5999
  const response = await checkCode({
5965
6000
  smsText: values.join(''),
5966
6001
  smsCodesSetName: { key: 'AUTHENTICATION' },
6002
+ phoneNumber,
5967
6003
  });
5968
6004
  if (response.ok) {
5969
6005
  const data = (await response.json());
@@ -6005,13 +6041,14 @@
6005
6041
  const VerifyPhoneDialog = JSX(({ phone, withDescription = true, consents, onSuccess = noop, onClose = noop, onFail = noop, }) => {
6006
6042
  const [values, setValues] = useState(Array(CODE_LENGTH).fill(''));
6007
6043
  const sessionStore = useSessionStore();
6044
+ const phoneNumber = formatPhone(phone);
6008
6045
  const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setErrorText, } = useVerifyPhoneDialogSubmit({
6009
6046
  values,
6047
+ phoneNumber,
6010
6048
  onSuccess,
6011
6049
  onFail,
6012
6050
  });
6013
6051
  const captchaDialog = useDialog(CaptchaDialog);
6014
- const phoneNumber = formatPhone(phone);
6015
6052
  const restartTimer = useCountDownTimer({ seconds: timeNextReq, onTick: setTimeNextReq });
6016
6053
  const handleSendCode = useCallback(async () => {
6017
6054
  const response = await sendCode({
@@ -6074,7 +6111,7 @@
6074
6111
  const useConsentBkiDialog = (onClose) => {
6075
6112
  const { open } = useDialog(ConsentBkiDialog);
6076
6113
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
6077
- const handleSuccessVerify = (profileId) => async (smsCode) => {
6114
+ const handleSuccessVerify = (profileId, taskId, participantId) => async (smsCode) => {
6078
6115
  try {
6079
6116
  if (profileId) {
6080
6117
  await updateUserProfile({
@@ -6085,18 +6122,32 @@
6085
6122
  },
6086
6123
  });
6087
6124
  }
6125
+ else if (taskId && participantId) {
6126
+ await updateUserTask({
6127
+ task: {
6128
+ id: taskId,
6129
+ participant: {
6130
+ id: participantId,
6131
+ consentBkiFlg: true,
6132
+ smsConsentBki: smsCode,
6133
+ },
6134
+ },
6135
+ sendToBank: false,
6136
+ taskKind: 'SHORT',
6137
+ });
6138
+ }
6088
6139
  onClose();
6089
6140
  }
6090
6141
  catch (ex) {
6091
6142
  console.log(ex);
6092
6143
  }
6093
6144
  };
6094
- const handleSubmitBkiConstent = (phone, profileId, onFail) => async (confirmStatus) => {
6145
+ const handleSubmitBkiConsent = ({ phone, profileId, onFail, taskId, participantId }) => async (confirmStatus) => {
6095
6146
  if (confirmStatus === 'SIGNED' && phone) {
6096
6147
  verifyPhoneDialog.open({
6097
6148
  phone,
6098
6149
  consents: ['согласие на запрос информации в БКИ'],
6099
- onSuccess: handleSuccessVerify(profileId),
6150
+ onSuccess: handleSuccessVerify(profileId, taskId, participantId),
6100
6151
  onFail,
6101
6152
  });
6102
6153
  }
@@ -6105,7 +6156,16 @@
6105
6156
  }
6106
6157
  };
6107
6158
  return {
6108
- open: (phone, profileId, onFail) => open({ onSubmit: handleSubmitBkiConstent(phone, profileId, onFail), onClose }),
6159
+ open: ({ phone, profileId, onFail, taskId, participantId }) => open({
6160
+ onSubmit: handleSubmitBkiConsent({
6161
+ phone,
6162
+ profileId,
6163
+ onFail,
6164
+ taskId,
6165
+ participantId,
6166
+ }),
6167
+ onClose,
6168
+ }),
6109
6169
  };
6110
6170
  };
6111
6171
 
@@ -6191,10 +6251,10 @@
6191
6251
  return [
6192
6252
  ...acc,
6193
6253
  {
6254
+ ...address,
6194
6255
  addressType: {
6195
6256
  key: fieldsNamesToAddressKeysMap[key],
6196
6257
  },
6197
- ...address,
6198
6258
  },
6199
6259
  ];
6200
6260
  }
@@ -6452,40 +6512,50 @@
6452
6512
  };
6453
6513
  };
6454
6514
 
6455
- /* eslint-disable camelcase */
6456
- const getCreditLeadFormTaskData = ({ participantId, taskId, profileId, formData, marketingInfo, }) => {
6457
- const { name, surname, middleName, limitedBirthday, phone, email } = formData;
6515
+ const getCreditLeadFormTaskData = ({ participantId, taskId, profileId, formData, marketingInfo, consents, }) => {
6458
6516
  const taskSource = getTaskSource(marketingInfo?.utm_source);
6517
+ const participantInfo = getParticipant({ participantId, profileId, formData, consents });
6459
6518
  return {
6460
6519
  sendToBank: true,
6461
6520
  taskKind: 'SHORT',
6462
6521
  task: {
6463
6522
  taskSource,
6464
6523
  id: taskId,
6465
- participants: [
6466
- {
6467
- birthDate: limitedBirthday && formatDate(limitedBirthday, true),
6468
- id: participantId,
6469
- midname: middleName,
6470
- name,
6471
- surname,
6472
- profile: {
6473
- id: profileId,
6474
- },
6475
- participantContacts: getParticipantContacts$1({
6476
- phone: phone && formatPhone(phone),
6477
- email,
6478
- }),
6479
- roleCd: {
6480
- key: 'BORROWER',
6481
- value: 'Заемщик',
6482
- },
6483
- },
6484
- ],
6524
+ ...(profileId
6525
+ ? {
6526
+ participants: [participantInfo],
6527
+ }
6528
+ : {
6529
+ participant: participantInfo,
6530
+ }),
6485
6531
  marketingInfo,
6486
6532
  },
6487
6533
  };
6488
6534
  };
6535
+ const getParticipant = ({ participantId, profileId, formData, consents, }) => {
6536
+ const { name, surname, middleName, limitedBirthday, phone, email } = formData;
6537
+ return {
6538
+ birthDate: limitedBirthday && formatDate(limitedBirthday, true),
6539
+ id: participantId,
6540
+ midname: middleName,
6541
+ name,
6542
+ surname,
6543
+ ...(profileId && {
6544
+ profile: {
6545
+ id: profileId,
6546
+ },
6547
+ }),
6548
+ participantContacts: getParticipantContacts$1({
6549
+ phone: phone && formatPhone(phone),
6550
+ email,
6551
+ }),
6552
+ roleCd: {
6553
+ key: 'BORROWER',
6554
+ value: 'Заемщик',
6555
+ },
6556
+ ...consents,
6557
+ };
6558
+ };
6489
6559
  const getDebitLeadFormTaskData = (formData, programId, marketingInfo) => {
6490
6560
  const { name, surname, middleName, limitedBirthday, phone, email } = formData;
6491
6561
  const taskSource = getTaskSource(marketingInfo?.utm_source);
@@ -6558,7 +6628,7 @@
6558
6628
 
6559
6629
  /* eslint-disable max-lines */
6560
6630
  // eslint-disable-next-line max-lines-per-function
6561
- const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, changeSubmitFormStatus, }) => {
6631
+ const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, changeSubmitFormStatus, isNewMicroservice, }) => {
6562
6632
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
6563
6633
  const saveUserData = useSaveUserData();
6564
6634
  const sessionStore = useSessionStore();
@@ -6575,7 +6645,7 @@
6575
6645
  verifyPhoneDialog.close();
6576
6646
  changeSubmitFormStatus(false);
6577
6647
  };
6578
- const handleSubmit = useCallback(async (formData) => {
6648
+ const handleSubmitOldMicroservice = useCallback(async (formData) => {
6579
6649
  try {
6580
6650
  startSending();
6581
6651
  const transformedFormData = transformFormData(formData);
@@ -6603,7 +6673,11 @@
6603
6673
  goToNextStep();
6604
6674
  }
6605
6675
  else {
6606
- consentBkiDialog.open(transformedFormData.phone, profileId, handleFailSendForm);
6676
+ consentBkiDialog.open({
6677
+ phone: transformedFormData.phone,
6678
+ profileId,
6679
+ onFail: handleFailSendForm,
6680
+ });
6607
6681
  }
6608
6682
  };
6609
6683
  const handleSuccessVerify = async () => {
@@ -6643,7 +6717,65 @@
6643
6717
  endSending();
6644
6718
  }
6645
6719
  }, []);
6646
- return { isSending, handleSubmit };
6720
+ const handleSubmitNewMicroservice = useCallback(async (formData) => {
6721
+ try {
6722
+ startSending();
6723
+ const transformedFormData = transformFormData(formData);
6724
+ const participantId = await createParticipant({
6725
+ phone: formatPhone(transformedFormData.phone),
6726
+ email: transformedFormData.email,
6727
+ });
6728
+ const referalData = leadFormStore.referalData;
6729
+ const marketingInfo = sessionStore.marketingInfo;
6730
+ if (!participantId) {
6731
+ throw new Error();
6732
+ }
6733
+ const sendCurrentTask = async () => {
6734
+ const taskId = await updateUserDataNewMicroservice({
6735
+ programId,
6736
+ participantId,
6737
+ formData: transformedFormData,
6738
+ referalData,
6739
+ productType,
6740
+ marketingInfo,
6741
+ saveUserData,
6742
+ sendAspects,
6743
+ });
6744
+ verifyPhoneDialog.close();
6745
+ consentBkiDialog.open({
6746
+ phone: transformedFormData.phone,
6747
+ taskId,
6748
+ participantId,
6749
+ onFail: handleFailSendForm,
6750
+ });
6751
+ };
6752
+ const handleSuccessVerify = async () => {
6753
+ try {
6754
+ await sendCurrentTask();
6755
+ }
6756
+ catch {
6757
+ handleFailSendForm();
6758
+ }
6759
+ };
6760
+ const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
6761
+ verifyPhoneDialog.open({
6762
+ phone: transformedFormData.phone,
6763
+ consents: acceptedConsents,
6764
+ onSuccess: handleSuccessVerify,
6765
+ onFail: handleFailSendForm,
6766
+ });
6767
+ }
6768
+ catch {
6769
+ handleFailSendForm();
6770
+ }
6771
+ finally {
6772
+ endSending();
6773
+ }
6774
+ }, []);
6775
+ return {
6776
+ isSending,
6777
+ handleSubmit: isNewMicroservice ? handleSubmitNewMicroservice : handleSubmitOldMicroservice,
6778
+ };
6647
6779
  };
6648
6780
  const getAcceptedConsents = (formData, productType) => {
6649
6781
  const consents = productTypeToConsentsMap[productType];
@@ -6690,6 +6822,37 @@
6690
6822
  console.log(ex);
6691
6823
  }
6692
6824
  };
6825
+ const updateUserDataNewMicroservice = async ({ programId, participantId, formData, referalData, productType, marketingInfo, saveUserData, sendAspects, }) => {
6826
+ let taskId;
6827
+ const transformedConsents = transformConsentsFields(formData, productType);
6828
+ try {
6829
+ const creditData = await createDraftTask({
6830
+ participantId,
6831
+ programId,
6832
+ });
6833
+ taskId = creditData.taskId;
6834
+ await updateUserTask(getCreditLeadFormTaskData({
6835
+ participantId,
6836
+ taskId,
6837
+ formData,
6838
+ marketingInfo,
6839
+ consents: transformedConsents,
6840
+ }));
6841
+ if (referalData?.referalCode) {
6842
+ await saveReferalInfo({
6843
+ taskId,
6844
+ ...referalData,
6845
+ });
6846
+ }
6847
+ sendAspects(participantId, taskId);
6848
+ saveUserData({ participantId, taskId, programId, formData });
6849
+ return taskId;
6850
+ }
6851
+ catch (ex) {
6852
+ console.log(ex);
6853
+ throw new Error();
6854
+ }
6855
+ };
6693
6856
  const transformConsentsFields = (formData, productType) => {
6694
6857
  const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg, consentInformMaterialsFlg, consentFATCA, } = formData;
6695
6858
  let consents;
@@ -6772,13 +6935,16 @@
6772
6935
  return () => clearInterval(timer);
6773
6936
  };
6774
6937
 
6775
- const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
6776
- if (res?.access_token && res?.refresh_token) {
6777
- saveToken(res);
6778
- updateRefreshToken(true);
6779
- }
6780
- return res;
6781
- });
6938
+ const esiaRequestProfile = async (body) => {
6939
+ const isNewMicroservice = checkNewMicroservice();
6940
+ return await fetchRetailJSON(`${isNewMicroservice ? '/user-data' : ''}/esia/requestProfile`, 'POST', body).then((res) => {
6941
+ if (res?.access_token && res?.refresh_token) {
6942
+ saveToken(res);
6943
+ updateRefreshToken(true);
6944
+ }
6945
+ return res;
6946
+ });
6947
+ };
6782
6948
 
6783
6949
  const useReferalProgramm = () => {
6784
6950
  const leadFormStore = useLeadFormStore();
@@ -6862,12 +7028,12 @@
6862
7028
  .then((response) => response.json());
6863
7029
  };
6864
7030
 
6865
- const parseEsiaProfile = async (esiaProfile, isDebit) => {
7031
+ const parseEsiaProfile = async (esiaProfile, isDebit = false, isNewMicroservice = false) => {
6866
7032
  checkEsiaData(esiaProfile);
6867
- const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
7033
+ const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile, isNewMicroservice);
6868
7034
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
6869
7035
  let files = [];
6870
- if (isFullEsiaData) {
7036
+ if (isFullEsiaData && !isNewMicroservice) {
6871
7037
  files = await saveDocuments(esiaAdditionalDocument);
6872
7038
  }
6873
7039
  const mainData = {
@@ -6998,8 +7164,16 @@
6998
7164
  throw new Error();
6999
7165
  }
7000
7166
  };
7001
- const checkEsiaAdditionalDocument = (esiaProfile) => {
7167
+ const checkEsiaAdditionalDocument = (esiaProfile, isNewMicroservice) => {
7002
7168
  const { esiaAdditionalDocument } = esiaProfile;
7169
+ const documents = [
7170
+ esiaAdditionalDocument?.pdfFilePayout,
7171
+ esiaAdditionalDocument?.pdfFileWorkbook,
7172
+ esiaAdditionalDocument?.pdfFileSigPayout,
7173
+ esiaAdditionalDocument?.xmlFilePayout,
7174
+ esiaAdditionalDocument?.xmlFileSigPayout,
7175
+ esiaAdditionalDocument?.xmlFileWorkbook,
7176
+ ];
7003
7177
  const data = [
7004
7178
  esiaAdditionalDocument?.inn,
7005
7179
  esiaAdditionalDocument?.averageMonthlyIncome?.toString(),
@@ -7008,18 +7182,12 @@
7008
7182
  esiaAdditionalDocument?.workLength?.toString(),
7009
7183
  esiaAdditionalDocument?.workLengthLastJob?.toString(),
7010
7184
  esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
7011
- esiaAdditionalDocument?.pdfFilePayout,
7012
- esiaAdditionalDocument?.pdfFileWorkbook,
7013
- esiaAdditionalDocument?.pdfFileSigPayout,
7014
- esiaAdditionalDocument?.xmlFilePayout,
7015
- esiaAdditionalDocument?.xmlFileSigPayout,
7016
- esiaAdditionalDocument?.xmlFileWorkbook,
7017
7185
  ];
7018
- return data.every(Boolean);
7186
+ return data.every(Boolean) && (isNewMicroservice || documents.every(Boolean));
7019
7187
  };
7020
7188
 
7021
7189
  /* eslint-disable camelcase */
7022
- const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
7190
+ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, isNewMicroservice, }) => {
7023
7191
  const leadFormStore = useLeadFormStore();
7024
7192
  const saveForm = useSetter(leadFormStore, 'leadForm');
7025
7193
  const sessionStore = useSessionStore();
@@ -7036,7 +7204,7 @@
7036
7204
  authorize: true,
7037
7205
  });
7038
7206
  if (data) {
7039
- const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
7207
+ const parsedData = await parseEsiaProfile(data, productType === 'debitCard', isNewMicroservice);
7040
7208
  saveForm((_) => ({
7041
7209
  ..._,
7042
7210
  ...parsedData,
@@ -7051,6 +7219,7 @@
7051
7219
  useEffect(() => {
7052
7220
  leadFormStore.productType = productType;
7053
7221
  sessionStore.marketingInfo = getMarketingInfo(queryFromStorage, sessionStore);
7222
+ sessionStore.isNewMicroservice = isNewMicroservice || null;
7054
7223
  }, [queryFromStorage]);
7055
7224
  useEffect(() => {
7056
7225
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
@@ -7083,7 +7252,7 @@
7083
7252
  };
7084
7253
  };
7085
7254
 
7086
- const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
7255
+ const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, isNewMicroservice = false, ...rest }) => {
7087
7256
  const [esiaStatus, setEsiaStatus] = useState();
7088
7257
  const [ok, setOK] = useState();
7089
7258
  const [attemptsWithoutConsents, setAttemptsWithoutConsents] = useState(0);
@@ -7104,6 +7273,7 @@
7104
7273
  productType,
7105
7274
  setEsiaStatus,
7106
7275
  esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
7276
+ isNewMicroservice,
7107
7277
  });
7108
7278
  const { isSending, handleSubmit } = useApplicationLeadApi({
7109
7279
  programId,
@@ -7111,6 +7281,7 @@
7111
7281
  productType,
7112
7282
  data,
7113
7283
  changeSubmitFormStatus,
7284
+ isNewMicroservice,
7114
7285
  });
7115
7286
  const [, { field, onSubmit, reset }] = useForm(initialFormState, {
7116
7287
  formValidator,
@@ -7702,7 +7873,7 @@
7702
7873
  };
7703
7874
  function useBusinessDepositRates(rateParams) {
7704
7875
  const serviceName = rateParams?.rateType ? DEPOSIT_RATES_SERVICE_MAP[rateParams?.rateType] : '';
7705
- const { data } = useAsyncData(serviceName ? `${API_BASE_URI$1}/depositrates/${serviceName}` : null, fetchJSONUnsafe);
7876
+ const { data } = useAsyncData(serviceName ? `${API_BASE_URI}/depositrates/${serviceName}` : null, fetchJSONUnsafe);
7706
7877
  return Array.isArray(data) ? data : [];
7707
7878
  }
7708
7879
 
@@ -8246,7 +8417,7 @@
8246
8417
  failUrl: `${navigator.origin}${FAILED_URL}`,
8247
8418
  language: LANGUAGE,
8248
8419
  };
8249
- const url = `${API_BASE_URI$1}/payment/${paymentURLMap[typeForm]}`;
8420
+ const url = `${API_BASE_URI}/payment/${paymentURLMap[typeForm]}`;
8250
8421
  try {
8251
8422
  const res = await fetch(url, {
8252
8423
  method: 'POST',
@@ -9631,6 +9802,10 @@
9631
9802
  return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold mr-s", children: ["\u0428\u0430\u0433 ", step, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
9632
9803
  });
9633
9804
 
9805
+ const sendMessage = async (body) => {
9806
+ await doRequest('/camunda/send/message', 'POST', body);
9807
+ };
9808
+
9634
9809
  const FailedStatusContent$1 = JSX(() => (jsx(FormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0412\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435", description: "\u0412 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u0411\u0430\u043D\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u043E\u0434\u043E\u0431\u0440\u0438\u0442\u044C \u0412\u0430\u0448\u0443 \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0434\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u043F\u043E\u0437\u0436\u0435. \u0421\u043F\u0430\u0441\u0438\u0431\u043E \u0437\u0430 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u0432 \u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB.", buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })));
9635
9810
 
9636
9811
  const PendingStatusContent$1 = JSX(({ onExpire }) => {
@@ -9708,13 +9883,25 @@
9708
9883
  'CREATE_APPLICATION_SHORT_SIGNAL',
9709
9884
  'CREATE_APPLICATION_LOAN_V3_SIGNAL',
9710
9885
  ];
9886
+ const MESSAGE_NAMES = [
9887
+ 'CREATE_APPLICATION_SHORT_MESSAGE',
9888
+ // 'CREATE_APPLICATION_LOAN_MESSAGE',
9889
+ ];
9711
9890
  const CreditFormStatusTracker = JSX(() => {
9891
+ const isNewMicroservice = checkNewMicroservice();
9712
9892
  const [status, setStatus] = useState(STATUS_TYPE.process);
9713
9893
  const { taskId } = useRetailFormStore();
9714
9894
  useEffect(() => {
9715
9895
  (async () => {
9716
- for (const signalType of SIGNAL_TYPES) {
9717
- await sendSignalToProcess({ signalType, taskId });
9896
+ if (isNewMicroservice) {
9897
+ for (const messageName of MESSAGE_NAMES) {
9898
+ await sendMessage({ messageName, taskId });
9899
+ }
9900
+ }
9901
+ else {
9902
+ for (const signalType of SIGNAL_TYPES) {
9903
+ await sendSignalToProcess({ signalType, taskId });
9904
+ }
9718
9905
  }
9719
9906
  })();
9720
9907
  }, [taskId]);
@@ -9776,33 +9963,43 @@
9776
9963
  };
9777
9964
  };
9778
9965
 
9779
- const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => ({
9780
- sendToBank: true,
9781
- taskKind: 'UNITED',
9782
- task: {
9783
- id: taskId,
9784
- authorizedAgentId: formData?.bankEmployeeCode,
9785
- participants: [
9786
- {
9787
- id: participantId,
9788
- profile: {
9789
- id: profileId,
9790
- },
9791
- roleCd: {
9792
- key: 'BORROWER',
9793
- value: 'Заемщик',
9794
- },
9795
- ...getCurrentStepData$1(step, formData),
9966
+ const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => {
9967
+ const isNewMicroservice = checkNewMicroservice();
9968
+ const participantInfo = {
9969
+ id: participantId,
9970
+ ...(!isNewMicroservice && {
9971
+ profile: {
9972
+ id: profileId,
9796
9973
  },
9797
- ],
9798
- ...getCalcData(formData),
9799
- ...getDeliveryCreditData(formData),
9800
- esiaAccountTypeCd: {
9801
- key: formData?.esiaAccountTypeCd?.key,
9974
+ }),
9975
+ roleCd: {
9976
+ key: 'BORROWER',
9977
+ value: 'Заемщик',
9802
9978
  },
9803
- files: formData?.files,
9804
- },
9805
- });
9979
+ ...getCurrentStepData$1(step, formData),
9980
+ };
9981
+ return {
9982
+ sendToBank: true,
9983
+ taskKind: 'UNITED',
9984
+ task: {
9985
+ id: taskId,
9986
+ authorizedAgentId: formData?.bankEmployeeCode,
9987
+ ...(isNewMicroservice
9988
+ ? {
9989
+ participant: participantInfo,
9990
+ }
9991
+ : {
9992
+ participants: [participantInfo],
9993
+ }),
9994
+ ...getCalcData(formData),
9995
+ ...getDeliveryCreditData(formData),
9996
+ esiaAccountTypeCd: {
9997
+ key: formData?.esiaAccountTypeCd?.key,
9998
+ },
9999
+ files: formData?.files,
10000
+ },
10001
+ };
10002
+ };
9806
10003
  const getCurrentStepData$1 = (step, formData) => {
9807
10004
  switch (step) {
9808
10005
  case 0:
@@ -9867,7 +10064,7 @@
9867
10064
  retailFormStore.leadForm = formData;
9868
10065
  try {
9869
10066
  const { taskId, profileId, participantId } = retailFormStore;
9870
- if (taskId && profileId && participantId) {
10067
+ if (taskId) {
9871
10068
  const response = await updateUserTask(getCreditFormTaskData({
9872
10069
  participantId,
9873
10070
  taskId,
@@ -10686,7 +10883,7 @@
10686
10883
  };
10687
10884
  const ErrorBlock = JSX(({ className = '', title, description, error, button, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-center items-center', className), defaultPadding: style('p-6xl'), version: "transparent", ...rest, children: [jsx("div", { className: "flex justify-center", children: renderErrorContent(error) }), jsx(Headline, { title: title, description: description, headlineVersion: "XL", isEmbedded: true, className: "mb-2xl last:mb-0" }), button?.text ? (jsx(LinkButton, { version: button?.version, text: button?.text, ...button })) : null] })));
10688
10885
 
10689
- const REGION_URL = `${API_BASE_URI$1}/region`;
10886
+ const REGION_URL = `${API_BASE_URI}/region`;
10690
10887
  function useLocation(defaultLocation = 'Москва') {
10691
10888
  const locationStore = useLocalStore();
10692
10889
  return locationStore.location ?? { name: defaultLocation };
@@ -10875,7 +11072,7 @@
10875
11072
  }
10876
11073
  };
10877
11074
 
10878
- const EXCHANGE_RATES_URL = `${API_BASE_URI$1}/exchangerates`;
11075
+ const EXCHANGE_RATES_URL = `${API_BASE_URI}/exchangerates`;
10879
11076
  function useFetchExchangeRateData(currentRegion) {
10880
11077
  const regionCode = currentRegion?.code || '000';
10881
11078
  const { data } = useAsyncData(EXCHANGE_RATES_URL + `?regionCode=${regionCode}`, fetchJSONUnsafe);
@@ -10956,7 +11153,7 @@
10956
11153
  const { navigationItems } = rest.options?.page?.navigation ?? {};
10957
11154
  rest.options?.page?.common ?? {};
10958
11155
  const { documents, relatedEnterprises, contacts, mediaLinks = [], horizontalNavigationTitle, feedbackButton, license, otherLinks = [], } = footer ?? {};
10959
- return (jsxs(BlockWrapper, { tag: "footer", className: style('grid gap-y-xl p-4xl pb-24 lg:p-xl', className), ...rest, children: [renderLogoSearchBar(), jsxs("div", { className: "flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ", children: [jsx(Sitemap, { navigationItems: navigationItems }), jsx("div", { className: "border-t border-main-divider lg:hidden w-full" }), jsxs("div", { className: style(LEFT_COLUMN_STYLE, 'flex flex-col shrink-0 overflow-hidden space-y-xl'), children: [jsx(Contacts, { items: contacts }), feedbackButton ? (jsx(LinkButton, { className: "w-full", version: "primary", ...feedbackButton })) : null, mediaLinks.map((_, i) => (jsx(SocialMedia, { media: _?.links ?? [], showButtonText: false, stretched: true, children: _?.title }, String(i)))), jsx("div", { className: "flex gap-m xl:gap-xs flex-wrap", children: otherLinks.map((_, i) => (jsx(Link, { className: "text-s font-light", ..._ }, `${_.href}_${i}`))) })] })] }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents, license: license })] }));
11156
+ return (jsxs(BlockWrapper, { tag: "footer", className: style('grid gap-y-xl p-4xl pb-24 lg:p-xl', className), ...rest, children: [renderLogoSearchBar(), jsxs("div", { className: "flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ", children: [jsx(Sitemap, { navigationItems: navigationItems }), jsx("div", { className: "border-t border-main-divider lg:hidden w-full" }), jsxs("div", { className: style(LEFT_COLUMN_STYLE, 'flex flex-col shrink-0 overflow-hidden space-y-xl'), children: [jsx(Contacts, { items: contacts }), feedbackButton ? (jsx(LinkButton, { className: "w-full", version: "primary", ...feedbackButton })) : null, mediaLinks.map((_, i) => (jsx(SocialMedia, { media: _?.links ?? [], showButtonText: false, stretched: true, children: _?.title }, String(i)))), otherLinks.map((_, i) => (jsx(Link, { className: "text-s font-light", ..._ }, `${_.href}_${i}`)))] })] }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents, license: license })] }));
10960
11157
  });
10961
11158
 
10962
11159
  const getInnerPadding = (isPadding = false) => isPadding ? {} : { padding: 'p-0' };
@@ -11511,7 +11708,7 @@
11511
11708
 
11512
11709
  const EMPTY_VALUE$1 = [];
11513
11710
  function useAtms(regionCode) {
11514
- const { data, error } = useAsyncData(`${API_BASE_URI$1}/atms?regionCode=${regionCode}`, fetchMap$1);
11711
+ const { data, error } = useAsyncData(`${API_BASE_URI}/atms?regionCode=${regionCode}`, fetchMap$1);
11515
11712
  const isLoad = !data && !error;
11516
11713
  return { data: data || EMPTY_VALUE$1, isLoad };
11517
11714
  }
@@ -11552,7 +11749,7 @@
11552
11749
 
11553
11750
  const EMPTY_VALUE = { branches: [], remoteWorkplaces: [] };
11554
11751
  function useOffices(regionCode = '000') {
11555
- const { data, error } = useAsyncData(`${API_BASE_URI$1}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(regionCode)}`, fetchMap);
11752
+ const { data, error } = useAsyncData(`${API_BASE_URI}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(regionCode)}`, fetchMap);
11556
11753
  const isLoad = !data && !error;
11557
11754
  return { data: data || EMPTY_VALUE, isLoad };
11558
11755
  }
@@ -12381,7 +12578,7 @@
12381
12578
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
12382
12579
  });
12383
12580
 
12384
- const packageVersion = "0.14.949";
12581
+ const packageVersion = "0.14.951";
12385
12582
 
12386
12583
  exports.Blocks = Blocks;
12387
12584
  exports.ContentPage = ContentPage;