@marleena/trb-proto 0.1.6 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/README.md +3 -3
  2. package/gen/js-ts/{clickhouse_manager → api/clickhouse}/ManagerServiceClientPb.ts +262 -262
  3. package/gen/js-ts/{clickhouse_manager → api/clickhouse}/manager_pb.d.ts +2 -2
  4. package/gen/js-ts/{clickhouse_manager → api/clickhouse}/manager_pb.js +3 -3
  5. package/gen/js-ts/api/db_api/Db_apiServiceClientPb.ts +259 -0
  6. package/gen/js-ts/{db_api → api/db_api}/db_api_pb.d.ts +21 -100
  7. package/gen/js-ts/{db_api → api/db_api}/db_api_pb.js +72 -714
  8. package/gen/js-ts/{nats → api/nats}/ManagerServiceClientPb.ts +232 -232
  9. package/gen/js-ts/{nats → api/nats}/manager_pb.d.ts +1 -1
  10. package/gen/js-ts/{nats → api/nats}/manager_pb.js +2 -2
  11. package/gen/js-ts/{moex/MoexServiceClientPb.ts → api/test/TestServiceClientPb.ts} +23 -23
  12. package/gen/js-ts/api/test/test_pb.d.ts +40 -0
  13. package/gen/js-ts/api/test/test_pb.js +324 -0
  14. package/package.json +1 -1
  15. package/gen/js-ts/clickhouse/Clickhouse_grpcServiceClientPb.ts +0 -108
  16. package/gen/js-ts/clickhouse/clickhouse_grpc_pb.d.ts +0 -464
  17. package/gen/js-ts/clickhouse/clickhouse_grpc_pb.js +0 -3611
  18. package/gen/js-ts/db_api/Db_apiServiceClientPb.ts +0 -215
  19. package/gen/js-ts/example/ExampleServiceClientPb.ts +0 -108
  20. package/gen/js-ts/example/Example_pb.d.ts +0 -77
  21. package/gen/js-ts/example/Example_pb.js +0 -634
  22. package/gen/js-ts/manager_indicators/Manager_indicatorsServiceClientPb.ts +0 -86
  23. package/gen/js-ts/manager_indicators/manager_indicators_pb.d.ts +0 -190
  24. package/gen/js-ts/manager_indicators/manager_indicators_pb.js +0 -563
  25. package/gen/js-ts/moex/moex_pb.d.ts +0 -53
  26. package/gen/js-ts/moex/moex_pb.js +0 -420
@@ -1,7 +1,7 @@
1
1
  import * as jspb from 'google-protobuf'
2
2
 
3
- import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto"
4
- import * as google_api_field_behavior_pb from '../google/api/field_behavior_pb'; // proto import: "google/api/field_behavior.proto"
3
+ import * as google_api_annotations_pb from '../../google/api/annotations_pb'; // proto import: "google/api/annotations.proto"
4
+ import * as google_api_field_behavior_pb from '../../google/api/field_behavior_pb'; // proto import: "google/api/field_behavior.proto"
5
5
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
6
6
 
7
7
 
