diff --git a/investAPI b/investAPI index c135b11..c010c0e 160000 --- a/investAPI +++ b/investAPI @@ -1 +1 @@ -Subproject commit c135b115bbc69455b69a74e1f0bb48bd3f0b1c61 +Subproject commit c010c0e037451b8aa29b706ce5438a67f6a8c3e4 diff --git a/package.json b/package.json index 9ac83bd..6aa97f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tinkoff/invest-js", - "version": "1.19.0", + "version": "1.22.1", "description": "Tinkoff Invest OpenAPI Client", "types": "./build/index.d.ts", "engines": { diff --git a/src/generated/common.ts b/src/generated/common.ts index e4afd1d..d010c15 100644 --- a/src/generated/common.ts +++ b/src/generated/common.ts @@ -19,6 +19,7 @@ export interface ProtoGrpcType { contract: { v1: { BrandData: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition InstrumentType: EnumTypeDefinition MoneyValue: MessageTypeDefinition Page: MessageTypeDefinition @@ -27,6 +28,7 @@ export interface ProtoGrpcType { PriceType: EnumTypeDefinition Quotation: MessageTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition SecurityTradingStatus: EnumTypeDefinition } } diff --git a/src/generated/instruments.ts b/src/generated/instruments.ts index 950c8fc..1c9b0bd 100644 --- a/src/generated/instruments.ts +++ b/src/generated/instruments.ts @@ -60,6 +60,7 @@ export interface ProtoGrpcType { AssetsResponse: MessageTypeDefinition Bond: MessageTypeDefinition BondResponse: MessageTypeDefinition + BondType: EnumTypeDefinition BondsResponse: MessageTypeDefinition Brand: MessageTypeDefinition BrandData: MessageTypeDefinition @@ -74,6 +75,7 @@ export interface ProtoGrpcType { EditFavoritesRequest: MessageTypeDefinition EditFavoritesRequestInstrument: MessageTypeDefinition EditFavoritesResponse: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition Etf: MessageTypeDefinition EtfResponse: MessageTypeDefinition EtfsResponse: MessageTypeDefinition @@ -113,6 +115,7 @@ export interface ProtoGrpcType { IndicativesRequest: MessageTypeDefinition IndicativesResponse: MessageTypeDefinition Instrument: MessageTypeDefinition + InstrumentExchangeType: EnumTypeDefinition InstrumentIdType: EnumTypeDefinition InstrumentLink: MessageTypeDefinition InstrumentRequest: MessageTypeDefinition @@ -138,6 +141,7 @@ export interface ProtoGrpcType { RealExchange: EnumTypeDefinition Recommendation: EnumTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition RiskLevel: EnumTypeDefinition SecurityTradingStatus: EnumTypeDefinition Share: MessageTypeDefinition diff --git a/src/generated/marketdata.ts b/src/generated/marketdata.ts index 06ff540..0bd5f4e 100644 --- a/src/generated/marketdata.ts +++ b/src/generated/marketdata.ts @@ -49,6 +49,7 @@ export interface ProtoGrpcType { CandleInterval: EnumTypeDefinition CandleSource: EnumTypeDefinition CandleSubscription: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition GetCandlesRequest: MessageTypeDefinition GetCandlesResponse: MessageTypeDefinition GetClosePricesRequest: MessageTypeDefinition @@ -92,6 +93,7 @@ export interface ProtoGrpcType { PriceType: EnumTypeDefinition Quotation: MessageTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition SecurityTradingStatus: EnumTypeDefinition SubscribeCandlesRequest: MessageTypeDefinition SubscribeCandlesResponse: MessageTypeDefinition @@ -109,6 +111,7 @@ export interface ProtoGrpcType { Trade: MessageTypeDefinition TradeDirection: EnumTypeDefinition TradeInstrument: MessageTypeDefinition + TradeSourceType: EnumTypeDefinition TradeSubscription: MessageTypeDefinition TradingStatus: MessageTypeDefinition } diff --git a/src/generated/operations.ts b/src/generated/operations.ts index 5c3ae29..2b54510 100644 --- a/src/generated/operations.ts +++ b/src/generated/operations.ts @@ -49,6 +49,7 @@ export interface ProtoGrpcType { BrokerReportRequest: MessageTypeDefinition BrokerReportResponse: MessageTypeDefinition DividendsForeignIssuerReport: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition GenerateBrokerReportRequest: MessageTypeDefinition GenerateBrokerReportResponse: MessageTypeDefinition GenerateDividendsForeignIssuerReportRequest: MessageTypeDefinition @@ -99,6 +100,7 @@ export interface ProtoGrpcType { PriceType: EnumTypeDefinition Quotation: MessageTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition SecurityTradingStatus: EnumTypeDefinition VirtualPortfolioPosition: MessageTypeDefinition WithdrawLimitsRequest: MessageTypeDefinition diff --git a/src/generated/orders.ts b/src/generated/orders.ts index 78b0081..8405942 100644 --- a/src/generated/orders.ts +++ b/src/generated/orders.ts @@ -46,6 +46,7 @@ export interface ProtoGrpcType { BrandData: MessageTypeDefinition CancelOrderRequest: MessageTypeDefinition CancelOrderResponse: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition GetMaxLotsRequest: MessageTypeDefinition GetMaxLotsResponse: MessageTypeDefinition GetOrderPriceRequest: MessageTypeDefinition @@ -59,6 +60,8 @@ export interface ProtoGrpcType { OrderExecutionReportStatus: EnumTypeDefinition OrderStage: MessageTypeDefinition OrderState: MessageTypeDefinition + OrderStateStreamRequest: MessageTypeDefinition + OrderStateStreamResponse: MessageTypeDefinition OrderTrade: MessageTypeDefinition OrderTrades: MessageTypeDefinition OrderType: EnumTypeDefinition @@ -73,6 +76,7 @@ export interface ProtoGrpcType { Quotation: MessageTypeDefinition ReplaceOrderRequest: MessageTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition SecurityTradingStatus: EnumTypeDefinition TimeInForceType: EnumTypeDefinition TradesStreamRequest: MessageTypeDefinition diff --git a/src/generated/sandbox.ts b/src/generated/sandbox.ts index fcbcdef..c4964ea 100644 --- a/src/generated/sandbox.ts +++ b/src/generated/sandbox.ts @@ -61,6 +61,7 @@ export interface ProtoGrpcType { CloseSandboxAccountRequest: MessageTypeDefinition CloseSandboxAccountResponse: MessageTypeDefinition DividendsForeignIssuerReport: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition GenerateBrokerReportRequest: MessageTypeDefinition GenerateBrokerReportResponse: MessageTypeDefinition GenerateDividendsForeignIssuerReportRequest: MessageTypeDefinition @@ -107,6 +108,8 @@ export interface ProtoGrpcType { OrderExecutionReportStatus: EnumTypeDefinition OrderStage: MessageTypeDefinition OrderState: MessageTypeDefinition + OrderStateStreamRequest: MessageTypeDefinition + OrderStateStreamResponse: MessageTypeDefinition OrderTrade: MessageTypeDefinition OrderTrades: MessageTypeDefinition OrderType: EnumTypeDefinition @@ -140,6 +143,7 @@ export interface ProtoGrpcType { Quotation: MessageTypeDefinition ReplaceOrderRequest: MessageTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition SandboxPayInRequest: MessageTypeDefinition SandboxPayInResponse: MessageTypeDefinition SandboxService: SubtypeConstructor & { service: _tinkoff_public_invest_api_contract_v1_SandboxServiceDefinition } diff --git a/src/generated/stoporders.ts b/src/generated/stoporders.ts index e07b1c4..58d152a 100644 --- a/src/generated/stoporders.ts +++ b/src/generated/stoporders.ts @@ -45,6 +45,7 @@ export interface ProtoGrpcType { BrandData: MessageTypeDefinition CancelStopOrderRequest: MessageTypeDefinition CancelStopOrderResponse: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition ExchangeOrderType: EnumTypeDefinition GetStopOrdersRequest: MessageTypeDefinition GetStopOrdersResponse: MessageTypeDefinition @@ -58,6 +59,7 @@ export interface ProtoGrpcType { PriceType: EnumTypeDefinition Quotation: MessageTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition SecurityTradingStatus: EnumTypeDefinition StopOrder: MessageTypeDefinition StopOrderDirection: EnumTypeDefinition diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/AccountType.ts b/src/generated/tinkoff/public/invest/api/contract/v1/AccountType.ts index 3be27bf..5fe2007 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/AccountType.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/AccountType.ts @@ -5,4 +5,5 @@ export enum AccountType { ACCOUNT_TYPE_TINKOFF = 1, ACCOUNT_TYPE_TINKOFF_IIS = 2, ACCOUNT_TYPE_INVEST_BOX = 3, + ACCOUNT_TYPE_INVEST_FUND = 4, } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/Bond.ts b/src/generated/tinkoff/public/invest/api/contract/v1/Bond.ts index e4e8a80..f827198 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/Bond.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/Bond.ts @@ -7,6 +7,7 @@ import type { SecurityTradingStatus as _tinkoff_public_invest_api_contract_v1_Se import type { RealExchange as _tinkoff_public_invest_api_contract_v1_RealExchange } from '../../../../../../tinkoff/public/invest/api/contract/v1/RealExchange'; import type { RiskLevel as _tinkoff_public_invest_api_contract_v1_RiskLevel } from '../../../../../../tinkoff/public/invest/api/contract/v1/RiskLevel'; import type { BrandData as _tinkoff_public_invest_api_contract_v1_BrandData, BrandData__Output as _tinkoff_public_invest_api_contract_v1_BrandData__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/BrandData'; +import type { BondType as _tinkoff_public_invest_api_contract_v1_BondType } from '../../../../../../tinkoff/public/invest/api/contract/v1/BondType'; import type { Long } from '@grpc/proto-loader'; export interface Bond { @@ -62,6 +63,7 @@ export interface Bond { 'first_1dayCandleDate'?: (_google_protobuf_Timestamp | null); 'riskLevel'?: (_tinkoff_public_invest_api_contract_v1_RiskLevel | keyof typeof _tinkoff_public_invest_api_contract_v1_RiskLevel); 'brand'?: (_tinkoff_public_invest_api_contract_v1_BrandData | null); + 'bondType'?: (_tinkoff_public_invest_api_contract_v1_BondType | keyof typeof _tinkoff_public_invest_api_contract_v1_BondType); } export interface Bond__Output { @@ -117,4 +119,5 @@ export interface Bond__Output { 'first_1dayCandleDate': (_google_protobuf_Timestamp__Output | null); 'riskLevel': (keyof typeof _tinkoff_public_invest_api_contract_v1_RiskLevel); 'brand': (_tinkoff_public_invest_api_contract_v1_BrandData__Output | null); + 'bondType': (keyof typeof _tinkoff_public_invest_api_contract_v1_BondType); } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/BondType.ts b/src/generated/tinkoff/public/invest/api/contract/v1/BondType.ts new file mode 100644 index 0000000..d82c914 --- /dev/null +++ b/src/generated/tinkoff/public/invest/api/contract/v1/BondType.ts @@ -0,0 +1,6 @@ +// Original file: investAPI/src/docs/contracts/instruments.proto + +export enum BondType { + BOND_TYPE_UNSPECIFIED = 0, + BOND_TYPE_REPLACED = 1, +} diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/ErrorDetail.ts b/src/generated/tinkoff/public/invest/api/contract/v1/ErrorDetail.ts new file mode 100644 index 0000000..8b8374f --- /dev/null +++ b/src/generated/tinkoff/public/invest/api/contract/v1/ErrorDetail.ts @@ -0,0 +1,12 @@ +// Original file: investAPI/src/docs/contracts/common.proto + + +export interface ErrorDetail { + 'code'?: (string); + 'message'?: (string); +} + +export interface ErrorDetail__Output { + 'code': (string); + 'message': (string); +} diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/Etf.ts b/src/generated/tinkoff/public/invest/api/contract/v1/Etf.ts index 62c4cab..9e53a19 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/Etf.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/Etf.ts @@ -4,6 +4,7 @@ import type { Quotation as _tinkoff_public_invest_api_contract_v1_Quotation, Quo import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../../../../google/protobuf/Timestamp'; import type { SecurityTradingStatus as _tinkoff_public_invest_api_contract_v1_SecurityTradingStatus } from '../../../../../../tinkoff/public/invest/api/contract/v1/SecurityTradingStatus'; import type { RealExchange as _tinkoff_public_invest_api_contract_v1_RealExchange } from '../../../../../../tinkoff/public/invest/api/contract/v1/RealExchange'; +import type { InstrumentExchangeType as _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType } from '../../../../../../tinkoff/public/invest/api/contract/v1/InstrumentExchangeType'; import type { BrandData as _tinkoff_public_invest_api_contract_v1_BrandData, BrandData__Output as _tinkoff_public_invest_api_contract_v1_BrandData__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/BrandData'; export interface Etf { @@ -40,6 +41,7 @@ export interface Etf { 'realExchange'?: (_tinkoff_public_invest_api_contract_v1_RealExchange | keyof typeof _tinkoff_public_invest_api_contract_v1_RealExchange); 'positionUid'?: (string); 'assetUid'?: (string); + 'instrumentExchange'?: (_tinkoff_public_invest_api_contract_v1_InstrumentExchangeType | keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType); 'forIisFlag'?: (boolean); 'forQualInvestorFlag'?: (boolean); 'weekendFlag'?: (boolean); @@ -84,6 +86,7 @@ export interface Etf__Output { 'realExchange': (keyof typeof _tinkoff_public_invest_api_contract_v1_RealExchange); 'positionUid': (string); 'assetUid': (string); + 'instrumentExchange': (keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType); 'forIisFlag': (boolean); 'forQualInvestorFlag': (boolean); 'weekendFlag': (boolean); diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/InstrumentExchangeType.ts b/src/generated/tinkoff/public/invest/api/contract/v1/InstrumentExchangeType.ts new file mode 100644 index 0000000..72d324f --- /dev/null +++ b/src/generated/tinkoff/public/invest/api/contract/v1/InstrumentExchangeType.ts @@ -0,0 +1,6 @@ +// Original file: investAPI/src/docs/contracts/instruments.proto + +export enum InstrumentExchangeType { + INSTRUMENT_EXCHANGE_UNSPECIFIED = 0, + INSTRUMENT_EXCHANGE_DEALER = 1, +} diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/InstrumentsRequest.ts b/src/generated/tinkoff/public/invest/api/contract/v1/InstrumentsRequest.ts index 73b4229..4f119be 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/InstrumentsRequest.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/InstrumentsRequest.ts @@ -1,13 +1,18 @@ // Original file: investAPI/src/docs/contracts/instruments.proto import type { InstrumentStatus as _tinkoff_public_invest_api_contract_v1_InstrumentStatus } from '../../../../../../tinkoff/public/invest/api/contract/v1/InstrumentStatus'; +import type { InstrumentExchangeType as _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType } from '../../../../../../tinkoff/public/invest/api/contract/v1/InstrumentExchangeType'; export interface InstrumentsRequest { 'instrumentStatus'?: (_tinkoff_public_invest_api_contract_v1_InstrumentStatus | keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentStatus); + 'instrumentExchange'?: (_tinkoff_public_invest_api_contract_v1_InstrumentExchangeType | keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType); '_instrumentStatus'?: "instrumentStatus"; + '_instrumentExchange'?: "instrumentExchange"; } export interface InstrumentsRequest__Output { 'instrumentStatus'?: (keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentStatus); + 'instrumentExchange'?: (keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType); '_instrumentStatus': "instrumentStatus"; + '_instrumentExchange': "instrumentExchange"; } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/OperationType.ts b/src/generated/tinkoff/public/invest/api/contract/v1/OperationType.ts index 96e16f7..1347cd8 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/OperationType.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/OperationType.ts @@ -63,4 +63,5 @@ export enum OperationType { OPERATION_TYPE_OVER_COM = 62, OPERATION_TYPE_OVER_INCOME = 63, OPERATION_TYPE_OPTION_EXPIRATION = 64, + OPERATION_TYPE_FUTURE_EXPIRATION = 65, } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamRequest.ts b/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamRequest.ts index a58db9c..8ebe1d9 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamRequest.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamRequest.ts @@ -3,8 +3,12 @@ export interface OrderStateStreamRequest { 'accounts'?: (string)[]; + 'pingDelayMillis'?: (number); + '_pingDelayMillis'?: "pingDelayMillis"; } export interface OrderStateStreamRequest__Output { 'accounts': (string)[]; + 'pingDelayMillis'?: (number); + '_pingDelayMillis': "pingDelayMillis"; } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamResponse.ts b/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamResponse.ts index 104cc7e..9feaf36 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamResponse.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/OrderStateStreamResponse.ts @@ -1,6 +1,8 @@ // Original file: investAPI/src/docs/contracts/orders.proto import type { Ping as _tinkoff_public_invest_api_contract_v1_Ping, Ping__Output as _tinkoff_public_invest_api_contract_v1_Ping__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/Ping'; +import type { ResultSubscriptionStatus as _tinkoff_public_invest_api_contract_v1_ResultSubscriptionStatus } from '../../../../../../tinkoff/public/invest/api/contract/v1/ResultSubscriptionStatus'; +import type { ErrorDetail as _tinkoff_public_invest_api_contract_v1_ErrorDetail, ErrorDetail__Output as _tinkoff_public_invest_api_contract_v1_ErrorDetail__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/ErrorDetail'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../../../../google/protobuf/Timestamp'; import type { OrderExecutionReportStatus as _tinkoff_public_invest_api_contract_v1_OrderExecutionReportStatus } from '../../../../../../tinkoff/public/invest/api/contract/v1/OrderExecutionReportStatus'; import type { OrderDirection as _tinkoff_public_invest_api_contract_v1_OrderDirection } from '../../../../../../tinkoff/public/invest/api/contract/v1/OrderDirection'; @@ -52,15 +54,19 @@ export interface _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse 'completionTime'?: (_google_protobuf_Timestamp | null); 'exchange'?: (string); 'instrumentUid'?: (string); + '_orderRequestId'?: "orderRequestId"; + '_statusInfo'?: "statusInfo"; + '_amount'?: "amount"; + '_marker'?: "marker"; } export interface _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_OrderState__Output { 'orderId': (string); - 'orderRequestId': (string); + 'orderRequestId'?: (string); 'clientCode': (string); 'createdAt': (_google_protobuf_Timestamp__Output | null); 'executionReportStatus': (keyof typeof _tinkoff_public_invest_api_contract_v1_OrderExecutionReportStatus); - 'statusInfo': (keyof typeof _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_StatusCauseInfo); + 'statusInfo'?: (keyof typeof _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_StatusCauseInfo); 'ticker': (string); 'classCode': (string); 'lotSize': (number); @@ -70,24 +76,29 @@ export interface _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse 'accountId': (string); 'initialOrderPrice': (_tinkoff_public_invest_api_contract_v1_MoneyValue__Output | null); 'orderPrice': (_tinkoff_public_invest_api_contract_v1_MoneyValue__Output | null); - 'amount': (_tinkoff_public_invest_api_contract_v1_MoneyValue__Output | null); + 'amount'?: (_tinkoff_public_invest_api_contract_v1_MoneyValue__Output | null); 'executedOrderPrice': (_tinkoff_public_invest_api_contract_v1_MoneyValue__Output | null); 'currency': (string); 'lotsRequested': (string); 'lotsExecuted': (string); 'lotsLeft': (string); 'lotsCancelled': (string); - 'marker': (keyof typeof _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_MarkerType); + 'marker'?: (keyof typeof _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_MarkerType); 'trades': (_tinkoff_public_invest_api_contract_v1_OrderTrade__Output)[]; 'completionTime': (_google_protobuf_Timestamp__Output | null); 'exchange': (string); 'instrumentUid': (string); + '_orderRequestId': "orderRequestId"; + '_statusInfo': "statusInfo"; + '_amount': "amount"; + '_marker': "marker"; } // Original file: investAPI/src/docs/contracts/orders.proto export enum _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_StatusCauseInfo { - CAUSE_CANCELLED_BY_CLIENT = 0, + CAUSE_UNSPECIFIED = 0, + CAUSE_CANCELLED_BY_CLIENT = 15, CAUSE_CANCELLED_BY_EXCHANGE = 1, CAUSE_CANCELLED_NOT_ENOUGH_POSITION = 2, CAUSE_CANCELLED_BY_CLIENT_BLOCK = 3, @@ -96,14 +107,34 @@ export enum _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_Stat CAUSE_CANCELLED_BY_BROKER = 6, } +export interface _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_SubscriptionResponse { + 'trackingId'?: (string); + 'status'?: (_tinkoff_public_invest_api_contract_v1_ResultSubscriptionStatus | keyof typeof _tinkoff_public_invest_api_contract_v1_ResultSubscriptionStatus); + 'streamId'?: (string); + 'accounts'?: (string)[]; + 'error'?: (_tinkoff_public_invest_api_contract_v1_ErrorDetail | null); + '_error'?: "error"; +} + +export interface _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_SubscriptionResponse__Output { + 'trackingId': (string); + 'status': (keyof typeof _tinkoff_public_invest_api_contract_v1_ResultSubscriptionStatus); + 'streamId': (string); + 'accounts': (string)[]; + 'error'?: (_tinkoff_public_invest_api_contract_v1_ErrorDetail__Output | null); + '_error': "error"; +} + export interface OrderStateStreamResponse { 'orderState'?: (_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_OrderState | null); 'ping'?: (_tinkoff_public_invest_api_contract_v1_Ping | null); - 'payload'?: "orderState"|"ping"; + 'subscription'?: (_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_SubscriptionResponse | null); + 'payload'?: "orderState"|"ping"|"subscription"; } export interface OrderStateStreamResponse__Output { 'orderState'?: (_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_OrderState__Output | null); 'ping'?: (_tinkoff_public_invest_api_contract_v1_Ping__Output | null); - 'payload': "orderState"|"ping"; + 'subscription'?: (_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse_SubscriptionResponse__Output | null); + 'payload': "orderState"|"ping"|"subscription"; } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/OrdersStreamService.ts b/src/generated/tinkoff/public/invest/api/contract/v1/OrdersStreamService.ts index c864c48..0874dba 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/OrdersStreamService.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/OrdersStreamService.ts @@ -2,10 +2,17 @@ import type * as grpc from '@grpc/grpc-js' import type { MethodDefinition } from '@grpc/proto-loader' +import type { OrderStateStreamRequest as _tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest, OrderStateStreamRequest__Output as _tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/OrderStateStreamRequest'; +import type { OrderStateStreamResponse as _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse, OrderStateStreamResponse__Output as _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/OrderStateStreamResponse'; import type { TradesStreamRequest as _tinkoff_public_invest_api_contract_v1_TradesStreamRequest, TradesStreamRequest__Output as _tinkoff_public_invest_api_contract_v1_TradesStreamRequest__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradesStreamRequest'; import type { TradesStreamResponse as _tinkoff_public_invest_api_contract_v1_TradesStreamResponse, TradesStreamResponse__Output as _tinkoff_public_invest_api_contract_v1_TradesStreamResponse__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradesStreamResponse'; export interface OrdersStreamServiceClient extends grpc.Client { + OrderStateStream(argument: _tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse__Output>; + OrderStateStream(argument: _tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse__Output>; + orderStateStream(argument: _tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse__Output>; + orderStateStream(argument: _tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse__Output>; + TradesStream(argument: _tinkoff_public_invest_api_contract_v1_TradesStreamRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_tinkoff_public_invest_api_contract_v1_TradesStreamResponse__Output>; TradesStream(argument: _tinkoff_public_invest_api_contract_v1_TradesStreamRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_tinkoff_public_invest_api_contract_v1_TradesStreamResponse__Output>; tradesStream(argument: _tinkoff_public_invest_api_contract_v1_TradesStreamRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_tinkoff_public_invest_api_contract_v1_TradesStreamResponse__Output>; @@ -14,10 +21,13 @@ export interface OrdersStreamServiceClient extends grpc.Client { } export interface OrdersStreamServiceHandlers extends grpc.UntypedServiceImplementation { + OrderStateStream: grpc.handleServerStreamingCall<_tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest__Output, _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse>; + TradesStream: grpc.handleServerStreamingCall<_tinkoff_public_invest_api_contract_v1_TradesStreamRequest__Output, _tinkoff_public_invest_api_contract_v1_TradesStreamResponse>; } export interface OrdersStreamServiceDefinition extends grpc.ServiceDefinition { + OrderStateStream: MethodDefinition<_tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest, _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse, _tinkoff_public_invest_api_contract_v1_OrderStateStreamRequest__Output, _tinkoff_public_invest_api_contract_v1_OrderStateStreamResponse__Output> TradesStream: MethodDefinition<_tinkoff_public_invest_api_contract_v1_TradesStreamRequest, _tinkoff_public_invest_api_contract_v1_TradesStreamResponse, _tinkoff_public_invest_api_contract_v1_TradesStreamRequest__Output, _tinkoff_public_invest_api_contract_v1_TradesStreamResponse__Output> } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/ResultSubscriptionStatus.ts b/src/generated/tinkoff/public/invest/api/contract/v1/ResultSubscriptionStatus.ts new file mode 100644 index 0000000..52be26b --- /dev/null +++ b/src/generated/tinkoff/public/invest/api/contract/v1/ResultSubscriptionStatus.ts @@ -0,0 +1,7 @@ +// Original file: investAPI/src/docs/contracts/common.proto + +export enum ResultSubscriptionStatus { + RESULT_SUBSCRIPTION_STATUS_UNSPECIFIED = 0, + RESULT_SUBSCRIPTION_STATUS_OK = 1, + RESULT_SUBSCRIPTION_STATUS_ERROR = 13, +} diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/SandboxService.ts b/src/generated/tinkoff/public/invest/api/contract/v1/SandboxService.ts index 644a8aa..03b0dce 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/SandboxService.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/SandboxService.ts @@ -8,6 +8,8 @@ import type { CloseSandboxAccountRequest as _tinkoff_public_invest_api_contract_ import type { CloseSandboxAccountResponse as _tinkoff_public_invest_api_contract_v1_CloseSandboxAccountResponse, CloseSandboxAccountResponse__Output as _tinkoff_public_invest_api_contract_v1_CloseSandboxAccountResponse__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/CloseSandboxAccountResponse'; import type { GetAccountsRequest as _tinkoff_public_invest_api_contract_v1_GetAccountsRequest, GetAccountsRequest__Output as _tinkoff_public_invest_api_contract_v1_GetAccountsRequest__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/GetAccountsRequest'; import type { GetAccountsResponse as _tinkoff_public_invest_api_contract_v1_GetAccountsResponse, GetAccountsResponse__Output as _tinkoff_public_invest_api_contract_v1_GetAccountsResponse__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/GetAccountsResponse'; +import type { GetMaxLotsRequest as _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, GetMaxLotsRequest__Output as _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/GetMaxLotsRequest'; +import type { GetMaxLotsResponse as _tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse, GetMaxLotsResponse__Output as _tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/GetMaxLotsResponse'; import type { GetOperationsByCursorRequest as _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorRequest, GetOperationsByCursorRequest__Output as _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorRequest__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/GetOperationsByCursorRequest'; import type { GetOperationsByCursorResponse as _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorResponse, GetOperationsByCursorResponse__Output as _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorResponse__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/GetOperationsByCursorResponse'; import type { GetOrderStateRequest as _tinkoff_public_invest_api_contract_v1_GetOrderStateRequest, GetOrderStateRequest__Output as _tinkoff_public_invest_api_contract_v1_GetOrderStateRequest__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/GetOrderStateRequest'; @@ -58,6 +60,15 @@ export interface SandboxServiceClient extends grpc.Client { getSandboxAccounts(argument: _tinkoff_public_invest_api_contract_v1_GetAccountsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetAccountsResponse__Output>): grpc.ClientUnaryCall; getSandboxAccounts(argument: _tinkoff_public_invest_api_contract_v1_GetAccountsRequest, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetAccountsResponse__Output>): grpc.ClientUnaryCall; + GetSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + GetSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + GetSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + GetSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + getSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + getSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + getSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + getSandboxMaxLots(argument: _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output>): grpc.ClientUnaryCall; + GetSandboxOperations(argument: _tinkoff_public_invest_api_contract_v1_OperationsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_OperationsResponse__Output>): grpc.ClientUnaryCall; GetSandboxOperations(argument: _tinkoff_public_invest_api_contract_v1_OperationsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_OperationsResponse__Output>): grpc.ClientUnaryCall; GetSandboxOperations(argument: _tinkoff_public_invest_api_contract_v1_OperationsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_tinkoff_public_invest_api_contract_v1_OperationsResponse__Output>): grpc.ClientUnaryCall; @@ -166,6 +177,8 @@ export interface SandboxServiceHandlers extends grpc.UntypedServiceImplementatio GetSandboxAccounts: grpc.handleUnaryCall<_tinkoff_public_invest_api_contract_v1_GetAccountsRequest__Output, _tinkoff_public_invest_api_contract_v1_GetAccountsResponse>; + GetSandboxMaxLots: grpc.handleUnaryCall<_tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest__Output, _tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse>; + GetSandboxOperations: grpc.handleUnaryCall<_tinkoff_public_invest_api_contract_v1_OperationsRequest__Output, _tinkoff_public_invest_api_contract_v1_OperationsResponse>; GetSandboxOperationsByCursor: grpc.handleUnaryCall<_tinkoff_public_invest_api_contract_v1_GetOperationsByCursorRequest__Output, _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorResponse>; @@ -194,6 +207,7 @@ export interface SandboxServiceDefinition extends grpc.ServiceDefinition { CancelSandboxOrder: MethodDefinition<_tinkoff_public_invest_api_contract_v1_CancelOrderRequest, _tinkoff_public_invest_api_contract_v1_CancelOrderResponse, _tinkoff_public_invest_api_contract_v1_CancelOrderRequest__Output, _tinkoff_public_invest_api_contract_v1_CancelOrderResponse__Output> CloseSandboxAccount: MethodDefinition<_tinkoff_public_invest_api_contract_v1_CloseSandboxAccountRequest, _tinkoff_public_invest_api_contract_v1_CloseSandboxAccountResponse, _tinkoff_public_invest_api_contract_v1_CloseSandboxAccountRequest__Output, _tinkoff_public_invest_api_contract_v1_CloseSandboxAccountResponse__Output> GetSandboxAccounts: MethodDefinition<_tinkoff_public_invest_api_contract_v1_GetAccountsRequest, _tinkoff_public_invest_api_contract_v1_GetAccountsResponse, _tinkoff_public_invest_api_contract_v1_GetAccountsRequest__Output, _tinkoff_public_invest_api_contract_v1_GetAccountsResponse__Output> + GetSandboxMaxLots: MethodDefinition<_tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest, _tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse, _tinkoff_public_invest_api_contract_v1_GetMaxLotsRequest__Output, _tinkoff_public_invest_api_contract_v1_GetMaxLotsResponse__Output> GetSandboxOperations: MethodDefinition<_tinkoff_public_invest_api_contract_v1_OperationsRequest, _tinkoff_public_invest_api_contract_v1_OperationsResponse, _tinkoff_public_invest_api_contract_v1_OperationsRequest__Output, _tinkoff_public_invest_api_contract_v1_OperationsResponse__Output> GetSandboxOperationsByCursor: MethodDefinition<_tinkoff_public_invest_api_contract_v1_GetOperationsByCursorRequest, _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorResponse, _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorRequest__Output, _tinkoff_public_invest_api_contract_v1_GetOperationsByCursorResponse__Output> GetSandboxOrderState: MethodDefinition<_tinkoff_public_invest_api_contract_v1_GetOrderStateRequest, _tinkoff_public_invest_api_contract_v1_OrderState, _tinkoff_public_invest_api_contract_v1_GetOrderStateRequest__Output, _tinkoff_public_invest_api_contract_v1_OrderState__Output> diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/Share.ts b/src/generated/tinkoff/public/invest/api/contract/v1/Share.ts index 26d773a..a0f12e3 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/Share.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/Share.ts @@ -6,6 +6,7 @@ import type { MoneyValue as _tinkoff_public_invest_api_contract_v1_MoneyValue, M import type { SecurityTradingStatus as _tinkoff_public_invest_api_contract_v1_SecurityTradingStatus } from '../../../../../../tinkoff/public/invest/api/contract/v1/SecurityTradingStatus'; import type { ShareType as _tinkoff_public_invest_api_contract_v1_ShareType } from '../../../../../../tinkoff/public/invest/api/contract/v1/ShareType'; import type { RealExchange as _tinkoff_public_invest_api_contract_v1_RealExchange } from '../../../../../../tinkoff/public/invest/api/contract/v1/RealExchange'; +import type { InstrumentExchangeType as _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType } from '../../../../../../tinkoff/public/invest/api/contract/v1/InstrumentExchangeType'; import type { BrandData as _tinkoff_public_invest_api_contract_v1_BrandData, BrandData__Output as _tinkoff_public_invest_api_contract_v1_BrandData__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/BrandData'; import type { Long } from '@grpc/proto-loader'; @@ -44,6 +45,7 @@ export interface Share { 'realExchange'?: (_tinkoff_public_invest_api_contract_v1_RealExchange | keyof typeof _tinkoff_public_invest_api_contract_v1_RealExchange); 'positionUid'?: (string); 'assetUid'?: (string); + 'instrumentExchange'?: (_tinkoff_public_invest_api_contract_v1_InstrumentExchangeType | keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType); 'forIisFlag'?: (boolean); 'forQualInvestorFlag'?: (boolean); 'weekendFlag'?: (boolean); @@ -89,6 +91,7 @@ export interface Share__Output { 'realExchange': (keyof typeof _tinkoff_public_invest_api_contract_v1_RealExchange); 'positionUid': (string); 'assetUid': (string); + 'instrumentExchange': (keyof typeof _tinkoff_public_invest_api_contract_v1_InstrumentExchangeType); 'forIisFlag': (boolean); 'forQualInvestorFlag': (boolean); 'weekendFlag': (boolean); diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/StopOrder.ts b/src/generated/tinkoff/public/invest/api/contract/v1/StopOrder.ts index 8d974d1..a42f132 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/StopOrder.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/StopOrder.ts @@ -6,6 +6,7 @@ import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _goo import type { MoneyValue as _tinkoff_public_invest_api_contract_v1_MoneyValue, MoneyValue__Output as _tinkoff_public_invest_api_contract_v1_MoneyValue__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/MoneyValue'; import type { TakeProfitType as _tinkoff_public_invest_api_contract_v1_TakeProfitType } from '../../../../../../tinkoff/public/invest/api/contract/v1/TakeProfitType'; import type { StopOrderStatusOption as _tinkoff_public_invest_api_contract_v1_StopOrderStatusOption } from '../../../../../../tinkoff/public/invest/api/contract/v1/StopOrderStatusOption'; +import type { ExchangeOrderType as _tinkoff_public_invest_api_contract_v1_ExchangeOrderType } from '../../../../../../tinkoff/public/invest/api/contract/v1/ExchangeOrderType'; import type { Quotation as _tinkoff_public_invest_api_contract_v1_Quotation, Quotation__Output as _tinkoff_public_invest_api_contract_v1_Quotation__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/Quotation'; import type { TrailingValueType as _tinkoff_public_invest_api_contract_v1_TrailingValueType } from '../../../../../../tinkoff/public/invest/api/contract/v1/TrailingValueType'; import type { TrailingStopStatus as _tinkoff_public_invest_api_contract_v1_TrailingStopStatus } from '../../../../../../tinkoff/public/invest/api/contract/v1/TrailingStopStatus'; @@ -47,6 +48,7 @@ export interface StopOrder { 'takeProfitType'?: (_tinkoff_public_invest_api_contract_v1_TakeProfitType | keyof typeof _tinkoff_public_invest_api_contract_v1_TakeProfitType); 'trailingData'?: (_tinkoff_public_invest_api_contract_v1_StopOrder_TrailingData | null); 'status'?: (_tinkoff_public_invest_api_contract_v1_StopOrderStatusOption | keyof typeof _tinkoff_public_invest_api_contract_v1_StopOrderStatusOption); + 'exchangeOrderType'?: (_tinkoff_public_invest_api_contract_v1_ExchangeOrderType | keyof typeof _tinkoff_public_invest_api_contract_v1_ExchangeOrderType); } export interface StopOrder__Output { @@ -65,4 +67,5 @@ export interface StopOrder__Output { 'takeProfitType': (keyof typeof _tinkoff_public_invest_api_contract_v1_TakeProfitType); 'trailingData': (_tinkoff_public_invest_api_contract_v1_StopOrder_TrailingData__Output | null); 'status': (keyof typeof _tinkoff_public_invest_api_contract_v1_StopOrderStatusOption); + 'exchangeOrderType': (keyof typeof _tinkoff_public_invest_api_contract_v1_ExchangeOrderType); } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesRequest.ts b/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesRequest.ts index 3446cdb..58302fc 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesRequest.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesRequest.ts @@ -2,13 +2,16 @@ import type { SubscriptionAction as _tinkoff_public_invest_api_contract_v1_SubscriptionAction } from '../../../../../../tinkoff/public/invest/api/contract/v1/SubscriptionAction'; import type { TradeInstrument as _tinkoff_public_invest_api_contract_v1_TradeInstrument, TradeInstrument__Output as _tinkoff_public_invest_api_contract_v1_TradeInstrument__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradeInstrument'; +import type { TradeSourceType as _tinkoff_public_invest_api_contract_v1_TradeSourceType } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradeSourceType'; export interface SubscribeTradesRequest { 'subscriptionAction'?: (_tinkoff_public_invest_api_contract_v1_SubscriptionAction | keyof typeof _tinkoff_public_invest_api_contract_v1_SubscriptionAction); 'instruments'?: (_tinkoff_public_invest_api_contract_v1_TradeInstrument)[]; + 'tradeType'?: (_tinkoff_public_invest_api_contract_v1_TradeSourceType | keyof typeof _tinkoff_public_invest_api_contract_v1_TradeSourceType); } export interface SubscribeTradesRequest__Output { 'subscriptionAction': (keyof typeof _tinkoff_public_invest_api_contract_v1_SubscriptionAction); 'instruments': (_tinkoff_public_invest_api_contract_v1_TradeInstrument__Output)[]; + 'tradeType': (keyof typeof _tinkoff_public_invest_api_contract_v1_TradeSourceType); } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesResponse.ts b/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesResponse.ts index a2c2d1c..04a09f9 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesResponse.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/SubscribeTradesResponse.ts @@ -1,13 +1,16 @@ // Original file: investAPI/src/docs/contracts/marketdata.proto import type { TradeSubscription as _tinkoff_public_invest_api_contract_v1_TradeSubscription, TradeSubscription__Output as _tinkoff_public_invest_api_contract_v1_TradeSubscription__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradeSubscription'; +import type { TradeSourceType as _tinkoff_public_invest_api_contract_v1_TradeSourceType } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradeSourceType'; export interface SubscribeTradesResponse { 'trackingId'?: (string); 'tradeSubscriptions'?: (_tinkoff_public_invest_api_contract_v1_TradeSubscription)[]; + 'tradeType'?: (_tinkoff_public_invest_api_contract_v1_TradeSourceType | keyof typeof _tinkoff_public_invest_api_contract_v1_TradeSourceType); } export interface SubscribeTradesResponse__Output { 'trackingId': (string); 'tradeSubscriptions': (_tinkoff_public_invest_api_contract_v1_TradeSubscription__Output)[]; + 'tradeType': (keyof typeof _tinkoff_public_invest_api_contract_v1_TradeSourceType); } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/Trade.ts b/src/generated/tinkoff/public/invest/api/contract/v1/Trade.ts index a3edb4e..f510340 100644 --- a/src/generated/tinkoff/public/invest/api/contract/v1/Trade.ts +++ b/src/generated/tinkoff/public/invest/api/contract/v1/Trade.ts @@ -3,6 +3,7 @@ import type { TradeDirection as _tinkoff_public_invest_api_contract_v1_TradeDirection } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradeDirection'; import type { Quotation as _tinkoff_public_invest_api_contract_v1_Quotation, Quotation__Output as _tinkoff_public_invest_api_contract_v1_Quotation__Output } from '../../../../../../tinkoff/public/invest/api/contract/v1/Quotation'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../../../../google/protobuf/Timestamp'; +import type { TradeSourceType as _tinkoff_public_invest_api_contract_v1_TradeSourceType } from '../../../../../../tinkoff/public/invest/api/contract/v1/TradeSourceType'; import type { Long } from '@grpc/proto-loader'; export interface Trade { @@ -12,6 +13,7 @@ export interface Trade { 'quantity'?: (number | string | Long); 'time'?: (_google_protobuf_Timestamp | null); 'instrumentUid'?: (string); + 'tradeSource'?: (_tinkoff_public_invest_api_contract_v1_TradeSourceType | keyof typeof _tinkoff_public_invest_api_contract_v1_TradeSourceType); } export interface Trade__Output { @@ -21,4 +23,5 @@ export interface Trade__Output { 'quantity': (string); 'time': (_google_protobuf_Timestamp__Output | null); 'instrumentUid': (string); + 'tradeSource': (keyof typeof _tinkoff_public_invest_api_contract_v1_TradeSourceType); } diff --git a/src/generated/tinkoff/public/invest/api/contract/v1/TradeSourceType.ts b/src/generated/tinkoff/public/invest/api/contract/v1/TradeSourceType.ts new file mode 100644 index 0000000..71fc904 --- /dev/null +++ b/src/generated/tinkoff/public/invest/api/contract/v1/TradeSourceType.ts @@ -0,0 +1,8 @@ +// Original file: investAPI/src/docs/contracts/marketdata.proto + +export enum TradeSourceType { + TRADE_SOURCE_UNSPECIFIED = 0, + TRADE_SOURCE_EXCHANGE = 1, + TRADE_SOURCE_DEALER = 2, + TRADE_SOURCE_ALL = 3, +} diff --git a/src/generated/users.ts b/src/generated/users.ts index 56054d6..65cd6ab 100644 --- a/src/generated/users.ts +++ b/src/generated/users.ts @@ -47,6 +47,7 @@ export interface ProtoGrpcType { AccountStatus: EnumTypeDefinition AccountType: EnumTypeDefinition BrandData: MessageTypeDefinition + ErrorDetail: MessageTypeDefinition GetAccountsRequest: MessageTypeDefinition GetAccountsResponse: MessageTypeDefinition GetInfoRequest: MessageTypeDefinition @@ -63,6 +64,7 @@ export interface ProtoGrpcType { PriceType: EnumTypeDefinition Quotation: MessageTypeDefinition ResponseMetadata: MessageTypeDefinition + ResultSubscriptionStatus: EnumTypeDefinition SecurityTradingStatus: EnumTypeDefinition StreamLimit: MessageTypeDefinition UnaryLimit: MessageTypeDefinition diff --git a/tsconfig.json b/tsconfig.json index 48a332a..bf92ce7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "sourceMap": true, "strict": true, "module": "commonjs", - "target": "es5", + "target": "es6", "moduleResolution": "node", "noUnusedParameters": true, "esModuleInterop": true,