@woodger/t-invest-node-sdk 0.5.1

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 (469) hide show
  1. package/CHANGELOG.md +611 -0
  2. package/LICENSE +21 -0
  3. package/THIRD_PARTY_NOTICES.md +307 -0
  4. package/certificates/russian-trusted-root-ca.pem +33 -0
  5. package/dist/application/dto/t-invest-options.d.ts +30 -0
  6. package/dist/application/dto/t-invest-options.js +11 -0
  7. package/dist/application/dto/t-invest-services.d.ts +168 -0
  8. package/dist/application/dto/t-invest-services.js +12 -0
  9. package/dist/application/errors/sdk-error.d.ts +47 -0
  10. package/dist/application/errors/sdk-error.js +84 -0
  11. package/dist/application/reports/accounts.report.d.ts +26 -0
  12. package/dist/application/reports/accounts.report.js +11 -0
  13. package/dist/application/reports/accrued-interests.report.d.ts +22 -0
  14. package/dist/application/reports/accrued-interests.report.js +11 -0
  15. package/dist/application/reports/asset.report.d.ts +72 -0
  16. package/dist/application/reports/asset.report.js +11 -0
  17. package/dist/application/reports/bond-coupons.report.d.ts +31 -0
  18. package/dist/application/reports/bond-coupons.report.js +11 -0
  19. package/dist/application/reports/bond.report.d.ts +82 -0
  20. package/dist/application/reports/bond.report.js +11 -0
  21. package/dist/application/reports/brands.report.d.ts +24 -0
  22. package/dist/application/reports/brands.report.js +11 -0
  23. package/dist/application/reports/broker-report.report.d.ts +74 -0
  24. package/dist/application/reports/broker-report.report.js +11 -0
  25. package/dist/application/reports/cancel-order.report.d.ts +14 -0
  26. package/dist/application/reports/cancel-order.report.js +11 -0
  27. package/dist/application/reports/cancel-stop-order.report.d.ts +14 -0
  28. package/dist/application/reports/cancel-stop-order.report.js +11 -0
  29. package/dist/application/reports/candles.report.d.ts +26 -0
  30. package/dist/application/reports/candles.report.js +11 -0
  31. package/dist/application/reports/close-prices.report.d.ts +20 -0
  32. package/dist/application/reports/close-prices.report.js +11 -0
  33. package/dist/application/reports/countries.report.d.ts +20 -0
  34. package/dist/application/reports/countries.report.js +11 -0
  35. package/dist/application/reports/currency.report.d.ts +58 -0
  36. package/dist/application/reports/currency.report.js +11 -0
  37. package/dist/application/reports/dividends-foreign-issuer.report.d.ts +51 -0
  38. package/dist/application/reports/dividends-foreign-issuer.report.js +11 -0
  39. package/dist/application/reports/dividends.report.d.ts +33 -0
  40. package/dist/application/reports/dividends.report.js +11 -0
  41. package/dist/application/reports/etf.report.d.ts +62 -0
  42. package/dist/application/reports/etf.report.js +11 -0
  43. package/dist/application/reports/favorites.report.d.ts +24 -0
  44. package/dist/application/reports/favorites.report.js +11 -0
  45. package/dist/application/reports/find-instrument.report.d.ts +34 -0
  46. package/dist/application/reports/find-instrument.report.js +11 -0
  47. package/dist/application/reports/future.report.d.ts +66 -0
  48. package/dist/application/reports/future.report.js +11 -0
  49. package/dist/application/reports/futures-margin.report.d.ts +21 -0
  50. package/dist/application/reports/futures-margin.report.js +11 -0
  51. package/dist/application/reports/index.d.ts +50 -0
  52. package/dist/application/reports/index.js +66 -0
  53. package/dist/application/reports/instrument.report.d.ts +47 -0
  54. package/dist/application/reports/instrument.report.js +11 -0
  55. package/dist/application/reports/last-prices.report.d.ts +20 -0
  56. package/dist/application/reports/last-prices.report.js +11 -0
  57. package/dist/application/reports/last-trades.report.d.ts +24 -0
  58. package/dist/application/reports/last-trades.report.js +11 -0
  59. package/dist/application/reports/margin-attributes.report.d.ts +25 -0
  60. package/dist/application/reports/margin-attributes.report.js +11 -0
  61. package/dist/application/reports/money.report.d.ts +15 -0
  62. package/dist/application/reports/money.report.js +11 -0
  63. package/dist/application/reports/operations-by-cursor.report.d.ts +65 -0
  64. package/dist/application/reports/operations-by-cursor.report.js +11 -0
  65. package/dist/application/reports/operations.report.d.ts +40 -0
  66. package/dist/application/reports/operations.report.js +11 -0
  67. package/dist/application/reports/option.report.d.ts +76 -0
  68. package/dist/application/reports/option.report.js +11 -0
  69. package/dist/application/reports/order-book.report.d.ts +38 -0
  70. package/dist/application/reports/order-book.report.js +11 -0
  71. package/dist/application/reports/order-mutation.report.d.ts +45 -0
  72. package/dist/application/reports/order-mutation.report.js +11 -0
  73. package/dist/application/reports/order-state.report.d.ts +12 -0
  74. package/dist/application/reports/order-state.report.js +11 -0
  75. package/dist/application/reports/orders.report.d.ts +53 -0
  76. package/dist/application/reports/orders.report.js +11 -0
  77. package/dist/application/reports/portfolio.report.d.ts +54 -0
  78. package/dist/application/reports/portfolio.report.js +11 -0
  79. package/dist/application/reports/positions.report.d.ts +45 -0
  80. package/dist/application/reports/positions.report.js +11 -0
  81. package/dist/application/reports/post-stop-order.report.d.ts +14 -0
  82. package/dist/application/reports/post-stop-order.report.js +11 -0
  83. package/dist/application/reports/sandbox-account.report.d.ts +20 -0
  84. package/dist/application/reports/sandbox-account.report.js +11 -0
  85. package/dist/application/reports/share.report.d.ts +66 -0
  86. package/dist/application/reports/share.report.js +11 -0
  87. package/dist/application/reports/stop-orders.report.d.ts +34 -0
  88. package/dist/application/reports/stop-orders.report.js +11 -0
  89. package/dist/application/reports/trading-schedules.report.d.ts +44 -0
  90. package/dist/application/reports/trading-schedules.report.js +11 -0
  91. package/dist/application/reports/trading-status.report.d.ts +19 -0
  92. package/dist/application/reports/trading-status.report.js +11 -0
  93. package/dist/application/reports/trading-statuses.report.d.ts +12 -0
  94. package/dist/application/reports/trading-statuses.report.js +11 -0
  95. package/dist/application/reports/user-info.report.d.ts +16 -0
  96. package/dist/application/reports/user-info.report.js +11 -0
  97. package/dist/application/reports/user-tariff.report.d.ts +28 -0
  98. package/dist/application/reports/user-tariff.report.js +11 -0
  99. package/dist/application/reports/withdraw-limits.report.d.ts +16 -0
  100. package/dist/application/reports/withdraw-limits.report.js +11 -0
  101. package/dist/application/services/unary-limiter.d.ts +44 -0
  102. package/dist/application/services/unary-limiter.js +138 -0
  103. package/dist/bootstrap/args/command-options.d.ts +43 -0
  104. package/dist/bootstrap/args/command-options.js +125 -0
  105. package/dist/bootstrap/args/index.d.ts +1 -0
  106. package/dist/bootstrap/args/index.js +5 -0
  107. package/dist/bootstrap/args/instrument-id-options.d.ts +24 -0
  108. package/dist/bootstrap/args/instrument-id-options.js +47 -0
  109. package/dist/bootstrap/args/instruments-args.d.ts +49 -0
  110. package/dist/bootstrap/args/instruments-args.js +89 -0
  111. package/dist/bootstrap/args/sdk-options.d.ts +19 -0
  112. package/dist/bootstrap/args/sdk-options.js +40 -0
  113. package/dist/bootstrap/args/side-effect-args.d.ts +20 -0
  114. package/dist/bootstrap/args/side-effect-args.js +50 -0
  115. package/dist/bootstrap/cli/contract.d.ts +16 -0
  116. package/dist/bootstrap/cli/contract.js +15 -0
  117. package/dist/bootstrap/cli/domains.d.ts +260 -0
  118. package/dist/bootstrap/cli/domains.js +631 -0
  119. package/dist/bootstrap/cli/error.d.ts +15 -0
  120. package/dist/bootstrap/cli/error.js +40 -0
  121. package/dist/bootstrap/cli/help.d.ts +751 -0
  122. package/dist/bootstrap/cli/help.js +1789 -0
  123. package/dist/bootstrap/cli/registry.d.ts +2102 -0
  124. package/dist/bootstrap/cli/registry.js +186 -0
  125. package/dist/bootstrap/cli/runner.d.ts +10 -0
  126. package/dist/bootstrap/cli/runner.js +151 -0
  127. package/dist/bootstrap/cli/version.d.ts +17 -0
  128. package/dist/bootstrap/cli/version.js +26 -0
  129. package/dist/bootstrap/commands/accounts/cli.d.ts +63 -0
  130. package/dist/bootstrap/commands/accounts/cli.js +50 -0
  131. package/dist/bootstrap/commands/accounts/reporter.d.ts +13 -0
  132. package/dist/bootstrap/commands/accounts/reporter.js +50 -0
  133. package/dist/bootstrap/commands/accrued-interests/cli.d.ts +129 -0
  134. package/dist/bootstrap/commands/accrued-interests/cli.js +80 -0
  135. package/dist/bootstrap/commands/accrued-interests/reporter.d.ts +13 -0
  136. package/dist/bootstrap/commands/accrued-interests/reporter.js +43 -0
  137. package/dist/bootstrap/commands/asset/cli.d.ts +99 -0
  138. package/dist/bootstrap/commands/asset/cli.js +64 -0
  139. package/dist/bootstrap/commands/asset/reporter.d.ts +16 -0
  140. package/dist/bootstrap/commands/asset/reporter.js +122 -0
  141. package/dist/bootstrap/commands/assets/cli.d.ts +102 -0
  142. package/dist/bootstrap/commands/assets/cli.js +78 -0
  143. package/dist/bootstrap/commands/assets/reporter.d.ts +14 -0
  144. package/dist/bootstrap/commands/assets/reporter.js +27 -0
  145. package/dist/bootstrap/commands/bond/cli.d.ts +83 -0
  146. package/dist/bootstrap/commands/bond/cli.js +53 -0
  147. package/dist/bootstrap/commands/bond/reporter.d.ts +15 -0
  148. package/dist/bootstrap/commands/bond/reporter.js +123 -0
  149. package/dist/bootstrap/commands/bond-coupons/cli.d.ts +129 -0
  150. package/dist/bootstrap/commands/bond-coupons/cli.js +80 -0
  151. package/dist/bootstrap/commands/bond-coupons/reporter.d.ts +13 -0
  152. package/dist/bootstrap/commands/bond-coupons/reporter.js +64 -0
  153. package/dist/bootstrap/commands/bonds/cli.d.ts +73 -0
  154. package/dist/bootstrap/commands/bonds/cli.js +53 -0
  155. package/dist/bootstrap/commands/bonds/reporter.d.ts +14 -0
  156. package/dist/bootstrap/commands/bonds/reporter.js +27 -0
  157. package/dist/bootstrap/commands/brand/cli.d.ts +99 -0
  158. package/dist/bootstrap/commands/brand/cli.js +64 -0
  159. package/dist/bootstrap/commands/brand/reporter.d.ts +14 -0
  160. package/dist/bootstrap/commands/brand/reporter.js +37 -0
  161. package/dist/bootstrap/commands/brands/cli.d.ts +63 -0
  162. package/dist/bootstrap/commands/brands/cli.js +50 -0
  163. package/dist/bootstrap/commands/brands/reporter.d.ts +14 -0
  164. package/dist/bootstrap/commands/brands/reporter.js +49 -0
  165. package/dist/bootstrap/commands/broker-report/cli.d.ts +132 -0
  166. package/dist/bootstrap/commands/broker-report/cli.js +105 -0
  167. package/dist/bootstrap/commands/broker-report/reporter.d.ts +13 -0
  168. package/dist/bootstrap/commands/broker-report/reporter.js +123 -0
  169. package/dist/bootstrap/commands/cancel-order/cli.d.ts +120 -0
  170. package/dist/bootstrap/commands/cancel-order/cli.js +71 -0
  171. package/dist/bootstrap/commands/cancel-order/reporter.d.ts +13 -0
  172. package/dist/bootstrap/commands/cancel-order/reporter.js +32 -0
  173. package/dist/bootstrap/commands/cancel-stop-order/cli.d.ts +120 -0
  174. package/dist/bootstrap/commands/cancel-stop-order/cli.js +71 -0
  175. package/dist/bootstrap/commands/cancel-stop-order/reporter.d.ts +13 -0
  176. package/dist/bootstrap/commands/cancel-stop-order/reporter.js +32 -0
  177. package/dist/bootstrap/commands/candles/cli.d.ts +138 -0
  178. package/dist/bootstrap/commands/candles/cli.js +104 -0
  179. package/dist/bootstrap/commands/candles/reporter.d.ts +13 -0
  180. package/dist/bootstrap/commands/candles/reporter.js +49 -0
  181. package/dist/bootstrap/commands/close-prices/cli.d.ts +99 -0
  182. package/dist/bootstrap/commands/close-prices/cli.js +66 -0
  183. package/dist/bootstrap/commands/close-prices/reporter.d.ts +13 -0
  184. package/dist/bootstrap/commands/close-prices/reporter.js +43 -0
  185. package/dist/bootstrap/commands/compile-proto/cli.d.ts +12 -0
  186. package/dist/bootstrap/commands/compile-proto/cli.js +22 -0
  187. package/dist/bootstrap/commands/countries/cli.d.ts +63 -0
  188. package/dist/bootstrap/commands/countries/cli.js +50 -0
  189. package/dist/bootstrap/commands/countries/reporter.d.ts +13 -0
  190. package/dist/bootstrap/commands/countries/reporter.js +42 -0
  191. package/dist/bootstrap/commands/currencies/cli.d.ts +73 -0
  192. package/dist/bootstrap/commands/currencies/cli.js +53 -0
  193. package/dist/bootstrap/commands/currencies/reporter.d.ts +14 -0
  194. package/dist/bootstrap/commands/currencies/reporter.js +27 -0
  195. package/dist/bootstrap/commands/currency/cli.d.ts +83 -0
  196. package/dist/bootstrap/commands/currency/cli.js +53 -0
  197. package/dist/bootstrap/commands/currency/reporter.d.ts +15 -0
  198. package/dist/bootstrap/commands/currency/reporter.js +104 -0
  199. package/dist/bootstrap/commands/dividends/cli.d.ts +129 -0
  200. package/dist/bootstrap/commands/dividends/cli.js +80 -0
  201. package/dist/bootstrap/commands/dividends/reporter.d.ts +13 -0
  202. package/dist/bootstrap/commands/dividends/reporter.js +62 -0
  203. package/dist/bootstrap/commands/dividends-foreign-issuer/cli.d.ts +132 -0
  204. package/dist/bootstrap/commands/dividends-foreign-issuer/cli.js +105 -0
  205. package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.d.ts +13 -0
  206. package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.js +108 -0
  207. package/dist/bootstrap/commands/edit-favorites/cli.d.ts +129 -0
  208. package/dist/bootstrap/commands/edit-favorites/cli.js +78 -0
  209. package/dist/bootstrap/commands/edit-favorites/reporter.d.ts +13 -0
  210. package/dist/bootstrap/commands/edit-favorites/reporter.js +23 -0
  211. package/dist/bootstrap/commands/etf/cli.d.ts +83 -0
  212. package/dist/bootstrap/commands/etf/cli.js +53 -0
  213. package/dist/bootstrap/commands/etf/reporter.d.ts +15 -0
  214. package/dist/bootstrap/commands/etf/reporter.js +109 -0
  215. package/dist/bootstrap/commands/etfs/cli.d.ts +73 -0
  216. package/dist/bootstrap/commands/etfs/cli.js +53 -0
  217. package/dist/bootstrap/commands/etfs/reporter.d.ts +14 -0
  218. package/dist/bootstrap/commands/etfs/reporter.js +27 -0
  219. package/dist/bootstrap/commands/favorites/cli.d.ts +63 -0
  220. package/dist/bootstrap/commands/favorites/cli.js +50 -0
  221. package/dist/bootstrap/commands/favorites/reporter.d.ts +13 -0
  222. package/dist/bootstrap/commands/favorites/reporter.js +60 -0
  223. package/dist/bootstrap/commands/find-instrument/cli.d.ts +126 -0
  224. package/dist/bootstrap/commands/find-instrument/cli.js +88 -0
  225. package/dist/bootstrap/commands/find-instrument/reporter.d.ts +13 -0
  226. package/dist/bootstrap/commands/find-instrument/reporter.js +71 -0
  227. package/dist/bootstrap/commands/future/cli.d.ts +83 -0
  228. package/dist/bootstrap/commands/future/cli.js +53 -0
  229. package/dist/bootstrap/commands/future/reporter.d.ts +15 -0
  230. package/dist/bootstrap/commands/future/reporter.js +116 -0
  231. package/dist/bootstrap/commands/futures/cli.d.ts +73 -0
  232. package/dist/bootstrap/commands/futures/cli.js +53 -0
  233. package/dist/bootstrap/commands/futures/reporter.d.ts +14 -0
  234. package/dist/bootstrap/commands/futures/reporter.js +27 -0
  235. package/dist/bootstrap/commands/futures-margin/cli.d.ts +105 -0
  236. package/dist/bootstrap/commands/futures-margin/cli.js +64 -0
  237. package/dist/bootstrap/commands/futures-margin/reporter.d.ts +13 -0
  238. package/dist/bootstrap/commands/futures-margin/reporter.js +40 -0
  239. package/dist/bootstrap/commands/help/cli.d.ts +13 -0
  240. package/dist/bootstrap/commands/help/cli.js +26 -0
  241. package/dist/bootstrap/commands/instrument/cli.d.ts +83 -0
  242. package/dist/bootstrap/commands/instrument/cli.js +53 -0
  243. package/dist/bootstrap/commands/instrument/reporter.d.ts +13 -0
  244. package/dist/bootstrap/commands/instrument/reporter.js +91 -0
  245. package/dist/bootstrap/commands/last-prices/cli.d.ts +99 -0
  246. package/dist/bootstrap/commands/last-prices/cli.js +66 -0
  247. package/dist/bootstrap/commands/last-prices/reporter.d.ts +13 -0
  248. package/dist/bootstrap/commands/last-prices/reporter.js +43 -0
  249. package/dist/bootstrap/commands/last-trades/cli.d.ts +123 -0
  250. package/dist/bootstrap/commands/last-trades/cli.js +82 -0
  251. package/dist/bootstrap/commands/last-trades/reporter.d.ts +13 -0
  252. package/dist/bootstrap/commands/last-trades/reporter.js +48 -0
  253. package/dist/bootstrap/commands/margin-attributes/cli.d.ts +99 -0
  254. package/dist/bootstrap/commands/margin-attributes/cli.js +64 -0
  255. package/dist/bootstrap/commands/margin-attributes/reporter.d.ts +13 -0
  256. package/dist/bootstrap/commands/margin-attributes/reporter.js +51 -0
  257. package/dist/bootstrap/commands/operations/cli.d.ts +156 -0
  258. package/dist/bootstrap/commands/operations/cli.js +99 -0
  259. package/dist/bootstrap/commands/operations/reporter.d.ts +13 -0
  260. package/dist/bootstrap/commands/operations/reporter.js +78 -0
  261. package/dist/bootstrap/commands/operations-by-cursor/cli.d.ts +204 -0
  262. package/dist/bootstrap/commands/operations-by-cursor/cli.js +164 -0
  263. package/dist/bootstrap/commands/operations-by-cursor/reporter.d.ts +13 -0
  264. package/dist/bootstrap/commands/operations-by-cursor/reporter.js +107 -0
  265. package/dist/bootstrap/commands/option/cli.d.ts +83 -0
  266. package/dist/bootstrap/commands/option/cli.js +53 -0
  267. package/dist/bootstrap/commands/option/reporter.d.ts +15 -0
  268. package/dist/bootstrap/commands/option/reporter.js +125 -0
  269. package/dist/bootstrap/commands/options-by/cli.d.ts +108 -0
  270. package/dist/bootstrap/commands/options-by/cli.js +68 -0
  271. package/dist/bootstrap/commands/options-by/reporter.d.ts +14 -0
  272. package/dist/bootstrap/commands/options-by/reporter.js +27 -0
  273. package/dist/bootstrap/commands/order-book/cli.d.ts +120 -0
  274. package/dist/bootstrap/commands/order-book/cli.js +73 -0
  275. package/dist/bootstrap/commands/order-book/reporter.d.ts +13 -0
  276. package/dist/bootstrap/commands/order-book/reporter.js +60 -0
  277. package/dist/bootstrap/commands/order-state/cli.d.ts +111 -0
  278. package/dist/bootstrap/commands/order-state/cli.js +71 -0
  279. package/dist/bootstrap/commands/order-state/reporter.d.ts +14 -0
  280. package/dist/bootstrap/commands/order-state/reporter.js +57 -0
  281. package/dist/bootstrap/commands/orders/cli.d.ts +99 -0
  282. package/dist/bootstrap/commands/orders/cli.js +64 -0
  283. package/dist/bootstrap/commands/orders/reporter.d.ts +14 -0
  284. package/dist/bootstrap/commands/orders/reporter.js +88 -0
  285. package/dist/bootstrap/commands/portfolio/cli.d.ts +114 -0
  286. package/dist/bootstrap/commands/portfolio/cli.js +77 -0
  287. package/dist/bootstrap/commands/portfolio/reporter.d.ts +13 -0
  288. package/dist/bootstrap/commands/portfolio/reporter.js +95 -0
  289. package/dist/bootstrap/commands/positions/cli.d.ts +99 -0
  290. package/dist/bootstrap/commands/positions/cli.js +64 -0
  291. package/dist/bootstrap/commands/positions/reporter.d.ts +13 -0
  292. package/dist/bootstrap/commands/positions/reporter.js +116 -0
  293. package/dist/bootstrap/commands/post-order/cli.d.ts +192 -0
  294. package/dist/bootstrap/commands/post-order/cli.js +113 -0
  295. package/dist/bootstrap/commands/post-order/reporter.d.ts +13 -0
  296. package/dist/bootstrap/commands/post-order/reporter.js +77 -0
  297. package/dist/bootstrap/commands/post-stop-order/cli.d.ts +216 -0
  298. package/dist/bootstrap/commands/post-stop-order/cli.js +145 -0
  299. package/dist/bootstrap/commands/post-stop-order/reporter.d.ts +13 -0
  300. package/dist/bootstrap/commands/post-stop-order/reporter.js +31 -0
  301. package/dist/bootstrap/commands/replace-order/cli.d.ts +180 -0
  302. package/dist/bootstrap/commands/replace-order/cli.js +99 -0
  303. package/dist/bootstrap/commands/replace-order/reporter.d.ts +13 -0
  304. package/dist/bootstrap/commands/replace-order/reporter.js +17 -0
  305. package/dist/bootstrap/commands/sandbox-accounts/cli.d.ts +64 -0
  306. package/dist/bootstrap/commands/sandbox-accounts/cli.js +54 -0
  307. package/dist/bootstrap/commands/sandbox-cancel-order/cli.d.ts +120 -0
  308. package/dist/bootstrap/commands/sandbox-cancel-order/cli.js +69 -0
  309. package/dist/bootstrap/commands/sandbox-close-account/cli.d.ts +108 -0
  310. package/dist/bootstrap/commands/sandbox-close-account/cli.js +66 -0
  311. package/dist/bootstrap/commands/sandbox-close-account/reporter.d.ts +12 -0
  312. package/dist/bootstrap/commands/sandbox-close-account/reporter.js +32 -0
  313. package/dist/bootstrap/commands/sandbox-open-account/cli.d.ts +70 -0
  314. package/dist/bootstrap/commands/sandbox-open-account/cli.js +57 -0
  315. package/dist/bootstrap/commands/sandbox-open-account/reporter.d.ts +13 -0
  316. package/dist/bootstrap/commands/sandbox-open-account/reporter.js +31 -0
  317. package/dist/bootstrap/commands/sandbox-operations/cli.d.ts +156 -0
  318. package/dist/bootstrap/commands/sandbox-operations/cli.js +78 -0
  319. package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.d.ts +204 -0
  320. package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.js +98 -0
  321. package/dist/bootstrap/commands/sandbox-order-state/cli.d.ts +111 -0
  322. package/dist/bootstrap/commands/sandbox-order-state/cli.js +67 -0
  323. package/dist/bootstrap/commands/sandbox-orders/cli.d.ts +99 -0
  324. package/dist/bootstrap/commands/sandbox-orders/cli.js +63 -0
  325. package/dist/bootstrap/commands/sandbox-pay-in/cli.d.ts +135 -0
  326. package/dist/bootstrap/commands/sandbox-pay-in/cli.js +86 -0
  327. package/dist/bootstrap/commands/sandbox-pay-in/reporter.d.ts +13 -0
  328. package/dist/bootstrap/commands/sandbox-pay-in/reporter.js +32 -0
  329. package/dist/bootstrap/commands/sandbox-portfolio/cli.d.ts +114 -0
  330. package/dist/bootstrap/commands/sandbox-portfolio/cli.js +68 -0
  331. package/dist/bootstrap/commands/sandbox-positions/cli.d.ts +99 -0
  332. package/dist/bootstrap/commands/sandbox-positions/cli.js +63 -0
  333. package/dist/bootstrap/commands/sandbox-post-order/cli.d.ts +192 -0
  334. package/dist/bootstrap/commands/sandbox-post-order/cli.js +90 -0
  335. package/dist/bootstrap/commands/sandbox-replace-order/cli.d.ts +180 -0
  336. package/dist/bootstrap/commands/sandbox-replace-order/cli.js +86 -0
  337. package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.d.ts +99 -0
  338. package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.js +63 -0
  339. package/dist/bootstrap/commands/share/cli.d.ts +83 -0
  340. package/dist/bootstrap/commands/share/cli.js +53 -0
  341. package/dist/bootstrap/commands/share/reporter.d.ts +15 -0
  342. package/dist/bootstrap/commands/share/reporter.js +111 -0
  343. package/dist/bootstrap/commands/shares/cli.d.ts +73 -0
  344. package/dist/bootstrap/commands/shares/cli.js +53 -0
  345. package/dist/bootstrap/commands/shares/reporter.d.ts +14 -0
  346. package/dist/bootstrap/commands/shares/reporter.js +27 -0
  347. package/dist/bootstrap/commands/stop-orders/cli.d.ts +99 -0
  348. package/dist/bootstrap/commands/stop-orders/cli.js +68 -0
  349. package/dist/bootstrap/commands/stop-orders/reporter.d.ts +13 -0
  350. package/dist/bootstrap/commands/stop-orders/reporter.js +69 -0
  351. package/dist/bootstrap/commands/stream-run/cli.d.ts +138 -0
  352. package/dist/bootstrap/commands/stream-run/cli.js +229 -0
  353. package/dist/bootstrap/commands/stream-run/config.d.ts +56 -0
  354. package/dist/bootstrap/commands/stream-run/config.js +468 -0
  355. package/dist/bootstrap/commands/stream-run/reporter.d.ts +30 -0
  356. package/dist/bootstrap/commands/stream-run/reporter.js +76 -0
  357. package/dist/bootstrap/commands/trading-schedules/cli.d.ts +120 -0
  358. package/dist/bootstrap/commands/trading-schedules/cli.js +79 -0
  359. package/dist/bootstrap/commands/trading-schedules/reporter.d.ts +13 -0
  360. package/dist/bootstrap/commands/trading-schedules/reporter.js +58 -0
  361. package/dist/bootstrap/commands/trading-status/cli.d.ts +99 -0
  362. package/dist/bootstrap/commands/trading-status/cli.js +65 -0
  363. package/dist/bootstrap/commands/trading-status/reporter.d.ts +13 -0
  364. package/dist/bootstrap/commands/trading-status/reporter.js +51 -0
  365. package/dist/bootstrap/commands/trading-statuses/cli.d.ts +99 -0
  366. package/dist/bootstrap/commands/trading-statuses/cli.js +64 -0
  367. package/dist/bootstrap/commands/trading-statuses/reporter.d.ts +14 -0
  368. package/dist/bootstrap/commands/trading-statuses/reporter.js +44 -0
  369. package/dist/bootstrap/commands/user-info/cli.d.ts +63 -0
  370. package/dist/bootstrap/commands/user-info/cli.js +50 -0
  371. package/dist/bootstrap/commands/user-info/reporter.d.ts +13 -0
  372. package/dist/bootstrap/commands/user-info/reporter.js +39 -0
  373. package/dist/bootstrap/commands/user-tariff/cli.d.ts +63 -0
  374. package/dist/bootstrap/commands/user-tariff/cli.js +50 -0
  375. package/dist/bootstrap/commands/user-tariff/reporter.d.ts +13 -0
  376. package/dist/bootstrap/commands/user-tariff/reporter.js +50 -0
  377. package/dist/bootstrap/commands/version/cli.d.ts +13 -0
  378. package/dist/bootstrap/commands/version/cli.js +22 -0
  379. package/dist/bootstrap/commands/withdraw-limits/cli.d.ts +99 -0
  380. package/dist/bootstrap/commands/withdraw-limits/cli.js +64 -0
  381. package/dist/bootstrap/commands/withdraw-limits/reporter.d.ts +13 -0
  382. package/dist/bootstrap/commands/withdraw-limits/reporter.js +59 -0
  383. package/dist/bootstrap/generated-exports.d.ts +29 -0
  384. package/dist/bootstrap/generated-exports.js +590 -0
  385. package/dist/bootstrap/index.d.ts +6 -0
  386. package/dist/bootstrap/index.js +22 -0
  387. package/dist/bootstrap/proto/compile-proto.d.ts +18 -0
  388. package/dist/bootstrap/proto/compile-proto.js +122 -0
  389. package/dist/bootstrap/sdk-config.d.ts +21 -0
  390. package/dist/bootstrap/sdk-config.js +152 -0
  391. package/dist/bootstrap/t-invest-node-sdk.d.ts +42 -0
  392. package/dist/bootstrap/t-invest-node-sdk.js +115 -0
  393. package/dist/bootstrap/unary-limit-config.d.ts +38 -0
  394. package/dist/bootstrap/unary-limit-config.js +130 -0
  395. package/dist/config.d.ts +160 -0
  396. package/dist/config.js +173 -0
  397. package/dist/config.types.d.ts +89 -0
  398. package/dist/config.types.js +13 -0
  399. package/dist/generated/common.d.ts +214 -0
  400. package/dist/generated/common.js +1336 -0
  401. package/dist/generated/google/api/field_behavior.d.ts +61 -0
  402. package/dist/generated/google/api/field_behavior.js +126 -0
  403. package/dist/generated/google/protobuf/descriptor.d.ts +1330 -0
  404. package/dist/generated/google/protobuf/descriptor.js +5984 -0
  405. package/dist/generated/google/protobuf/timestamp.d.ts +122 -0
  406. package/dist/generated/google/protobuf/timestamp.js +102 -0
  407. package/dist/generated/instruments.d.ts +3230 -0
  408. package/dist/generated/instruments.js +24246 -0
  409. package/dist/generated/marketdata.d.ts +1268 -0
  410. package/dist/generated/marketdata.js +8922 -0
  411. package/dist/generated/operations.d.ts +1165 -0
  412. package/dist/generated/operations.js +8625 -0
  413. package/dist/generated/orders.d.ts +806 -0
  414. package/dist/generated/orders.js +5639 -0
  415. package/dist/generated/sandbox.d.ts +356 -0
  416. package/dist/generated/sandbox.js +603 -0
  417. package/dist/generated/signals.d.ts +196 -0
  418. package/dist/generated/signals.js +1261 -0
  419. package/dist/generated/stoporders.d.ts +328 -0
  420. package/dist/generated/stoporders.js +1990 -0
  421. package/dist/generated/users.d.ts +453 -0
  422. package/dist/generated/users.js +2334 -0
  423. package/dist/index.d.ts +11 -0
  424. package/dist/index.js +30 -0
  425. package/dist/infrastructure/interceptor/index.d.ts +1 -0
  426. package/dist/infrastructure/interceptor/index.js +17 -0
  427. package/dist/infrastructure/interceptor/warning-interceptor.d.ts +23 -0
  428. package/dist/infrastructure/interceptor/warning-interceptor.js +38 -0
  429. package/dist/infrastructure/report-values.d.ts +19 -0
  430. package/dist/infrastructure/report-values.js +50 -0
  431. package/dist/infrastructure/transport/grpc/index.d.ts +5 -0
  432. package/dist/infrastructure/transport/grpc/index.js +13 -0
  433. package/dist/infrastructure/transport/grpc/sdk-channel.d.ts +12 -0
  434. package/dist/infrastructure/transport/grpc/sdk-channel.js +23 -0
  435. package/dist/infrastructure/transport/grpc/sdk-client.d.ts +16 -0
  436. package/dist/infrastructure/transport/grpc/sdk-client.js +33 -0
  437. package/dist/infrastructure/transport/grpc/sdk-metadata.d.ts +12 -0
  438. package/dist/infrastructure/transport/grpc/sdk-metadata.js +22 -0
  439. package/dist/infrastructure/transport/grpc/sdk-middleware.d.ts +22 -0
  440. package/dist/infrastructure/transport/grpc/sdk-middleware.js +312 -0
  441. package/dist/infrastructure/transport/grpc/tls-root-certificates.d.ts +10 -0
  442. package/dist/infrastructure/transport/grpc/tls-root-certificates.js +20 -0
  443. package/dist/infrastructure/transport/grpc/unary-limit-resolver.d.ts +22 -0
  444. package/dist/infrastructure/transport/grpc/unary-limit-resolver.js +60 -0
  445. package/dist/infrastructure/transport/grpc/unary-limits.d.ts +1 -0
  446. package/dist/infrastructure/transport/grpc/unary-limits.js +7 -0
  447. package/docs/architecture.md +378 -0
  448. package/docs/bundled-ca.md +157 -0
  449. package/docs/clean-architecture/adapters.md +173 -0
  450. package/docs/clean-architecture/api-commands.md +487 -0
  451. package/docs/clean-architecture/application.md +137 -0
  452. package/docs/clean-architecture/cli-output-boundaries.md +256 -0
  453. package/docs/clean-architecture/dto.md +153 -0
  454. package/docs/clean-architecture/index.md +89 -0
  455. package/docs/cli-stream-configuration.md +305 -0
  456. package/docs/cli-stream-reference.md +195 -0
  457. package/docs/guides/custom-unary-limiter.md +552 -0
  458. package/docs/guides/errors-and-lifecycle.md +196 -0
  459. package/docs/guides/getting-started.md +100 -0
  460. package/docs/guides/index.md +43 -0
  461. package/docs/guides/streams-and-cancellation.md +177 -0
  462. package/docs/guides/testing-with-service-definitions.md +110 -0
  463. package/docs/guides/unary-calls.md +216 -0
  464. package/docs/index.md +86 -0
  465. package/docs/limits-policy.md +201 -0
  466. package/docs/roadmap.md +204 -0
  467. package/docs/tls-policy.md +62 -0
  468. package/package.json +62 -0
  469. package/readme.md +472 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,611 @@
