@woodger/t-invest-node-sdk 0.5.5 → 0.5.7

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 (372) hide show
  1. package/CHANGELOG.md +313 -522
  2. package/NOTICE +8 -8
  3. package/dist/application/dto/t-invest-services.d.ts +2 -1
  4. package/dist/application/dto/t-invest-services.js +2 -1
  5. package/dist/application/errors/sdk-error.d.ts +9 -0
  6. package/dist/application/errors/sdk-error.js +12 -2
  7. package/dist/application/reports/accounts.report.d.ts +7 -2
  8. package/dist/application/reports/accrued-interests.report.d.ts +8 -2
  9. package/dist/application/reports/bond-coupons.report.d.ts +3 -1
  10. package/dist/application/reports/bond.report.d.ts +3 -1
  11. package/dist/application/reports/brands.report.d.ts +4 -1
  12. package/dist/application/reports/broker-report.report.d.ts +6 -2
  13. package/dist/application/reports/candles.report.d.ts +4 -1
  14. package/dist/application/reports/close-prices.report.d.ts +7 -2
  15. package/dist/application/reports/currency.report.d.ts +4 -1
  16. package/dist/application/reports/dividends-foreign-issuer.report.d.ts +4 -1
  17. package/dist/application/reports/dividends.report.d.ts +4 -1
  18. package/dist/application/reports/find-instrument.report.d.ts +3 -1
  19. package/dist/application/reports/future.report.d.ts +3 -1
  20. package/dist/application/reports/futures-margin.report.d.ts +10 -3
  21. package/dist/application/reports/instrument.report.d.ts +7 -2
  22. package/dist/application/reports/last-prices.report.d.ts +7 -2
  23. package/dist/application/reports/last-trades.report.d.ts +4 -2
  24. package/dist/application/reports/margin-attributes.report.d.ts +6 -2
  25. package/dist/application/reports/operations-by-cursor.report.d.ts +7 -2
  26. package/dist/application/reports/option.report.d.ts +4 -1
  27. package/dist/application/reports/order-book.report.d.ts +1 -1
  28. package/dist/application/reports/order-mutation.report.d.ts +6 -2
  29. package/dist/application/reports/portfolio.report.d.ts +4 -1
  30. package/dist/application/reports/stop-orders.report.d.ts +3 -1
  31. package/dist/application/reports/trading-schedules.report.d.ts +12 -4
  32. package/dist/application/reports/trading-status.report.d.ts +3 -1
  33. package/dist/application/reports/trading-statuses.report.d.ts +4 -1
  34. package/dist/application/reports/user-tariff.report.d.ts +2 -0
  35. package/dist/application/reports/withdraw-limits.report.d.ts +4 -1
  36. package/dist/application/services/unary-limiter.d.ts +5 -2
  37. package/dist/application/services/unary-limiter.js +77 -27
  38. package/dist/bootstrap/args/instrument-id-options.d.ts +4 -2
  39. package/dist/bootstrap/args/instrument-id-options.js +4 -2
  40. package/dist/bootstrap/args/instruments-args.js +2 -1
  41. package/dist/bootstrap/args/sdk-options.d.ts +2 -1
  42. package/dist/bootstrap/args/sdk-options.js +2 -1
  43. package/dist/bootstrap/args/side-effect-args.js +3 -1
  44. package/dist/bootstrap/cli/contract.d.ts +2 -1
  45. package/dist/bootstrap/cli/contract.js +2 -1
  46. package/dist/bootstrap/cli/domains.d.ts +2 -1
  47. package/dist/bootstrap/cli/domains.js +8 -3
  48. package/dist/bootstrap/cli/error.d.ts +2 -1
  49. package/dist/bootstrap/cli/error.js +2 -1
  50. package/dist/bootstrap/cli/help-catalog.d.ts +1 -0
  51. package/dist/bootstrap/cli/help-catalog.js +5 -0
  52. package/dist/bootstrap/cli/help.d.ts +2 -1
  53. package/dist/bootstrap/cli/help.js +4 -3
  54. package/dist/bootstrap/cli/registry.d.ts +2 -1
  55. package/dist/bootstrap/cli/registry.js +4 -2
  56. package/dist/bootstrap/cli/version.d.ts +2 -1
  57. package/dist/bootstrap/cli/version.js +2 -1
  58. package/dist/bootstrap/commands/accounts/cli.d.ts +2 -1
  59. package/dist/bootstrap/commands/accounts/cli.js +2 -1
  60. package/dist/bootstrap/commands/accounts/reporter.d.ts +2 -1
  61. package/dist/bootstrap/commands/accounts/reporter.js +2 -1
  62. package/dist/bootstrap/commands/accrued-interests/cli.d.ts +2 -1
  63. package/dist/bootstrap/commands/accrued-interests/cli.js +2 -1
  64. package/dist/bootstrap/commands/accrued-interests/reporter.d.ts +2 -1
  65. package/dist/bootstrap/commands/accrued-interests/reporter.js +2 -1
  66. package/dist/bootstrap/commands/asset/cli.d.ts +2 -1
  67. package/dist/bootstrap/commands/asset/cli.js +2 -1
  68. package/dist/bootstrap/commands/asset/reporter.d.ts +2 -1
  69. package/dist/bootstrap/commands/asset/reporter.js +2 -1
  70. package/dist/bootstrap/commands/assets/cli.d.ts +2 -1
  71. package/dist/bootstrap/commands/assets/cli.js +2 -1
  72. package/dist/bootstrap/commands/assets/reporter.d.ts +2 -1
  73. package/dist/bootstrap/commands/assets/reporter.js +2 -1
  74. package/dist/bootstrap/commands/bond/cli.d.ts +2 -1
  75. package/dist/bootstrap/commands/bond/cli.js +2 -1
  76. package/dist/bootstrap/commands/bond/reporter.d.ts +2 -1
  77. package/dist/bootstrap/commands/bond/reporter.js +5 -2
  78. package/dist/bootstrap/commands/bond-coupons/cli.d.ts +2 -1
  79. package/dist/bootstrap/commands/bond-coupons/cli.js +2 -1
  80. package/dist/bootstrap/commands/bond-coupons/reporter.d.ts +2 -1
  81. package/dist/bootstrap/commands/bond-coupons/reporter.js +2 -1
  82. package/dist/bootstrap/commands/bonds/cli.d.ts +2 -1
  83. package/dist/bootstrap/commands/bonds/cli.js +2 -1
  84. package/dist/bootstrap/commands/bonds/reporter.d.ts +2 -1
  85. package/dist/bootstrap/commands/bonds/reporter.js +2 -1
  86. package/dist/bootstrap/commands/brand/cli.d.ts +2 -1
  87. package/dist/bootstrap/commands/brand/cli.js +2 -1
  88. package/dist/bootstrap/commands/brand/reporter.d.ts +2 -1
  89. package/dist/bootstrap/commands/brand/reporter.js +2 -1
  90. package/dist/bootstrap/commands/brands/cli.d.ts +2 -1
  91. package/dist/bootstrap/commands/brands/cli.js +2 -1
  92. package/dist/bootstrap/commands/brands/reporter.d.ts +2 -1
  93. package/dist/bootstrap/commands/brands/reporter.js +2 -1
  94. package/dist/bootstrap/commands/broker-report/cli.d.ts +2 -1
  95. package/dist/bootstrap/commands/broker-report/cli.js +2 -1
  96. package/dist/bootstrap/commands/broker-report/reporter.d.ts +2 -1
  97. package/dist/bootstrap/commands/broker-report/reporter.js +2 -1
  98. package/dist/bootstrap/commands/cancel-order/cli.d.ts +2 -1
  99. package/dist/bootstrap/commands/cancel-order/cli.js +2 -1
  100. package/dist/bootstrap/commands/cancel-order/reporter.d.ts +2 -1
  101. package/dist/bootstrap/commands/cancel-order/reporter.js +2 -1
  102. package/dist/bootstrap/commands/cancel-stop-order/cli.d.ts +2 -1
  103. package/dist/bootstrap/commands/cancel-stop-order/cli.js +2 -1
  104. package/dist/bootstrap/commands/cancel-stop-order/reporter.d.ts +2 -1
  105. package/dist/bootstrap/commands/cancel-stop-order/reporter.js +2 -1
  106. package/dist/bootstrap/commands/candles/cli.d.ts +2 -1
  107. package/dist/bootstrap/commands/candles/cli.js +2 -1
  108. package/dist/bootstrap/commands/candles/reporter.d.ts +2 -1
  109. package/dist/bootstrap/commands/candles/reporter.js +2 -1
  110. package/dist/bootstrap/commands/close-prices/cli.d.ts +2 -1
  111. package/dist/bootstrap/commands/close-prices/cli.js +2 -1
  112. package/dist/bootstrap/commands/close-prices/reporter.d.ts +2 -1
  113. package/dist/bootstrap/commands/close-prices/reporter.js +2 -1
  114. package/dist/bootstrap/commands/compile-proto/cli.d.ts +2 -1
  115. package/dist/bootstrap/commands/compile-proto/cli.js +2 -1
  116. package/dist/bootstrap/commands/countries/cli.d.ts +2 -1
  117. package/dist/bootstrap/commands/countries/cli.js +2 -1
  118. package/dist/bootstrap/commands/countries/reporter.d.ts +2 -1
  119. package/dist/bootstrap/commands/countries/reporter.js +2 -1
  120. package/dist/bootstrap/commands/currencies/cli.d.ts +2 -1
  121. package/dist/bootstrap/commands/currencies/cli.js +2 -1
  122. package/dist/bootstrap/commands/currencies/reporter.d.ts +2 -1
  123. package/dist/bootstrap/commands/currencies/reporter.js +2 -1
  124. package/dist/bootstrap/commands/currency/cli.d.ts +2 -1
  125. package/dist/bootstrap/commands/currency/cli.js +2 -1
  126. package/dist/bootstrap/commands/currency/reporter.d.ts +2 -1
  127. package/dist/bootstrap/commands/currency/reporter.js +2 -1
  128. package/dist/bootstrap/commands/dividends/cli.d.ts +2 -1
  129. package/dist/bootstrap/commands/dividends/cli.js +2 -1
  130. package/dist/bootstrap/commands/dividends/reporter.d.ts +2 -1
  131. package/dist/bootstrap/commands/dividends/reporter.js +2 -1
  132. package/dist/bootstrap/commands/dividends-foreign-issuer/cli.d.ts +2 -1
  133. package/dist/bootstrap/commands/dividends-foreign-issuer/cli.js +6 -2
  134. package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.d.ts +2 -1
  135. package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.js +2 -1
  136. package/dist/bootstrap/commands/edit-favorites/cli.d.ts +2 -1
  137. package/dist/bootstrap/commands/edit-favorites/cli.js +2 -1
  138. package/dist/bootstrap/commands/etf/cli.d.ts +2 -1
  139. package/dist/bootstrap/commands/etf/cli.js +2 -1
  140. package/dist/bootstrap/commands/etf/reporter.d.ts +2 -1
  141. package/dist/bootstrap/commands/etf/reporter.js +5 -2
  142. package/dist/bootstrap/commands/etfs/cli.d.ts +2 -1
  143. package/dist/bootstrap/commands/etfs/cli.js +2 -1
  144. package/dist/bootstrap/commands/etfs/reporter.d.ts +2 -1
  145. package/dist/bootstrap/commands/etfs/reporter.js +2 -1
  146. package/dist/bootstrap/commands/favorites/cli.d.ts +2 -1
  147. package/dist/bootstrap/commands/favorites/cli.js +2 -1
  148. package/dist/bootstrap/commands/favorites/reporter.d.ts +2 -1
  149. package/dist/bootstrap/commands/favorites/reporter.js +2 -1
  150. package/dist/bootstrap/commands/find-instrument/cli.d.ts +2 -1
  151. package/dist/bootstrap/commands/find-instrument/cli.js +2 -1
  152. package/dist/bootstrap/commands/find-instrument/reporter.d.ts +2 -1
  153. package/dist/bootstrap/commands/find-instrument/reporter.js +2 -1
  154. package/dist/bootstrap/commands/future/cli.d.ts +2 -1
  155. package/dist/bootstrap/commands/future/cli.js +2 -1
  156. package/dist/bootstrap/commands/future/reporter.d.ts +2 -1
  157. package/dist/bootstrap/commands/future/reporter.js +2 -1
  158. package/dist/bootstrap/commands/futures/cli.d.ts +2 -1
  159. package/dist/bootstrap/commands/futures/cli.js +2 -1
  160. package/dist/bootstrap/commands/futures/reporter.d.ts +2 -1
  161. package/dist/bootstrap/commands/futures/reporter.js +2 -1
  162. package/dist/bootstrap/commands/futures-margin/cli.d.ts +2 -1
  163. package/dist/bootstrap/commands/futures-margin/cli.js +2 -1
  164. package/dist/bootstrap/commands/futures-margin/reporter.d.ts +2 -1
  165. package/dist/bootstrap/commands/futures-margin/reporter.js +8 -2
  166. package/dist/bootstrap/commands/instrument/cli.d.ts +2 -1
  167. package/dist/bootstrap/commands/instrument/cli.js +2 -1
  168. package/dist/bootstrap/commands/instrument/reporter.d.ts +2 -1
  169. package/dist/bootstrap/commands/instrument/reporter.js +5 -2
  170. package/dist/bootstrap/commands/last-prices/cli.d.ts +2 -1
  171. package/dist/bootstrap/commands/last-prices/cli.js +2 -1
  172. package/dist/bootstrap/commands/last-prices/reporter.d.ts +2 -1
  173. package/dist/bootstrap/commands/last-prices/reporter.js +2 -1
  174. package/dist/bootstrap/commands/last-trades/cli.d.ts +2 -1
  175. package/dist/bootstrap/commands/last-trades/cli.js +2 -1
  176. package/dist/bootstrap/commands/last-trades/reporter.d.ts +2 -1
  177. package/dist/bootstrap/commands/last-trades/reporter.js +2 -1
  178. package/dist/bootstrap/commands/margin-attributes/cli.d.ts +2 -1
  179. package/dist/bootstrap/commands/margin-attributes/cli.js +2 -1
  180. package/dist/bootstrap/commands/margin-attributes/reporter.d.ts +2 -1
  181. package/dist/bootstrap/commands/margin-attributes/reporter.js +2 -1
  182. package/dist/bootstrap/commands/operations/cli.d.ts +2 -1
  183. package/dist/bootstrap/commands/operations/cli.js +8 -2
  184. package/dist/bootstrap/commands/operations/reporter.d.ts +2 -1
  185. package/dist/bootstrap/commands/operations/reporter.js +2 -1
  186. package/dist/bootstrap/commands/operations-by-cursor/cli.d.ts +2 -1
  187. package/dist/bootstrap/commands/operations-by-cursor/cli.js +8 -2
  188. package/dist/bootstrap/commands/operations-by-cursor/reporter.d.ts +2 -1
  189. package/dist/bootstrap/commands/operations-by-cursor/reporter.js +2 -1
  190. package/dist/bootstrap/commands/operations-by-cursor/request.mapper.d.ts +2 -1
  191. package/dist/bootstrap/commands/operations-by-cursor/request.mapper.js +2 -1
  192. package/dist/bootstrap/commands/option/cli.d.ts +2 -1
  193. package/dist/bootstrap/commands/option/cli.js +2 -1
  194. package/dist/bootstrap/commands/option/reporter.d.ts +2 -1
  195. package/dist/bootstrap/commands/option/reporter.js +2 -1
  196. package/dist/bootstrap/commands/options-by/cli.d.ts +2 -1
  197. package/dist/bootstrap/commands/options-by/cli.js +2 -1
  198. package/dist/bootstrap/commands/options-by/reporter.d.ts +2 -1
  199. package/dist/bootstrap/commands/options-by/reporter.js +2 -1
  200. package/dist/bootstrap/commands/order-book/cli.d.ts +2 -1
  201. package/dist/bootstrap/commands/order-book/cli.js +2 -1
  202. package/dist/bootstrap/commands/order-book/reporter.d.ts +2 -1
  203. package/dist/bootstrap/commands/order-book/reporter.js +11 -2
  204. package/dist/bootstrap/commands/order-state/cli.d.ts +2 -1
  205. package/dist/bootstrap/commands/order-state/cli.js +2 -1
  206. package/dist/bootstrap/commands/order-state/reporter.d.ts +2 -1
  207. package/dist/bootstrap/commands/order-state/reporter.js +2 -1
  208. package/dist/bootstrap/commands/orders/cli.d.ts +2 -1
  209. package/dist/bootstrap/commands/orders/cli.js +2 -1
  210. package/dist/bootstrap/commands/orders/reporter.d.ts +2 -1
  211. package/dist/bootstrap/commands/orders/reporter.js +2 -1
  212. package/dist/bootstrap/commands/portfolio/cli.d.ts +2 -1
  213. package/dist/bootstrap/commands/portfolio/cli.js +2 -1
  214. package/dist/bootstrap/commands/portfolio/reporter.d.ts +2 -1
  215. package/dist/bootstrap/commands/portfolio/reporter.js +2 -1
  216. package/dist/bootstrap/commands/portfolio/request.mapper.d.ts +2 -1
  217. package/dist/bootstrap/commands/portfolio/request.mapper.js +2 -1
  218. package/dist/bootstrap/commands/positions/cli.d.ts +2 -1
  219. package/dist/bootstrap/commands/positions/cli.js +2 -1
  220. package/dist/bootstrap/commands/positions/reporter.d.ts +2 -1
  221. package/dist/bootstrap/commands/positions/reporter.js +11 -2
  222. package/dist/bootstrap/commands/post-order/cli.d.ts +2 -1
  223. package/dist/bootstrap/commands/post-order/cli.js +2 -1
  224. package/dist/bootstrap/commands/post-order/reporter.d.ts +2 -1
  225. package/dist/bootstrap/commands/post-order/reporter.js +2 -1
  226. package/dist/bootstrap/commands/post-stop-order/cli.d.ts +2 -1
  227. package/dist/bootstrap/commands/post-stop-order/cli.js +4 -2
  228. package/dist/bootstrap/commands/post-stop-order/reporter.d.ts +2 -1
  229. package/dist/bootstrap/commands/post-stop-order/reporter.js +2 -1
  230. package/dist/bootstrap/commands/replace-order/cli.d.ts +2 -1
  231. package/dist/bootstrap/commands/replace-order/cli.js +2 -1
  232. package/dist/bootstrap/commands/replace-order/reporter.d.ts +2 -1
  233. package/dist/bootstrap/commands/replace-order/reporter.js +2 -1
  234. package/dist/bootstrap/commands/sandbox-accounts/cli.d.ts +2 -1
  235. package/dist/bootstrap/commands/sandbox-accounts/cli.js +2 -1
  236. package/dist/bootstrap/commands/sandbox-cancel-order/cli.d.ts +2 -1
  237. package/dist/bootstrap/commands/sandbox-cancel-order/cli.js +2 -1
  238. package/dist/bootstrap/commands/sandbox-close-account/cli.d.ts +2 -1
  239. package/dist/bootstrap/commands/sandbox-close-account/cli.js +2 -1
  240. package/dist/bootstrap/commands/sandbox-close-account/reporter.d.ts +2 -1
  241. package/dist/bootstrap/commands/sandbox-close-account/reporter.js +2 -1
  242. package/dist/bootstrap/commands/sandbox-open-account/cli.d.ts +2 -1
  243. package/dist/bootstrap/commands/sandbox-open-account/cli.js +2 -1
  244. package/dist/bootstrap/commands/sandbox-open-account/reporter.d.ts +2 -1
  245. package/dist/bootstrap/commands/sandbox-open-account/reporter.js +2 -1
  246. package/dist/bootstrap/commands/sandbox-operations/cli.d.ts +2 -1
  247. package/dist/bootstrap/commands/sandbox-operations/cli.js +2 -1
  248. package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.d.ts +2 -1
  249. package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.js +7 -2
  250. package/dist/bootstrap/commands/sandbox-order-state/cli.d.ts +2 -1
  251. package/dist/bootstrap/commands/sandbox-order-state/cli.js +2 -1
  252. package/dist/bootstrap/commands/sandbox-orders/cli.d.ts +2 -1
  253. package/dist/bootstrap/commands/sandbox-orders/cli.js +2 -1
  254. package/dist/bootstrap/commands/sandbox-pay-in/cli.d.ts +2 -1
  255. package/dist/bootstrap/commands/sandbox-pay-in/cli.js +2 -1
  256. package/dist/bootstrap/commands/sandbox-pay-in/reporter.d.ts +2 -1
  257. package/dist/bootstrap/commands/sandbox-pay-in/reporter.js +2 -1
  258. package/dist/bootstrap/commands/sandbox-portfolio/cli.d.ts +2 -1
  259. package/dist/bootstrap/commands/sandbox-portfolio/cli.js +2 -1
  260. package/dist/bootstrap/commands/sandbox-positions/cli.d.ts +2 -1
  261. package/dist/bootstrap/commands/sandbox-positions/cli.js +2 -1
  262. package/dist/bootstrap/commands/sandbox-post-order/cli.d.ts +2 -1
  263. package/dist/bootstrap/commands/sandbox-post-order/cli.js +2 -1
  264. package/dist/bootstrap/commands/sandbox-replace-order/cli.d.ts +2 -1
  265. package/dist/bootstrap/commands/sandbox-replace-order/cli.js +2 -1
  266. package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.d.ts +2 -1
  267. package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.js +6 -2
  268. package/dist/bootstrap/commands/share/cli.d.ts +2 -1
  269. package/dist/bootstrap/commands/share/cli.js +2 -1
  270. package/dist/bootstrap/commands/share/reporter.d.ts +2 -1
  271. package/dist/bootstrap/commands/share/reporter.js +5 -2
  272. package/dist/bootstrap/commands/shares/cli.d.ts +2 -1
  273. package/dist/bootstrap/commands/shares/cli.js +2 -1
  274. package/dist/bootstrap/commands/shares/reporter.d.ts +2 -1
  275. package/dist/bootstrap/commands/shares/reporter.js +2 -1
  276. package/dist/bootstrap/commands/stop-orders/cli.d.ts +2 -1
  277. package/dist/bootstrap/commands/stop-orders/cli.js +2 -1
  278. package/dist/bootstrap/commands/stop-orders/reporter.d.ts +2 -1
  279. package/dist/bootstrap/commands/stop-orders/reporter.js +2 -1
  280. package/dist/bootstrap/commands/stream-run/cli.d.ts +2 -1
  281. package/dist/bootstrap/commands/stream-run/cli.js +3 -4
  282. package/dist/bootstrap/commands/stream-run/config.js +2 -1
  283. package/dist/bootstrap/commands/stream-run/request.mapper.js +15 -5
  284. package/dist/bootstrap/commands/stream-run/stream-session.js +6 -2
  285. package/dist/bootstrap/commands/trading-schedules/cli.d.ts +2 -1
  286. package/dist/bootstrap/commands/trading-schedules/cli.js +2 -1
  287. package/dist/bootstrap/commands/trading-schedules/reporter.d.ts +2 -1
  288. package/dist/bootstrap/commands/trading-schedules/reporter.js +11 -2
  289. package/dist/bootstrap/commands/trading-status/cli.d.ts +2 -1
  290. package/dist/bootstrap/commands/trading-status/cli.js +2 -1
  291. package/dist/bootstrap/commands/trading-status/reporter.d.ts +2 -1
  292. package/dist/bootstrap/commands/trading-status/reporter.js +2 -1
  293. package/dist/bootstrap/commands/trading-statuses/cli.d.ts +2 -1
  294. package/dist/bootstrap/commands/trading-statuses/cli.js +2 -1
  295. package/dist/bootstrap/commands/trading-statuses/reporter.d.ts +2 -1
  296. package/dist/bootstrap/commands/trading-statuses/reporter.js +2 -1
  297. package/dist/bootstrap/commands/user-info/cli.d.ts +2 -1
  298. package/dist/bootstrap/commands/user-info/cli.js +2 -1
  299. package/dist/bootstrap/commands/user-info/reporter.d.ts +2 -1
  300. package/dist/bootstrap/commands/user-info/reporter.js +2 -1
  301. package/dist/bootstrap/commands/user-tariff/cli.d.ts +2 -1
  302. package/dist/bootstrap/commands/user-tariff/cli.js +2 -1
  303. package/dist/bootstrap/commands/user-tariff/reporter.d.ts +2 -1
  304. package/dist/bootstrap/commands/user-tariff/reporter.js +17 -2
  305. package/dist/bootstrap/commands/withdraw-limits/cli.d.ts +2 -1
  306. package/dist/bootstrap/commands/withdraw-limits/cli.js +2 -1
  307. package/dist/bootstrap/commands/withdraw-limits/reporter.d.ts +2 -1
  308. package/dist/bootstrap/commands/withdraw-limits/reporter.js +2 -1
  309. package/dist/bootstrap/generated-exports.d.ts +2 -2
  310. package/dist/bootstrap/generated-exports.js +11 -9
  311. package/dist/bootstrap/proto/compile-proto.d.ts +4 -2
  312. package/dist/bootstrap/proto/compile-proto.js +9 -6
  313. package/dist/bootstrap/t-invest-node-sdk.d.ts +21 -1
  314. package/dist/bootstrap/t-invest-node-sdk.js +40 -16
  315. package/dist/config.d.ts +5 -2
  316. package/dist/config.js +5 -2
  317. package/dist/generated/common.js +1 -1
  318. package/dist/generated/google/api/field_behavior.js +1 -1
  319. package/dist/generated/google/protobuf/descriptor.js +1 -1
  320. package/dist/generated/google/protobuf/timestamp.js +1 -1
  321. package/dist/generated/instruments.d.ts +16 -0
  322. package/dist/generated/instruments.js +160 -3
  323. package/dist/generated/marketdata.d.ts +22 -1
  324. package/dist/generated/marketdata.js +228 -11
  325. package/dist/generated/operations.d.ts +4 -0
  326. package/dist/generated/operations.js +46 -1
  327. package/dist/generated/orders.js +1 -1
  328. package/dist/generated/sandbox.js +1 -1
  329. package/dist/generated/signals.js +1 -1
  330. package/dist/generated/stoporders.js +1 -1
  331. package/dist/generated/users.d.ts +8 -0
  332. package/dist/generated/users.js +29 -1
  333. package/dist/infrastructure/interceptor/warning-interceptor.d.ts +2 -1
  334. package/dist/infrastructure/interceptor/warning-interceptor.js +4 -3
  335. package/dist/infrastructure/report-values.js +3 -1
  336. package/dist/infrastructure/transport/grpc/sdk-call-error.js +2 -2
  337. package/dist/infrastructure/transport/grpc/sdk-middleware.d.ts +2 -1
  338. package/dist/infrastructure/transport/grpc/sdk-middleware.js +2 -1
  339. package/dist/infrastructure/transport/grpc/unary-limit-resolver.d.ts +18 -0
  340. package/dist/infrastructure/transport/grpc/unary-limit-resolver.js +19 -3
  341. package/docs/architecture.md +78 -92
  342. package/docs/bundled-ca.md +25 -41
  343. package/docs/clean-architecture/api-commands.md +98 -91
  344. package/docs/clean-architecture/application.md +61 -79
  345. package/docs/clean-architecture/cli-output-boundaries.md +88 -104
  346. package/docs/clean-architecture/index.md +10 -32
  347. package/docs/cli-reference.md +30 -22
  348. package/docs/cli-stream-configuration.md +28 -28
  349. package/docs/cli-stream-reference.md +38 -70
  350. package/docs/examples/custom-unary-limiter.md +442 -0
  351. package/docs/examples/deprecated-fields.md +27 -0
  352. package/docs/examples/errors-and-lifecycle.md +168 -0
  353. package/docs/examples/getting-started.md +45 -0
  354. package/docs/examples/index.md +34 -0
  355. package/docs/examples/market-data-recovery.md +273 -0
  356. package/docs/examples/streams-and-cancellation.md +131 -0
  357. package/docs/examples/testing-with-service-definitions.md +77 -0
  358. package/docs/examples/unary-calls.md +144 -0
  359. package/docs/examples/unary-limits.md +90 -0
  360. package/docs/index.md +24 -45
  361. package/docs/limits-policy.md +16 -41
  362. package/docs/roadmap.md +54 -54
  363. package/docs/tls-policy.md +30 -14
  364. package/package.json +6 -6
  365. package/readme.md +51 -113
  366. package/docs/guides/custom-unary-limiter.md +0 -500
  367. package/docs/guides/errors-and-lifecycle.md +0 -184
  368. package/docs/guides/getting-started.md +0 -86
  369. package/docs/guides/index.md +0 -32
  370. package/docs/guides/streams-and-cancellation.md +0 -162
  371. package/docs/guides/testing-with-service-definitions.md +0 -102
  372. package/docs/guides/unary-calls.md +0 -181
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
- * Модуль proto compiler запускает генерацию TypeScript contracts из локальных proto-файлов.
3
+ * Модуль proto compiler запускает генерацию TypeScript contracts из локальных
4
+ * proto-файлов.
4
5
  *
