@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.
- package/CHANGELOG.md +611 -0
- package/LICENSE +21 -0
- package/THIRD_PARTY_NOTICES.md +307 -0
- package/certificates/russian-trusted-root-ca.pem +33 -0
- package/dist/application/dto/t-invest-options.d.ts +30 -0
- package/dist/application/dto/t-invest-options.js +11 -0
- package/dist/application/dto/t-invest-services.d.ts +168 -0
- package/dist/application/dto/t-invest-services.js +12 -0
- package/dist/application/errors/sdk-error.d.ts +47 -0
- package/dist/application/errors/sdk-error.js +84 -0
- package/dist/application/reports/accounts.report.d.ts +26 -0
- package/dist/application/reports/accounts.report.js +11 -0
- package/dist/application/reports/accrued-interests.report.d.ts +22 -0
- package/dist/application/reports/accrued-interests.report.js +11 -0
- package/dist/application/reports/asset.report.d.ts +72 -0
- package/dist/application/reports/asset.report.js +11 -0
- package/dist/application/reports/bond-coupons.report.d.ts +31 -0
- package/dist/application/reports/bond-coupons.report.js +11 -0
- package/dist/application/reports/bond.report.d.ts +82 -0
- package/dist/application/reports/bond.report.js +11 -0
- package/dist/application/reports/brands.report.d.ts +24 -0
- package/dist/application/reports/brands.report.js +11 -0
- package/dist/application/reports/broker-report.report.d.ts +74 -0
- package/dist/application/reports/broker-report.report.js +11 -0
- package/dist/application/reports/cancel-order.report.d.ts +14 -0
- package/dist/application/reports/cancel-order.report.js +11 -0
- package/dist/application/reports/cancel-stop-order.report.d.ts +14 -0
- package/dist/application/reports/cancel-stop-order.report.js +11 -0
- package/dist/application/reports/candles.report.d.ts +26 -0
- package/dist/application/reports/candles.report.js +11 -0
- package/dist/application/reports/close-prices.report.d.ts +20 -0
- package/dist/application/reports/close-prices.report.js +11 -0
- package/dist/application/reports/countries.report.d.ts +20 -0
- package/dist/application/reports/countries.report.js +11 -0
- package/dist/application/reports/currency.report.d.ts +58 -0
- package/dist/application/reports/currency.report.js +11 -0
- package/dist/application/reports/dividends-foreign-issuer.report.d.ts +51 -0
- package/dist/application/reports/dividends-foreign-issuer.report.js +11 -0
- package/dist/application/reports/dividends.report.d.ts +33 -0
- package/dist/application/reports/dividends.report.js +11 -0
- package/dist/application/reports/etf.report.d.ts +62 -0
- package/dist/application/reports/etf.report.js +11 -0
- package/dist/application/reports/favorites.report.d.ts +24 -0
- package/dist/application/reports/favorites.report.js +11 -0
- package/dist/application/reports/find-instrument.report.d.ts +34 -0
- package/dist/application/reports/find-instrument.report.js +11 -0
- package/dist/application/reports/future.report.d.ts +66 -0
- package/dist/application/reports/future.report.js +11 -0
- package/dist/application/reports/futures-margin.report.d.ts +21 -0
- package/dist/application/reports/futures-margin.report.js +11 -0
- package/dist/application/reports/index.d.ts +50 -0
- package/dist/application/reports/index.js +66 -0
- package/dist/application/reports/instrument.report.d.ts +47 -0
- package/dist/application/reports/instrument.report.js +11 -0
- package/dist/application/reports/last-prices.report.d.ts +20 -0
- package/dist/application/reports/last-prices.report.js +11 -0
- package/dist/application/reports/last-trades.report.d.ts +24 -0
- package/dist/application/reports/last-trades.report.js +11 -0
- package/dist/application/reports/margin-attributes.report.d.ts +25 -0
- package/dist/application/reports/margin-attributes.report.js +11 -0
- package/dist/application/reports/money.report.d.ts +15 -0
- package/dist/application/reports/money.report.js +11 -0
- package/dist/application/reports/operations-by-cursor.report.d.ts +65 -0
- package/dist/application/reports/operations-by-cursor.report.js +11 -0
- package/dist/application/reports/operations.report.d.ts +40 -0
- package/dist/application/reports/operations.report.js +11 -0
- package/dist/application/reports/option.report.d.ts +76 -0
- package/dist/application/reports/option.report.js +11 -0
- package/dist/application/reports/order-book.report.d.ts +38 -0
- package/dist/application/reports/order-book.report.js +11 -0
- package/dist/application/reports/order-mutation.report.d.ts +45 -0
- package/dist/application/reports/order-mutation.report.js +11 -0
- package/dist/application/reports/order-state.report.d.ts +12 -0
- package/dist/application/reports/order-state.report.js +11 -0
- package/dist/application/reports/orders.report.d.ts +53 -0
- package/dist/application/reports/orders.report.js +11 -0
- package/dist/application/reports/portfolio.report.d.ts +54 -0
- package/dist/application/reports/portfolio.report.js +11 -0
- package/dist/application/reports/positions.report.d.ts +45 -0
- package/dist/application/reports/positions.report.js +11 -0
- package/dist/application/reports/post-stop-order.report.d.ts +14 -0
- package/dist/application/reports/post-stop-order.report.js +11 -0
- package/dist/application/reports/sandbox-account.report.d.ts +20 -0
- package/dist/application/reports/sandbox-account.report.js +11 -0
- package/dist/application/reports/share.report.d.ts +66 -0
- package/dist/application/reports/share.report.js +11 -0
- package/dist/application/reports/stop-orders.report.d.ts +34 -0
- package/dist/application/reports/stop-orders.report.js +11 -0
- package/dist/application/reports/trading-schedules.report.d.ts +44 -0
- package/dist/application/reports/trading-schedules.report.js +11 -0
- package/dist/application/reports/trading-status.report.d.ts +19 -0
- package/dist/application/reports/trading-status.report.js +11 -0
- package/dist/application/reports/trading-statuses.report.d.ts +12 -0
- package/dist/application/reports/trading-statuses.report.js +11 -0
- package/dist/application/reports/user-info.report.d.ts +16 -0
- package/dist/application/reports/user-info.report.js +11 -0
- package/dist/application/reports/user-tariff.report.d.ts +28 -0
- package/dist/application/reports/user-tariff.report.js +11 -0
- package/dist/application/reports/withdraw-limits.report.d.ts +16 -0
- package/dist/application/reports/withdraw-limits.report.js +11 -0
- package/dist/application/services/unary-limiter.d.ts +44 -0
- package/dist/application/services/unary-limiter.js +138 -0
- package/dist/bootstrap/args/command-options.d.ts +43 -0
- package/dist/bootstrap/args/command-options.js +125 -0
- package/dist/bootstrap/args/index.d.ts +1 -0
- package/dist/bootstrap/args/index.js +5 -0
- package/dist/bootstrap/args/instrument-id-options.d.ts +24 -0
- package/dist/bootstrap/args/instrument-id-options.js +47 -0
- package/dist/bootstrap/args/instruments-args.d.ts +49 -0
- package/dist/bootstrap/args/instruments-args.js +89 -0
- package/dist/bootstrap/args/sdk-options.d.ts +19 -0
- package/dist/bootstrap/args/sdk-options.js +40 -0
- package/dist/bootstrap/args/side-effect-args.d.ts +20 -0
- package/dist/bootstrap/args/side-effect-args.js +50 -0
- package/dist/bootstrap/cli/contract.d.ts +16 -0
- package/dist/bootstrap/cli/contract.js +15 -0
- package/dist/bootstrap/cli/domains.d.ts +260 -0
- package/dist/bootstrap/cli/domains.js +631 -0
- package/dist/bootstrap/cli/error.d.ts +15 -0
- package/dist/bootstrap/cli/error.js +40 -0
- package/dist/bootstrap/cli/help.d.ts +751 -0
- package/dist/bootstrap/cli/help.js +1789 -0
- package/dist/bootstrap/cli/registry.d.ts +2102 -0
- package/dist/bootstrap/cli/registry.js +186 -0
- package/dist/bootstrap/cli/runner.d.ts +10 -0
- package/dist/bootstrap/cli/runner.js +151 -0
- package/dist/bootstrap/cli/version.d.ts +17 -0
- package/dist/bootstrap/cli/version.js +26 -0
- package/dist/bootstrap/commands/accounts/cli.d.ts +63 -0
- package/dist/bootstrap/commands/accounts/cli.js +50 -0
- package/dist/bootstrap/commands/accounts/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/accounts/reporter.js +50 -0
- package/dist/bootstrap/commands/accrued-interests/cli.d.ts +129 -0
- package/dist/bootstrap/commands/accrued-interests/cli.js +80 -0
- package/dist/bootstrap/commands/accrued-interests/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/accrued-interests/reporter.js +43 -0
- package/dist/bootstrap/commands/asset/cli.d.ts +99 -0
- package/dist/bootstrap/commands/asset/cli.js +64 -0
- package/dist/bootstrap/commands/asset/reporter.d.ts +16 -0
- package/dist/bootstrap/commands/asset/reporter.js +122 -0
- package/dist/bootstrap/commands/assets/cli.d.ts +102 -0
- package/dist/bootstrap/commands/assets/cli.js +78 -0
- package/dist/bootstrap/commands/assets/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/assets/reporter.js +27 -0
- package/dist/bootstrap/commands/bond/cli.d.ts +83 -0
- package/dist/bootstrap/commands/bond/cli.js +53 -0
- package/dist/bootstrap/commands/bond/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/bond/reporter.js +123 -0
- package/dist/bootstrap/commands/bond-coupons/cli.d.ts +129 -0
- package/dist/bootstrap/commands/bond-coupons/cli.js +80 -0
- package/dist/bootstrap/commands/bond-coupons/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/bond-coupons/reporter.js +64 -0
- package/dist/bootstrap/commands/bonds/cli.d.ts +73 -0
- package/dist/bootstrap/commands/bonds/cli.js +53 -0
- package/dist/bootstrap/commands/bonds/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/bonds/reporter.js +27 -0
- package/dist/bootstrap/commands/brand/cli.d.ts +99 -0
- package/dist/bootstrap/commands/brand/cli.js +64 -0
- package/dist/bootstrap/commands/brand/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/brand/reporter.js +37 -0
- package/dist/bootstrap/commands/brands/cli.d.ts +63 -0
- package/dist/bootstrap/commands/brands/cli.js +50 -0
- package/dist/bootstrap/commands/brands/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/brands/reporter.js +49 -0
- package/dist/bootstrap/commands/broker-report/cli.d.ts +132 -0
- package/dist/bootstrap/commands/broker-report/cli.js +105 -0
- package/dist/bootstrap/commands/broker-report/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/broker-report/reporter.js +123 -0
- package/dist/bootstrap/commands/cancel-order/cli.d.ts +120 -0
- package/dist/bootstrap/commands/cancel-order/cli.js +71 -0
- package/dist/bootstrap/commands/cancel-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/cancel-order/reporter.js +32 -0
- package/dist/bootstrap/commands/cancel-stop-order/cli.d.ts +120 -0
- package/dist/bootstrap/commands/cancel-stop-order/cli.js +71 -0
- package/dist/bootstrap/commands/cancel-stop-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/cancel-stop-order/reporter.js +32 -0
- package/dist/bootstrap/commands/candles/cli.d.ts +138 -0
- package/dist/bootstrap/commands/candles/cli.js +104 -0
- package/dist/bootstrap/commands/candles/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/candles/reporter.js +49 -0
- package/dist/bootstrap/commands/close-prices/cli.d.ts +99 -0
- package/dist/bootstrap/commands/close-prices/cli.js +66 -0
- package/dist/bootstrap/commands/close-prices/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/close-prices/reporter.js +43 -0
- package/dist/bootstrap/commands/compile-proto/cli.d.ts +12 -0
- package/dist/bootstrap/commands/compile-proto/cli.js +22 -0
- package/dist/bootstrap/commands/countries/cli.d.ts +63 -0
- package/dist/bootstrap/commands/countries/cli.js +50 -0
- package/dist/bootstrap/commands/countries/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/countries/reporter.js +42 -0
- package/dist/bootstrap/commands/currencies/cli.d.ts +73 -0
- package/dist/bootstrap/commands/currencies/cli.js +53 -0
- package/dist/bootstrap/commands/currencies/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/currencies/reporter.js +27 -0
- package/dist/bootstrap/commands/currency/cli.d.ts +83 -0
- package/dist/bootstrap/commands/currency/cli.js +53 -0
- package/dist/bootstrap/commands/currency/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/currency/reporter.js +104 -0
- package/dist/bootstrap/commands/dividends/cli.d.ts +129 -0
- package/dist/bootstrap/commands/dividends/cli.js +80 -0
- package/dist/bootstrap/commands/dividends/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/dividends/reporter.js +62 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/cli.d.ts +132 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/cli.js +105 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.js +108 -0
- package/dist/bootstrap/commands/edit-favorites/cli.d.ts +129 -0
- package/dist/bootstrap/commands/edit-favorites/cli.js +78 -0
- package/dist/bootstrap/commands/edit-favorites/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/edit-favorites/reporter.js +23 -0
- package/dist/bootstrap/commands/etf/cli.d.ts +83 -0
- package/dist/bootstrap/commands/etf/cli.js +53 -0
- package/dist/bootstrap/commands/etf/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/etf/reporter.js +109 -0
- package/dist/bootstrap/commands/etfs/cli.d.ts +73 -0
- package/dist/bootstrap/commands/etfs/cli.js +53 -0
- package/dist/bootstrap/commands/etfs/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/etfs/reporter.js +27 -0
- package/dist/bootstrap/commands/favorites/cli.d.ts +63 -0
- package/dist/bootstrap/commands/favorites/cli.js +50 -0
- package/dist/bootstrap/commands/favorites/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/favorites/reporter.js +60 -0
- package/dist/bootstrap/commands/find-instrument/cli.d.ts +126 -0
- package/dist/bootstrap/commands/find-instrument/cli.js +88 -0
- package/dist/bootstrap/commands/find-instrument/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/find-instrument/reporter.js +71 -0
- package/dist/bootstrap/commands/future/cli.d.ts +83 -0
- package/dist/bootstrap/commands/future/cli.js +53 -0
- package/dist/bootstrap/commands/future/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/future/reporter.js +116 -0
- package/dist/bootstrap/commands/futures/cli.d.ts +73 -0
- package/dist/bootstrap/commands/futures/cli.js +53 -0
- package/dist/bootstrap/commands/futures/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/futures/reporter.js +27 -0
- package/dist/bootstrap/commands/futures-margin/cli.d.ts +105 -0
- package/dist/bootstrap/commands/futures-margin/cli.js +64 -0
- package/dist/bootstrap/commands/futures-margin/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/futures-margin/reporter.js +40 -0
- package/dist/bootstrap/commands/help/cli.d.ts +13 -0
- package/dist/bootstrap/commands/help/cli.js +26 -0
- package/dist/bootstrap/commands/instrument/cli.d.ts +83 -0
- package/dist/bootstrap/commands/instrument/cli.js +53 -0
- package/dist/bootstrap/commands/instrument/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/instrument/reporter.js +91 -0
- package/dist/bootstrap/commands/last-prices/cli.d.ts +99 -0
- package/dist/bootstrap/commands/last-prices/cli.js +66 -0
- package/dist/bootstrap/commands/last-prices/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/last-prices/reporter.js +43 -0
- package/dist/bootstrap/commands/last-trades/cli.d.ts +123 -0
- package/dist/bootstrap/commands/last-trades/cli.js +82 -0
- package/dist/bootstrap/commands/last-trades/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/last-trades/reporter.js +48 -0
- package/dist/bootstrap/commands/margin-attributes/cli.d.ts +99 -0
- package/dist/bootstrap/commands/margin-attributes/cli.js +64 -0
- package/dist/bootstrap/commands/margin-attributes/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/margin-attributes/reporter.js +51 -0
- package/dist/bootstrap/commands/operations/cli.d.ts +156 -0
- package/dist/bootstrap/commands/operations/cli.js +99 -0
- package/dist/bootstrap/commands/operations/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/operations/reporter.js +78 -0
- package/dist/bootstrap/commands/operations-by-cursor/cli.d.ts +204 -0
- package/dist/bootstrap/commands/operations-by-cursor/cli.js +164 -0
- package/dist/bootstrap/commands/operations-by-cursor/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/operations-by-cursor/reporter.js +107 -0
- package/dist/bootstrap/commands/option/cli.d.ts +83 -0
- package/dist/bootstrap/commands/option/cli.js +53 -0
- package/dist/bootstrap/commands/option/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/option/reporter.js +125 -0
- package/dist/bootstrap/commands/options-by/cli.d.ts +108 -0
- package/dist/bootstrap/commands/options-by/cli.js +68 -0
- package/dist/bootstrap/commands/options-by/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/options-by/reporter.js +27 -0
- package/dist/bootstrap/commands/order-book/cli.d.ts +120 -0
- package/dist/bootstrap/commands/order-book/cli.js +73 -0
- package/dist/bootstrap/commands/order-book/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/order-book/reporter.js +60 -0
- package/dist/bootstrap/commands/order-state/cli.d.ts +111 -0
- package/dist/bootstrap/commands/order-state/cli.js +71 -0
- package/dist/bootstrap/commands/order-state/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/order-state/reporter.js +57 -0
- package/dist/bootstrap/commands/orders/cli.d.ts +99 -0
- package/dist/bootstrap/commands/orders/cli.js +64 -0
- package/dist/bootstrap/commands/orders/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/orders/reporter.js +88 -0
- package/dist/bootstrap/commands/portfolio/cli.d.ts +114 -0
- package/dist/bootstrap/commands/portfolio/cli.js +77 -0
- package/dist/bootstrap/commands/portfolio/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/portfolio/reporter.js +95 -0
- package/dist/bootstrap/commands/positions/cli.d.ts +99 -0
- package/dist/bootstrap/commands/positions/cli.js +64 -0
- package/dist/bootstrap/commands/positions/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/positions/reporter.js +116 -0
- package/dist/bootstrap/commands/post-order/cli.d.ts +192 -0
- package/dist/bootstrap/commands/post-order/cli.js +113 -0
- package/dist/bootstrap/commands/post-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/post-order/reporter.js +77 -0
- package/dist/bootstrap/commands/post-stop-order/cli.d.ts +216 -0
- package/dist/bootstrap/commands/post-stop-order/cli.js +145 -0
- package/dist/bootstrap/commands/post-stop-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/post-stop-order/reporter.js +31 -0
- package/dist/bootstrap/commands/replace-order/cli.d.ts +180 -0
- package/dist/bootstrap/commands/replace-order/cli.js +99 -0
- package/dist/bootstrap/commands/replace-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/replace-order/reporter.js +17 -0
- package/dist/bootstrap/commands/sandbox-accounts/cli.d.ts +64 -0
- package/dist/bootstrap/commands/sandbox-accounts/cli.js +54 -0
- package/dist/bootstrap/commands/sandbox-cancel-order/cli.d.ts +120 -0
- package/dist/bootstrap/commands/sandbox-cancel-order/cli.js +69 -0
- package/dist/bootstrap/commands/sandbox-close-account/cli.d.ts +108 -0
- package/dist/bootstrap/commands/sandbox-close-account/cli.js +66 -0
- package/dist/bootstrap/commands/sandbox-close-account/reporter.d.ts +12 -0
- package/dist/bootstrap/commands/sandbox-close-account/reporter.js +32 -0
- package/dist/bootstrap/commands/sandbox-open-account/cli.d.ts +70 -0
- package/dist/bootstrap/commands/sandbox-open-account/cli.js +57 -0
- package/dist/bootstrap/commands/sandbox-open-account/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/sandbox-open-account/reporter.js +31 -0
- package/dist/bootstrap/commands/sandbox-operations/cli.d.ts +156 -0
- package/dist/bootstrap/commands/sandbox-operations/cli.js +78 -0
- package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.d.ts +204 -0
- package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.js +98 -0
- package/dist/bootstrap/commands/sandbox-order-state/cli.d.ts +111 -0
- package/dist/bootstrap/commands/sandbox-order-state/cli.js +67 -0
- package/dist/bootstrap/commands/sandbox-orders/cli.d.ts +99 -0
- package/dist/bootstrap/commands/sandbox-orders/cli.js +63 -0
- package/dist/bootstrap/commands/sandbox-pay-in/cli.d.ts +135 -0
- package/dist/bootstrap/commands/sandbox-pay-in/cli.js +86 -0
- package/dist/bootstrap/commands/sandbox-pay-in/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/sandbox-pay-in/reporter.js +32 -0
- package/dist/bootstrap/commands/sandbox-portfolio/cli.d.ts +114 -0
- package/dist/bootstrap/commands/sandbox-portfolio/cli.js +68 -0
- package/dist/bootstrap/commands/sandbox-positions/cli.d.ts +99 -0
- package/dist/bootstrap/commands/sandbox-positions/cli.js +63 -0
- package/dist/bootstrap/commands/sandbox-post-order/cli.d.ts +192 -0
- package/dist/bootstrap/commands/sandbox-post-order/cli.js +90 -0
- package/dist/bootstrap/commands/sandbox-replace-order/cli.d.ts +180 -0
- package/dist/bootstrap/commands/sandbox-replace-order/cli.js +86 -0
- package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.d.ts +99 -0
- package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.js +63 -0
- package/dist/bootstrap/commands/share/cli.d.ts +83 -0
- package/dist/bootstrap/commands/share/cli.js +53 -0
- package/dist/bootstrap/commands/share/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/share/reporter.js +111 -0
- package/dist/bootstrap/commands/shares/cli.d.ts +73 -0
- package/dist/bootstrap/commands/shares/cli.js +53 -0
- package/dist/bootstrap/commands/shares/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/shares/reporter.js +27 -0
- package/dist/bootstrap/commands/stop-orders/cli.d.ts +99 -0
- package/dist/bootstrap/commands/stop-orders/cli.js +68 -0
- package/dist/bootstrap/commands/stop-orders/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/stop-orders/reporter.js +69 -0
- package/dist/bootstrap/commands/stream-run/cli.d.ts +138 -0
- package/dist/bootstrap/commands/stream-run/cli.js +229 -0
- package/dist/bootstrap/commands/stream-run/config.d.ts +56 -0
- package/dist/bootstrap/commands/stream-run/config.js +468 -0
- package/dist/bootstrap/commands/stream-run/reporter.d.ts +30 -0
- package/dist/bootstrap/commands/stream-run/reporter.js +76 -0
- package/dist/bootstrap/commands/trading-schedules/cli.d.ts +120 -0
- package/dist/bootstrap/commands/trading-schedules/cli.js +79 -0
- package/dist/bootstrap/commands/trading-schedules/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/trading-schedules/reporter.js +58 -0
- package/dist/bootstrap/commands/trading-status/cli.d.ts +99 -0
- package/dist/bootstrap/commands/trading-status/cli.js +65 -0
- package/dist/bootstrap/commands/trading-status/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/trading-status/reporter.js +51 -0
- package/dist/bootstrap/commands/trading-statuses/cli.d.ts +99 -0
- package/dist/bootstrap/commands/trading-statuses/cli.js +64 -0
- package/dist/bootstrap/commands/trading-statuses/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/trading-statuses/reporter.js +44 -0
- package/dist/bootstrap/commands/user-info/cli.d.ts +63 -0
- package/dist/bootstrap/commands/user-info/cli.js +50 -0
- package/dist/bootstrap/commands/user-info/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/user-info/reporter.js +39 -0
- package/dist/bootstrap/commands/user-tariff/cli.d.ts +63 -0
- package/dist/bootstrap/commands/user-tariff/cli.js +50 -0
- package/dist/bootstrap/commands/user-tariff/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/user-tariff/reporter.js +50 -0
- package/dist/bootstrap/commands/version/cli.d.ts +13 -0
- package/dist/bootstrap/commands/version/cli.js +22 -0
- package/dist/bootstrap/commands/withdraw-limits/cli.d.ts +99 -0
- package/dist/bootstrap/commands/withdraw-limits/cli.js +64 -0
- package/dist/bootstrap/commands/withdraw-limits/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/withdraw-limits/reporter.js +59 -0
- package/dist/bootstrap/generated-exports.d.ts +29 -0
- package/dist/bootstrap/generated-exports.js +590 -0
- package/dist/bootstrap/index.d.ts +6 -0
- package/dist/bootstrap/index.js +22 -0
- package/dist/bootstrap/proto/compile-proto.d.ts +18 -0
- package/dist/bootstrap/proto/compile-proto.js +122 -0
- package/dist/bootstrap/sdk-config.d.ts +21 -0
- package/dist/bootstrap/sdk-config.js +152 -0
- package/dist/bootstrap/t-invest-node-sdk.d.ts +42 -0
- package/dist/bootstrap/t-invest-node-sdk.js +115 -0
- package/dist/bootstrap/unary-limit-config.d.ts +38 -0
- package/dist/bootstrap/unary-limit-config.js +130 -0
- package/dist/config.d.ts +160 -0
- package/dist/config.js +173 -0
- package/dist/config.types.d.ts +89 -0
- package/dist/config.types.js +13 -0
- package/dist/generated/common.d.ts +214 -0
- package/dist/generated/common.js +1336 -0
- package/dist/generated/google/api/field_behavior.d.ts +61 -0
- package/dist/generated/google/api/field_behavior.js +126 -0
- package/dist/generated/google/protobuf/descriptor.d.ts +1330 -0
- package/dist/generated/google/protobuf/descriptor.js +5984 -0
- package/dist/generated/google/protobuf/timestamp.d.ts +122 -0
- package/dist/generated/google/protobuf/timestamp.js +102 -0
- package/dist/generated/instruments.d.ts +3230 -0
- package/dist/generated/instruments.js +24246 -0
- package/dist/generated/marketdata.d.ts +1268 -0
- package/dist/generated/marketdata.js +8922 -0
- package/dist/generated/operations.d.ts +1165 -0
- package/dist/generated/operations.js +8625 -0
- package/dist/generated/orders.d.ts +806 -0
- package/dist/generated/orders.js +5639 -0
- package/dist/generated/sandbox.d.ts +356 -0
- package/dist/generated/sandbox.js +603 -0
- package/dist/generated/signals.d.ts +196 -0
- package/dist/generated/signals.js +1261 -0
- package/dist/generated/stoporders.d.ts +328 -0
- package/dist/generated/stoporders.js +1990 -0
- package/dist/generated/users.d.ts +453 -0
- package/dist/generated/users.js +2334 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +30 -0
- package/dist/infrastructure/interceptor/index.d.ts +1 -0
- package/dist/infrastructure/interceptor/index.js +17 -0
- package/dist/infrastructure/interceptor/warning-interceptor.d.ts +23 -0
- package/dist/infrastructure/interceptor/warning-interceptor.js +38 -0
- package/dist/infrastructure/report-values.d.ts +19 -0
- package/dist/infrastructure/report-values.js +50 -0
- package/dist/infrastructure/transport/grpc/index.d.ts +5 -0
- package/dist/infrastructure/transport/grpc/index.js +13 -0
- package/dist/infrastructure/transport/grpc/sdk-channel.d.ts +12 -0
- package/dist/infrastructure/transport/grpc/sdk-channel.js +23 -0
- package/dist/infrastructure/transport/grpc/sdk-client.d.ts +16 -0
- package/dist/infrastructure/transport/grpc/sdk-client.js +33 -0
- package/dist/infrastructure/transport/grpc/sdk-metadata.d.ts +12 -0
- package/dist/infrastructure/transport/grpc/sdk-metadata.js +22 -0
- package/dist/infrastructure/transport/grpc/sdk-middleware.d.ts +22 -0
- package/dist/infrastructure/transport/grpc/sdk-middleware.js +312 -0
- package/dist/infrastructure/transport/grpc/tls-root-certificates.d.ts +10 -0
- package/dist/infrastructure/transport/grpc/tls-root-certificates.js +20 -0
- package/dist/infrastructure/transport/grpc/unary-limit-resolver.d.ts +22 -0
- package/dist/infrastructure/transport/grpc/unary-limit-resolver.js +60 -0
- package/dist/infrastructure/transport/grpc/unary-limits.d.ts +1 -0
- package/dist/infrastructure/transport/grpc/unary-limits.js +7 -0
- package/docs/architecture.md +378 -0
- package/docs/bundled-ca.md +157 -0
- package/docs/clean-architecture/adapters.md +173 -0
- package/docs/clean-architecture/api-commands.md +487 -0
- package/docs/clean-architecture/application.md +137 -0
- package/docs/clean-architecture/cli-output-boundaries.md +256 -0
- package/docs/clean-architecture/dto.md +153 -0
- package/docs/clean-architecture/index.md +89 -0
- package/docs/cli-stream-configuration.md +305 -0
- package/docs/cli-stream-reference.md +195 -0
- package/docs/guides/custom-unary-limiter.md +552 -0
- package/docs/guides/errors-and-lifecycle.md +196 -0
- package/docs/guides/getting-started.md +100 -0
- package/docs/guides/index.md +43 -0
- package/docs/guides/streams-and-cancellation.md +177 -0
- package/docs/guides/testing-with-service-definitions.md +110 -0
- package/docs/guides/unary-calls.md +216 -0
- package/docs/index.md +86 -0
- package/docs/limits-policy.md +201 -0
- package/docs/roadmap.md +204 -0
- package/docs/tls-policy.md +62 -0
- package/package.json +62 -0
- package/readme.md +472 -0
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Модуль CLI domains задает публичную доменную структуру командной строки.
|
|
4
|
+
*
|
|
5
|
+
* Здесь допустимы:
|
|
6
|
+
* - описание публичных CLI domains;
|
|
7
|
+
* - описание preferred command paths и compatibility aliases;
|
|
8
|
+
* - helpers для domain-level help и registry aliases.
|
|
9
|
+
*
|
|
10
|
+
* Здесь не должно быть исполнения команд, SDK wiring или command-specific parsing.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.cliDomainNames = exports.cliDomains = void 0;
|
|
14
|
+
exports.isCliDomainName = isCliDomainName;
|
|
15
|
+
exports.commandPathToName = commandPathToName;
|
|
16
|
+
exports.commandNameToPath = commandNameToPath;
|
|
17
|
+
exports.canonicalizeCommandPath = canonicalizeCommandPath;
|
|
18
|
+
exports.canonicalizeCommandName = canonicalizeCommandName;
|
|
19
|
+
exports.commandPathAliases = commandPathAliases;
|
|
20
|
+
exports.commandDomainName = commandDomainName;
|
|
21
|
+
exports.commandActionName = commandActionName;
|
|
22
|
+
exports.cliDomains = {
|
|
23
|
+
account: {
|
|
24
|
+
description: 'Accounts, user info, tariff and limits'
|
|
25
|
+
},
|
|
26
|
+
instrument: {
|
|
27
|
+
description: 'Shares, bonds, ETFs, currencies, futures, options and dictionaries'
|
|
28
|
+
},
|
|
29
|
+
market: {
|
|
30
|
+
description: 'Historical and live market data'
|
|
31
|
+
},
|
|
32
|
+
order: {
|
|
33
|
+
description: 'Real account orders'
|
|
34
|
+
},
|
|
35
|
+
'stop-order': {
|
|
36
|
+
description: 'Real account stop orders'
|
|
37
|
+
},
|
|
38
|
+
operation: {
|
|
39
|
+
description: 'Operations and broker reports'
|
|
40
|
+
},
|
|
41
|
+
sandbox: {
|
|
42
|
+
description: 'Sandbox accounts, orders and portfolio'
|
|
43
|
+
},
|
|
44
|
+
stream: {
|
|
45
|
+
description: 'Streaming API runners'
|
|
46
|
+
},
|
|
47
|
+
dev: {
|
|
48
|
+
description: 'Developer tools'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const publicDomainByLegacyHead = {
|
|
52
|
+
users: 'account',
|
|
53
|
+
instruments: 'instrument',
|
|
54
|
+
marketdata: 'market',
|
|
55
|
+
orders: 'order',
|
|
56
|
+
stoporders: 'stop-order',
|
|
57
|
+
operations: 'operation'
|
|
58
|
+
};
|
|
59
|
+
const cliPathAliases = [
|
|
60
|
+
{
|
|
61
|
+
preferred: ['account', 'list'],
|
|
62
|
+
aliases: [
|
|
63
|
+
['account', 'get-accounts'],
|
|
64
|
+
['users', 'get-accounts']
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
preferred: ['account', 'info'],
|
|
69
|
+
aliases: [
|
|
70
|
+
['account', 'get-info'],
|
|
71
|
+
['users', 'get-info']
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
preferred: ['account', 'margin'],
|
|
76
|
+
aliases: [
|
|
77
|
+
['account', 'get-margin-attributes'],
|
|
78
|
+
['users', 'get-margin-attributes']
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
preferred: ['account', 'tariff'],
|
|
83
|
+
aliases: [
|
|
84
|
+
['account', 'get-user-tariff'],
|
|
85
|
+
['users', 'get-user-tariff']
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
preferred: ['instrument', 'search'],
|
|
90
|
+
aliases: [
|
|
91
|
+
['instrument', 'find-instrument'],
|
|
92
|
+
['instruments', 'find-instrument']
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
preferred: ['instrument', 'show'],
|
|
97
|
+
aliases: [
|
|
98
|
+
['instrument', 'get-instrument-by'],
|
|
99
|
+
['instruments', 'get-instrument-by']
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
preferred: ['instrument', 'dividends'],
|
|
104
|
+
aliases: [
|
|
105
|
+
['instrument', 'get-dividends'],
|
|
106
|
+
['instruments', 'get-dividends']
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
preferred: ['instrument', 'schedules'],
|
|
111
|
+
aliases: [
|
|
112
|
+
['instrument', 'trading-schedules'],
|
|
113
|
+
['instruments', 'trading-schedules']
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
preferred: ['instrument', 'favorite', 'list'],
|
|
118
|
+
aliases: [
|
|
119
|
+
['instrument', 'get-favorites'],
|
|
120
|
+
['instruments', 'get-favorites']
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
preferred: ['instrument', 'favorite', 'edit'],
|
|
125
|
+
aliases: [
|
|
126
|
+
['instrument', 'edit-favorites'],
|
|
127
|
+
['instruments', 'edit-favorites']
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
preferred: ['instrument', 'share', 'list'],
|
|
132
|
+
aliases: [
|
|
133
|
+
['instrument', 'shares'],
|
|
134
|
+
['instruments', 'shares']
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
preferred: ['instrument', 'share', 'show'],
|
|
139
|
+
aliases: [
|
|
140
|
+
['instrument', 'share-by'],
|
|
141
|
+
['instruments', 'share-by']
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
preferred: ['instrument', 'bond', 'list'],
|
|
146
|
+
aliases: [
|
|
147
|
+
['instrument', 'bonds'],
|
|
148
|
+
['instruments', 'bonds']
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
preferred: ['instrument', 'bond', 'show'],
|
|
153
|
+
aliases: [
|
|
154
|
+
['instrument', 'bond-by'],
|
|
155
|
+
['instruments', 'bond-by']
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
preferred: ['instrument', 'bond', 'coupons'],
|
|
160
|
+
aliases: [
|
|
161
|
+
['instrument', 'get-bond-coupons'],
|
|
162
|
+
['instruments', 'get-bond-coupons']
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
preferred: ['instrument', 'bond', 'accrued'],
|
|
167
|
+
aliases: [
|
|
168
|
+
['instrument', 'get-accrued-interests'],
|
|
169
|
+
['instruments', 'get-accrued-interests']
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
preferred: ['instrument', 'etf', 'list'],
|
|
174
|
+
aliases: [
|
|
175
|
+
['instrument', 'etfs'],
|
|
176
|
+
['instruments', 'etfs']
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
preferred: ['instrument', 'etf', 'show'],
|
|
181
|
+
aliases: [
|
|
182
|
+
['instrument', 'etf-by'],
|
|
183
|
+
['instruments', 'etf-by']
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
preferred: ['instrument', 'currency', 'list'],
|
|
188
|
+
aliases: [
|
|
189
|
+
['instrument', 'currencies'],
|
|
190
|
+
['instruments', 'currencies']
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
preferred: ['instrument', 'currency', 'show'],
|
|
195
|
+
aliases: [
|
|
196
|
+
['instrument', 'currency-by'],
|
|
197
|
+
['instruments', 'currency-by']
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
preferred: ['instrument', 'future', 'list'],
|
|
202
|
+
aliases: [
|
|
203
|
+
['instrument', 'futures'],
|
|
204
|
+
['instruments', 'futures']
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
preferred: ['instrument', 'future', 'show'],
|
|
209
|
+
aliases: [
|
|
210
|
+
['instrument', 'future-by'],
|
|
211
|
+
['instruments', 'future-by']
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
preferred: ['instrument', 'future', 'margin'],
|
|
216
|
+
aliases: [
|
|
217
|
+
['instrument', 'get-futures-margin'],
|
|
218
|
+
['instruments', 'get-futures-margin']
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
preferred: ['instrument', 'option', 'list'],
|
|
223
|
+
aliases: [
|
|
224
|
+
['instrument', 'options-by'],
|
|
225
|
+
['instruments', 'options-by']
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
preferred: ['instrument', 'option', 'show'],
|
|
230
|
+
aliases: [
|
|
231
|
+
['instrument', 'option-by'],
|
|
232
|
+
['instruments', 'option-by']
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
preferred: ['instrument', 'asset', 'list'],
|
|
237
|
+
aliases: [
|
|
238
|
+
['instrument', 'get-assets'],
|
|
239
|
+
['instruments', 'get-assets']
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
preferred: ['instrument', 'asset', 'show'],
|
|
244
|
+
aliases: [
|
|
245
|
+
['instrument', 'get-asset-by'],
|
|
246
|
+
['instruments', 'get-asset-by']
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
preferred: ['instrument', 'brand', 'list'],
|
|
251
|
+
aliases: [
|
|
252
|
+
['instrument', 'get-brands'],
|
|
253
|
+
['instruments', 'get-brands']
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
preferred: ['instrument', 'brand', 'show'],
|
|
258
|
+
aliases: [
|
|
259
|
+
['instrument', 'get-brand-by'],
|
|
260
|
+
['instruments', 'get-brand-by']
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
preferred: ['instrument', 'country', 'list'],
|
|
265
|
+
aliases: [
|
|
266
|
+
['instrument', 'get-countries'],
|
|
267
|
+
['instruments', 'get-countries']
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
preferred: ['market', 'candles'],
|
|
272
|
+
aliases: [
|
|
273
|
+
['market', 'get-candles'],
|
|
274
|
+
['marketdata', 'get-candles']
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
preferred: ['market', 'close-prices'],
|
|
279
|
+
aliases: [
|
|
280
|
+
['market', 'get-close-prices'],
|
|
281
|
+
['marketdata', 'get-close-prices']
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
preferred: ['market', 'last-prices'],
|
|
286
|
+
aliases: [
|
|
287
|
+
['market', 'get-last-prices'],
|
|
288
|
+
['marketdata', 'get-last-prices']
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
preferred: ['market', 'trades'],
|
|
293
|
+
aliases: [
|
|
294
|
+
['market', 'get-last-trades'],
|
|
295
|
+
['marketdata', 'get-last-trades']
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
preferred: ['market', 'order-book'],
|
|
300
|
+
aliases: [
|
|
301
|
+
['market', 'get-order-book'],
|
|
302
|
+
['marketdata', 'get-order-book']
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
preferred: ['market', 'status'],
|
|
307
|
+
aliases: [
|
|
308
|
+
['market', 'get-trading-status'],
|
|
309
|
+
['marketdata', 'get-trading-status']
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
preferred: ['market', 'statuses'],
|
|
314
|
+
aliases: [
|
|
315
|
+
['market', 'get-trading-statuses'],
|
|
316
|
+
['marketdata', 'get-trading-statuses']
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
preferred: ['order', 'list'],
|
|
321
|
+
aliases: [
|
|
322
|
+
['order', 'get-orders'],
|
|
323
|
+
['orders', 'get-orders']
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
preferred: ['order', 'show'],
|
|
328
|
+
aliases: [
|
|
329
|
+
['order', 'get-order-state'],
|
|
330
|
+
['orders', 'get-order-state']
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
preferred: ['order', 'place'],
|
|
335
|
+
aliases: [
|
|
336
|
+
['order', 'post-order'],
|
|
337
|
+
['orders', 'post-order']
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
preferred: ['order', 'cancel'],
|
|
342
|
+
aliases: [
|
|
343
|
+
['order', 'cancel-order'],
|
|
344
|
+
['orders', 'cancel-order']
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
preferred: ['order', 'replace'],
|
|
349
|
+
aliases: [
|
|
350
|
+
['order', 'replace-order'],
|
|
351
|
+
['orders', 'replace-order']
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
preferred: ['stop-order', 'list'],
|
|
356
|
+
aliases: [
|
|
357
|
+
['stop-order', 'get-stop-orders'],
|
|
358
|
+
['stoporders', 'get-stop-orders']
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
preferred: ['stop-order', 'place'],
|
|
363
|
+
aliases: [
|
|
364
|
+
['stop-order', 'post-stop-order'],
|
|
365
|
+
['stoporders', 'post-stop-order']
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
preferred: ['stop-order', 'cancel'],
|
|
370
|
+
aliases: [
|
|
371
|
+
['stop-order', 'cancel-stop-order'],
|
|
372
|
+
['stoporders', 'cancel-stop-order']
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
preferred: ['operation', 'list'],
|
|
377
|
+
aliases: [
|
|
378
|
+
['operation', 'get-operations'],
|
|
379
|
+
['operations', 'get-operations']
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
preferred: ['operation', 'page'],
|
|
384
|
+
aliases: [
|
|
385
|
+
['operation', 'get-operations-by-cursor'],
|
|
386
|
+
['operations', 'get-operations-by-cursor']
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
preferred: ['operation', 'broker-report'],
|
|
391
|
+
aliases: [
|
|
392
|
+
['operation', 'get-broker-report'],
|
|
393
|
+
['operations', 'get-broker-report']
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
preferred: ['operation', 'foreign-dividends-report'],
|
|
398
|
+
aliases: [
|
|
399
|
+
['operation', 'get-dividends-foreign-issuer'],
|
|
400
|
+
['operations', 'get-dividends-foreign-issuer']
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
preferred: ['operation', 'portfolio'],
|
|
405
|
+
aliases: [
|
|
406
|
+
['operation', 'get-portfolio'],
|
|
407
|
+
['operations', 'get-portfolio']
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
preferred: ['operation', 'positions'],
|
|
412
|
+
aliases: [
|
|
413
|
+
['operation', 'get-positions'],
|
|
414
|
+
['operations', 'get-positions']
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
preferred: ['operation', 'withdraw-limits'],
|
|
419
|
+
aliases: [
|
|
420
|
+
['operation', 'get-withdraw-limits'],
|
|
421
|
+
['operations', 'get-withdraw-limits']
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
preferred: ['sandbox', 'account', 'list'],
|
|
426
|
+
aliases: [
|
|
427
|
+
['sandbox', 'get-sandbox-accounts']
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
preferred: ['sandbox', 'account', 'open'],
|
|
432
|
+
aliases: [
|
|
433
|
+
['sandbox', 'open-sandbox-account']
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
preferred: ['sandbox', 'account', 'close'],
|
|
438
|
+
aliases: [
|
|
439
|
+
['sandbox', 'close-sandbox-account']
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
preferred: ['sandbox', 'order', 'list'],
|
|
444
|
+
aliases: [
|
|
445
|
+
['sandbox', 'get-sandbox-orders']
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
preferred: ['sandbox', 'order', 'show'],
|
|
450
|
+
aliases: [
|
|
451
|
+
['sandbox', 'get-sandbox-order-state']
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
preferred: ['sandbox', 'order', 'place'],
|
|
456
|
+
aliases: [
|
|
457
|
+
['sandbox', 'post-sandbox-order']
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
preferred: ['sandbox', 'order', 'replace'],
|
|
462
|
+
aliases: [
|
|
463
|
+
['sandbox', 'replace-sandbox-order']
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
preferred: ['sandbox', 'order', 'cancel'],
|
|
468
|
+
aliases: [
|
|
469
|
+
['sandbox', 'cancel-sandbox-order']
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
preferred: ['sandbox', 'position', 'list'],
|
|
474
|
+
aliases: [
|
|
475
|
+
['sandbox', 'get-sandbox-positions']
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
preferred: ['sandbox', 'operation', 'list'],
|
|
480
|
+
aliases: [
|
|
481
|
+
['sandbox', 'get-sandbox-operations']
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
preferred: ['sandbox', 'operation', 'page'],
|
|
486
|
+
aliases: [
|
|
487
|
+
['sandbox', 'get-sandbox-operations-by-cursor']
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
preferred: ['sandbox', 'portfolio'],
|
|
492
|
+
aliases: [
|
|
493
|
+
['sandbox', 'get-sandbox-portfolio']
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
preferred: ['sandbox', 'withdraw-limits'],
|
|
498
|
+
aliases: [
|
|
499
|
+
['sandbox', 'get-sandbox-withdraw-limits']
|
|
500
|
+
]
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
preferred: ['sandbox', 'pay-in'],
|
|
504
|
+
aliases: [
|
|
505
|
+
['sandbox', 'sandbox-pay-in']
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
preferred: ['dev', 'compile-proto'],
|
|
510
|
+
aliases: [
|
|
511
|
+
['compile-proto']
|
|
512
|
+
]
|
|
513
|
+
}
|
|
514
|
+
];
|
|
515
|
+
const preferredPathByAliasName = createPreferredPathByAliasName(cliPathAliases);
|
|
516
|
+
const aliasPathsByPreferredName = createAliasPathsByPreferredName(cliPathAliases);
|
|
517
|
+
const explicitAliasDomains = createExplicitAliasDomains(cliPathAliases);
|
|
518
|
+
exports.cliDomainNames = Object.keys(exports.cliDomains);
|
|
519
|
+
function isCliDomainName(value) {
|
|
520
|
+
return typeof value === 'string' && Object.hasOwn(exports.cliDomains, value);
|
|
521
|
+
}
|
|
522
|
+
function commandPathToName(path) {
|
|
523
|
+
return path.join(' ');
|
|
524
|
+
}
|
|
525
|
+
function commandNameToPath(name) {
|
|
526
|
+
const path = name.split(' ');
|
|
527
|
+
if (path[0] === undefined || path[0] === '') {
|
|
528
|
+
throw new Error('Expected command name');
|
|
529
|
+
}
|
|
530
|
+
return path;
|
|
531
|
+
}
|
|
532
|
+
function canonicalizeCommandPath(path) {
|
|
533
|
+
const preferredPath = preferredPathByAliasName.get(commandPathToName(path));
|
|
534
|
+
if (preferredPath !== undefined) {
|
|
535
|
+
return preferredPath;
|
|
536
|
+
}
|
|
537
|
+
const publicPath = publicDomainPath(path);
|
|
538
|
+
if (commandPathToName(publicPath) === commandPathToName(path)) {
|
|
539
|
+
return publicPath;
|
|
540
|
+
}
|
|
541
|
+
const [domain] = publicPath;
|
|
542
|
+
return isCliDomainName(domain) && explicitAliasDomains.has(domain) ? path : publicPath;
|
|
543
|
+
}
|
|
544
|
+
function canonicalizeCommandName(name) {
|
|
545
|
+
return commandPathToName(canonicalizeCommandPath(commandNameToPath(name)));
|
|
546
|
+
}
|
|
547
|
+
function commandPathAliases(path) {
|
|
548
|
+
const canonicalPath = canonicalizeCommandPath(path);
|
|
549
|
+
const aliasPaths = aliasPathsByPreferredName.get(commandPathToName(canonicalPath));
|
|
550
|
+
if (aliasPaths !== undefined) {
|
|
551
|
+
return uniqueCommandPaths([canonicalPath, ...aliasPaths]);
|
|
552
|
+
}
|
|
553
|
+
return uniqueCommandPaths([canonicalPath, legacyCommandPath(canonicalPath)]);
|
|
554
|
+
}
|
|
555
|
+
function commandDomainName(commandName) {
|
|
556
|
+
const [domain] = commandName.split(' ');
|
|
557
|
+
return isCliDomainName(domain) ? domain : undefined;
|
|
558
|
+
}
|
|
559
|
+
function commandActionName(commandName) {
|
|
560
|
+
return commandName.split(' ').slice(1).join(' ');
|
|
561
|
+
}
|
|
562
|
+
function isLegacyPathHead(value) {
|
|
563
|
+
return Object.hasOwn(publicDomainByLegacyHead, value);
|
|
564
|
+
}
|
|
565
|
+
function createPreferredPathByAliasName(pathAliases) {
|
|
566
|
+
const result = new Map();
|
|
567
|
+
for (const { preferred, aliases } of pathAliases) {
|
|
568
|
+
result.set(commandPathToName(preferred), preferred);
|
|
569
|
+
for (const alias of aliases) {
|
|
570
|
+
result.set(commandPathToName(alias), preferred);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
return result;
|
|
574
|
+
}
|
|
575
|
+
function createAliasPathsByPreferredName(pathAliases) {
|
|
576
|
+
const result = new Map();
|
|
577
|
+
for (const { preferred, aliases } of pathAliases) {
|
|
578
|
+
result.set(commandPathToName(preferred), aliases);
|
|
579
|
+
}
|
|
580
|
+
return result;
|
|
581
|
+
}
|
|
582
|
+
function createExplicitAliasDomains(pathAliases) {
|
|
583
|
+
const result = new Set();
|
|
584
|
+
for (const { preferred } of pathAliases) {
|
|
585
|
+
const [domain] = preferred;
|
|
586
|
+
if (isCliDomainName(domain)) {
|
|
587
|
+
result.add(domain);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return result;
|
|
591
|
+
}
|
|
592
|
+
function publicDomainPath(path) {
|
|
593
|
+
const [head, ...tail] = path;
|
|
594
|
+
const domain = isLegacyPathHead(head) ? publicDomainByLegacyHead[head] : undefined;
|
|
595
|
+
if (domain === undefined) {
|
|
596
|
+
return path;
|
|
597
|
+
}
|
|
598
|
+
return [domain, ...tail];
|
|
599
|
+
}
|
|
600
|
+
function legacyCommandPath(path) {
|
|
601
|
+
const [head, ...tail] = path;
|
|
602
|
+
if (!isCliDomainName(head)) {
|
|
603
|
+
return undefined;
|
|
604
|
+
}
|
|
605
|
+
const legacyHead = legacyHeadForDomain(head);
|
|
606
|
+
return legacyHead === undefined ? undefined : [legacyHead, ...tail];
|
|
607
|
+
}
|
|
608
|
+
function legacyHeadForDomain(domain) {
|
|
609
|
+
for (const [legacyHead, publicDomain] of Object.entries(publicDomainByLegacyHead)) {
|
|
610
|
+
if (publicDomain === domain) {
|
|
611
|
+
return legacyHead;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return undefined;
|
|
615
|
+
}
|
|
616
|
+
function uniqueCommandPaths(paths) {
|
|
617
|
+
const names = new Set();
|
|
618
|
+
const result = [];
|
|
619
|
+
for (const path of paths) {
|
|
620
|
+
if (path === undefined) {
|
|
621
|
+
continue;
|
|
622
|
+
}
|
|
623
|
+
const name = commandPathToName(path);
|
|
624
|
+
if (names.has(name)) {
|
|
625
|
+
continue;
|
|
626
|
+
}
|
|
627
|
+
names.add(name);
|
|
628
|
+
result.push(path);
|
|
629
|
+
}
|
|
630
|
+
return result;
|
|
631
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Модуль CLI error policy нормализует terminal errors и process-style exit code.
|
|
3
|
+
*
|
|
4
|
+
* Здесь допустимы:
|
|
5
|
+
* - narrowing `IcoreError` по стабильному code/details contract;
|
|
6
|
+
* - преобразование Error и неизвестных thrown values в строку;
|
|
7
|
+
* - сохранение стабильного newline-контракта CLI errors;
|
|
8
|
+
* - выбор exit code без записи в stdout/stderr.
|
|
9
|
+
*
|
|
10
|
+
* Здесь не должно быть command execution, stdout/stderr writes или SDK wiring.
|
|
11
|
+
*/
|
|
12
|
+
import { type TerminalErrorPolicy } from 'icore';
|
|
13
|
+
export declare function renderCommandError(error: unknown): string;
|
|
14
|
+
export declare function resolveCommandExitCode(error: unknown): number;
|
|
15
|
+
export declare const terminalErrorPolicy: TerminalErrorPolicy<unknown>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Модуль CLI error policy нормализует terminal errors и process-style exit code.
|
|
4
|
+
*
|
|
5
|
+
* Здесь допустимы:
|
|
6
|
+
* - narrowing `IcoreError` по стабильному code/details contract;
|
|
7
|
+
* - преобразование Error и неизвестных thrown values в строку;
|
|
8
|
+
* - сохранение стабильного newline-контракта CLI errors;
|
|
9
|
+
* - выбор exit code без записи в stdout/stderr.
|
|
10
|
+
*
|
|
11
|
+
* Здесь не должно быть command execution, stdout/stderr writes или SDK wiring.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.terminalErrorPolicy = void 0;
|
|
15
|
+
exports.renderCommandError = renderCommandError;
|
|
16
|
+
exports.resolveCommandExitCode = resolveCommandExitCode;
|
|
17
|
+
const icore_1 = require("icore");
|
|
18
|
+
const help_1 = require("./help");
|
|
19
|
+
function renderCommandError(error) {
|
|
20
|
+
if ((0, icore_1.isIcoreError)(error, 'UNKNOWN_COMMAND')) {
|
|
21
|
+
const command = error.details.reason === 'unresolved'
|
|
22
|
+
? error.details.command
|
|
23
|
+
: formatCommandPositionals(error.details.positionals);
|
|
24
|
+
return `Unknown command: ${command}\n\n${(0, help_1.renderCliHelp)()}`;
|
|
25
|
+
}
|
|
26
|
+
if (error instanceof Error) {
|
|
27
|
+
return `${error.message}\n`;
|
|
28
|
+
}
|
|
29
|
+
return `${String(error)}\n`;
|
|
30
|
+
}
|
|
31
|
+
function resolveCommandExitCode(error) {
|
|
32
|
+
return (0, icore_1.isUsageError)(error) ? 2 : 1;
|
|
33
|
+
}
|
|
34
|
+
exports.terminalErrorPolicy = {
|
|
35
|
+
renderError: renderCommandError,
|
|
36
|
+
resolveExitCode: resolveCommandExitCode
|
|
37
|
+
};
|
|
38
|
+
function formatCommandPositionals(positionals) {
|
|
39
|
+
return positionals.length === 0 ? '<empty>' : positionals.join(' ');
|
|
40
|
+
}
|