@@ -1,4 +1,4 @@
1
- // source: clickhouse_manager/manager.proto
1
+ // source: api/clickhouse/manager.proto
2
2
  /**
3
3
  * @fileoverview
4
4
  * @enhanceable
@@ -21,9 +21,9 @@ var global =
21
21
  (function () { return this; }).call(null) ||
22
22
  Function('return this')();
23
23
 
24
- var google_api_annotations_pb = require('../google/api/annotations_pb.js');
24
+ var google_api_annotations_pb = require('../../google/api/annotations_pb.js');
25
25
  goog.object.extend(proto, google_api_annotations_pb);
26
- var google_api_field_behavior_pb = require('../google/api/field_behavior_pb.js');
26
+ var google_api_field_behavior_pb = require('../../google/api/field_behavior_pb.js');
27
27
  goog.object.extend(proto, google_api_field_behavior_pb);
28
28
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
29
29
  goog.object.extend(proto, google_protobuf_timestamp_pb);
@@ -0,0 +1,259 @@
1
+ /**
2
+ * @fileoverview gRPC-Web generated client stub for trb.db.api.public.contract.v1
3
+ * @enhanceable
4
+ * @public
5
+ */
6
+
7
+ // Code generated by protoc-gen-grpc-web. DO NOT EDIT.
8
+ // versions:
9
+ // protoc-gen-grpc-web v1.5.0
10
+ // protoc v7.34.1
11
+ // source: api/db_api/db_api.proto
12
+
13
+
14
+ /* eslint-disable */
15
+ // @ts-nocheck
16
+
17
+
18
+ import * as grpcWeb from 'grpc-web';
19
+
20
+ import * as tinvest_instruments_pb from '../../tinvest/instruments_pb'; // proto import: "tinvest/instruments.proto"
21
+ import * as api_db_api_db_api_pb from '../../api/db_api/db_api_pb'; // proto import: "api/db_api/db_api.proto"
22
+
23
+
24
+ export class DbApiClient {
25
+ client_: grpcWeb.AbstractClientBase;
26
+ hostname_: string;
27
+ credentials_: null | { [index: string]: string; };
28
+ options_: null | { [index: string]: any; };
29
+
30
+ constructor (hostname: string,
31
+ credentials?: null | { [index: string]: string; },
32
+ options?: null | { [index: string]: any; }) {
33
+ if (!options) options = {};
34
+ if (!credentials) credentials = {};
35
+ options['format'] = 'binary';
36
+
37
+ this.client_ = new grpcWeb.GrpcWebClientBase(options);
38
+ this.hostname_ = hostname.replace(/\/+$/, '');
39
+ this.credentials_ = credentials;
40
+ this.options_ = options;
41
+ }
42
+
43
+ methodDescriptorListInstruments = new grpcWeb.MethodDescriptor(
44
+ '/trb.db.api.public.contract.v1.DbApi/ListInstruments',
45
+ grpcWeb.MethodType.UNARY,
46
+ api_db_api_db_api_pb.ListInstrumentsRequest,
47
+ tinvest_instruments_pb.SharesResponse,
48
+ (request: api_db_api_db_api_pb.ListInstrumentsRequest) => {
49
+ return request.serializeBinary();
50
+ },
51
+ tinvest_instruments_pb.SharesResponse.deserializeBinary
52
+ );
53
+
54
+ listInstruments(
55
+ request: api_db_api_db_api_pb.ListInstrumentsRequest,
56
+ metadata?: grpcWeb.Metadata | null): Promise<tinvest_instruments_pb.SharesResponse>;
57
+
58
+ listInstruments(
59
+ request: api_db_api_db_api_pb.ListInstrumentsRequest,
60
+ metadata: grpcWeb.Metadata | null,
61
+ callback: (err: grpcWeb.RpcError,
62
+ response: tinvest_instruments_pb.SharesResponse) => void): grpcWeb.ClientReadableStream<tinvest_instruments_pb.SharesResponse>;
63
+
64
+ listInstruments(
65
+ request: api_db_api_db_api_pb.ListInstrumentsRequest,
66
+ metadata?: grpcWeb.Metadata | null,
67
+ callback?: (err: grpcWeb.RpcError,
68
+ response: tinvest_instruments_pb.SharesResponse) => void) {
69
+ if (callback !== undefined) {
70
+ return this.client_.rpcCall(
71
+ this.hostname_ +
72
+ '/trb.db.api.public.contract.v1.DbApi/ListInstruments',
73
+ request,
74
+ metadata || {},
75
+ this.methodDescriptorListInstruments,
76
+ callback);
77
+ }
78
+ return this.client_.unaryCall(
79
+ this.hostname_ +
80
+ '/trb.db.api.public.contract.v1.DbApi/ListInstruments',
81
+ request,
82
+ metadata || {},
83
+ this.methodDescriptorListInstruments);
84
+ }
85
+
86
+ methodDescriptorUpsertInstruments = new grpcWeb.MethodDescriptor(
87
+ '/trb.db.api.public.contract.v1.DbApi/UpsertInstruments',
88
+ grpcWeb.MethodType.UNARY,
89
+ tinvest_instruments_pb.SharesResponse,
90
+ api_db_api_db_api_pb.UpsertInstrumentsResponse,
91
+ (request: tinvest_instruments_pb.SharesResponse) => {
92
+ return request.serializeBinary();
93
+ },
94
+ api_db_api_db_api_pb.UpsertInstrumentsResponse.deserializeBinary
95
+ );
96
+
97
+ upsertInstruments(
98
+ request: tinvest_instruments_pb.SharesResponse,
99
+ metadata?: grpcWeb.Metadata | null): Promise<api_db_api_db_api_pb.UpsertInstrumentsResponse>;
100
+
101
+ upsertInstruments(
102
+ request: tinvest_instruments_pb.SharesResponse,
103
+ metadata: grpcWeb.Metadata | null,
104
+ callback: (err: grpcWeb.RpcError,
105
+ response: api_db_api_db_api_pb.UpsertInstrumentsResponse) => void): grpcWeb.ClientReadableStream<api_db_api_db_api_pb.UpsertInstrumentsResponse>;
106
+
107
+ upsertInstruments(
108
+ request: tinvest_instruments_pb.SharesResponse,
109
+ metadata?: grpcWeb.Metadata | null,
110
+ callback?: (err: grpcWeb.RpcError,
111
+ response: api_db_api_db_api_pb.UpsertInstrumentsResponse) => void) {
112
+ if (callback !== undefined) {
113
+ return this.client_.rpcCall(
114
+ this.hostname_ +
115
+ '/trb.db.api.public.contract.v1.DbApi/UpsertInstruments',
116
+ request,
117
+ metadata || {},
118
+ this.methodDescriptorUpsertInstruments,
119
+ callback);
120
+ }
121
+ return this.client_.unaryCall(
122
+ this.hostname_ +
123
+ '/trb.db.api.public.contract.v1.DbApi/UpsertInstruments',
124
+ request,
125
+ metadata || {},
126
+ this.methodDescriptorUpsertInstruments);
127
+ }
128
+
129
+ methodDescriptorListSchedulerTargets = new grpcWeb.MethodDescriptor(
130
+ '/trb.db.api.public.contract.v1.DbApi/ListSchedulerTargets',
131
+ grpcWeb.MethodType.UNARY,
132
+ api_db_api_db_api_pb.ListSchedulerTargetsRequest,
133
+ api_db_api_db_api_pb.ListSchedulerTargetsResponse,
134
+ (request: api_db_api_db_api_pb.ListSchedulerTargetsRequest) => {
135
+ return request.serializeBinary();
136
+ },
137
+ api_db_api_db_api_pb.ListSchedulerTargetsResponse.deserializeBinary
138
+ );
139
+
140
+ listSchedulerTargets(
141
+ request: api_db_api_db_api_pb.ListSchedulerTargetsRequest,
142
+ metadata?: grpcWeb.Metadata | null): Promise<api_db_api_db_api_pb.ListSchedulerTargetsResponse>;
143
+
144
+ listSchedulerTargets(
145
+ request: api_db_api_db_api_pb.ListSchedulerTargetsRequest,
146
+ metadata: grpcWeb.Metadata | null,
147
+ callback: (err: grpcWeb.RpcError,
148
+ response: api_db_api_db_api_pb.ListSchedulerTargetsResponse) => void): grpcWeb.ClientReadableStream<api_db_api_db_api_pb.ListSchedulerTargetsResponse>;
149
+
150
+ listSchedulerTargets(
151
+ request: api_db_api_db_api_pb.ListSchedulerTargetsRequest,
152
+ metadata?: grpcWeb.Metadata | null,
153
+ callback?: (err: grpcWeb.RpcError,
154
+ response: api_db_api_db_api_pb.ListSchedulerTargetsResponse) => void) {
155
+ if (callback !== undefined) {
156
+ return this.client_.rpcCall(
157
+ this.hostname_ +
158
+ '/trb.db.api.public.contract.v1.DbApi/ListSchedulerTargets',
159
+ request,
160
+ metadata || {},
161
+ this.methodDescriptorListSchedulerTargets,
162
+ callback);
163
+ }
164
+ return this.client_.unaryCall(
165
+ this.hostname_ +
166
+ '/trb.db.api.public.contract.v1.DbApi/ListSchedulerTargets',
167
+ request,
168
+ metadata || {},
169
+ this.methodDescriptorListSchedulerTargets);
170
+ }
171
+
172
+ methodDescriptorSyncSchedulerTargets = new grpcWeb.MethodDescriptor(
173
+ '/trb.db.api.public.contract.v1.DbApi/SyncSchedulerTargets',
174
+ grpcWeb.MethodType.UNARY,
175
+ api_db_api_db_api_pb.SyncSchedulerTargetsRequest,
176
+ api_db_api_db_api_pb.SyncSchedulerTargetsResponse,
177
+ (request: api_db_api_db_api_pb.SyncSchedulerTargetsRequest) => {
178
+ return request.serializeBinary();
179
+ },
180
+ api_db_api_db_api_pb.SyncSchedulerTargetsResponse.deserializeBinary
181
+ );
182
+
183
+ syncSchedulerTargets(
184
+ request: api_db_api_db_api_pb.SyncSchedulerTargetsRequest,
185
+ metadata?: grpcWeb.Metadata | null): Promise<api_db_api_db_api_pb.SyncSchedulerTargetsResponse>;
186
+
187
+ syncSchedulerTargets(
188
+ request: api_db_api_db_api_pb.SyncSchedulerTargetsRequest,
189
+ metadata: grpcWeb.Metadata | null,
190
+ callback: (err: grpcWeb.RpcError,
191
+ response: api_db_api_db_api_pb.SyncSchedulerTargetsResponse) => void): grpcWeb.ClientReadableStream<api_db_api_db_api_pb.SyncSchedulerTargetsResponse>;
192
+
193
+ syncSchedulerTargets(
194
+ request: api_db_api_db_api_pb.SyncSchedulerTargetsRequest,
195
+ metadata?: grpcWeb.Metadata | null,
196
+ callback?: (err: grpcWeb.RpcError,
197
+ response: api_db_api_db_api_pb.SyncSchedulerTargetsResponse) => void) {
198
+ if (callback !== undefined) {
199
+ return this.client_.rpcCall(
200
+ this.hostname_ +
201
+ '/trb.db.api.public.contract.v1.DbApi/SyncSchedulerTargets',
202
+ request,
203
+ metadata || {},
204
+ this.methodDescriptorSyncSchedulerTargets,
205
+ callback);
206
+ }
207
+ return this.client_.unaryCall(
208
+ this.hostname_ +
209
+ '/trb.db.api.public.contract.v1.DbApi/SyncSchedulerTargets',
210
+ request,
211
+ metadata || {},
212
+ this.methodDescriptorSyncSchedulerTargets);
213
+ }
214
+
215
+ methodDescriptorListLastDownloads = new grpcWeb.MethodDescriptor(
216
+ '/trb.db.api.public.contract.v1.DbApi/ListLastDownloads',
217
+ grpcWeb.MethodType.UNARY,
218
+ api_db_api_db_api_pb.ListLastDownloadsRequest,
219
+ api_db_api_db_api_pb.ListLastDownloadsResponse,
220
+ (request: api_db_api_db_api_pb.ListLastDownloadsRequest) => {
221
+ return request.serializeBinary();
222
+ },
223
+ api_db_api_db_api_pb.ListLastDownloadsResponse.deserializeBinary
224
+ );
225
+
226
+ listLastDownloads(
227
+ request: api_db_api_db_api_pb.ListLastDownloadsRequest,
228
+ metadata?: grpcWeb.Metadata | null): Promise<api_db_api_db_api_pb.ListLastDownloadsResponse>;
229
+
230
+ listLastDownloads(
231
+ request: api_db_api_db_api_pb.ListLastDownloadsRequest,
232
+ metadata: grpcWeb.Metadata | null,
233
+ callback: (err: grpcWeb.RpcError,
234
+ response: api_db_api_db_api_pb.ListLastDownloadsResponse) => void): grpcWeb.ClientReadableStream<api_db_api_db_api_pb.ListLastDownloadsResponse>;
235
+
236
+ listLastDownloads(
237
+ request: api_db_api_db_api_pb.ListLastDownloadsRequest,
238
+ metadata?: grpcWeb.Metadata | null,
239
+ callback?: (err: grpcWeb.RpcError,
240
+ response: api_db_api_db_api_pb.ListLastDownloadsResponse) => void) {
241
+ if (callback !== undefined) {
242
+ return this.client_.rpcCall(
243
+ this.hostname_ +
244
+ '/trb.db.api.public.contract.v1.DbApi/ListLastDownloads',
245
+ request,
246
+ metadata || {},
247
+ this.methodDescriptorListLastDownloads,
248
+ callback);
249
+ }
250
+ return this.client_.unaryCall(
251
+ this.hostname_ +
252
+ '/trb.db.api.public.contract.v1.DbApi/ListLastDownloads',
253
+ request,
254
+ metadata || {},
255
+ this.methodDescriptorListLastDownloads);
256
+ }
257
+
258
+ }
259
+
@@ -1,7 +1,8 @@
1
1
  import * as jspb from 'google-protobuf'