5
6
  * Здесь допустимы:
6
7
  * - чтение локальных generation paths из proto upstream manifest;
@@ -8,7 +9,8 @@
8
9
  * - вызов закреплённого локального `protoc` с текущими ts-proto options;
9
10
  * - проверка обязательных tool/runtime prerequisites перед генерацией;
10
11
  *
11
- * Здесь не должно быть post-processing generated sources или SDK runtime wiring.
12
+ * Здесь не должно быть post-processing generated sources или SDK runtime
13
+ * wiring.
12
14
  */
13
15
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -82,10 +84,11 @@ function assertProtoCompilerReady(contractsDir) {
82
84
  throw new Error(`Missing ts-proto plugin at ${pluginPath}`);
83
85
  }
84
86
  // npm-пакет предоставляет Node.js launcher над локальным native binary;
85
- // process.execPath позволяет не искать compiler через shell или системный PATH.
87
+ // process.execPath позволяет не искать compiler через shell или системный
88
+ // PATH.
86
89
  (0, node_child_process_1.execFileSync)(process.execPath, [compilerLauncherPath, '--version'], {
87
90
  cwd: pwd_fs_1.pfs.pwd,
88
- stdio: ['ignore', 'ignore', 'inherit'],
91
+ stdio: ['ignore', 'ignore', 'inherit']
89
92
  });
