@woodger/t-invest-node-sdk 0.5.7 → 0.5.8
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 +13 -4
- package/NOTICE +2 -2
- package/dist/application/dto/t-invest-options.d.ts +8 -6
- package/dist/application/dto/t-invest-options.js +4 -4
- package/dist/application/dto/t-invest-services.d.ts +24 -0
- package/dist/application/errors/sdk-error.d.ts +12 -7
- package/dist/application/errors/sdk-error.js +16 -23
- package/dist/application/reports/asset.report.d.ts +5 -0
- package/dist/application/reports/broker-report.report.d.ts +8 -0
- package/dist/application/reports/dividends-foreign-issuer.report.d.ts +8 -0
- package/dist/application/reports/sandbox-account.report.d.ts +6 -0
- package/dist/application/services/unary-limiter.d.ts +14 -13
- package/dist/application/services/unary-limiter.js +20 -12
- package/dist/bootstrap/args/command-options.d.ts +5 -0
- package/dist/bootstrap/args/command-options.js +24 -15
- package/dist/bootstrap/args/instrument-id-options.d.ts +8 -4
- package/dist/bootstrap/args/instruments-args.d.ts +2 -2
- package/dist/bootstrap/args/sdk-options.d.ts +7 -4
- package/dist/bootstrap/args/sdk-options.js +3 -4
- package/dist/bootstrap/args/side-effect-args.js +4 -2
- package/dist/bootstrap/cli/domains.d.ts +11 -9
- package/dist/bootstrap/cli/error.d.ts +5 -0
- package/dist/bootstrap/cli/error.js +9 -2
- package/dist/bootstrap/cli/help-catalog.d.ts +3 -1
- package/dist/bootstrap/cli/help.d.ts +3 -3
- package/dist/bootstrap/cli/registry.d.ts +286 -286
- package/dist/bootstrap/cli/runner.js +1 -1
- package/dist/bootstrap/commands/accounts/cli.d.ts +4 -4
- package/dist/bootstrap/commands/accounts/cli.js +15 -21
- package/dist/bootstrap/commands/accounts/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/accrued-interests/cli.d.ts +14 -14
- package/dist/bootstrap/commands/accrued-interests/cli.js +12 -20
- package/dist/bootstrap/commands/accrued-interests/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/asset/cli.d.ts +11 -11
- package/dist/bootstrap/commands/asset/cli.js +12 -20
- package/dist/bootstrap/commands/asset/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/assets/cli.d.ts +14 -14
- package/dist/bootstrap/commands/assets/cli.js +12 -20
- package/dist/bootstrap/commands/assets/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/bond/cli.d.ts +4 -4
- package/dist/bootstrap/commands/bond/cli.js +17 -23
- package/dist/bootstrap/commands/bond/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/bond-coupons/cli.d.ts +14 -14
- package/dist/bootstrap/commands/bond-coupons/cli.js +12 -20
- package/dist/bootstrap/commands/bond-coupons/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/bonds/cli.d.ts +4 -4
- package/dist/bootstrap/commands/bonds/cli.js +17 -23
- package/dist/bootstrap/commands/bonds/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/brand/cli.d.ts +11 -11
- package/dist/bootstrap/commands/brand/cli.js +12 -20
- package/dist/bootstrap/commands/brand/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/brands/cli.d.ts +4 -4
- package/dist/bootstrap/commands/brands/cli.js +15 -21
- package/dist/bootstrap/commands/brands/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/broker-report/cli.d.ts +23 -23
- package/dist/bootstrap/commands/broker-report/cli.js +12 -20
- package/dist/bootstrap/commands/broker-report/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/cancel-order/cli.d.ts +8 -8
- package/dist/bootstrap/commands/cancel-order/cli.js +26 -34
- package/dist/bootstrap/commands/cancel-order/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/cancel-stop-order/cli.d.ts +14 -14
- package/dist/bootstrap/commands/cancel-stop-order/cli.js +14 -21
- package/dist/bootstrap/commands/cancel-stop-order/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/candles/cli.d.ts +20 -20
- package/dist/bootstrap/commands/candles/cli.js +12 -20
- package/dist/bootstrap/commands/candles/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/close-prices/cli.d.ts +11 -11
- package/dist/bootstrap/commands/close-prices/cli.js +12 -20
- package/dist/bootstrap/commands/close-prices/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/countries/cli.d.ts +4 -4
- package/dist/bootstrap/commands/countries/cli.js +15 -21
- package/dist/bootstrap/commands/countries/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/currencies/cli.d.ts +4 -4
- package/dist/bootstrap/commands/currencies/cli.js +17 -23
- package/dist/bootstrap/commands/currencies/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/currency/cli.d.ts +4 -4
- package/dist/bootstrap/commands/currency/cli.js +17 -23
- package/dist/bootstrap/commands/currency/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/dividends/cli.d.ts +14 -14
- package/dist/bootstrap/commands/dividends/cli.js +12 -20
- package/dist/bootstrap/commands/dividends/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/dividends-foreign-issuer/cli.d.ts +23 -23
- package/dist/bootstrap/commands/dividends-foreign-issuer/cli.js +12 -23
- package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/edit-favorites/cli.d.ts +11 -11
- package/dist/bootstrap/commands/edit-favorites/cli.js +14 -21
- package/dist/bootstrap/commands/edit-favorites/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/etf/cli.d.ts +4 -4
- package/dist/bootstrap/commands/etf/cli.js +17 -23
- package/dist/bootstrap/commands/etf/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/etfs/cli.d.ts +4 -4
- package/dist/bootstrap/commands/etfs/cli.js +17 -23
- package/dist/bootstrap/commands/etfs/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/favorites/cli.d.ts +4 -4
- package/dist/bootstrap/commands/favorites/cli.js +15 -21
- package/dist/bootstrap/commands/favorites/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/find-instrument/cli.d.ts +20 -20
- package/dist/bootstrap/commands/find-instrument/cli.js +12 -20
- package/dist/bootstrap/commands/find-instrument/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/future/cli.d.ts +4 -4
- package/dist/bootstrap/commands/future/cli.js +17 -23
- package/dist/bootstrap/commands/future/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/futures/cli.d.ts +4 -4
- package/dist/bootstrap/commands/futures/cli.js +17 -23
- package/dist/bootstrap/commands/futures/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/futures-margin/cli.d.ts +8 -8
- package/dist/bootstrap/commands/futures-margin/cli.js +12 -20
- package/dist/bootstrap/commands/futures-margin/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/help/cli.js +1 -4
- package/dist/bootstrap/commands/instrument/cli.d.ts +4 -4
- package/dist/bootstrap/commands/instrument/cli.js +17 -23
- package/dist/bootstrap/commands/instrument/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/last-prices/cli.d.ts +11 -11
- package/dist/bootstrap/commands/last-prices/cli.js +12 -20
- package/dist/bootstrap/commands/last-prices/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/last-trades/cli.d.ts +17 -17
- package/dist/bootstrap/commands/last-trades/cli.js +12 -20
- package/dist/bootstrap/commands/last-trades/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/margin-attributes/cli.d.ts +11 -11
- package/dist/bootstrap/commands/margin-attributes/cli.js +12 -20
- package/dist/bootstrap/commands/margin-attributes/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/operations/cli.d.ts +20 -20
- package/dist/bootstrap/commands/operations/cli.js +34 -45
- package/dist/bootstrap/commands/operations/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/operations/request.mapper.d.ts +6 -6
- package/dist/bootstrap/commands/operations-by-cursor/cli.d.ts +42 -42
- package/dist/bootstrap/commands/operations-by-cursor/cli.js +55 -73
- package/dist/bootstrap/commands/operations-by-cursor/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/operations-by-cursor/request.mapper.d.ts +6 -6
- package/dist/bootstrap/commands/operations-by-cursor/request.mapper.js +8 -3
- package/dist/bootstrap/commands/option/cli.d.ts +4 -4
- package/dist/bootstrap/commands/option/cli.js +17 -23
- package/dist/bootstrap/commands/option/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/options-by/cli.d.ts +14 -14
- package/dist/bootstrap/commands/options-by/cli.js +12 -20
- package/dist/bootstrap/commands/options-by/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/order-book/cli.d.ts +20 -20
- package/dist/bootstrap/commands/order-book/cli.js +16 -27
- package/dist/bootstrap/commands/order-book/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/order-state/cli.d.ts +8 -8
- package/dist/bootstrap/commands/order-state/cli.js +24 -33
- package/dist/bootstrap/commands/order-state/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/orders/cli.d.ts +6 -6
- package/dist/bootstrap/commands/orders/cli.js +20 -29
- package/dist/bootstrap/commands/orders/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/portfolio/cli.d.ts +10 -10
- package/dist/bootstrap/commands/portfolio/cli.js +25 -34
- package/dist/bootstrap/commands/portfolio/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/portfolio/request.mapper.d.ts +4 -4
- package/dist/bootstrap/commands/positions/cli.d.ts +6 -6
- package/dist/bootstrap/commands/positions/cli.js +20 -29
- package/dist/bootstrap/commands/positions/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/post-order/cli.d.ts +16 -16
- package/dist/bootstrap/commands/post-order/cli.js +47 -55
- package/dist/bootstrap/commands/post-order/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/post-order/request.mapper.d.ts +9 -9
- package/dist/bootstrap/commands/post-stop-order/cli.d.ts +32 -32
- package/dist/bootstrap/commands/post-stop-order/cli.js +14 -21
- package/dist/bootstrap/commands/post-stop-order/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/replace-order/cli.d.ts +14 -14
- package/dist/bootstrap/commands/replace-order/cli.js +43 -51
- package/dist/bootstrap/commands/replace-order/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/replace-order/request.mapper.d.ts +4 -4
- package/dist/bootstrap/commands/sandbox-accounts/cli.d.ts +4 -5
- package/dist/bootstrap/commands/sandbox-accounts/cli.js +15 -25
- package/dist/bootstrap/commands/sandbox-cancel-order/cli.d.ts +8 -43
- package/dist/bootstrap/commands/sandbox-cancel-order/cli.js +26 -38
- package/dist/bootstrap/commands/sandbox-close-account/cli.d.ts +11 -11
- package/dist/bootstrap/commands/sandbox-close-account/cli.js +14 -21
- package/dist/bootstrap/commands/sandbox-close-account/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/sandbox-open-account/cli.d.ts +4 -5
- package/dist/bootstrap/commands/sandbox-open-account/cli.js +17 -27
- package/dist/bootstrap/commands/sandbox-open-account/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/sandbox-operations/cli.d.ts +16 -63
- package/dist/bootstrap/commands/sandbox-operations/cli.js +34 -47
- package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.d.ts +30 -93
- package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.js +55 -72
- package/dist/bootstrap/commands/sandbox-order-state/cli.d.ts +8 -40
- package/dist/bootstrap/commands/sandbox-order-state/cli.js +24 -37
- package/dist/bootstrap/commands/sandbox-orders/cli.d.ts +6 -34
- package/dist/bootstrap/commands/sandbox-orders/cli.js +20 -33
- package/dist/bootstrap/commands/sandbox-pay-in/cli.d.ts +20 -20
- package/dist/bootstrap/commands/sandbox-pay-in/cli.js +14 -21
- package/dist/bootstrap/commands/sandbox-pay-in/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/sandbox-portfolio/cli.d.ts +12 -45
- package/dist/bootstrap/commands/sandbox-portfolio/cli.js +25 -38
- package/dist/bootstrap/commands/sandbox-positions/cli.d.ts +6 -34
- package/dist/bootstrap/commands/sandbox-positions/cli.js +20 -33
- package/dist/bootstrap/commands/sandbox-post-order/cli.d.ts +20 -79
- package/dist/bootstrap/commands/sandbox-post-order/cli.js +47 -59
- package/dist/bootstrap/commands/sandbox-replace-order/cli.d.ts +16 -71
- package/dist/bootstrap/commands/sandbox-replace-order/cli.js +43 -55
- package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.d.ts +6 -34
- package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.js +20 -36
- package/dist/bootstrap/commands/share/cli.d.ts +4 -4
- package/dist/bootstrap/commands/share/cli.js +17 -23
- package/dist/bootstrap/commands/share/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/shares/cli.d.ts +4 -4
- package/dist/bootstrap/commands/shares/cli.js +17 -23
- package/dist/bootstrap/commands/shares/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/stop-orders/cli.d.ts +11 -11
- package/dist/bootstrap/commands/stop-orders/cli.js +12 -20
- package/dist/bootstrap/commands/stop-orders/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/stream-run/cli.d.ts +4 -3
- package/dist/bootstrap/commands/stream-run/cli.js +4 -3
- package/dist/bootstrap/commands/stream-run/config.d.ts +18 -1
- package/dist/bootstrap/commands/stream-run/config.js +3 -2
- package/dist/bootstrap/commands/stream-run/reporter.d.ts +6 -1
- package/dist/bootstrap/commands/stream-run/stream-session.d.ts +14 -0
- package/dist/bootstrap/commands/stream-run/stream-session.js +1 -0
- package/dist/bootstrap/commands/trading-schedules/cli.d.ts +17 -17
- package/dist/bootstrap/commands/trading-schedules/cli.js +12 -20
- package/dist/bootstrap/commands/trading-schedules/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/trading-status/cli.d.ts +11 -11
- package/dist/bootstrap/commands/trading-status/cli.js +12 -20
- package/dist/bootstrap/commands/trading-status/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/trading-statuses/cli.d.ts +11 -11
- package/dist/bootstrap/commands/trading-statuses/cli.js +12 -20
- package/dist/bootstrap/commands/trading-statuses/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/user-info/cli.d.ts +4 -4
- package/dist/bootstrap/commands/user-info/cli.js +15 -21
- package/dist/bootstrap/commands/user-info/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/user-tariff/cli.d.ts +4 -4
- package/dist/bootstrap/commands/user-tariff/cli.js +15 -21
- package/dist/bootstrap/commands/user-tariff/reporter.d.ts +2 -1
- package/dist/bootstrap/commands/withdraw-limits/cli.d.ts +10 -6
- package/dist/bootstrap/commands/withdraw-limits/cli.js +27 -29
- package/dist/bootstrap/commands/withdraw-limits/reporter.d.ts +2 -1
- package/dist/bootstrap/generated-exports.d.ts +1 -1
- package/dist/bootstrap/generated-exports.js +14 -11
- package/dist/bootstrap/index.js +5 -2
- package/dist/bootstrap/proto/compile-proto.js +2 -0
- package/dist/bootstrap/sdk-config.d.ts +9 -7
- package/dist/bootstrap/sdk-config.js +8 -7
- package/dist/bootstrap/t-invest-node-sdk.d.ts +5 -5
- package/dist/bootstrap/t-invest-node-sdk.js +8 -7
- package/dist/bootstrap/unary-limit-config.d.ts +13 -14
- package/dist/bootstrap/unary-limit-config.js +12 -13
- package/dist/config.d.ts +9 -10
- package/dist/config.js +9 -10
- package/dist/config.types.d.ts +18 -19
- package/dist/config.types.js +6 -6
- package/dist/generated/common.d.ts +1 -0
- package/dist/generated/common.js +3 -2
- package/dist/generated/google/api/field_behavior.d.ts +1 -0
- package/dist/generated/google/api/field_behavior.js +3 -2
- package/dist/generated/google/protobuf/descriptor.d.ts +1 -0
- package/dist/generated/google/protobuf/descriptor.js +26 -16
- package/dist/generated/google/protobuf/timestamp.d.ts +1 -0
- package/dist/generated/google/protobuf/timestamp.js +20 -2
- package/dist/generated/instruments.d.ts +1 -0
- package/dist/generated/instruments.js +59 -55
- package/dist/generated/marketdata.d.ts +1 -0
- package/dist/generated/marketdata.js +10 -7
- package/dist/generated/operations.d.ts +1 -0
- package/dist/generated/operations.js +10 -7
- package/dist/generated/orders.d.ts +5 -2
- package/dist/generated/orders.js +29 -7
- package/dist/generated/sandbox.d.ts +1 -0
- package/dist/generated/sandbox.js +3 -2
- package/dist/generated/signals.d.ts +1 -0
- package/dist/generated/signals.js +3 -2
- package/dist/generated/stoporders.d.ts +1 -0
- package/dist/generated/stoporders.js +3 -2
- package/dist/generated/users.d.ts +1 -0
- package/dist/generated/users.js +9 -6
- package/dist/infrastructure/interceptor/warning-interceptor.d.ts +1 -0
- package/dist/infrastructure/report-values.js +5 -1
- package/dist/infrastructure/transport/grpc/call-callback-boundary.d.ts +23 -0
- package/dist/infrastructure/transport/grpc/call-callback-boundary.js +56 -0
- package/dist/infrastructure/transport/grpc/sdk-channel.d.ts +5 -5
- package/dist/infrastructure/transport/grpc/sdk-channel.js +5 -5
- package/dist/infrastructure/transport/grpc/sdk-client.d.ts +4 -3
- package/dist/infrastructure/transport/grpc/sdk-client.js +4 -3
- package/dist/infrastructure/transport/grpc/sdk-middleware.d.ts +20 -12
- package/dist/infrastructure/transport/grpc/sdk-middleware.js +96 -110
- package/dist/infrastructure/transport/grpc/unary-limit-resolver.d.ts +3 -3
- package/dist/infrastructure/transport/grpc/unary-limit-resolver.js +3 -3
- package/docs/architecture.md +30 -39
- package/docs/bundled-ca.md +11 -12
- package/docs/clean-architecture/adapters.md +14 -14
- package/docs/clean-architecture/api-commands.md +14 -17
- package/docs/clean-architecture/application.md +20 -18
- package/docs/clean-architecture/cli-output-boundaries.md +24 -18
- package/docs/clean-architecture/dto.md +18 -18
- package/docs/clean-architecture/index.md +7 -10
- package/docs/cli-reference.md +15 -15
- package/docs/cli-stream-configuration.md +31 -15
- package/docs/cli-stream-reference.md +16 -16
- package/docs/examples/custom-unary-limiter.md +40 -28
- package/docs/examples/deprecated-fields.md +5 -5
- package/docs/examples/errors-and-lifecycle.md +24 -12
- package/docs/examples/getting-started.md +6 -6
- package/docs/examples/index.md +29 -20
- package/docs/examples/instrument-lookup.md +38 -0
- package/docs/examples/market-data-recovery.md +159 -105
- package/docs/examples/operations-pagination.md +47 -0
- package/docs/examples/order-state-stream.md +39 -0
- package/docs/examples/sandbox-orders.md +85 -0
- package/docs/examples/streams-and-cancellation.md +93 -6
- package/docs/examples/testing-with-service-definitions.md +7 -5
- package/docs/examples/unary-calls.md +27 -15
- package/docs/examples/unary-limits.md +11 -5
- package/docs/index.md +16 -20
- package/docs/limits-policy.md +16 -13
- package/docs/tls-policy.md +10 -8
- package/package.json +5 -5
- package/readme.md +19 -142
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Модуль
|
|
3
|
+
* Модуль реализует публичный класс `TInvestNodeSDK`.
|
|
4
4
|
*
|
|
5
5
|
* Здесь допустимы:
|
|
6
|
-
* -
|
|
7
|
-
* - владение
|
|
8
|
-
* - подключение
|
|
6
|
+
* - ленивое создание сгенерированных клиентов сервисов;
|
|
7
|
+
* - владение общими каналом gRPC и метаданными;
|
|
8
|
+
* - подключение ограничителя unary-запросов, переданного приложением;
|
|
9
9
|
*
|
|
10
|
-
* Здесь не должно быть CLI
|
|
10
|
+
* Здесь не должно быть логики CLI или преобразования сгенерированных DTO.
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.TInvestNodeSDK = void 0;
|
|
@@ -100,12 +100,13 @@ class TInvestNodeSDK {
|
|
|
100
100
|
return cachedClient;
|
|
101
101
|
}
|
|
102
102
|
const client = (0, grpc_1.createSdkClient)(serviceDefinition, this.channel, this.metadata, this.options.unaryLimiter, this.unaryLimitResolver, {
|
|
103
|
-
useSsl: this.options.useSsl,
|
|
104
|
-
maxReceiveMessageLength: this.maxReceiveMessageLength,
|
|
105
103
|
signal: this.lifecycleController.signal,
|
|
106
104
|
assertOpen: () => {
|
|
107
105
|
this.assertOpen();
|
|
108
106
|
}
|
|
107
|
+
}, {
|
|
108
|
+
useSsl: this.options.useSsl,
|
|
109
|
+
maxReceiveMessageLength: this.maxReceiveMessageLength
|
|
109
110
|
});
|
|
110
111
|
this.clientsByServiceDefinition.set(serviceDefinition, client);
|
|
111
112
|
return client;
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Модуль
|
|
3
|
-
* runtime-квоты для Consumer-owned limiter-а.
|
|
2
|
+
* Модуль преобразует декларацию unary-квот в таблицы правил для gRPC-вызовов.
|
|
4
3
|
*
|
|
5
4
|
* Здесь допустимы:
|
|
6
|
-
* - построение полных gRPC
|
|
7
|
-
* - сборка
|
|
8
|
-
* - проверка
|
|
9
|
-
* -
|
|
5
|
+
* - построение полных путей gRPC-методов;
|
|
6
|
+
* - сборка групп общих квот и проверка декларации;
|
|
7
|
+
* - проверка таблиц квот после объединения значений;
|
|
8
|
+
* - преобразование переопределений экземпляра в плоскую таблицу.
|
|
10
9
|
*
|
|
11
|
-
* Здесь не должно быть
|
|
12
|
-
*
|
|
10
|
+
* Здесь не должно быть значений по умолчанию модуля, состояния ограничителя
|
|
11
|
+
* или обновления тарифа провайдера.
|
|
13
12
|
*/
|
|
14
13
|
import type { TInvestUnaryLimit } from '../application/services/unary-limiter';
|
|
15
14
|
import type { UnaryLimits, UnaryLimitsConfig, UnaryLimitsDefinition } from '../config.types';
|
|
16
|
-
/**
|
|
15
|
+
/** Таблицы квот по ключам правил и группам общих квот для транспорта. */
|
|
17
16
|
export interface UnaryLimitConfig {
|
|
18
17
|
buckets: Record<string, string>;
|
|
19
18
|
limits: UnaryLimits;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
23
|
-
* полные gRPC
|
|
24
|
-
*
|
|
21
|
+
* Значения по умолчанию сервиса сохраняются под короткими ключами, а правила
|
|
22
|
+
* методов получают полные пути gRPC. Значения модуля и группы общих квот не
|
|
23
|
+
* добавляются.
|
|
25
24
|
*/
|
|
26
25
|
export declare function defineUnaryLimits(definition: UnaryLimitsDefinition): UnaryLimits;
|
|
27
26
|
/**
|
|
@@ -30,8 +29,8 @@ export declare function defineUnaryLimits(definition: UnaryLimitsDefinition): Un
|
|
|
30
29
|
*/
|
|
31
30
|
export declare function compileUnaryLimits(definition: UnaryLimitsConfig): UnaryLimitConfig;
|
|
32
31
|
/**
|
|
33
|
-
* Проверяет
|
|
34
|
-
*
|
|
32
|
+
* Проверяет таблицы квот и группы общих квот после применения значений по
|
|
33
|
+
* умолчанию и переопределений экземпляра, до создания транспорта.
|
|
35
34
|
*/
|
|
36
35
|
export declare function assertUnaryLimitConfig(config: UnaryLimitConfig): void;
|
|
37
36
|
export declare function cloneUnaryLimits(limits: UnaryLimits): UnaryLimits;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Модуль
|
|
4
|
-
* runtime-квоты для Consumer-owned limiter-а.
|
|
3
|
+
* Модуль преобразует декларацию unary-квот в таблицы правил для gRPC-вызовов.
|
|
5
4
|
*
|
|
6
5
|
* Здесь допустимы:
|
|
7
|
-
* - построение полных gRPC
|
|
8
|
-
* - сборка
|
|
9
|
-
* - проверка
|
|
10
|
-
* -
|
|
6
|
+
* - построение полных путей gRPC-методов;
|
|
7
|
+
* - сборка групп общих квот и проверка декларации;
|
|
8
|
+
* - проверка таблиц квот после объединения значений;
|
|
9
|
+
* - преобразование переопределений экземпляра в плоскую таблицу.
|
|
11
10
|
*
|
|
12
|
-
* Здесь не должно быть
|
|
13
|
-
*
|
|
11
|
+
* Здесь не должно быть значений по умолчанию модуля, состояния ограничителя
|
|
12
|
+
* или обновления тарифа провайдера.
|
|
14
13
|
*/
|
|
15
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
15
|
exports.defineUnaryLimits = defineUnaryLimits;
|
|
@@ -20,9 +19,9 @@ exports.cloneUnaryLimits = cloneUnaryLimits;
|
|
|
20
19
|
exports.sameUnaryLimit = sameUnaryLimit;
|
|
21
20
|
const unary_method_path_1 = require("../infrastructure/transport/grpc/unary-method-path");
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
24
|
-
* полные gRPC
|
|
25
|
-
*
|
|
22
|
+
* Значения по умолчанию сервиса сохраняются под короткими ключами, а правила
|
|
23
|
+
* методов получают полные пути gRPC. Значения модуля и группы общих квот не
|
|
24
|
+
* добавляются.
|
|
26
25
|
*/
|
|
27
26
|
function defineUnaryLimits(definition) {
|
|
28
27
|
const limits = {};
|
|
@@ -79,8 +78,8 @@ function compileUnaryLimits(definition) {
|
|
|
79
78
|
return compiled;
|
|
80
79
|
}
|
|
81
80
|
/**
|
|
82
|
-
* Проверяет
|
|
83
|
-
*
|
|
81
|
+
* Проверяет таблицы квот и группы общих квот после применения значений по
|
|
82
|
+
* умолчанию и переопределений экземпляра, до создания транспорта.
|
|
84
83
|
*/
|
|
85
84
|
function assertUnaryLimitConfig(config) {
|
|
86
85
|
const limitsByBucket = new Map();
|
package/dist/config.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Модуль
|
|
3
|
-
* policies SDK.
|
|
2
|
+
* Модуль хранит значения по умолчанию и правила работы SDK.
|
|
4
3
|
*
|
|
5
4
|
* Здесь допустимы:
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* - unary
|
|
9
|
-
* -
|
|
5
|
+
* - значения по умолчанию модуля;
|
|
6
|
+
* - правила настройки общего gRPC-канала;
|
|
7
|
+
* - квоты unary-вызовов по сервисам и RPC;
|
|
8
|
+
* - правило подтверждения CLI-команд с побочными эффектами.
|
|
10
9
|
*
|
|
11
|
-
* Здесь не должно быть
|
|
12
|
-
*
|
|
10
|
+
* Здесь не должно быть секретов, чтения окружения, значений развёртывания или
|
|
11
|
+
* преобразований при создании SDK.
|
|
13
12
|
*/
|
|
14
13
|
export declare const packageConfig: {
|
|
15
14
|
readonly sdk: {
|
|
16
15
|
/**
|
|
17
|
-
* TLS
|
|
16
|
+
* TLS включён, если приложение не передало `useSsl` для экземпляра SDK.
|
|
18
17
|
*/
|
|
19
18
|
readonly useSsl: true;
|
|
20
19
|
};
|
|
@@ -23,7 +22,7 @@ export declare const packageConfig: {
|
|
|
23
22
|
* SDK фиксирует 4 MiB как собственную transport policy и не зависит от
|
|
24
23
|
* неявного default grpc-js, который может измениться при upgrade.
|
|
25
24
|
*/
|
|
26
|
-
readonly maxReceiveMessageLength:
|
|
25
|
+
readonly maxReceiveMessageLength: 4194304;
|
|
27
26
|
};
|
|
28
27
|
readonly unaryLimits: {
|
|
29
28
|
/**
|
package/dist/config.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Модуль
|
|
4
|
-
* policies SDK.
|
|
3
|
+
* Модуль хранит значения по умолчанию и правила работы SDK.
|
|
5
4
|
*
|
|
6
5
|
* Здесь допустимы:
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
* - unary
|
|
10
|
-
* -
|
|
6
|
+
* - значения по умолчанию модуля;
|
|
7
|
+
* - правила настройки общего gRPC-канала;
|
|
8
|
+
* - квоты unary-вызовов по сервисам и RPC;
|
|
9
|
+
* - правило подтверждения CLI-команд с побочными эффектами.
|
|
11
10
|
*
|
|
12
|
-
* Здесь не должно быть
|
|
13
|
-
*
|
|
11
|
+
* Здесь не должно быть секретов, чтения окружения, значений развёртывания или
|
|
12
|
+
* преобразований при создании SDK.
|
|
14
13
|
*/
|
|
15
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
15
|
exports.packageConfig = void 0;
|
|
17
16
|
exports.packageConfig = {
|
|
18
17
|
sdk: {
|
|
19
18
|
/**
|
|
20
|
-
* TLS
|
|
19
|
+
* TLS включён, если приложение не передало `useSsl` для экземпляра SDK.
|
|
21
20
|
*/
|
|
22
21
|
useSsl: true
|
|
23
22
|
},
|
|
@@ -26,7 +25,7 @@ exports.packageConfig = {
|
|
|
26
25
|
* SDK фиксирует 4 MiB как собственную transport policy и не зависит от
|
|
27
26
|
* неявного default grpc-js, который может измениться при upgrade.
|
|
28
27
|
*/
|
|
29
|
-
maxReceiveMessageLength:
|
|
28
|
+
maxReceiveMessageLength: 4_194_304
|
|
30
29
|
},
|
|
31
30
|
unaryLimits: {
|
|
32
31
|
/**
|
package/dist/config.types.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Модуль
|
|
3
|
-
*
|
|
2
|
+
* Модуль описывает типы исходных настроек модуля и публичных значений по
|
|
3
|
+
* умолчанию.
|
|
4
4
|
*
|
|
5
5
|
* Здесь допустимы:
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* - переиспользование
|
|
6
|
+
* - типы публичных настроек;
|
|
7
|
+
* - проверка формы исходных настроек при компиляции;
|
|
8
|
+
* - переиспользование интерфейсов сервисов приложения.
|
|
9
9
|
*
|
|
10
|
-
* Здесь не должно быть
|
|
10
|
+
* Здесь не должно быть значений по умолчанию или проверок при создании SDK.
|
|
11
11
|
*/
|
|
12
12
|
import type { InstrumentsService, MarketDataService, OperationsService, OrdersService, SandboxService, SignalService, StopOrdersService, UsersService } from './application/dto/t-invest-services';
|
|
13
13
|
import type { TInvestUnaryLimit, TInvestUnaryLimits } from './application/services/unary-limiter';
|
|
14
14
|
type GrpcMethodName<Service> = Capitalize<Extract<keyof Service, string>>;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Плоская таблица квот unary-вызовов. Ключ — имя сгенерированного сервиса или
|
|
17
|
+
* полный путь gRPC-метода, значение — число запросов и размер окна.
|
|
18
18
|
*/
|
|
19
19
|
export type UnaryLimits = TInvestUnaryLimits;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* Переопределения квот для одного экземпляра без групп общих квот.
|
|
22
|
+
* Значения по умолчанию модуля добавляются при создании SDK.
|
|
23
23
|
*/
|
|
24
24
|
export type UnaryLimitsDefinition = {
|
|
25
25
|
[Service in keyof PackageUnaryLimitsConfig]?: {
|
|
@@ -48,9 +48,8 @@ export interface UnaryServiceLimitsConfig<Method extends string = string> {
|
|
|
48
48
|
/** Человекочитаемая unary policy, сгруппированная по generated services. */
|
|
49
49
|
export type UnaryLimitsConfig = Readonly<Record<string, UnaryServiceLimitsConfig>>;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
52
|
-
* Допустимые RPC
|
|
53
|
-
* contracts.
|
|
51
|
+
* Настройки квот модуля для всех поддерживаемых unary-сервисов.
|
|
52
|
+
* Допустимые имена RPC выводятся из синхронизированных интерфейсов сервисов.
|
|
54
53
|
*/
|
|
55
54
|
export type PackageUnaryLimitsConfig = {
|
|
56
55
|
InstrumentsService: UnaryServiceLimitsConfig<GrpcMethodName<InstrumentsService>>;
|
|
@@ -62,26 +61,26 @@ export type PackageUnaryLimitsConfig = {
|
|
|
62
61
|
StopOrdersService: UnaryServiceLimitsConfig<GrpcMethodName<StopOrdersService>>;
|
|
63
62
|
UsersService: UnaryServiceLimitsConfig<GrpcMethodName<UsersService>>;
|
|
64
63
|
};
|
|
65
|
-
/**
|
|
64
|
+
/** Тип исходных настроек модуля без преобразований при создании SDK. */
|
|
66
65
|
export interface PackageConfigDefinition {
|
|
67
|
-
/**
|
|
66
|
+
/** Значения по умолчанию для параметров экземпляра SDK. */
|
|
68
67
|
sdk: {
|
|
69
68
|
/** Использовать TLS, если instance option не задан. */
|
|
70
69
|
useSsl: boolean;
|
|
71
70
|
};
|
|
72
|
-
/**
|
|
71
|
+
/** Настройки общего gRPC-канала. */
|
|
73
72
|
grpc: {
|
|
74
73
|
/** Максимальный размер одного входящего gRPC-сообщения в байтах. */
|
|
75
74
|
maxReceiveMessageLength: number;
|
|
76
75
|
};
|
|
77
|
-
/**
|
|
76
|
+
/** Квоты провайдера и группы общих квот. */
|
|
78
77
|
unaryLimits: PackageUnaryLimitsConfig;
|
|
79
78
|
/** CLI safety policy для команд с необратимыми или торговыми side effects. */
|
|
80
79
|
requireSideEffectConfirmation: boolean;
|
|
81
80
|
}
|
|
82
|
-
/**
|
|
81
|
+
/** Публичные значения по умолчанию, подготовленные из настроек модуля. */
|
|
83
82
|
export interface TInvestNodeSDKConfig {
|
|
84
|
-
/**
|
|
83
|
+
/** Плоская таблица квот, доступная для чтения и переопределения. */
|
|
85
84
|
unaryLimits: UnaryLimits;
|
|
86
85
|
/** Требует явное подтверждение CLI-команд с side effects. */
|
|
87
86
|
requireSideEffectConfirmation: boolean;
|
package/dist/config.types.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Модуль
|
|
4
|
-
*
|
|
3
|
+
* Модуль описывает типы исходных настроек модуля и публичных значений по
|
|
4
|
+
* умолчанию.
|
|
5
5
|
*
|
|
6
6
|
* Здесь допустимы:
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
* - переиспользование
|
|
7
|
+
* - типы публичных настроек;
|
|
8
|
+
* - проверка формы исходных настроек при компиляции;
|
|
9
|
+
* - переиспользование интерфейсов сервисов приложения.
|
|
10
10
|
*
|
|
11
|
-
* Здесь не должно быть
|
|
11
|
+
* Здесь не должно быть значений по умолчанию или проверок при создании SDK.
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
export declare const protobufPackage = "tinkoff.public.invest.api.contract.v1";
|
|
3
|
+
export declare const protobufFileName = "common.proto";
|
|
3
4
|
/** Тип инструмента. */
|
|
4
5
|
export declare enum InstrumentType {
|
|
5
6
|
INSTRUMENT_TYPE_UNSPECIFIED = 0,
|
package/dist/generated/common.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.0
|
|
5
5
|
// protoc v7.36.2
|
|
6
6
|
// source: common.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ErrorDetail = exports.BrandData = exports.ResponseMetadata = exports.PageResponse = exports.Page = exports.Ping = exports.PingDelaySettings = exports.PingRequest = exports.Quotation = exports.MoneyValue = exports.RealExchange = exports.ResultSubscriptionStatus = exports.PriceType = exports.SecurityTradingStatus = exports.InstrumentStatus = exports.InstrumentType = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ErrorDetail = exports.BrandData = exports.ResponseMetadata = exports.PageResponse = exports.Page = exports.Ping = exports.PingDelaySettings = exports.PingRequest = exports.Quotation = exports.MoneyValue = exports.RealExchange = exports.ResultSubscriptionStatus = exports.PriceType = exports.SecurityTradingStatus = exports.InstrumentStatus = exports.InstrumentType = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
exports.instrumentTypeFromJSON = instrumentTypeFromJSON;
|
|
10
10
|
exports.instrumentTypeToJSON = instrumentTypeToJSON;
|
|
11
11
|
exports.instrumentStatusFromJSON = instrumentStatusFromJSON;
|
|
@@ -22,6 +22,7 @@ exports.realExchangeToJSON = realExchangeToJSON;
|
|
|
22
22
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
23
23
|
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
24
24
|
exports.protobufPackage = "tinkoff.public.invest.api.contract.v1";
|
|
25
|
+
exports.protobufFileName = "common.proto";
|
|
25
26
|
/** Тип инструмента. */
|
|
26
27
|
var InstrumentType;
|
|
27
28
|
(function (InstrumentType) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const protobufPackage = "google.api";
|
|
2
|
+
export declare const protobufFileName = "google/api/field_behavior.proto";
|
|
2
3
|
/**
|
|
3
4
|
* An indicator of the behavior of a given field (for example, that a field
|
|
4
5
|
* is required in requests, or given as output but ignored as input).
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.0
|
|
5
5
|
// protoc v7.36.2
|
|
6
6
|
// source: google/api/field_behavior.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.FieldBehavior = exports.protobufPackage = void 0;
|
|
8
|
+
exports.FieldBehavior = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON;
|
|
10
10
|
exports.fieldBehaviorToJSON = fieldBehaviorToJSON;
|
|
11
11
|
/* eslint-disable */
|
|
12
12
|
exports.protobufPackage = "google.api";
|
|
13
|
+
exports.protobufFileName = "google/api/field_behavior.proto";
|
|
13
14
|
/**
|
|
14
15
|
* An indicator of the behavior of a given field (for example, that a field
|
|
15
16
|
* is required in requests, or given as output but ignored as input).
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
export declare const protobufFileName = "google/protobuf/descriptor.proto";
|
|
3
4
|
/** The full set of known editions. */
|
|
4
5
|
export declare enum Edition {
|
|
5
6
|
/** EDITION_UNKNOWN - A placeholder for an unknown edition value. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.0
|
|
5
5
|
// protoc v7.36.2
|
|
6
6
|
// source: google/protobuf/descriptor.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.FeatureSetDefaults_FeatureSetEditionDefault = void 0;
|
|
8
|
+
exports.FeatureSet_VisibilityFeature = exports.FeatureSet = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions_FeatureSupport = exports.FieldOptions_EditionDefault = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions_Declaration = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.GeneratedCodeInfo_Annotation_Semantic = exports.FeatureSet_VisibilityFeature_DefaultSymbolVisibility = exports.FeatureSet_EnforceNamingStyle = exports.FeatureSet_JsonFormat = exports.FeatureSet_MessageEncoding = exports.FeatureSet_Utf8Validation = exports.FeatureSet_RepeatedFieldEncoding = exports.FeatureSet_EnumType = exports.FeatureSet_FieldPresence = exports.MethodOptions_IdempotencyLevel = exports.FieldOptions_OptionTargetType = exports.FieldOptions_OptionRetention = exports.FieldOptions_JSType = exports.FieldOptions_CType = exports.FileOptions_OptimizeMode = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto_Type = exports.ExtensionRangeOptions_VerificationState = exports.SymbolVisibility = exports.Edition = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
|
+
exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.FeatureSetDefaults_FeatureSetEditionDefault = exports.FeatureSetDefaults = void 0;
|
|
10
10
|
exports.editionFromJSON = editionFromJSON;
|
|
11
11
|
exports.editionToJSON = editionToJSON;
|
|
12
12
|
exports.symbolVisibilityFromJSON = symbolVisibilityFromJSON;
|
|
@@ -50,6 +50,7 @@ exports.generatedCodeInfo_Annotation_SemanticToJSON = generatedCodeInfo_Annotati
|
|
|
50
50
|
/* eslint-disable */
|
|
51
51
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
52
52
|
exports.protobufPackage = "google.protobuf";
|
|
53
|
+
exports.protobufFileName = "google/protobuf/descriptor.proto";
|
|
53
54
|
/** The full set of known editions. */
|
|
54
55
|
var Edition;
|
|
55
56
|
(function (Edition) {
|
|
@@ -4969,7 +4970,7 @@ exports.UninterpretedOption = {
|
|
|
4969
4970
|
obj.negativeIntValue = Math.round(message.negativeIntValue);
|
|
4970
4971
|
}
|
|
4971
4972
|
if (message.doubleValue !== undefined && message.doubleValue !== 0) {
|
|
4972
|
-
obj.doubleValue = message.doubleValue;
|
|
4973
|
+
obj.doubleValue = floatToJson(message.doubleValue);
|
|
4973
4974
|
}
|
|
4974
4975
|
if (message.stringValue !== undefined && message.stringValue.length !== 0) {
|
|
4975
4976
|
obj.stringValue = base64FromBytes(message.stringValue);
|
|
@@ -5614,16 +5615,20 @@ function createBaseSourceCodeInfo_Location() {
|
|
|
5614
5615
|
}
|
|
5615
5616
|
exports.SourceCodeInfo_Location = {
|
|
5616
5617
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5618
|
+
if (message.path.length !== 0) {
|
|
5619
|
+
writer.uint32(10).fork();
|
|
5620
|
+
for (const v of message.path) {
|
|
5621
|
+
writer.int32(v);
|
|
5622
|
+
}
|
|
5623
|
+
writer.join();
|
|
5620
5624
|
}
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
+
if (message.span.length !== 0) {
|
|
5626
|
+
writer.uint32(18).fork();
|
|
5627
|
+
for (const v of message.span) {
|
|
5628
|
+
writer.int32(v);
|
|
5629
|
+
}
|
|
5630
|
+
writer.join();
|
|
5625
5631
|
}
|
|
5626
|
-
writer.join();
|
|
5627
5632
|
if (message.leadingComments !== undefined && message.leadingComments !== "") {
|
|
5628
5633
|
writer.uint32(26).string(message.leadingComments);
|
|
5629
5634
|
}
|
|
@@ -5832,11 +5837,13 @@ function createBaseGeneratedCodeInfo_Annotation() {
|
|
|
5832
5837
|
}
|
|
5833
5838
|
exports.GeneratedCodeInfo_Annotation = {
|
|
5834
5839
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5840
|
+
if (message.path.length !== 0) {
|
|
5841
|
+
writer.uint32(10).fork();
|
|
5842
|
+
for (const v of message.path) {
|
|
5843
|
+
writer.int32(v);
|
|
5844
|
+
}
|
|
5845
|
+
writer.join();
|
|
5838
5846
|
}
|
|
5839
|
-
writer.join();
|
|
5840
5847
|
if (message.sourceFile !== undefined && message.sourceFile !== "") {
|
|
5841
5848
|
writer.uint32(18).string(message.sourceFile);
|
|
5842
5849
|
}
|
|
@@ -5969,6 +5976,9 @@ function bytesFromBase64(b64) {
|
|
|
5969
5976
|
function base64FromBytes(arr) {
|
|
5970
5977
|
return globalThis.Buffer.from(arr).toString("base64");
|
|
5971
5978
|
}
|
|
5979
|
+
function floatToJson(value) {
|
|
5980
|
+
return typeof value === "number" && !globalThis.Number.isFinite(value) ? globalThis.String(value) : value;
|
|
5981
|
+
}
|
|
5972
5982
|
function longToNumber(int64) {
|
|
5973
5983
|
const num = globalThis.Number(int64.toString());
|
|
5974
5984
|
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
export declare const protobufFileName = "google/protobuf/timestamp.proto";
|
|
3
4
|
/**
|
|
4
5
|
* A Timestamp represents a point in time independent of any time zone or local
|
|
5
6
|
* calendar, encoded as a count of seconds and fractions of seconds at
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.0
|
|
5
5
|
// protoc v7.36.2
|
|
6
6
|
// source: google/protobuf/timestamp.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Timestamp = exports.protobufPackage = void 0;
|
|
8
|
+
exports.Timestamp = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
exports.protobufPackage = "google.protobuf";
|
|
12
|
+
exports.protobufFileName = "google/protobuf/timestamp.proto";
|
|
12
13
|
function createBaseTimestamp() {
|
|
13
14
|
return { seconds: 0, nanos: 0 };
|
|
14
15
|
}
|
|
@@ -62,6 +63,9 @@ exports.Timestamp = {
|
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
fromJSON(object) {
|
|
66
|
+
if (typeof object === "string") {
|
|
67
|
+
return exports.Timestamp.fromJSON(timestampFromJson(object));
|
|
68
|
+
}
|
|
65
69
|
return {
|
|
66
70
|
seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
|
|
67
71
|
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
|
|
@@ -87,6 +91,20 @@ exports.Timestamp = {
|
|
|
87
91
|
return message;
|
|
88
92
|
},
|
|
89
93
|
};
|
|
94
|
+
const timestampJsonRegex = /^.+T\d{2}:\d{2}:\d{2}(\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/;
|
|
95
|
+
function timestampFromJson(value) {
|
|
96
|
+
const match = timestampJsonRegex.exec(value);
|
|
97
|
+
// Date only keeps milliseconds, so it parses the string without the fractional seconds
|
|
98
|
+
const fraction = match?.[1];
|
|
99
|
+
const millis = match
|
|
100
|
+
? new globalThis.Date(fraction === undefined ? value : value.replace(fraction, "")).getTime()
|
|
101
|
+
: NaN;
|
|
102
|
+
if (!match || globalThis.Number.isNaN(millis)) {
|
|
103
|
+
throw new globalThis.Error(`Invalid timestamp: ${value}`);
|
|
104
|
+
}
|
|
105
|
+
const nanos = fraction === undefined ? 0 : globalThis.Number(fraction.slice(1, 10).padEnd(9, "0"));
|
|
106
|
+
return { seconds: millis / 1_000, nanos };
|
|
107
|
+
}
|
|
90
108
|
function longToNumber(int64) {
|
|
91
109
|
const num = globalThis.Number(int64.toString());
|
|
92
110
|
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
@@ -2,6 +2,7 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
2
2
|
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
3
3
|
import { BrandData, InstrumentStatus, InstrumentType, MoneyValue, Page, PageResponse, Quotation, RealExchange, SecurityTradingStatus } from "./common";
|
|
4
4
|
export declare const protobufPackage = "tinkoff.public.invest.api.contract.v1";
|
|
5
|
+
export declare const protobufFileName = "instruments.proto";
|
|
5
6
|
/** Тип купонов. */
|
|
6
7
|
export declare enum CouponType {
|
|
7
8
|
/** COUPON_TYPE_UNSPECIFIED - Неопределенное значение. */
|