2
2
 
3
- import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto"
3
+ import * as google_api_annotations_pb from '../../google/api/annotations_pb'; // proto import: "google/api/annotations.proto"
4
4
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
5
+ import * as tinvest_instruments_pb from '../../tinvest/instruments_pb'; // proto import: "tinvest/instruments.proto"
5
6
 
6
7
 
7
8
  export class ListFilter extends jspb.Message {
@@ -54,113 +55,33 @@ export namespace ListInstrumentsRequest {
54
55
  }
55
56
  }
56
57
 
57
- export class ListInstrumentsResponse extends jspb.Message {
58
- getItemsList(): Array<Instrument>;
59
- setItemsList(value: Array<Instrument>): ListInstrumentsResponse;
60
- clearItemsList(): ListInstrumentsResponse;
61
- addItems(value?: Instrument, index?: number): Instrument;
58
+ export class UpsertInstrumentsResponse extends jspb.Message {
59
+ getFetched(): number;
60
+ setFetched(value: number): UpsertInstrumentsResponse;
62
61
 
63
- serializeBinary(): Uint8Array;
64
- toObject(includeInstance?: boolean): ListInstrumentsResponse.AsObject;
65
- static toObject(includeInstance: boolean, msg: ListInstrumentsResponse): ListInstrumentsResponse.AsObject;
66
- static serializeBinaryToWriter(message: ListInstrumentsResponse, writer: jspb.BinaryWriter): void;
67
- static deserializeBinary(bytes: Uint8Array): ListInstrumentsResponse;
68
- static deserializeBinaryFromReader(message: ListInstrumentsResponse, reader: jspb.BinaryReader): ListInstrumentsResponse;
69
- }
70
-
71
- export namespace ListInstrumentsResponse {
72
- export type AsObject = {
73
- itemsList: Array<Instrument.AsObject>,
74
- }
75
- }
76
-
77
- export class Instrument extends jspb.Message {
78
- getUid(): string;
79
- setUid(value: string): Instrument;
80
-
81
- getFigi(): string;
82
- setFigi(value: string): Instrument;
83
-
84
- getTicker(): string;
85
- setTicker(value: string): Instrument;
86
-
87
- getName(): string;
88
- setName(value: string): Instrument;
89
-
90
- getClassCode(): string;
91
- setClassCode(value: string): Instrument;
62
+ getInserted(): number;
63
+ setInserted(value: number): UpsertInstrumentsResponse;
92
64
 
93
- getIsin(): string;
94
- setIsin(value: string): Instrument;
65
+ getUpdated(): number;
66
+ setUpdated(value: number): UpsertInstrumentsResponse;
95
67
 
96
- getLot(): number;
97
- setLot(value: number): Instrument;
98
-
99
- getCurrency(): string;
100
- setCurrency(value: string): Instrument;
101
-
102
- getExchange(): string;
103
- setExchange(value: string): Instrument;
104
-
105
- getSector(): string;
106
- setSector(value: string): Instrument;
107
-
108
- getTradingStatus(): number;
109
- setTradingStatus(value: number): Instrument;
110
-
111
- getLiquidityFlag(): boolean;
112
- setLiquidityFlag(value: boolean): Instrument;
113
-
114
- getShortEnabledFlag(): boolean;
115
- setShortEnabledFlag(value: boolean): Instrument;
116
-
117
- getApiTradeAvailableFlag(): boolean;
118
- setApiTradeAvailableFlag(value: boolean): Instrument;
119
-
120
- getBuyAvailableFlag(): boolean;
121
- setBuyAvailableFlag(value: boolean): Instrument;
122
-
123
- getSellAvailableFlag(): boolean;
124
- setSellAvailableFlag(value: boolean): Instrument;
125
-
126
- getFirst1minCandleDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
127
- setFirst1minCandleDate(value?: google_protobuf_timestamp_pb.Timestamp): Instrument;
128
- hasFirst1minCandleDate(): boolean;
129
- clearFirst1minCandleDate(): Instrument;
130
-
131
- getFirst1dayCandleDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
132
- setFirst1dayCandleDate(value?: google_protobuf_timestamp_pb.Timestamp): Instrument;
133
- hasFirst1dayCandleDate(): boolean;
134
- clearFirst1dayCandleDate(): Instrument;
68
+ getUnchanged(): number;
69
+ setUnchanged(value: number): UpsertInstrumentsResponse;
135
70
 
136
71
  serializeBinary(): Uint8Array;
137
- toObject(includeInstance?: boolean): Instrument.AsObject;
138
- static toObject(includeInstance: boolean, msg: Instrument): Instrument.AsObject;
139
- static serializeBinaryToWriter(message: Instrument, writer: jspb.BinaryWriter): void;
140
- static deserializeBinary(bytes: Uint8Array): Instrument;
141
- static deserializeBinaryFromReader(message: Instrument, reader: jspb.BinaryReader): Instrument;
72
+ toObject(includeInstance?: boolean): UpsertInstrumentsResponse.AsObject;
73
+ static toObject(includeInstance: boolean, msg: UpsertInstrumentsResponse): UpsertInstrumentsResponse.AsObject;
74
+ static serializeBinaryToWriter(message: UpsertInstrumentsResponse, writer: jspb.BinaryWriter): void;
75
+ static deserializeBinary(bytes: Uint8Array): UpsertInstrumentsResponse;
76
+ static deserializeBinaryFromReader(message: UpsertInstrumentsResponse, reader: jspb.BinaryReader): UpsertInstrumentsResponse;
142
77
  }
143
78
 
144
- export namespace Instrument {
79
+ export namespace UpsertInstrumentsResponse {
145
80
  export type AsObject = {
146
- uid: string,
147
- figi: string,
148
- ticker: string,
149
- name: string,
150
- classCode: string,
151
- isin: string,
152
- lot: number,
153
- currency: string,
154
- exchange: string,
155
- sector: string,
156
- tradingStatus: number,
157
- liquidityFlag: boolean,
158
- shortEnabledFlag: boolean,
159
- apiTradeAvailableFlag: boolean,
160
- buyAvailableFlag: boolean,
161
- sellAvailableFlag: boolean,
162
- first1minCandleDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
163
- first1dayCandleDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
81
+ fetched: number,
82
+ inserted: number,
83
+ updated: number,
84
+ unchanged: number,
164
85
  }
165
86
  }
166
87