90
93
  }
91
94
  function runProtoCompiler(protoFiles, paths) {
@@ -97,10 +100,10 @@ function runProtoCompiler(protoFiles, paths) {
97
100
  '--ts_proto_opt=outputServices=nice-grpc,outputServices=generic-definitions,useExactTypes=false',
98
101
  '--ts_proto_opt=env=node',
99
102
  '--ts_proto_opt=esModuleInterop=true',
100
- ...protoFiles,
103
+ ...protoFiles
101
104
  ], {
102
105
  cwd: pwd_fs_1.pfs.pwd,
103
- stdio: 'inherit',
106
+ stdio: 'inherit'
104
107
  });
105
108
  }
106
109
  function requireManifestPath(local, name, manifestPath) {
@@ -33,10 +33,30 @@ export declare class TInvestNodeSDK {
33
33
  get users(): UsersService;
34
34
  /**
35
35
  * Идемпотентно закрывает shared channel и запрещает новые SDK-вызовы.
36
- * Уже переданные transport-у операции нужно завершать их собственным AbortSignal.
36
+ * Уже переданные transport-у операции нужно завершать их собственным
37
+ * AbortSignal.
37
38
  */
38
39
  close(): void;
40
+ /**
41
+ * Лениво создаёт и кеширует клиент service definition с общим channel и
42
+ * middleware SDK.
43
+ * Доступ после закрытия SDK отклоняется, включая возврат ранее созданного
44
+ * клиента.
45
+ */
39
46
  private getOrCreateServiceClient;
47
+ /**
48
+ * Останавливает доступ к сервисам и новые RPC с SDK_CLOSED после закрытия
49
+ * SDK.
50
+ */
40
51
  private assertOpen;
52
+ /**
53
+ * Задаёт lifecycle-ошибку для отказа в новом вызове и причины отмены ожиданий
54
+ * limiter-а.
55
+ */
41
56
  private createClosedError;
57
+ /**
58
+ * Отклоняет доступ через прежние имена сервисов с ошибкой и подсказкой для
59
+ * миграции.
60
+ */
61
+ private static throwDeprecatedServiceGetter;
42
62
  }
@@ -75,7 +75,8 @@ class TInvestNodeSDK {
75
75
  }
76
76
  /**
77
77
  * Идемпотентно закрывает shared channel и запрещает новые SDK-вызовы.
78
- * Уже переданные transport-у операции нужно завершать их собственным AbortSignal.
78
+ * Уже переданные transport-у операции нужно завершать их собственным
79
+ * AbortSignal.
79
80
  */
80
81
  close() {
81
82
  if (this.closed) {
@@ -85,6 +86,12 @@ class TInvestNodeSDK {
85
86
  this.lifecycleController.abort(this.createClosedError());
86
87
  this.channel.close();
87
88
  }
89
+ /**
90
+ * Лениво создаёт и кеширует клиент service definition с общим channel и
91
+ * middleware SDK.
92
+ * Доступ после закрытия SDK отклоняется, включая возврат ранее созданного
93
+ * клиента.
94
+ */
88
95
  getOrCreateServiceClient(serviceDefinition) {
89
96
  this.assertOpen();
90
97
  const cachedClient = this.clientsByServiceDefinition.get(serviceDefinition);
@@ -103,30 +110,47 @@ class TInvestNodeSDK {
103
110
  this.clientsByServiceDefinition.set(serviceDefinition, client);
104
111
  return client;
105
112
  }
113
+ /**
114
+ * Останавливает доступ к сервисам и новые RPC с SDK_CLOSED после закрытия
115
+ * SDK.
116
+ */
106
117
  assertOpen() {
107
118
  if (this.closed) {
108
119
  throw this.createClosedError();
109
120
  }
110
121
  }
122
+ /**
123
+ * Задаёт lifecycle-ошибку для отказа в новом вызове и причины отмены ожиданий
124
+ * limiter-а.
125
+ */
111
126
  createClosedError() {
112
127
  return new sdk_error_1.SdkError(sdk_error_1.SdkErrorCode.SdkClosed, 'TInvestNodeSDK is closed', {
113
128
  source: 'lifecycle'
114
129
  });
115
130
  }
131
+ /**
132
+ * Отклоняет доступ через прежние имена сервисов с ошибкой и подсказкой для
133
+ * миграции.
134
+ */
135
+ static throwDeprecatedServiceGetter() {
136
+ throw new sdk_error_1.SdkError(sdk_error_1.SdkErrorCode.InvalidArgument, 'Прежние sdk.marketdata и sdk.stoporders не используйте: они устарели. Используйте вместо них sdk.marketData и sdk.stopOrders.', {
137
+ source: 'sdk'
138
+ });
139
+ }
140
+ // Прежние имена регистрируются при загрузке класса только в runtime,
141
+ // чтобы сохранить диагностику без включения этих getters в публичные
142
+ // TypeScript-типы.
143
+ static {
144
+ Object.defineProperties(this.prototype, {
145
+ marketdata: {
146
+ configurable: true,
147
+ get: this.throwDeprecatedServiceGetter
148
+ },
149
+ stoporders: {
150
+ configurable: true,
151
+ get: this.throwDeprecatedServiceGetter
152
+ }
153
+ });
154
+ }
116
155
  }
117
156
  exports.TInvestNodeSDK = TInvestNodeSDK;
118
- function throwDeprecatedServiceGetter() {
119
- throw new sdk_error_1.SdkError(sdk_error_1.SdkErrorCode.InvalidArgument, 'Прежние sdk.marketdata и sdk.stoporders не используйте: они устарели. Используйте вместо них sdk.marketData и sdk.stopOrders.', {
120
- source: 'sdk'
121
- });
122
- }
123
- Object.defineProperties(TInvestNodeSDK.prototype, {
124
- marketdata: {
125
- configurable: true,
126
- get: throwDeprecatedServiceGetter
127
- },
128
- stoporders: {
129
- configurable: true,
130
- get: throwDeprecatedServiceGetter
131
- }
132
- });
package/dist/config.d.ts CHANGED
@@ -13,7 +13,9 @@
13
13
  */
14
14
  export declare const packageConfig: {
15
15
  readonly sdk: {
16
- /** TLS включен для каждого SDK instance, если consumer не переопределил его. */
16
+ /**
17
+ * TLS включен для каждого SDK instance, если consumer не переопределил его.
18
+ */
17
19
  readonly useSsl: true;
18
20
  };
19
21
  readonly grpc: {
@@ -25,7 +27,8 @@ export declare const packageConfig: {
25
27
  };
26
28
  readonly unaryLimits: {
27
29
  /**
28
- * Fallback 200 запросов в минуту применяется к RPC без более специфичного rule.
30
+ * Fallback 200 запросов в минуту применяется к RPC без более специфичного
31
+ * rule.
29
32
  * Шесть list RPC расходуют одну общую квоту 15 запросов в минуту, поэтому
30
33
  * перечислены в одной group с единственным значением limit.
31
34
  */
package/dist/config.js CHANGED
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.packageConfig = void 0;
17
17
  exports.packageConfig = {
18
18
  sdk: {
19
- /** TLS включен для каждого SDK instance, если consumer не переопределил его. */
19
+ /**
20
+ * TLS включен для каждого SDK instance, если consumer не переопределил его.
21
+ */
20
22
  useSsl: true
21
23
  },
22
24
  grpc: {
@@ -28,7 +30,8 @@ exports.packageConfig = {
28
30
  },
29
31
  unaryLimits: {
30
32
  /**
31
- * Fallback 200 запросов в минуту применяется к RPC без более специфичного rule.
33
+ * Fallback 200 запросов в минуту применяется к RPC без более специфичного
34
+ * rule.
32
35
  * Шесть list RPC расходуют одну общую квоту 15 запросов в минуту, поэтому
33
36
  * перечислены в одной group с единственным значением limit.
34
37
  */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.12.4
4
+ // protoc-gen-ts_proto v2.13.0
5
5
  // protoc v7.36.2
6
6
  // source: common.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.12.4
4
+ // protoc-gen-ts_proto v2.13.0
5
5
  // protoc v7.36.2
6
6
  // source: google/api/field_behavior.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.12.4
4
+ // protoc-gen-ts_proto v2.13.0
5
5
  // protoc v7.36.2
6
6
  // source: google/protobuf/descriptor.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.12.4
4
+ // protoc-gen-ts_proto v2.13.0
5
5
  // protoc v7.36.2
6
6
  // source: google/protobuf/timestamp.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -752,6 +752,21 @@ export interface Bond {
752
752
  dlongClient: Quotation | undefined;
753
753
  /** Ставка риска в шорт с учетом текущего уровня риска портфеля клиента. [Подробнее про ставки риска](https://www.tbank.ru/invest/help/brokerage/account/margin/about/#q5). */
754
754
  dshortClient: Quotation | undefined;
755
+ /** Массив рейтингов. */
756
+ ratings: Rating[];
757
+ }
758
+ /** Объект передачи информации о рейтинге. */
759
+ export interface Rating {
760
+ /** Название рейтингового агентства. */
761
+ agencyName: string;
762
+ /** Рейтинг. */
763
+ ratingLevel: string;
764
+ /** Дата выставления рейтинга. */
765
+ ratingDate: Date | undefined;
766
+ /** Прогноз. */
767
+ forecast: string;
768
+ /** Признак нахождения под наблюдением. */
769
+ isUnderWatch: boolean;
755
770
  }
756
771
  /** Объект передачи информации о валюте. */
757
772
  export interface Currency {
@@ -2533,6 +2548,7 @@ export declare const Table: MessageFns<Table>;
2533
2548
  export declare const NewsInstrument: MessageFns<NewsInstrument>;
2534
2549
  export declare const NewsInstrumentInfo: MessageFns<NewsInstrumentInfo>;
2535
2550
  export declare const Bond: MessageFns<Bond>;
2551
+ export declare const Rating: MessageFns<Rating>;
2536
2552
  export declare const Currency: MessageFns<Currency>;
2537
2553
  export declare const Etf: MessageFns<Etf>;
2538
2554
  export declare const Future: MessageFns<Future>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.12.4
4
+ // protoc-gen-ts_proto v2.13.0
5
5
  // protoc v7.36.2
6
6
  // source: instruments.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.StructuredNotesResponse = exports.StructuredNoteResponse = exports.SharesResponse = exports.ShareResponse = exports.Option = exports.OptionsResponse = exports.OptionResponse = exports.FuturesResponse = exports.FutureResponse = exports.EtfsResponse = exports.EtfResponse = exports.CurrenciesResponse = exports.CurrencyResponse = exports.Coupon = exports.GetBondEventsResponse_BondEvent = exports.GetBondEventsResponse = exports.GetBondEventsRequest = exports.GetBondCouponsResponse = exports.GetBondCouponsRequest = exports.BondsResponse = exports.BondResponse = exports.NewsRequest = exports.FilterOptionsRequest = exports.InstrumentsRequest = exports.InstrumentRequest = exports.TradingDay = exports.TradingSchedule = exports.TradingSchedulesResponse = exports.TradingSchedulesRequest = exports.GetInsiderDealsResponse_TradeDirection = exports.GetAssetReportsResponse_AssetReportPeriodType = exports.StructuredNote_YieldType = exports.StructuredNote_ObservationPrinciple = exports.StructuredNote_LogicPortfolio = exports.GetBondEventsRequest_EventType = exports.InstrumentExchangeType = exports.BondType = exports.RiskLevel = exports.Recommendation = exports.EditFavoritesActionType = exports.StructuredProductType = exports.AssetType = exports.ShareType = exports.InstrumentIdType = exports.OptionSettlementType = exports.OptionStyle = exports.OptionPaymentType = exports.OptionDirection = exports.CouponType = exports.protobufPackage = void 0;
9
- exports.GetFavoriteGroupsRequest = exports.DeleteFavoriteGroupResponse = exports.DeleteFavoriteGroupRequest = exports.CreateFavoriteGroupResponse = exports.CreateFavoriteGroupRequest = exports.EditFavoritesResponse = exports.EditFavoritesRequestInstrument = exports.EditFavoritesRequest = exports.FavoriteInstrument = exports.GetFavoritesResponse = exports.GetFavoritesRequest = exports.InstrumentLink = exports.AssetInstrument = exports.Brand = exports.AssetClearingCertificate = exports.AssetEtf = exports.AssetStructuredProduct = exports.AssetBond = exports.AssetShare = exports.AssetSecurity = exports.AssetCurrency = exports.Asset = exports.AssetFull = exports.AssetsResponse = exports.AssetsRequest = exports.AssetResponse = exports.AssetRequest = exports.Dividend = exports.GetDividendsResponse = exports.GetDividendsRequest = exports.Instrument = exports.InstrumentResponse = exports.GetFuturesMarginResponse = exports.GetFuturesMarginRequest = exports.AccruedInterest = exports.GetAccruedInterestsResponse = exports.GetAccruedInterestsRequest = exports.StructuredNote_Yield = exports.StructuredNote_BasicAsset = exports.StructuredNote = exports.Share = exports.Future = exports.Etf = exports.Currency = exports.Bond = exports.NewsInstrumentInfo = exports.NewsInstrument = exports.Table = exports.NewsItem = exports.NewsResponse = void 0;
10
- exports.InstrumentsServiceDefinition = exports.DfasResponse = exports.DfaResponse_ForecastYield = exports.DfaResponse_BasicAsset = exports.DfaResponse = exports.DfasRequest = exports.GetInsiderDealsResponse_InsiderDeal = exports.GetInsiderDealsResponse = exports.GetInsiderDealsRequest = exports.TradingInterval_TimeInterval = exports.TradingInterval = exports.RiskRatesResponse_RiskRate = exports.RiskRatesResponse_RiskRateResult = exports.RiskRatesResponse = exports.RiskRatesRequest = exports.GetForecastResponse_ConsensusItem = exports.GetForecastResponse_TargetItem = exports.GetForecastResponse = exports.GetForecastRequest = exports.GetConsensusForecastsResponse_ConsensusForecastsItem = exports.GetConsensusForecastsResponse = exports.GetConsensusForecastsRequest = exports.GetAssetReportsResponse_GetAssetReportsEvent = exports.GetAssetReportsResponse = exports.GetAssetReportsRequest = exports.GetAssetFundamentalsResponse_StatisticResponse = exports.GetAssetFundamentalsResponse = exports.GetAssetFundamentalsRequest = exports.GetBrandsResponse = exports.GetBrandRequest = exports.GetBrandsRequest = exports.InstrumentShort = exports.FindInstrumentResponse = exports.FindInstrumentRequest = exports.CountryResponse = exports.IndexInstrument = exports.IndicativeResponse = exports.IndicativesResponse = exports.IndicativesRequest = exports.GetCountriesResponse = exports.GetCountriesRequest = exports.GetFavoriteGroupsResponse_FavoriteGroup = exports.GetFavoriteGroupsResponse = void 0;
9
+ exports.DeleteFavoriteGroupResponse = exports.DeleteFavoriteGroupRequest = exports.CreateFavoriteGroupResponse = exports.CreateFavoriteGroupRequest = exports.EditFavoritesResponse = exports.EditFavoritesRequestInstrument = exports.EditFavoritesRequest = exports.FavoriteInstrument = exports.GetFavoritesResponse = exports.GetFavoritesRequest = exports.InstrumentLink = exports.AssetInstrument = exports.Brand = exports.AssetClearingCertificate = exports.AssetEtf = exports.AssetStructuredProduct = exports.AssetBond = exports.AssetShare = exports.AssetSecurity = exports.AssetCurrency = exports.Asset = exports.AssetFull = exports.AssetsResponse = exports.AssetsRequest = exports.AssetResponse = exports.AssetRequest = exports.Dividend = exports.GetDividendsResponse = exports.GetDividendsRequest = exports.Instrument = exports.InstrumentResponse = exports.GetFuturesMarginResponse = exports.GetFuturesMarginRequest = exports.AccruedInterest = exports.GetAccruedInterestsResponse = exports.GetAccruedInterestsRequest = exports.StructuredNote_Yield = exports.StructuredNote_BasicAsset = exports.StructuredNote = exports.Share = exports.Future = exports.Etf = exports.Currency = exports.Rating = exports.Bond = exports.NewsInstrumentInfo = exports.NewsInstrument = exports.Table = exports.NewsItem = exports.NewsResponse = void 0;
10
+ exports.InstrumentsServiceDefinition = exports.DfasResponse = exports.DfaResponse_ForecastYield = exports.DfaResponse_BasicAsset = exports.DfaResponse = exports.DfasRequest = exports.GetInsiderDealsResponse_InsiderDeal = exports.GetInsiderDealsResponse = exports.GetInsiderDealsRequest = exports.TradingInterval_TimeInterval = exports.TradingInterval = exports.RiskRatesResponse_RiskRate = exports.RiskRatesResponse_RiskRateResult = exports.RiskRatesResponse = exports.RiskRatesRequest = exports.GetForecastResponse_ConsensusItem = exports.GetForecastResponse_TargetItem = exports.GetForecastResponse = exports.GetForecastRequest = exports.GetConsensusForecastsResponse_ConsensusForecastsItem = exports.GetConsensusForecastsResponse = exports.GetConsensusForecastsRequest = exports.GetAssetReportsResponse_GetAssetReportsEvent = exports.GetAssetReportsResponse = exports.GetAssetReportsRequest = exports.GetAssetFundamentalsResponse_StatisticResponse = exports.GetAssetFundamentalsResponse = exports.GetAssetFundamentalsRequest = exports.GetBrandsResponse = exports.GetBrandRequest = exports.GetBrandsRequest = exports.InstrumentShort = exports.FindInstrumentResponse = exports.FindInstrumentRequest = exports.CountryResponse = exports.IndexInstrument = exports.IndicativeResponse = exports.IndicativesResponse = exports.IndicativesRequest = exports.GetCountriesResponse = exports.GetCountriesRequest = exports.GetFavoriteGroupsResponse_FavoriteGroup = exports.GetFavoriteGroupsResponse = exports.GetFavoriteGroupsRequest = void 0;
11
11
  exports.couponTypeFromJSON = couponTypeFromJSON;
12
12
  exports.couponTypeToJSON = couponTypeToJSON;
13
13
  exports.optionDirectionFromJSON = optionDirectionFromJSON;
@@ -5506,6 +5506,7 @@ function createBaseBond() {
5506
5506
  callDate: undefined,
5507
5507
  dlongClient: undefined,
5508
5508
  dshortClient: undefined,
5509
+ ratings: [],
5509
5510
  };
5510
5511
  }
5511
5512
  exports.Bond = {
@@ -5681,6 +5682,9 @@ exports.Bond = {
5681
5682
  if (message.dshortClient !== undefined) {
5682
5683
  common_1.Quotation.encode(message.dshortClient, writer.uint32(730).fork()).join();
5683
5684
  }
5685
+ for (const v of message.ratings) {
5686
+ exports.Rating.encode(v, writer.uint32(738).fork()).join();
5687
+ }
5684
5688
  return writer;
5685
5689
  },
5686
5690
  decode(input, length) {
@@ -6095,6 +6099,13 @@ exports.Bond = {
6095
6099
  message.dshortClient = common_1.Quotation.decode(reader, reader.uint32());
6096
6100
  continue;
6097
6101
  }
6102
+ case 92: {
6103
+ if (tag !== 738) {
6104
+ break;
6105
+ }
6106
+ message.ratings.push(exports.Rating.decode(reader, reader.uint32()));
6107
+ continue;
6108
+ }
6098
6109
  }
6099
6110
  if ((tag & 7) === 4 || tag === 0) {
6100
6111
  break;
@@ -6334,6 +6345,9 @@ exports.Bond = {
6334
6345
  : isSet(object.dshort_client)
6335
6346
  ? common_1.Quotation.fromJSON(object.dshort_client)
6336
6347
  : undefined,
6348
+ ratings: globalThis.Array.isArray(object?.ratings)
6349
+ ? object.ratings.map((e) => exports.Rating.fromJSON(e))
6350
+ : [],
6337
6351
  };
6338
6352
  },
6339
6353
  toJSON(message) {
@@ -6509,6 +6523,9 @@ exports.Bond = {
6509
6523
  if (message.dshortClient !== undefined) {
6510
6524
  obj.dshortClient = common_1.Quotation.toJSON(message.dshortClient);
6511
6525
  }
6526
+ if (message.ratings?.length) {
6527
+ obj.ratings = message.ratings.map((e) => exports.Rating.toJSON(e));
6528
+ }
6512
6529
  return obj;
6513
6530
  },
6514
6531
  create(base) {
@@ -6601,6 +6618,146 @@ exports.Bond = {
6601
6618
  message.dshortClient = (object.dshortClient !== undefined && object.dshortClient !== null)
6602
6619
  ? common_1.Quotation.fromPartial(object.dshortClient)
6603
6620
  : undefined;
6621
+ message.ratings = object.ratings?.map((e) => exports.Rating.fromPartial(e)) || [];
6622
+ return message;
6623
+ },
6624
+ };
6625
+ function createBaseRating() {
6626
+ return { agencyName: "", ratingLevel: "", ratingDate: undefined, forecast: "", isUnderWatch: false };
6627
+ }
6628
+ exports.Rating = {
6629
+ encode(message, writer = new wire_1.BinaryWriter()) {
6630
+ if (message.agencyName !== "") {
6631
+ writer.uint32(10).string(message.agencyName);
6632
+ }
6633
+ if (message.ratingLevel !== "") {
6634
+ writer.uint32(18).string(message.ratingLevel);
6635
+ }
6636
+ if (message.ratingDate !== undefined) {
6637
+ timestamp_1.Timestamp.encode(toTimestamp(message.ratingDate), writer.uint32(26).fork()).join();
6638
+ }
6639
+ if (message.forecast !== "") {
6640
+ writer.uint32(34).string(message.forecast);
6641
+ }
6642
+ if (message.isUnderWatch !== false) {
6643
+ writer.uint32(40).bool(message.isUnderWatch);
6644
+ }
6645
+ return writer;
6646
+ },
6647
+ decode(input, length) {
6648
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6649
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6650
+ if (previousRecursionDepth >= 100) {
6651
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6652
+ }
6653
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6654
+ try {
6655
+ const end = length === undefined ? reader.len : reader.pos + length;
6656
+ const message = createBaseRating();
6657
+ while (reader.pos < end) {
6658
+ const tag = reader.uint32();
6659
+ switch (tag >>> 3) {
6660
+ case 1: {
6661
+ if (tag !== 10) {
6662
+ break;
6663
+ }
6664
+ message.agencyName = reader.string();
6665
+ continue;
6666
+ }
6667
+ case 2: {
6668
+ if (tag !== 18) {
6669
+ break;
6670
+ }
6671
+ message.ratingLevel = reader.string();
6672
+ continue;
6673
+ }
6674
+ case 3: {
6675
+ if (tag !== 26) {
6676
+ break;
6677
+ }
6678
+ message.ratingDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
6679
+ continue;
6680
+ }
6681
+ case 4: {
6682
+ if (tag !== 34) {
6683
+ break;
6684
+ }
6685
+ message.forecast = reader.string();
6686
+ continue;
6687
+ }
6688
+ case 5: {
6689
+ if (tag !== 40) {
6690
+ break;
6691
+ }
6692
+ message.isUnderWatch = reader.bool();
6693
+ continue;
6694
+ }
6695
+ }
6696
+ if ((tag & 7) === 4 || tag === 0) {
6697
+ break;
6698
+ }
6699
+ reader.skip(tag & 7);
6700
+ }
6701
+ return message;
6702
+ }
6703
+ finally {
6704
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
6705
+ }
6706
+ },
6707
+ fromJSON(object) {
6708
+ return {
6709
+ agencyName: isSet(object.agencyName)
6710
+ ? globalThis.String(object.agencyName)
6711
+ : isSet(object.agency_name)
6712
+ ? globalThis.String(object.agency_name)
6713
+ : "",
6714
+ ratingLevel: isSet(object.ratingLevel)
6715
+ ? globalThis.String(object.ratingLevel)
6716
+ : isSet(object.rating_level)
6717
+ ? globalThis.String(object.rating_level)
6718
+ : "",
6719
+ ratingDate: isSet(object.ratingDate)
6720
+ ? fromJsonTimestamp(object.ratingDate)
6721
+ : isSet(object.rating_date)
6722
+ ? fromJsonTimestamp(object.rating_date)
6723
+ : undefined,
6724
+ forecast: isSet(object.forecast) ? globalThis.String(object.forecast) : "",
6725
+ isUnderWatch: isSet(object.isUnderWatch)
6726
+ ? globalThis.Boolean(object.isUnderWatch)
6727
+ : isSet(object.is_under_watch)
6728
+ ? globalThis.Boolean(object.is_under_watch)
6729
+ : false,
6730
+ };
6731
+ },
6732
+ toJSON(message) {
6733
+ const obj = {};
6734
+ if (message.agencyName !== "") {
6735
+ obj.agencyName = message.agencyName;
6736
+ }
6737
+ if (message.ratingLevel !== "") {
6738
+ obj.ratingLevel = message.ratingLevel;
6739
+ }
6740
+ if (message.ratingDate !== undefined) {
6741
+ obj.ratingDate = message.ratingDate.toISOString();
6742
+ }
6743
+ if (message.forecast !== "") {
6744
+ obj.forecast = message.forecast;
6745
+ }
6746
+ if (message.isUnderWatch !== false) {
6747
+ obj.isUnderWatch = message.isUnderWatch;
6748
+ }
6749
+ return obj;
6750
+ },
6751
+ create(base) {
6752
+ return exports.Rating.fromPartial(base ?? {});
6753
+ },
6754
+ fromPartial(object) {
6755
+ const message = createBaseRating();
6756
+ message.agencyName = object.agencyName ?? "";
6757
+ message.ratingLevel = object.ratingLevel ?? "";
6758
+ message.ratingDate = object.ratingDate ?? undefined;
6759
+ message.forecast = object.forecast ?? "";
6760
+ message.isUnderWatch = object.isUnderWatch ?? false;
6604
6761
  return message;
6605
6762
  },
6606
6763
  };
@@ -650,6 +650,8 @@ export declare function getCandlesRequest_CandleSourceToJSON(object: GetCandlesR
650
650
  export interface GetCandlesResponse {
651
651
  /** Массив свечей. */
652
652
  candles: HistoricCandle[];
653
+ /** Валюта цены. */
654
+ priceCurrency: string;
653
655
  }
654
656
  /** Информация о свече. */
655
657
  export interface HistoricCandle {
@@ -766,6 +768,8 @@ export interface GetOrderBookResponse {
766
768
  closePriceTs: Date | undefined;
767
769
  /** Время формирования стакана на бирже. */
768
770
  orderbookTs: Date | undefined;
771
+ /** Валюта цены. */
772
+ priceCurrency: string;
769
773
  }
770
774
  /** Запрос получения торгового статуса. */
771
775
  export interface GetTradingStatusRequest {
@@ -832,6 +836,8 @@ export interface GetLastTradesRequest {
832
836
  export interface GetLastTradesResponse {
833
837
  /** Массив сделок. */
834
838
  trades: Trade[];
839
+ /** Валюта цены. */
840
+ priceCurrency: string;
835
841
  }
836
842
  /** Запрос активных подписок. Возвращает по одному сообщению на каждый тип активных подписок — `SubscribeLastPriceResponse`, `SubscribeInfoResponse`, `SubscribeTradesResponse`, `SubscribeOrderBookResponse`, `SubscribeCandlesResponse`. */
837
843
  export interface GetMySubscriptions {
@@ -876,7 +882,7 @@ export interface GetTechAnalysisRequest {
876
882
  /** Тип технического индикатора. */
877
883
  indicatorType: GetTechAnalysisRequest_IndicatorType;
878
884
  /** UID инструмента. */
879
- instrumentUid: string;
885
+ instrumentUid?: string | undefined;
880
886
  /** Начало запрашиваемого периода по UTC. */
881
887
  from: Date | undefined;
882
888
  /** Окончание запрашиваемого периода по UTC. */
@@ -891,6 +897,8 @@ export interface GetTechAnalysisRequest {
891
897
  deviation: GetTechAnalysisRequest_Deviation | undefined;
892
898
  /** Параметры сглаживания. */
893
899
  smoothing: GetTechAnalysisRequest_Smoothing | undefined;
900
+ /** Идентификатор инструмента. Принимает значение `figi`, `instrument_uid` или `ticker + '_' + class_code`. */
901
+ instrumentId?: string | undefined;
894
902
  }
895
903
  /** Интервал свечи. */
896
904
  export declare enum GetTechAnalysisRequest_IndicatorInterval {
@@ -1009,6 +1017,18 @@ export interface MarketValueInstrument {
1009
1017
  ticker: string;
1010
1018
  /** Класс-код (секция торгов). */
1011
1019
  classCode: string;
1020
+ /** Дополнительная информация. */
1021
+ statistic: MarketValueStatistic | undefined;
1022
+ /** Валюта цены. */
1023
+ priceCurrency: string;
1024
+ }
1025
+ export interface MarketValueStatistic {
1026
+ /** Количество человек, просматривающих инструмент. */
1027
+ interestedCount?: number | undefined;
1028
+ /** Количество человек, торгующих инструментом. */
1029
+ tradedCount?: number | undefined;
1030
+ /** Дата и время актуализации данных. */
1031
+ time: Date | undefined;
1012
1032
  }
1013
1033
  export interface MarketValue {
1014
1034
  /** Тип параметра. */
@@ -1074,6 +1094,7 @@ export declare const GetTechAnalysisResponse_TechAnalysisItem: MessageFns<GetTec
1074
1094
  export declare const GetMarketValuesRequest: MessageFns<GetMarketValuesRequest>;
1075
1095
  export declare const GetMarketValuesResponse: MessageFns<GetMarketValuesResponse>;
1076
1096
  export declare const MarketValueInstrument: MessageFns<MarketValueInstrument>;
1097
+ export declare const MarketValueStatistic: MessageFns<MarketValueStatistic>;
1077
1098
  export declare const MarketValue: MessageFns<MarketValue>;
1078
1099
  /** Сервис для получения биржевой информации:<br/> 1. Свечи.<br/> 2. Стаканы.<br/> 3. Торговые статусы.<br/> 4. Лента сделок. */
1079
1100
  export type MarketDataServiceDefinition = typeof MarketDataServiceDefinition;