@marleena/trb-proto 0.1.0 → 0.1.2

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 (33) hide show
  1. package/README.md +28 -23
  2. package/gen/js-ts/clickhouse/Clickhouse_grpcServiceClientPb.ts +108 -0
  3. package/gen/js-ts/clickhouse/clickhouse_grpc_pb.d.ts +464 -0
  4. package/gen/js-ts/db_api/Db_apiServiceClientPb.ts +215 -0
  5. package/gen/js-ts/db_api/db_api_pb.d.ts +406 -0
  6. package/gen/js-ts/db_api/db_api_pb.js +3371 -0
  7. package/gen/js-ts/example/ExampleServiceClientPb.ts +108 -0
  8. package/gen/js-ts/example/Example_pb.d.ts +77 -0
  9. package/gen/js-ts/manager_indicators/Manager_indicatorsServiceClientPb.ts +86 -0
  10. package/gen/js-ts/manager_indicators/manager_indicators_pb.d.ts +190 -0
  11. package/gen/js-ts/moex/MoexServiceClientPb.ts +86 -0
  12. package/gen/js-ts/moex/moex_pb.d.ts +53 -0
  13. package/gen/js-ts/nats/ManagerServiceClientPb.ts +1032 -0
  14. package/gen/js-ts/nats/manager_pb.d.ts +1416 -0
  15. package/gen/js-ts/nats/manager_pb.js +394 -0
  16. package/gen/js-ts/tinvest/InstrumentsServiceClientPb.ts +1892 -0
  17. package/gen/js-ts/tinvest/MarketdataServiceClientPb.ts +473 -0
  18. package/gen/js-ts/tinvest/OperationsServiceClientPb.ts +431 -0
  19. package/gen/js-ts/tinvest/OrdersServiceClientPb.ts +452 -0
  20. package/gen/js-ts/tinvest/SandboxServiceClientPb.ts +907 -0
  21. package/gen/js-ts/tinvest/SignalsServiceClientPb.ts +129 -0
  22. package/gen/js-ts/tinvest/StopordersServiceClientPb.ts +172 -0
  23. package/gen/js-ts/tinvest/UsersServiceClientPb.ts +387 -0
  24. package/gen/js-ts/tinvest/common_pb.d.ts +314 -0
  25. package/gen/js-ts/tinvest/instruments_pb.d.ts +6373 -0
  26. package/gen/js-ts/tinvest/marketdata_pb.d.ts +2397 -0
  27. package/gen/js-ts/tinvest/operations_pb.d.ts +2380 -0
  28. package/gen/js-ts/tinvest/orders_pb.d.ts +1555 -0
  29. package/gen/js-ts/tinvest/sandbox_pb.d.ts +129 -0
  30. package/gen/js-ts/tinvest/signals_pb.d.ts +408 -0
  31. package/gen/js-ts/tinvest/stoporders_pb.d.ts +493 -0
  32. package/gen/js-ts/tinvest/users_pb.d.ts +611 -0
  33. package/package.json +1 -1
package/README.md CHANGED
@@ -1,14 +1,27 @@
1
- # @marleena/trb-proto
1
+ # TrB proto
2
2
 
3
- Сгенерированные protobuf-сообщения и gRPC-Web клиенты сервисов TrB.
3
+ Контракты сервисов и сгенерированный код:
4
4
 