1
+ # История изменений
2
+
3
+ В этом файле документируются все существенные изменения проекта.
4
+
5
+ Формат основан на [Keep a Changelog](https://keepachangelog.com/), а версии
6
+ проекта соответствуют [Semantic Versioning](https://semver.org/).
7
+
8
+ Записи, предшествующие появлению этого файла, восстановлены по истории Git и
9
+ сведениям о проекте. Исторические разделы `0.1.40` и `0.0.29` объединяют частые
10
+ патч-релизы в строках версий вместо перечисления каждого микрорелиза.
11
+ Исторический раздел `0.3.0` также включает изменения промежуточных тегов
12
+ `0.2.4`–`0.2.9`.
13
+
14
+ ## [Не выпущено]
15
+
16
+ ### Добавлено
17
+
18
+ - Добавлен отдельный документ о встроенном Russian Trusted Root CA: в нём
19
+ зафиксированы официальный источник и путь получения, X.509 fingerprint,
20
+ официальный прецедент T-Invest Python SDK, границы распространения, package
21
+ path и пример `tls.rootCertificates`. MIT License SDK явно не представлена
22
+ как отдельное лицензионное разрешение на сертификат.
23
+
24
+ ### Изменено
25
+
26
+ - Пакет подготовлен к публичной публикации в npm под именем
27
+ `@woodger/t-invest-node-sdk`: снят флаг `private`, для пакета с областью
28
+ видимости явно задан `publishConfig.access: public`, а сборка архива
29
+ перенесена с `prepare` на `prepack`. Поддерживаемым каналом установки
30
+ становится реестр npm; при установке Git-зависимости npm по-прежнему запускает
31
+ `prepack`. Имя CLI-команды и вывод версии остаются `t-invest-node-sdk`.
32
+ - Для T-Invest proto-контрактов версии 1.49 и производного generated-кода
33
+ зафиксирована Apache License 2.0 со ссылкой на официальный
34
+ `ru.tinkoff.piapi:java-sdk-grpc-contract:1.49`. Полный текст лицензии
35
+ приведён в `THIRD_PARTY_NOTICES.md` и включён в package archive; MIT License
36
+ продолжает применяться только к собственному коду SDK.
37
+
38
+ ## [0.5.1] - 2026-09-08
39
+
40
+ ### Добавлено
41
+
42
+ - Добавлен публичный структурный port `TInvestUnaryLimiter`. Перед каждым
43
+ unary transport call SDK передаёт реализации полный gRPC `path`,
44
+ разрешённые `bucket`, `maxRequests`, `windowMs` и объединённый
45
+ `AbortSignal`. Lifecycle и внешние ресурсы limiter-а остаются у Consumer-а.
46
+ - Экспортирована необязательная фабрика `createInMemoryUnaryLimiter()` с
47
+ process-local очередями, монотонным временем и отменой ожидающих permits.
48
+ Один объект можно передать нескольким SDK instances для общего состояния в
49
+ пределах процесса.
50
+ - Добавлено отдельное руководство по собственной реализации limiter-а,
51
+ cancellation, конфликтам квот, ownership и подключению межпроцессного
52
+ coordinator-а.
53
+
54
+ ### Изменено
55
+
56
+ - Unary limiter больше не создаётся фасадом SDK автоматически. Без
57
+ `TInvestOptions.unaryLimiter` unary-вызов сразу передаётся transport-у;
58
+ встроенный CLI также не добавляет limiter. Streams через этот port не
59
+ проходят. Ошибки пользовательской реализации не маскируются под gRPC
60
+ failures.
61
+ - `UnaryLimits` теперь хранит явные пары `{ maxRequests, windowMs }` вместо
62
+ нормализованных чисел запросов в минуту. Секундная квота `PostOrder`
63
+ передаётся как `15` запросов за `1_000` мс без изменения burst-семантики.
64
+
65
+ ### Удалено
66
+
67
+ - Удалена опция `trackLimits`. Для прежнего локального поведения нужно явно
68
+ передать `unaryLimiter: createInMemoryUnaryLimiter()`; отсутствие limiter-а
69
+ соответствует прежнему `trackLimits: false`.
70
+
71
+ ## [0.5.0] - 2026-09-07
72
+
73
+ ### Исправлено
74
+
75
+ - Денежные значения и котировки в CLI-отчётах теперь формируются из `units` и
76
+ `nano` без арифметики с плавающей точкой. Малые дроби сохраняют десятичную
77
+ форму, а наносы не теряются при больших целых частях.
78
+ - Положительные целочисленные CLI-опции ограничены безопасным диапазоном
79
+ JavaScript. Торговые `quantity`, глубина стакана и параметры stream runtime
80
+ больше не округляются при разборе значений вне этого диапазона.
81
+ - CLI принимает даты только в формате RFC 3339 с явным `Z` или числовым
82
+ смещением и отклоняет несуществующие календарные даты. Проверки command help,
83
+ domain names и stream interval больше не принимают свойства прототипа
84
+ объекта как допустимые значения.
85
+ - Unary throttling и stream timeouts используют монотонное время, а ожидания
86
+ длиннее диапазона Node.js timer разбиваются на безопасные части.
87
+ - Локальная ошибка разбора входящего gRPC response сохраняет код `Internal`,
88
+ но получает `source: 'sdk'`; provider-side `INTERNAL` остаётся
89
+ `source: 'grpc'`.
90
+ - Неизвестные service names и gRPC method paths в `unaryLimits` отклоняются как
91
+ `InvalidArgument` с `source: 'sdk'`. Вложенный контракт
92
+ `UnaryLimitsDefinition` типизирован именами поддерживаемых unary-сервисов и
93
+ их методов.
94
+
95
+ ### Изменено
96
+
97
+ - `@bufbuild/protobuf` обновлён до 2.14.1, `@types/node` — до 26.4.1,
98
+ `oxlint` — до 1.81.0, `ts-proto` — до 2.12.2.
99
+ - CLI-команды больше не содержат отдельный слой повторного разбора raw options:
100
+ schema-level проверка выполняется один раз command mechanics `icore`, а
101
+ request builders получают уже типизированные значения. Удалены 83 test-only
102
+ parser helper-а и дублирующие тесты; runtime-поведение команд не изменилось.
103
+ - Из внутренних модулей удалены неиспользуемый `stdoutInterceptor` и несколько
104
+ test-only фасадов над command registry и stream request builders. Тесты
105
+ проверяют непосредственно объекты, используемые production runtime.
106
+ - В Oxlint включены `typescript/no-deprecated` и
107
+ `typescript/no-unsafe-assignment`. Небезопасные присваивания результата
108
+ `JSON.parse` в reporter-тестах заменены байт-в-байт проверками JSON-вывода, а
109
+ handwritten-код больше не обращается к deprecated API.
110
+ - Локальные proto-файлы сверены с актуальным официальным выпуском T-Invest
111
+ `invest-contracts` 1.49 и перегенерированы с `ts-proto` 2.12.2. Публичные
112
+ DTO и контракты сервисов не изменились; сгенерированные декодеры теперь
113
+ отклоняют protobuf-вложения глубже 100 уровней.
114
+ - Документация сверена с текущим публичным API, CLI, составом пакета и
115
+ поведением runtime: исправлены примеры stream config и коды завершения,
116
+ добавлено требование Node.js `>=20.19.0`, обновлены архитектурные карты и
117
+ навигация, а источник вспомогательных Google proto зафиксирован в
118
+ `contracts/upstream.json`.
119
+ - MIT License собственного кода SDK отделена от уведомлений о сторонних
120
+ компонентах. Для производных от `google/api/field_behavior.proto` добавлены
121
+ атрибуция и полный текст Apache License 2.0, включаемые в package archive.
122
+
123
+ ### Удалено
124
+
125
+ - Из нормализованных JSON-отчётов CLI для облигаций, валют, ETF, фьючерсов,
126
+ опционов и акций удалены устаревшие `klong` и `kshort`. Поля `dlong` и
127
+ `dshort` сохраняют собственную семантику и не используются как замена.
128
+ Публичные generated DTO и прямые service-вызовы не изменены.
129
+
130
+ ## [0.4.4] - 2026-08-13
131
+
132
+ ### Исправлено
133
+
134
+ - Из корня пакета экспортируются все T-Invest enum-контракты, используемые
135
+ публичными generated DTO, и соответствующие JSON-конвертеры. Consumer-проекты
136
+ могут реализовывать mock-сервисы без deep imports, числовых констант и
137
+ подавлений проверки исчерпывающего `switch`.
138
+ - Локальное превышение внутреннего лимита SDK для входящего gRPC-сообщения
139
+ теперь отличается от исчерпания квоты провайдера по `SdkError.source`: первый
140
+ случай получает `ResourceExhausted` с `source: 'sdk'`, второй сохраняет
141
+ `source: 'grpc'`.
142
+ Поля `path`, `details` и `cause` остаются доступными для диагностики.
143
+ - Ошибка сериализации исходящего request теперь получает `Internal` с
144
+ `source: 'sdk'`, поскольку запрос не покинул процесс. Provider-side
145
+ `INTERNAL` сохраняет `source: 'grpc'`; `path`, `details` и `cause` не
146
+ теряются.
147
+ - Синхронные исключения из `onHeader` и `onTrailer` больше не выходят в
148
+ `uncaughtException`: соответствующий unary-вызов или stream iteration
149
+ отклоняется исходной ошибкой, а незавершённый transport call отменяется.
150
+ - Недопустимые значения публичных `token`, `appName` и `unaryLimits`
151
+ нормализуются в `InvalidArgument` с `source: 'sdk'` до создания transport.
152
+ Диагностика metadata validation не содержит значение token.
153
+
154
+ ## [0.4.3] - 2026-08-13
155
+
156
+ ### Изменено
157
+
158
+ - `oxlint` обновлён до 1.78.0, `fwa` — до 2.1.4, `icore` — до 2.2.3,
159
+ `pwd-fs` — до 3.5.10.
160
+ - Конфигурация Oxlint приведена к проверенному эталонному набору правил для
161
+ Node.js и TypeScript. Проект использует явные пространства правил `eslint`,
162
+ `typescript` и `import`, 84 выбранных правила уровня `error` и 21 правило
163
+ анализа типов, отобранное по рискам. Исключение сгенерированного кода и
164
+ проверка неиспользуемых подавлений сохранены.
165
+ - `typescript/no-deprecated` не включён в основной набор правил: диагностический
166
+ запуск обнаружил устаревшие исходные контракты на границах сгенерированного
167
+ публичного API и совместимого вывода CLI. Не все такие случаи допускают
168
+ механическую замену полей, в частности `klong`/`kshort` на `dlong`/`dshort`.
169
+ - Устаревший статус `klong`/`kshort` перенесён в шесть написанных вручную
170
+ контрактов отчётов CLI и описан для Consumer-проектов. Существующий вывод CLI
171
+ в форматах JSON и table не изменён.
172
+ - `typescript/no-unsafe-assignment` не включён в основной набор правил, поскольку
173
+ его срабатывания ограничены разбором JSON в тестах. Правила
174
+ `no-empty-function`, `no-meaningless-void-operator` и `no-misused-spread`
175
+ остаются включёнными.
176
+ - Русский язык закреплён как основной для документации, комментариев и новых
177
+ записей в истории изменений. Технические идентификаторы сохраняют исходное
178
+ написание.
179
+
180
+ ### Исправлено
181
+
182
+ - Написанные вручную фабрики запросов CLI больше не заполняют устаревшие в
183
+ исходном контракте FIGI-поля запросов и подписок. Совместимая опция `--figi`
184
+ преобразуется только в `instrumentId`; устаревшие поля сохраняют значения по
185
+ умолчанию protobuf и не попадают в сериализованные запросы.
186
+
187
+ ## [0.4.2] - 2026-08-07
188
+
189
+ ### Changed
190
+
191
+ - Updated direct dependencies to their current compatible releases, including
192
+ `@bufbuild/protobuf` 2.13.0, `icore` 2.2.1, `nice-grpc` 2.1.17,
193
+ `pwd-fs` 3.5.9, `@types/node` 26.1.2, `fwa` 2.1.3, and
194
+ `ts-proto` 2.12.0.
195
+ - Replaced Biome with Oxlint `1.76.0` as the sole source linter. The explicit
196
+ error-level rule set preserves the accepted project policy where Oxlint has
197
+ an equivalent, generated contracts remain excluded, and formatting remains
198
+ outside the lint command.
199
+ - Added a focused type-aware correctness ruleset through `oxlint-tsgolint`.
200
+ Rules use their defaults except for the precise `node:test` safe-call
201
+ allowance required by `no-floating-promises`.
202
+ - Standardized development and CI package management on npm. Replaced
203
+ `yarn.lock` with committed `package-lock.json` and updated active project
204
+ commands and documentation; alternative package managers are no longer
205
+ supported.
206
+ - Reviewed and explicitly allowed the `protobufjs@7.6.5` postinstall script
207
+ through a version-pinned `allowScripts` entry. Strict allow-scripts mode
208
+ remains disabled.
209
+ - Removed repeated unit scenarios while preserving the owning behavioral and
210
+ integration coverage. SDK runtime behavior and public contracts are
211
+ unchanged.
212
+
213
+ ## [0.4.1] - 2026-08-05
214
+
215
+ ### Added
216
+
217
+ - Added `tls` to `SdkErrorSource` so Consumers can distinguish certificate
218
+ verification failures from other transport availability failures.
219
+
220
+ ### Fixed
221
+
222
+ - Classified known TLS certificate chain and hostname verification failures as
223
+ `SdkErrorCode.Unavailable` with `source: 'tls'`, while preserving `path`,
224
+ `details`, and the original `nice-grpc` error in `cause`. Provider and network
225
+ `UNAVAILABLE` errors remain `source: 'grpc'`; retry policy remains
226
+ Consumer-owned.
227
+
228
+ ## [0.4.0] - 2026-08-05
229
+
230
+ This release changes the package identity and public SDK contract without
231
+ compatibility aliases. Consumers must update the Git dependency URL and tag,
232
+ the import specifier and `TInvest*` symbols, replace the former environment
233
+ variables with `T_INVEST_TOKEN` and `T_INVEST_ENDPOINT`, and regenerate their
234
+ lockfiles.
235
+
236
+ ### Added
237
+
238
+ - Bundled the official Russian Trusted Root CA for T-Invest TLS channels and
239
+ added the per-instance `tls.rootCertificates` PEM buffer override. Trust is
240
+ scoped to the created gRPC channel; the SDK does not mutate the system trust
241
+ store, use `NODE_EXTRA_CA_CERTS`, or download certificates during install or
242
+ runtime.
243
+
244
+ ### Changed
245
+
246
+ - Renamed the Git and package identity from `tinkoff-invest-node-sdk` to
247
+ `t-invest-node-sdk` and changed the primary CLI binary and version output to
248
+ the new name.
249
+ - Renamed the public facade to `TInvestNodeSDK` and all package-owned
250
+ `TinkoffInvest*` contracts to their `TInvest*` counterparts without legacy
251
+ aliases.
252
+ - Renamed the CLI environment contract to `T_INVEST_TOKEN` and
253
+ `T_INVEST_ENDPOINT` without fallback to the former names.
254
+ - Changed the cross-copy `SdkError` brand to the new package identity. Errors
255
+ from `0.3.x` and `0.4.x` are intentionally not recognized across versions.
256
+ - Updated Consumer guides, CLI help, repository links, architecture documents,
257
+ and package metadata for the new identity. Upstream proto namespaces and
258
+ generated contracts remain unchanged.
259
+
260
+ ## [0.3.7] - 2026-07-30
261
+
262
+ ### Changed
263
+
264
+ - Added detailed Consumer guides for safe SDK lifecycle, unary calls, streams
265
+ and cancellation, error handling, and mock services through root exports.
266
+ README now keeps one short quick start and links to the complete workflows.
267
+ - Added npm documentation metadata, included `docs/guides/**` in the package,
268
+ and excluded contributor-only `docs/policy/**`. Links from packaged
269
+ documentation to excluded repository files now point to GitHub.
270
+ - Updated the development compiler from TypeScript `6.0.3` to `7.0.2`.
271
+ Compiler options, package runtime dependencies, and runtime behavior remain
272
+ unchanged.
273
+ - Updated `pwd-fs` to `3.5.8`, aligning the runtime dependency with its
274
+ TypeScript 7 release while preserving its public CommonJS contract.
275
+ - Replaced ESLint with Biome `2.5.6`. Equivalent rules retain error severity,
276
+ formatting and assists remain disabled, and generated contracts remain
277
+ outside the lint boundary. Biome has no direct equivalents for
278
+ `no-invalid-regexp`, `no-unexpected-multiline`, and
279
+ `@typescript-eslint/triple-slash-reference`.
280
+ - Updated `icore` to `2.2.0` and `fwa` to `2.1.0`. The lightweight
281
+ empty-registry `TerminalApp` used by global CLI shortcuts is now explicitly
282
+ supported upstream, while command execution and the existing `fwa --prune`
283
+ workflow remain unchanged.
284
+
285
+ ## [0.3.6] - 2026-07-29
286
+
287
+ ### Changed
288
+
289
+ - Updated `icore` to `2.1.0` and the `fwa` test runner to `2.0.7`.
290
+ - Restricted package imports to the documented root entrypoint.
291
+ - Made the `version` command reject extra positional arguments as a usage
292
+ error.
293
+ - Deferred loading the CLI command registry until command execution so global
294
+ help and version shortcuts do not initialize API commands or generated
295
+ contracts.
296
+ - Reorganized CLI, SDK configuration, and gRPC transport tests around their
297
+ owning production modules and observable contracts.
298
+ - Consolidated shared instrument and comma-separated option coverage, and
299
+ removed repeated unit checks for passthrough command helpers. Public package
300
+ exports, CLI behavior, and SDK runtime semantics remain unchanged.
301
+ - Clarified that `SdkError.code` contains a standard symbolic non-OK gRPC status
302
+ for errors with `source: 'grpc'`, while `source` distinguishes provider
303
+ failures from local SDK errors.
304
+
305
+ ### Fixed
306
+
307
+ - Preserved SDK-owned authorization and application metadata when Consumer
308
+ call metadata is provided.
309
+ - Kept TLS and unary throttling defaults enabled when optional instance flags
310
+ are explicitly `undefined`.
311
+ - Rejected blank SDK credentials and endpoint values at the SDK and CLI
312
+ boundaries.
313
+ - Made global CLI shortcut paths reject unsupported options with exit code `2`.
314
+
315
+ ### Security
316
+
317
+ - Excluded local `.env` credentials from Git and package archives.
318
+
319
+ ## [0.3.5] - 2026-07-28
320
+
321
+ ### Fixed
322
+
323
+ - Preserved the full unary throttling interval after delayed timer callbacks so
324
+ queued calls cannot be dispatched in a burst when the event loop resumes.
325
+ - Made `stream run` cancel its pending transport read before iterator cleanup
326
+ when `durationMs` or `idleTimeoutMs` expires, preventing quiet streams from
327
+ hanging during timeout shutdown.
328
+
329
+ ## [0.3.4] - 2026-07-28
330
+
331
+ ### Added
332
+
333
+ - Added the public `SdkError`, `SdkErrorCode`, `SdkErrorSource`, and
334
+ `isSdkError()` contracts. Unary and streaming gRPC failures now expose stable
335
+ SDK codes while retaining the original transport error as `cause`.
336
+
337
+ ### Changed
338
+
339
+ - Updated `icore` to `2.0.5`, bound the shared CLI command context, result, and
340
+ metadata contracts once through `createCommand.withTypes()`, and derived the
341
+ compatibility alias decorator's definition type from that bound builder.
342
+ - Made `TinkoffInvestNodeSDK.close()` idempotent. Service access and calls
343
+ through previously obtained clients now fail with `SdkErrorCode.SdkClosed`
344
+ after shutdown, while already delegated transport calls remain
345
+ caller-cancellable through their own `AbortSignal`.
346
+
347
+ ### Fixed
348
+
349
+ - Made `TinkoffInvestCallOptions.signal` cancel local unary throttle waiting.
350
+ A call cancelled while waiting is removed from its quota bucket so the
351
+ following call can use the released slot.
352
+
353
+ ## [0.3.3] - 2026-07-25
354
+
355
+ ### Changed
356
+
357
+ - Updated `icore` to `2.0.4` and replaced the local application usage-error
358
+ class and manual category check with the public `CliUsageError` and
359
+ `isUsageError()` contracts. Cross-copy errors now retain the established CLI
360
+ rendering and exit-code policy.
361
+ - Simplified `version`, `--version`, and `-v` output to one package-version
362
+ line.
363
+ - Typed the command registry output with the public `TerminalCommandOutput`
364
+ contract; `TerminalApp.runPrepared()` remains responsible for runtime output
365
+ narrowing and render-phase errors.
366
+ - Replaced expanded compatibility command definitions with first-class `icore`
367
+ aliases: `name` and `path` now keep canonical identity, `matchedPath` records
368
+ the invoked path, and registry names contain preferred commands only.
369
+ - Declared `-h` and `-v` through native `icore` option aliases and rejected the
370
+ undocumented `--h` and `--v` long forms as usage errors.
371
+ - Delegated complete candles CSV document rendering to the public
372
+ `renderCsv()` primitive without changing its output contract.
373
+
374
+ ## [0.3.2] - 2026-07-24
375
+
376
+ ### Changed
377
+
378
+ - Marked the package as private and documented version-pinned installation from
379
+ its GitHub tag; this release is not published to the npm registry.
380
+ - Made the 4 MiB gRPC receive message limit an explicit package-owned transport
381
+ policy instead of inheriting the implicit `grpc-js` default.
382
+ - Moved the `useSsl` and `trackLimits` SDK instance defaults into the typed
383
+ package config without changing per-instance override behavior.
384
+
385
+ ### Fixed
386
+
387
+ - Added the omitted SignalService root contracts and `sdk.signals` facade,
388
+ including its package-owned unary limit policy.
389
+ - Classified `pwd-fs` as a runtime dependency so the package CLI can start
390
+ after installation from GitHub.
391
+
392
+ ## [0.3.1] - 2026-07-17
393
+
394
+ ### Changed
395
+
396
+ - Split unary throttling into transport-specific gRPC rule resolution and a
397
+ transport-neutral application scheduler.
398
+
399
+ ### Fixed
400
+
401
+ - Rejected non-positive and non-finite unary limits after merging mutable
402
+ public defaults with per-instance overrides.
403
+
404
+ ## [0.3.0] - 2026-07-17
405
+
406
+ ### Added
407
+
408
+ - Added package `bin` metadata for the `tinkoff-invest-node-sdk` CLI binary.
409
+ - Added per-instance unary limit overrides through
410
+ `TinkoffInvestOptions.unaryLimits`, merged with package defaults when an SDK
411
+ instance is created.
412
+ - Added `defineUnaryLimits()` and `UnaryLimitsDefinition` for readable nested
413
+ service and method limit declarations without changing the flat runtime
414
+ `UnaryLimits` contract.
415
+
416
+ ### Changed
417
+
418
+ - Replaced executable package unary-limit declarations with one typed,
419
+ human-readable config that compiles service fallbacks, method rules, and
420
+ shared quota groups into the compatible flat runtime policy.
421
+ - Migrated the public CLI contract to preferred friendly domain paths for
422
+ account, market, order, stop-order, operation, sandbox, instrument, and
423
+ `dev compile-proto`.
424
+ - Kept technical and legacy CLI paths as compatibility aliases while making
425
+ top-level help show domains, domain help show preferred commands, and
426
+ command-specific help normalize compatibility calls to preferred usage.
427
+ - Restored `yarn build` as the explicit TypeScript compile command and kept
428
+ `prepare` as the package-install compile lifecycle script.
429
+ - Moved proto generation from a package script to the `yarn cli compile-proto`
430
+ utility command.
431
+ - Documented `yarn build` as the strict TypeScript compile gate backed by
432
+ `tsconfig.json`.
433
+ - Updated the `icore` runtime dependency to `2.0.0` and migrated the CLI runner
434
+ to the shared terminal error policy.
435
+ - Classified invalid CLI invocation, required CLI/ENV values, and parsed
436
+ command configuration as usage failures with exit code `2`; runtime,
437
+ output, provider, and command-definition failures keep exit code `1`.
438
+ - Updated proto provenance to the active official T-Bank `invest-contracts`
439
+ upstream and restored a flat layout for vendored and generated contracts.
440
+ Root package exports remain unchanged; direct generated-module imports now
441
+ use the flat `generated/<contract>` paths.
442
+ - Made proto generation resolve vendored and generated contract paths from
443
+ `contracts/upstream.json` instead of duplicating them in bootstrap code.
444
+
445
+ ### Fixed
446
+
447
+ - Restored the generated `OrderType` enum in the root package exports.
448
+ - Synchronized the public SDK service interfaces with the active generated
449
+ service definitions, restoring typed access to 33 RPC methods.
450
+ - Updated default unary throttling with current service and method-specific
451
+ T-Invest limits, including low-limit instrument lists and operation reports.
452
+ - Isolated unary throttling schedules by quota bucket so unrelated services no
453
+ longer delay each other while methods with one shared quota remain
454
+ aggregated.
455
+ - Matched unary service fallbacks by exact generated service name so
456
+ `OrdersService` no longer catches `StopOrdersService` paths.
457
+ - Replaced the stale archived limits reference and outdated stream grade table
458
+ with the active T-Bank limits policy.
459
+
460
+ ## [0.2.3] - 2026-07-03
461
+
462
+ ### Added
463
+
464
+ - Added this changelog in Keep a Changelog format.
465
+ - Added public root exports for generated server-side service definitions and
466
+ implementation types.
467
+ - Added package metadata needed for publishing preparation, including
468
+ keywords and license notices.
469
+
470
+ ### Changed
471
+
472
+ - Standardized CLI boolean flags around `--flag` / `--no-flag` syntax and
473
+ rejected assigned boolean values such as `--flag=true`.
474
+ - Exported only curated generated runtime contracts from the package root.
475
+ - Normalized package metadata and repository fields.
476
+ - Made `prepare: tsc` the compile entrypoint and removed the dedicated
477
+ `build` script.
478
+ - Disabled TypeScript source map emission.
479
+
480
+ ### Fixed
481
+
482
+ - Fixed CLI boolean parsing after the `icore` API stopped accepting
483
+ `--flag=true` and `--flag=false`.
484
+ - Fixed stale generated package surface for server-side nice-grpc consumers.
485
+
486
+ ## [0.2.2] - 2026-07-02
487
+
488
+ ### Changed
489
+
490
+ - Prepared package compilation for git dependency installation.
491
+ - Made the project Yarn-oriented in user-facing scripts and documentation.
492
+ - Switched the compile step to `prepare` as an npm lifecycle entrypoint.
493
+
494
+ ## [0.2.1] - 2026-07-02
495
+
496
+ ### Added
497
+
498
+ - Added MIT license notices and compact third-party generated-code notices.
499
+
500
+ ### Changed
501
+
502
+ - Updated `icore` integration to `1.0.7`.
503
+ - Consolidated license notices in a single `LICENSE` file.
504
+
505
+ ### Removed
506
+
507
+ - Removed path-specific generated-code license wording.
508
+
509
+ ## [0.2.0] - 2026-06-29
510
+
511
+ ### Changed
512
+
513
+ - Promoted the package from the `0.1.x` CLI build-out line to `0.2.0`.
514
+ - Established the post-CLI-migration baseline for the SDK package.
515
+
516
+ ## [0.1.40] - 2026-06-28
517
+
518
+ This section summarizes package versions `0.1.0` through `0.1.40`.
519
+
520
+ ### Added
521
+
522
+ - Added a broad bootstrap CLI command surface using canonical
523
+ `<service> <method>` command names.
524
+ - Added CLI commands for users, market data, instruments, operations, orders,
525
+ stop orders, sandbox, and stream scenarios.
526
+ - Added confirmed side-effect CLI commands for order, stop order, favorites,
527
+ and sandbox mutations.
528
+ - Added configurable stream CLI support for server-side streams and
529
+ `marketdata.marketDataStream` initial requests.
530
+ - Added stream CLI reference and configuration documentation.
531
+ - Added application report contracts and reusable report value formatting.
532
+ - Added infrastructure renderers for JSON, CSV, and table output.
533
+ - Added stdout/stderr writers with backpressure handling.
534
+ - Added Clean Architecture, command, output-boundary, testing, naming,
535
+ scripts, dependency, and change-policy documentation.
536
+ - Added local `yarn cli` shortcut.
537
+
538
+ ### Changed
539
+
540
+ - Migrated bootstrap CLI mechanics to the `icore` command registry and option
541
+ schemas.
542
+ - Replaced legacy `CliArgs`, ArgGuards, and compatibility wrappers with
543
+ declarative `icore` parsing.
544
+ - Migrated the test runner from local suite files to `fwa`.
545
+ - Reorganized bootstrap executable entrypoints under `src/bootstrap/bin`.
546
+ - Moved the executable CLI entrypoint while keeping package binary behavior.
547
+ - Moved gRPC infrastructure under `src/infrastructure/transport/grpc`.
548
+ - Split CLI output formatting into application reports, infrastructure
549
+ renderers, and output writers.
550
+ - Standardized CLI instrument identifiers around `--instrument-id`.
551
+ - Migrated CLI money JSON output from combined text values to structured
552
+ `amount` and `currency` values.
553
+ - Centralized scalar report formatting for money, quotation, and date values.
554
+ - Updated proto generation to recursively process raw proto files.
555
+ - Regenerated proto outputs with `protoc` 3.21.
556
+ - Switched proto generation back to system `protoc` after the `grpc-tools`
557
+ experiment.
558
+ - Grouped compiled test execution around `fwa`.
559
+ - Shortened CLI quick-start documentation.
560
+
561
+ ### Fixed
562
+
563
+ - Fixed stdout and stderr backpressure handling for CLI output.
564
+ - Fixed stream output status/error handling and long-running output writes.
565
+
566
+ ### Removed
567
+
568
+ - Removed GitHub Actions documentation workflow noise.
569
+ - Removed legacy CLI aliases before publishing the new command surface.
570
+
571
+ ## [0.0.29] - 2026-06-19
572
+
573
+ This section summarizes package versions `0.0.1` through `0.0.29`.
574
+
575
+ ### Added
576
+
577
+ - Added the initial SDK package structure and generated TypeScript contracts.
578
+ - Added generated declaration output and package entrypoint metadata.
579
+ - Added configurable SDK options and config JSON resolution.
580
+ - Added unary throttling for provider rate limits.
581
+ - Added account/token total request limiting.
582
+ - Added environment-based configuration, including SSL-related options.
583
+ - Added stream clients and SDK close lifecycle support.
584
+ - Added `@bufbuild/protobuf` runtime dependency.
585
+ - Added VitePress documentation and proto generation documentation before the
586
+ later documentation reset.
587
+ - Added throttling, config, middleware, and SDK internals tests.
588
+ - Added ESLint-based linting.
589
+ - Added early bootstrap CLI commands and initial CLI API argument preparation.
590
+ - Added testing and project policy documentation.
591
+
592
+ ### Changed
593
+
594
+ - Updated proto contracts from upstream snapshots.
595
+ - Updated `tsconfig.json` and JSON config handling.
596
+ - Updated README to the current SDK API.
597
+ - Updated SDK config and SSL option handling.
598
+ - Improved unary throttling limits and middleware behavior.
599
+ - Updated dependencies and compatibility fixes.
600
+ - Refactored SDK internals around throttle/config tests.
601
+
602
+ ### Fixed
603
+
604
+ - Fixed config JSON resolution.
605
+ - Fixed throttle delay behavior.
606
+
607
+ ### Removed
608
+
609
+ - Removed the committed `config.json` file.
610
+ - Removed VitePress documentation tooling during the documentation reset.
611
+ - Removed committed `dist` artifacts and added `dist` to `.gitignore`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Stanislav Potemkin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.