5
- ## Установка
5
+ - Go — `gen/go`
6
+ - JavaScript / TypeScript (protobuf + gRPC-Web) — npm-пакет [`@marleena/trb-proto`](https://www.npmjs.com/package/@marleena/trb-proto)
7
+
8
+ ## Генерация
9
+
10
+ Нужны `protoc` и плагины: `protoc-gen-go`, `protoc-gen-go-grpc`, `protoc-gen-grpc-gateway`, `protoc-gen-js`, `protoc-gen-grpc-web`.
6
11
 
7
12
  ```bash
8
- npm install @marleena/trb-proto
13
+ make gene
9
14
  ```
10
15
 
11
- ## Использование
16
+ Собирает Go, JS/TS и descriptor set. Google API-аннотации для JS генерируются отдельно, чтобы не попасть в `gen/go`.
17
+
18
+ Другие цели: `make desc`, `make buf`.
19
+
20
+ ## npm
21
+
22
+ ```bash
23
+ npm install @marleena/trb-proto
24
+ ```
12
25
 
13
26
  ```ts
14
27
  import { MessageRequest } from '@marleena/trb-proto/example/Example_pb';
@@ -19,35 +32,27 @@ const req = new MessageRequest();
19
32
  req.setText('hello');
20
33
  ```
21
34
 
22
- Другие сервисы: `tinvest`, `nats`, `moex`, `clickhouse`, `manager_indicators`.
35
+ Сервисы: `example`, `tinvest`, `nats`, `moex`, `clickhouse`, `manager_indicators`, `db_api`.
23
36
 
24
- ## Публикация
37
+ `db_api` (`trb.db.api.public.contract.v1.DbApi`) — gRPC API веб-клиента к ClickHouse и Postgres. Новый метод добавляется RPC-ом в `services/db_api/db_api.proto`.
25
38
 
26
- Через код 2FA:
39
+ ## Публикация
27
40
 
28
41
  ```bash
29
42
  make gene
30
43
  make login
31
- make publish OTP=123456
44
+ make publish
32
45
  ```
33
46
 
34
- Через Access Token:
35
-
36
- 1. [Create Granular Access Token](https://www.npmjs.com/settings/marleena/tokens/create)
37
- 2. Permissions: **Read and write**
38
- 3. Packages: `@marleena/trb-proto` (или весь scope `@marleena`)
39
- 4. Включить **Bypass 2FA / Bypass two-factor authentication**
40
- 5. Скопировать токен (`npm_...`) и опубликовать:
47
+ Если `make` не спрашивает 2FA (часто на Windows):
41
48
 
42
49
  ```bash
43
- make logout
44
- make publish TOKEN=npm_ваш_токен
50
+ make publish OTP=123456
45
51
  ```
46
52
 
47
- Сессию `npm login` нужно сбросить (`make logout`), иначе npm игнорирует токен.
48
-
49
- Для GitHub Packages добавьте в `.npmrc`:
53
+ Через [granular token](https://www.npmjs.com/settings/marleena/tokens/create) (Read and write + Bypass 2FA):
50
54
 
51
- ```
52
- @marleena:registry=https://npm.pkg.github.com
55
+ ```bash
56
+ make logout
57
+ make publish TOKEN=npm_...
53
58
  ```
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @fileoverview gRPC-Web generated client stub for clickhouse.grpc
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: clickhouse/clickhouse_grpc.proto
12
+
13
+
14
+ /* eslint-disable */
15
+ // @ts-nocheck
16
+
17
+
18
+ import * as grpcWeb from 'grpc-web';
19
+
20
+ import * as clickhouse_clickhouse_grpc_pb from '../clickhouse/clickhouse_grpc_pb'; // proto import: "clickhouse/clickhouse_grpc.proto"
21
+
22
+
23
+ export class ClickHouseClient {
24
+ client_: grpcWeb.AbstractClientBase;
25
+ hostname_: string;
26
+ credentials_: null | { [index: string]: string; };
27
+ options_: null | { [index: string]: any; };
28
+
29
+ constructor (hostname: string,
30
+ credentials?: null | { [index: string]: string; },
31
+ options?: null | { [index: string]: any; }) {
32
+ if (!options) options = {};
33
+ if (!credentials) credentials = {};
34
+ options['format'] = 'binary';
35
+
36
+ this.client_ = new grpcWeb.GrpcWebClientBase(options);
37
+ this.hostname_ = hostname.replace(/\/+$/, '');
38
+ this.credentials_ = credentials;
39
+ this.options_ = options;
40
+ }
41
+
42
+ methodDescriptorExecuteQuery = new grpcWeb.MethodDescriptor(
43
+ '/clickhouse.grpc.ClickHouse/ExecuteQuery',
44
+ grpcWeb.MethodType.UNARY,
45
+ clickhouse_clickhouse_grpc_pb.QueryInfo,
46
+ clickhouse_clickhouse_grpc_pb.Result,
47
+ (request: clickhouse_clickhouse_grpc_pb.QueryInfo) => {
48
+ return request.serializeBinary();
49
+ },
50
+ clickhouse_clickhouse_grpc_pb.Result.deserializeBinary
51
+ );
52
+
53
+ executeQuery(
54
+ request: clickhouse_clickhouse_grpc_pb.QueryInfo,
55
+ metadata?: grpcWeb.Metadata | null): Promise<clickhouse_clickhouse_grpc_pb.Result>;
56
+
57
+ executeQuery(
58
+ request: clickhouse_clickhouse_grpc_pb.QueryInfo,
59
+ metadata: grpcWeb.Metadata | null,
60
+ callback: (err: grpcWeb.RpcError,
61
+ response: clickhouse_clickhouse_grpc_pb.Result) => void): grpcWeb.ClientReadableStream<clickhouse_clickhouse_grpc_pb.Result>;
62
+
63
+ executeQuery(
64
+ request: clickhouse_clickhouse_grpc_pb.QueryInfo,
65
+ metadata?: grpcWeb.Metadata | null,
66
+ callback?: (err: grpcWeb.RpcError,
67
+ response: clickhouse_clickhouse_grpc_pb.Result) => void) {
68
+ if (callback !== undefined) {
69
+ return this.client_.rpcCall(
70
+ this.hostname_ +
71
+ '/clickhouse.grpc.ClickHouse/ExecuteQuery',
72
+ request,
73
+ metadata || {},
74
+ this.methodDescriptorExecuteQuery,
75
+ callback);
76
+ }
77
+ return this.client_.unaryCall(
78
+ this.hostname_ +
79
+ '/clickhouse.grpc.ClickHouse/ExecuteQuery',
80
+ request,
81
+ metadata || {},
82
+ this.methodDescriptorExecuteQuery);
83
+ }
84
+
85
+ methodDescriptorExecuteQueryWithStreamOutput = new grpcWeb.MethodDescriptor(
86
+ '/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamOutput',
87
+ grpcWeb.MethodType.SERVER_STREAMING,
88
+ clickhouse_clickhouse_grpc_pb.QueryInfo,
89
+ clickhouse_clickhouse_grpc_pb.Result,
90
+ (request: clickhouse_clickhouse_grpc_pb.QueryInfo) => {
91
+ return request.serializeBinary();
92
+ },
93
+ clickhouse_clickhouse_grpc_pb.Result.deserializeBinary
94
+ );
95
+
96
+ executeQueryWithStreamOutput(
97
+ request: clickhouse_clickhouse_grpc_pb.QueryInfo,
98
+ metadata?: grpcWeb.Metadata): grpcWeb.ClientReadableStream<clickhouse_clickhouse_grpc_pb.Result> {
99
+ return this.client_.serverStreaming(
100
+ this.hostname_ +
101
+ '/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamOutput',
102
+ request,
103
+ metadata || {},
104
+ this.methodDescriptorExecuteQueryWithStreamOutput);
105
+ }
106
+
107
+ }
108
+
@@ -0,0 +1,464 @@
1
+ import * as jspb from 'google-protobuf'
2
+
3
+ import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto"
4
+
5
+
6
+ export class NameAndType extends jspb.Message {
7
+ getName(): string;
8
+ setName(value: string): NameAndType;
9
+
10
+ getType(): string;
11
+ setType(value: string): NameAndType;
12
+
13
+ serializeBinary(): Uint8Array;
14
+ toObject(includeInstance?: boolean): NameAndType.AsObject;
15
+ static toObject(includeInstance: boolean, msg: NameAndType): NameAndType.AsObject;
16
+ static serializeBinaryToWriter(message: NameAndType, writer: jspb.BinaryWriter): void;
17
+ static deserializeBinary(bytes: Uint8Array): NameAndType;
18
+ static deserializeBinaryFromReader(message: NameAndType, reader: jspb.BinaryReader): NameAndType;
19
+ }
20
+
21
+ export namespace NameAndType {
22
+ export type AsObject = {
23
+ name: string,
24
+ type: string,
25
+ }
26
+ }
27
+
28
+ export class ExternalTable extends jspb.Message {
29
+ getName(): string;
30
+ setName(value: string): ExternalTable;
31
+
32
+ getColumnsList(): Array<NameAndType>;
33
+ setColumnsList(value: Array<NameAndType>): ExternalTable;
34
+ clearColumnsList(): ExternalTable;
35
+ addColumns(value?: NameAndType, index?: number): NameAndType;
36
+
37
+ getData(): Uint8Array | string;
38
+ getData_asU8(): Uint8Array;
39
+ getData_asB64(): string;
40
+ setData(value: Uint8Array | string): ExternalTable;
41
+
42
+ getFormat(): string;
43
+ setFormat(value: string): ExternalTable;
44
+
45
+ getCompressionType(): string;
46
+ setCompressionType(value: string): ExternalTable;
47
+
48
+ getSettingsMap(): jspb.Map<string, string>;
49
+ clearSettingsMap(): ExternalTable;
50
+
51
+ serializeBinary(): Uint8Array;
52
+ toObject(includeInstance?: boolean): ExternalTable.AsObject;
53
+ static toObject(includeInstance: boolean, msg: ExternalTable): ExternalTable.AsObject;
54
+ static serializeBinaryToWriter(message: ExternalTable, writer: jspb.BinaryWriter): void;
55
+ static deserializeBinary(bytes: Uint8Array): ExternalTable;
56
+ static deserializeBinaryFromReader(message: ExternalTable, reader: jspb.BinaryReader): ExternalTable;
57
+ }
58
+
59
+ export namespace ExternalTable {
60
+ export type AsObject = {
61
+ name: string,
62
+ columnsList: Array<NameAndType.AsObject>,
63
+ data: Uint8Array | string,
64
+ format: string,
65
+ compressionType: string,
66
+ settingsMap: Array<[string, string]>,
67
+ }
68
+ }
69
+
70
+ export class ObsoleteTransportCompression extends jspb.Message {
71
+ getAlgorithm(): ObsoleteTransportCompression.CompressionAlgorithm;
72
+ setAlgorithm(value: ObsoleteTransportCompression.CompressionAlgorithm): ObsoleteTransportCompression;
73
+
74
+ getLevel(): ObsoleteTransportCompression.CompressionLevel;
75
+ setLevel(value: ObsoleteTransportCompression.CompressionLevel): ObsoleteTransportCompression;
76
+
77
+ serializeBinary(): Uint8Array;
78
+ toObject(includeInstance?: boolean): ObsoleteTransportCompression.AsObject;
79
+ static toObject(includeInstance: boolean, msg: ObsoleteTransportCompression): ObsoleteTransportCompression.AsObject;
80
+ static serializeBinaryToWriter(message: ObsoleteTransportCompression, writer: jspb.BinaryWriter): void;
81
+ static deserializeBinary(bytes: Uint8Array): ObsoleteTransportCompression;
82
+ static deserializeBinaryFromReader(message: ObsoleteTransportCompression, reader: jspb.BinaryReader): ObsoleteTransportCompression;
83
+ }
84
+
85
+ export namespace ObsoleteTransportCompression {
86
+ export type AsObject = {
87
+ algorithm: ObsoleteTransportCompression.CompressionAlgorithm,
88
+ level: ObsoleteTransportCompression.CompressionLevel,
89
+ }
90
+
91
+ export enum CompressionAlgorithm {
92
+ NO_COMPRESSION = 0,
93
+ DEFLATE = 1,
94
+ GZIP = 2,
95
+ STREAM_GZIP = 3,
96
+ }
97
+
98
+ export enum CompressionLevel {
99
+ COMPRESSION_NONE = 0,
100
+ COMPRESSION_LOW = 1,
101
+ COMPRESSION_MEDIUM = 2,
102
+ COMPRESSION_HIGH = 3,
103
+ }
104
+ }
105
+
106
+ export class QueryInfo extends jspb.Message {
107
+ getQuery(): string;
108
+ setQuery(value: string): QueryInfo;
109
+
110
+ getQueryId(): string;
111
+ setQueryId(value: string): QueryInfo;
112
+
113
+ getSettingsMap(): jspb.Map<string, string>;
114
+ clearSettingsMap(): QueryInfo;
115
+
116
+ getDatabase(): string;
117
+ setDatabase(value: string): QueryInfo;
118
+
119
+ getInputData(): Uint8Array | string;
120
+ getInputData_asU8(): Uint8Array;
121
+ getInputData_asB64(): string;
122
+ setInputData(value: Uint8Array | string): QueryInfo;
123
+
124
+ getInputDataDelimiter(): Uint8Array | string;
125
+ getInputDataDelimiter_asU8(): Uint8Array;
126
+ getInputDataDelimiter_asB64(): string;
127
+ setInputDataDelimiter(value: Uint8Array | string): QueryInfo;
128
+
129
+ getOutputFormat(): string;
130
+ setOutputFormat(value: string): QueryInfo;
131
+
132
+ getSendOutputColumns(): boolean;
133
+ setSendOutputColumns(value: boolean): QueryInfo;
134
+
135
+ getExternalTablesList(): Array<ExternalTable>;
136
+ setExternalTablesList(value: Array<ExternalTable>): QueryInfo;
137
+ clearExternalTablesList(): QueryInfo;
138
+ addExternalTables(value?: ExternalTable, index?: number): ExternalTable;
139
+
140
+ getUserName(): string;
141
+ setUserName(value: string): QueryInfo;
142
+
143
+ getPassword(): string;
144
+ setPassword(value: string): QueryInfo;
145
+
146
+ getQuota(): string;
147
+ setQuota(value: string): QueryInfo;
148
+
149
+ getJwt(): string;
150
+ setJwt(value: string): QueryInfo;
151
+
152
+ getSessionId(): string;
153
+ setSessionId(value: string): QueryInfo;
154
+
155
+ getSessionCheck(): boolean;
156
+ setSessionCheck(value: boolean): QueryInfo;
157
+
158
+ getSessionTimeout(): number;
159
+ setSessionTimeout(value: number): QueryInfo;
160
+
161
+ getCancel(): boolean;
162
+ setCancel(value: boolean): QueryInfo;
163
+
164
+ getNextQueryInfo(): boolean;
165
+ setNextQueryInfo(value: boolean): QueryInfo;
166
+
167
+ getInputCompressionType(): string;
168
+ setInputCompressionType(value: string): QueryInfo;
169
+
170
+ getOutputCompressionType(): string;
171
+ setOutputCompressionType(value: string): QueryInfo;
172
+
173
+ getOutputCompressionLevel(): number;
174
+ setOutputCompressionLevel(value: number): QueryInfo;
175
+
176
+ getTransportCompressionType(): string;
177
+ setTransportCompressionType(value: string): QueryInfo;
178
+
179
+ getTransportCompressionLevel(): number;
180
+ setTransportCompressionLevel(value: number): QueryInfo;
181
+
182
+ getObsoleteResultCompression(): ObsoleteTransportCompression | undefined;
183
+ setObsoleteResultCompression(value?: ObsoleteTransportCompression): QueryInfo;
184
+ hasObsoleteResultCompression(): boolean;
185
+ clearObsoleteResultCompression(): QueryInfo;
186
+
187
+ getObsoleteCompressionType(): string;
188
+ setObsoleteCompressionType(value: string): QueryInfo;
189
+
190
+ serializeBinary(): Uint8Array;
191
+ toObject(includeInstance?: boolean): QueryInfo.AsObject;
192
+ static toObject(includeInstance: boolean, msg: QueryInfo): QueryInfo.AsObject;
193
+ static serializeBinaryToWriter(message: QueryInfo, writer: jspb.BinaryWriter): void;
194
+ static deserializeBinary(bytes: Uint8Array): QueryInfo;
195
+ static deserializeBinaryFromReader(message: QueryInfo, reader: jspb.BinaryReader): QueryInfo;
196
+ }
197
+
198
+ export namespace QueryInfo {
199
+ export type AsObject = {
200
+ query: string,
201
+ queryId: string,
202
+ settingsMap: Array<[string, string]>,
203
+ database: string,
204
+ inputData: Uint8Array | string,
205
+ inputDataDelimiter: Uint8Array | string,
206
+ outputFormat: string,
207
+ sendOutputColumns: boolean,
208
+ externalTablesList: Array<ExternalTable.AsObject>,
209
+ userName: string,
210
+ password: string,
211
+ quota: string,
212
+ jwt: string,
213
+ sessionId: string,
214
+ sessionCheck: boolean,
215
+ sessionTimeout: number,
216
+ cancel: boolean,
217
+ nextQueryInfo: boolean,
218
+ inputCompressionType: string,
219
+ outputCompressionType: string,
220
+ outputCompressionLevel: number,
221
+ transportCompressionType: string,
222
+ transportCompressionLevel: number,
223
+ obsoleteResultCompression?: ObsoleteTransportCompression.AsObject,
224
+ obsoleteCompressionType: string,
225
+ }
226
+ }
227
+
228
+ export class LogEntry extends jspb.Message {
229
+ getTime(): number;
230
+ setTime(value: number): LogEntry;
231
+
232
+ getTimeMicroseconds(): number;
233
+ setTimeMicroseconds(value: number): LogEntry;
234
+
235
+ getThreadId(): number;
236
+ setThreadId(value: number): LogEntry;
237
+
238
+ getQueryId(): string;
239
+ setQueryId(value: string): LogEntry;
240
+
241
+ getLevel(): LogsLevel;
242
+ setLevel(value: LogsLevel): LogEntry;
243
+
244
+ getSource(): string;
245
+ setSource(value: string): LogEntry;
246
+
247
+ getText(): string;
248
+ setText(value: string): LogEntry;
249
+
250
+ serializeBinary(): Uint8Array;
251
+ toObject(includeInstance?: boolean): LogEntry.AsObject;
252
+ static toObject(includeInstance: boolean, msg: LogEntry): LogEntry.AsObject;
253
+ static serializeBinaryToWriter(message: LogEntry, writer: jspb.BinaryWriter): void;
254
+ static deserializeBinary(bytes: Uint8Array): LogEntry;
255
+ static deserializeBinaryFromReader(message: LogEntry, reader: jspb.BinaryReader): LogEntry;
256
+ }
257
+
258
+ export namespace LogEntry {
259
+ export type AsObject = {
260
+ time: number,
261
+ timeMicroseconds: number,
262
+ threadId: number,
263
+ queryId: string,
264
+ level: LogsLevel,
265
+ source: string,
266
+ text: string,
267
+ }
268
+ }
269
+
270
+ export class Progress extends jspb.Message {
271
+ getReadRows(): number;
272
+ setReadRows(value: number): Progress;
273
+
274
+ getReadBytes(): number;
275
+ setReadBytes(value: number): Progress;
276
+
277
+ getTotalRowsToRead(): number;
278
+ setTotalRowsToRead(value: number): Progress;
279
+
280
+ getWrittenRows(): number;
281
+ setWrittenRows(value: number): Progress;
282
+
283
+ getWrittenBytes(): number;
284
+ setWrittenBytes(value: number): Progress;
285
+
286
+ serializeBinary(): Uint8Array;
287
+ toObject(includeInstance?: boolean): Progress.AsObject;
288
+ static toObject(includeInstance: boolean, msg: Progress): Progress.AsObject;
289
+ static serializeBinaryToWriter(message: Progress, writer: jspb.BinaryWriter): void;
290
+ static deserializeBinary(bytes: Uint8Array): Progress;
291
+ static deserializeBinaryFromReader(message: Progress, reader: jspb.BinaryReader): Progress;
292
+ }
293
+
294
+ export namespace Progress {
295
+ export type AsObject = {
296
+ readRows: number,
297
+ readBytes: number,
298
+ totalRowsToRead: number,
299
+ writtenRows: number,
300
+ writtenBytes: number,
301
+ }
302
+ }
303
+
304
+ export class Stats extends jspb.Message {
305
+ getRows(): number;
306
+ setRows(value: number): Stats;
307
+
308
+ getBlocks(): number;
309
+ setBlocks(value: number): Stats;
310
+
311
+ getAllocatedBytes(): number;
312
+ setAllocatedBytes(value: number): Stats;
313
+
314
+ getAppliedLimit(): boolean;
315
+ setAppliedLimit(value: boolean): Stats;
316
+
317
+ getRowsBeforeLimit(): number;
318
+ setRowsBeforeLimit(value: number): Stats;
319
+
320
+ getAppliedAggregation(): boolean;
321
+ setAppliedAggregation(value: boolean): Stats;
322
+
323
+ getRowsBeforeAggregation(): number;
324
+ setRowsBeforeAggregation(value: number): Stats;
325
+
326
+ serializeBinary(): Uint8Array;
327
+ toObject(includeInstance?: boolean): Stats.AsObject;
328
+ static toObject(includeInstance: boolean, msg: Stats): Stats.AsObject;
329
+ static serializeBinaryToWriter(message: Stats, writer: jspb.BinaryWriter): void;
330
+ static deserializeBinary(bytes: Uint8Array): Stats;
331
+ static deserializeBinaryFromReader(message: Stats, reader: jspb.BinaryReader): Stats;
332
+ }
333
+
334
+ export namespace Stats {
335
+ export type AsObject = {
336
+ rows: number,
337
+ blocks: number,
338
+ allocatedBytes: number,
339
+ appliedLimit: boolean,
340
+ rowsBeforeLimit: number,
341
+ appliedAggregation: boolean,
342
+ rowsBeforeAggregation: number,
343
+ }
344
+ }
345
+
346
+ export class Exception extends jspb.Message {
347
+ getCode(): number;
348
+ setCode(value: number): Exception;
349
+
350
+ getName(): string;
351
+ setName(value: string): Exception;
352
+
353
+ getDisplayText(): string;
354
+ setDisplayText(value: string): Exception;
355
+
356
+ getStackTrace(): string;
357
+ setStackTrace(value: string): Exception;
358
+
359
+ serializeBinary(): Uint8Array;
360
+ toObject(includeInstance?: boolean): Exception.AsObject;
361
+ static toObject(includeInstance: boolean, msg: Exception): Exception.AsObject;
362
+ static serializeBinaryToWriter(message: Exception, writer: jspb.BinaryWriter): void;
363
+ static deserializeBinary(bytes: Uint8Array): Exception;
364
+ static deserializeBinaryFromReader(message: Exception, reader: jspb.BinaryReader): Exception;
365
+ }
366
+
367
+ export namespace Exception {
368
+ export type AsObject = {
369
+ code: number,
370
+ name: string,
371
+ displayText: string,
372
+ stackTrace: string,
373
+ }
374
+ }
375
+
376
+ export class Result extends jspb.Message {
377
+ getQueryId(): string;
378
+ setQueryId(value: string): Result;
379
+
380
+ getTimeZone(): string;
381
+ setTimeZone(value: string): Result;
382
+
383
+ getOutputFormat(): string;
384
+ setOutputFormat(value: string): Result;
385
+
386
+ getOutputColumnsList(): Array<NameAndType>;
387
+ setOutputColumnsList(value: Array<NameAndType>): Result;
388
+ clearOutputColumnsList(): Result;
389
+ addOutputColumns(value?: NameAndType, index?: number): NameAndType;
390
+
391
+ getOutput(): Uint8Array | string;
392
+ getOutput_asU8(): Uint8Array;
393
+ getOutput_asB64(): string;
394
+ setOutput(value: Uint8Array | string): Result;
395
+
396
+ getTotals(): Uint8Array | string;
397
+ getTotals_asU8(): Uint8Array;
398
+ getTotals_asB64(): string;
399
+ setTotals(value: Uint8Array | string): Result;
400
+
401
+ getExtremes(): Uint8Array | string;
402
+ getExtremes_asU8(): Uint8Array;
403
+ getExtremes_asB64(): string;
404
+ setExtremes(value: Uint8Array | string): Result;
405
+
406
+ getLogsList(): Array<LogEntry>;
407
+ setLogsList(value: Array<LogEntry>): Result;
408
+ clearLogsList(): Result;
409
+ addLogs(value?: LogEntry, index?: number): LogEntry;
410
+
411
+ getProgress(): Progress | undefined;
412
+ setProgress(value?: Progress): Result;
413
+ hasProgress(): boolean;
414
+ clearProgress(): Result;
415
+
416
+ getStats(): Stats | undefined;
417
+ setStats(value?: Stats): Result;
418
+ hasStats(): boolean;
419
+ clearStats(): Result;
420
+
421
+ getException(): Exception | undefined;
422
+ setException(value?: Exception): Result;
423
+ hasException(): boolean;
424
+ clearException(): Result;
425
+
426
+ getCancelled(): boolean;
427
+ setCancelled(value: boolean): Result;
428
+
429
+ serializeBinary(): Uint8Array;
430
+ toObject(includeInstance?: boolean): Result.AsObject;
431
+ static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
432
+ static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
433
+ static deserializeBinary(bytes: Uint8Array): Result;
434
+ static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
435
+ }
436
+
437
+ export namespace Result {
438
+ export type AsObject = {
439
+ queryId: string,
440
+ timeZone: string,
441
+ outputFormat: string,
442
+ outputColumnsList: Array<NameAndType.AsObject>,
443
+ output: Uint8Array | string,
444
+ totals: Uint8Array | string,
445
+ extremes: Uint8Array | string,
446
+ logsList: Array<LogEntry.AsObject>,
447
+ progress?: Progress.AsObject,
448
+ stats?: Stats.AsObject,
449
+ exception?: Exception.AsObject,
450
+ cancelled: boolean,
451
+ }
452
+ }
453
+
454
+ export enum LogsLevel {
455
+ LOG_NONE = 0,
456
+ LOG_FATAL = 1,
457
+ LOG_CRITICAL = 2,
458
+ LOG_ERROR = 3,
459
+ LOG_WARNING = 4,
460
+ LOG_NOTICE = 5,
461
+ LOG_INFORMATION = 6,
462
+ LOG_DEBUG = 7,
463
+ LOG_TRACE = 8,
464
+ }