@influxdata/influxdb-client-browser 1.34.0-nightly.3719 → 1.34.0

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.
@@ -0,0 +1,1198 @@
1
+ /**
2
+ * ChunkCombiner is a simplified platform-neutral manipulation of Uint8arrays
3
+ * that allows to process text data on the fly. The implementation can be optimized
4
+ * for the target platform (node vs browser).
5
+ */
6
+ interface ChunkCombiner {
7
+ /**
8
+ * Concatenates first and second chunk.
9
+ * @param first - first chunk
10
+ * @param second - second chunk
11
+ * @returns first + second
12
+ */
13
+ concat(first: Uint8Array, second: Uint8Array): Uint8Array;
14
+ /**
15
+ * Converts chunk into a string.
16
+ * @param chunk - chunk
17
+ * @param start - start index
18
+ * @param end - end index
19
+ * @returns string representation of chunk slice
20
+ */
21
+ toUtf8String(chunk: Uint8Array, start: number, end: number): string;
22
+ /**
23
+ * Creates a new chunk from the supplied chunk.
24
+ * @param chunk - chunk to copy
25
+ * @param start - start index
26
+ * @param end - end index
27
+ * @returns a copy of a chunk slice
28
+ */
29
+ copy(chunk: Uint8Array, start: number, end: number): Uint8Array;
30
+ }
31
+ /**
32
+ * Creates a chunk combiner instance that uses UTF-8
33
+ * TextDecoder to decode Uint8Arrays into strings.
34
+ */
35
+ declare function createTextDecoderCombiner(): ChunkCombiner;
36
+
37
+ /**
38
+ * Allows to cancel a running execution.
39
+ */
40
+ interface Cancellable {
41
+ /**
42
+ * Cancels execution.
43
+ */
44
+ cancel(): void;
45
+ isCancelled(): boolean;
46
+ }
47
+
48
+ /**
49
+ * Type of HTTP headers.
50
+ */
51
+ type HttpHeaders = {
52
+ [header: string]: string | string[] | undefined;
53
+ };
54
+
55
+ /**
56
+ * Informs about a start of response processing.
57
+ * @param headers - response HTTP headers
58
+ * @param statusCode - response status code
59
+ */
60
+ type ResponseStartedFn = (headers: HttpHeaders, statusCode?: number) => void;
61
+ /**
62
+ * Observes communication with the server.
63
+ */
64
+ interface CommunicationObserver<T> {
65
+ /**
66
+ * Data chunk received, can be called multiple times.
67
+ * @param data - data
68
+ * @returns when `false` value is returned and {@link CommunicationObserver.useResume} is defined,
69
+ * future calls to `next` are paused until resume is called.
70
+ */
71
+ next(data: T): void | boolean;
72
+ /**
73
+ * Communication ended with an error.
74
+ */
75
+ error(error: Error): void;
76
+ /**
77
+ * Communication was successful.
78
+ */
79
+ complete(): void;
80
+ /**
81
+ * Informs about a start of response processing.
82
+ */
83
+ responseStarted?: ResponseStartedFn;
84
+ /**
85
+ * Setups cancelllable for this communication.
86
+ */
87
+ useCancellable?: (cancellable: Cancellable) => void;
88
+ /**
89
+ * Setups a callback that resumes reading of next data, it is called whenever
90
+ * {@link CommunicationObserver.next} returns `false`.
91
+ *
92
+ * @param resume - a function that will resume reading of next data when called
93
+ */
94
+ useResume?: (resume: () => void) => void;
95
+ }
96
+
97
+ /**
98
+ * ChunksToLines is a transformation that accepts Uint8Array instances
99
+ * and emmits strings representing CSV lines.
100
+ * @param target - target to emmit CSV lines to
101
+ * @param chunkCombiner - chunk combiner
102
+ * @returns communication obrver to accept Uint8Arrays
103
+ */
104
+ declare function chunksToLines(target: CommunicationObserver<string>, chunkCombiner?: ChunkCombiner): CommunicationObserver<Uint8Array>;
105
+
106
+ /**
107
+ * ChunksToLinesIterable is a transformation that accepts
108
+ * an iterable of Uint8Array instances and returns iterable of lines.
109
+ * @param source - iterable of transport buffers
110
+ * @param chunkCombiner - chunk combiner
111
+ * @returns iterable of lines
112
+ */
113
+ declare function chunksToLinesIterable(source: AsyncIterable<Uint8Array>, chunkCombiner?: ChunkCombiner): AsyncIterableIterator<string>;
114
+
115
+ /**
116
+ * Type of query result column, see {@link https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#data-types }
117
+ */
118
+ type ColumnType = 'boolean' | 'unsignedLong' | 'long' | 'double' | 'string' | 'base64Binary' | 'dateTime:RFC3339' | 'duration' | string;
119
+ /**
120
+ * FluxTableColumn describes {@link http://bit.ly/flux-spec#table | flux table} column.
121
+ */
122
+ interface FluxTableColumn {
123
+ /**
124
+ * Label (e.g., "_start", "_stop", "_time").
125
+ */
126
+ label: string;
127
+ /**
128
+ * The data type of column (e.g., "string", "long", "dateTime:RFC3339").
129
+ */
130
+ dataType: ColumnType;
131
+ /**
132
+ * Boolean flag indicating if the column is a part of the table's group key.
133
+ */
134
+ group: boolean;
135
+ /**
136
+ * Default value to be used for rows whose string value is an empty string.
137
+ */
138
+ defaultValue: string;
139
+ /**
140
+ * Index of this column in a row array.
141
+ */
142
+ index: number;
143
+ /**
144
+ * Get returns a JavaScript object of this column in the supplied result row, using default deserializers.
145
+ * @param row - a data row
146
+ * @returns column value
147
+ */
148
+ get: (row: string[]) => any;
149
+ }
150
+ /**
151
+ * A dictionary of serializers of particular types returned by a flux query.
152
+ * See {@link https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#data-types }
153
+ */
154
+ declare const typeSerializers: Record<ColumnType, (val: string) => any>;
155
+ declare const UNKNOWN_COLUMN: FluxTableColumn;
156
+ /**
157
+ * Creates a new flux table column.
158
+ * @returns column instance
159
+ */
160
+ declare function newFluxTableColumn(): FluxTableColumn;
161
+ /**
162
+ * Creates a flux table column from a partial FluxTableColumn.
163
+ * @param object - source object
164
+ * @returns column instance
165
+ */
166
+ declare function createFluxTableColumn(object: Partial<FluxTableColumn>): FluxTableColumn;
167
+
168
+ /**
169
+ * serializeDateTimeAsDate changes type serializers to return JavaScript Date instances
170
+ * for 'dateTime:RFC3339' query result data type. Empty value is converted to null.
171
+ * @remarks
172
+ * Please note that the result has millisecond precision whereas InfluxDB returns dateTime
173
+ * in nanosecond precision.
174
+ */
175
+ declare function serializeDateTimeAsDate(): void;
176
+ /**
177
+ * serializeDateTimeAsNumber changes type serializers to return milliseconds since epoch
178
+ * for 'dateTime:RFC3339' query result data type. Empty value is converted to null.
179
+ * @remarks
180
+ * Please note that the result has millisecond precision whereas InfluxDB returns dateTime
181
+ * in nanosecond precision.
182
+ */
183
+ declare function serializeDateTimeAsNumber(): void;
184
+ /**
185
+ * serializeDateTimeAsString changes type serializers to return string values
186
+ * for `dateTime:RFC3339` query result data type. Empty value is converted to null.
187
+ */
188
+ declare function serializeDateTimeAsString(): void;
189
+ /**
190
+ * Represents metadata of a {@link http://bit.ly/flux-spec#table | flux table}.
191
+ */
192
+ interface FluxTableMetaData {
193
+ /**
194
+ * Table columns.
195
+ */
196
+ columns: Array<FluxTableColumn>;
197
+ /**
198
+ * Gets columns by name
199
+ * @param label - column label
200
+ * @param errorOnMissingColumn - throw error on missing column (by default), return UNKNOWN_COLUMN when false
201
+ * @returns table column
202
+ * @throws IllegalArgumentError if column is not found
203
+ **/
204
+ column(label: string, errorOnMissingColumn?: boolean): FluxTableColumn;
205
+ /**
206
+ * Creates an object out of the supplied row with the help of column descriptors.
207
+ * @param row - a row with data for each column
208
+ */
209
+ toObject(row: string[]): {
210
+ [key: string]: any;
211
+ };
212
+ /**
213
+ * Gets column values out of the supplied row.
214
+ * @param row - a row with data for each column
215
+ * @param column - column name
216
+ * @returns column value, undefined for unknown column
217
+ */
218
+ get(row: string[], column: string): any;
219
+ }
220
+ /**
221
+ * Created FluxTableMetaData from the columns supplied.
222
+ * @param columns - columns
223
+ * @returns - instance
224
+ */
225
+ declare function createFluxTableMetaData(columns: FluxTableColumn[]): FluxTableMetaData;
226
+ /** Wraps values and associated metadata of a query result row */
227
+ interface Row {
228
+ values: string[];
229
+ tableMeta: FluxTableMetaData;
230
+ }
231
+
232
+ /**
233
+ * Observes results of a flux query.
234
+ */
235
+ interface FluxResultObserver<T> {
236
+ /**
237
+ * Inform about a next record in a table.
238
+ * @param row - flux result
239
+ * @param tableMeta - actual table metata for the row supplied
240
+ * @returns when `false` value is returned and {@link FluxResultObserver.useResume} is defined,
241
+ * future calls to `next` are paused until resume is called.
242
+ */
243
+ next(row: T, tableMeta: FluxTableMetaData): void | boolean;
244
+ /**
245
+ * Signalizes processing error.
246
+ */
247
+ error(error: Error): void;
248
+ /**
249
+ * Signalizes completition.
250
+ */
251
+ complete(): void;
252
+ /**
253
+ * Setups cancellable that can abort flux result processing.
254
+ */
255
+ useCancellable?: (cancellable: Cancellable) => void;
256
+ /**
257
+ * Setups a callback that resumes reading of next data, it is called whenever
258
+ * {@link FluxResultObserver.next} returns `false`.
259
+ *
260
+ * @param resume - a function that will resume reading of next data when called
261
+ */
262
+ useResume?: (resume: () => void) => void;
263
+ }
264
+
265
+ /**
266
+ * LinesToTables creates a transformation that accepts (flux) annotated CSV lines
267
+ * and emits rows together with table metadata.
268
+ */
269
+ declare function linesToTables(consumer: FluxResultObserver<string[]>): CommunicationObserver<string>;
270
+
271
+ /**
272
+ * LinesToRowsIterable is a transformation that accepts
273
+ * an iterable of flux annotated CSV lines and returns
274
+ * an iterable of rows (row values and table metadata).
275
+ */
276
+ declare function linesToRowsIterable(source: AsyncIterable<string>): AsyncIterableIterator<Row>;
277
+
278
+ /**
279
+ * Optimized tokenizer of a single CSV line.
280
+ */
281
+ declare class LineSplitter {
282
+ /** returned value when reused */
283
+ reusedValues: string[];
284
+ /** last length of elements in */
285
+ lastSplitLength: number;
286
+ private _reuse;
287
+ /**
288
+ * Reuse returned array between consecutive calls.
289
+ */
290
+ get reuse(): boolean;
291
+ set reuse(val: boolean);
292
+ /**
293
+ * Sets the reuse flag and returns this.
294
+ */
295
+ withReuse(): LineSplitter;
296
+ /**
297
+ * Splits the supplied line to elements that are separated by
298
+ * comma with values possibly escaped within double quotes ("value")
299
+ * @param line - line
300
+ * @returns array of splitted parts
301
+ */
302
+ splitLine(line: string | undefined | null): string[];
303
+ private getValue;
304
+ }
305
+
306
+ /**
307
+ * StringToLines is a transformation that emmits strings for each CSV
308
+ * line in the supplied source string.
309
+ * @param source - source string
310
+ * @param target - target to emmit CSV lines to
311
+ * @returns communication obrver to accept Uint8Arrays
312
+ */
313
+ declare function stringToLines(source: string, target: CommunicationObserver<string>): void;
314
+
315
+ declare global {
316
+ interface SymbolConstructor {
317
+ readonly observable: symbol;
318
+ }
319
+ }
320
+ /** Symbol.observable or a string "\@\@observable". Used for interop */
321
+ declare const symbolObservable: typeof Symbol.observable | "@@observable";
322
+
323
+ /** Type of {@link Observer.next} */
324
+ type ObserverNext<T> = (value: T) => void;
325
+ /** Type of {@link Observer.error} */
326
+ type ObserverError = (e: any) => void;
327
+ /** Type of {@link Observer.complete} */
328
+ type ObserverComplete = () => void;
329
+ /** Observer mimics Observer from ECMAScript TC39 Observable proposal */
330
+ interface Observer<T> {
331
+ next: ObserverNext<T>;
332
+ error: ObserverError;
333
+ complete: ObserverComplete;
334
+ }
335
+ interface Subscribable<T> {
336
+ subscribe(observer: Partial<Observer<T>>): Subscription;
337
+ }
338
+ /**
339
+ * An observable that aligns with the
340
+ * {@link https://github.com/tc39/proposal-observable | TC39 observable proposal} and
341
+ * can be consumed by other observable libraries like
342
+ * {@link https://github.com/ReactiveX/rxjs | rx js} or
343
+ * {@link https://github.com/zenparsing/zen-observable | zen-observable}.
344
+ */
345
+ interface Observable<T> {
346
+ subscribe(): Subscription;
347
+ subscribe(observer: Partial<Observer<T>>): Subscription;
348
+ subscribe(next: ObserverNext<T>, error?: ObserverError, complete?: ObserverComplete): Subscription;
349
+ [Symbol.observable](): Subscribable<T>;
350
+ }
351
+ /** Subscription mimics Subscription from ECMAScript TC39 Observable proposal */
352
+ interface Subscription {
353
+ readonly closed: boolean;
354
+ unsubscribe(): void;
355
+ }
356
+
357
+ /**
358
+ * A factory that returns async iterables.
359
+ */
360
+ type IterableResultExecutor = () => AsyncIterable<Uint8Array>;
361
+ /**
362
+ * AnnotatedCSVResponse provides various ways of how to
363
+ * process data from an annotated CSV response stream,
364
+ * which is returned as a result of a flux script execution.
365
+ */
366
+ interface AnnotatedCSVResponse {
367
+ /**
368
+ * IterateLines returns iterable of CSV response lines suitable for `for-await` loop consumption.
369
+ * @returns iterable of lines
370
+ */
371
+ iterateLines(): AsyncIterable<string>;
372
+ /**
373
+ * IterateRows returns iterable of response table rows suitable for `for-await` loop consumption.
374
+ * @returns iterable of rows
375
+ */
376
+ iterateRows(): AsyncIterable<Row>;
377
+ /**
378
+ * Lines creates a cold observable of the CSV response lines.
379
+ * @returns observable of CSV result lines
380
+ */
381
+ lines(): Observable<string>;
382
+ /**
383
+ * Rows creates a cold observable of the CSV response rows.
384
+ * @returns observable of CSV result rows
385
+ */
386
+ rows(): Observable<Row>;
387
+ /**
388
+ * ConsumesLines consumes result lines (including empty and annotation lines)
389
+ * through the supplied consumer. See [annotated-csv](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/).
390
+ * @param consumer - csv result lines and error consumer
391
+ */
392
+ consumeLines(consumer: CommunicationObserver<string>): void;
393
+ /**
394
+ * ConsumeRows consumes result rows through the supplied consumer.
395
+ *
396
+ * @param consumer - csv result lines and error consumer
397
+ */
398
+ consumeRows(consumer: FluxResultObserver<string[]>): void;
399
+ /**
400
+ * CollectRows collects all the result rows in the returned Promise.
401
+ * This method is suitable to collect simple results. Use with caution,
402
+ * a possibly huge stream of results is copied to memory.
403
+ *
404
+ * @param rowMapper - maps the supplied row to an item that is then collected,
405
+ * undefined return values are not collected. If no rowMapper is supplied,
406
+ * `row => tableMeta.toObject(row.values)` is used.
407
+ * @returns Promise of mapped results
408
+ */
409
+ collectRows<T>(rowMapper?: (values: string[], tableMeta: FluxTableMetaData) => T | undefined): Promise<Array<T>>;
410
+ /**
411
+ * CollectLines collects all result lines in the returned Promise.
412
+ * This method is suitable to collect simple results. Use with caution,
413
+ * a possibly huge stream of lines is copied to memory.
414
+ *
415
+ * @returns Promise of returned csv lines
416
+ */
417
+ collectLines(): Promise<Array<string>>;
418
+ }
419
+
420
+ /** APIExecutor executes the API and passes its response to the supplied consumer */
421
+ type APIExecutor = (consumer: CommunicationObserver<Uint8Array>) => void;
422
+
423
+ /**
424
+ * Options for sending a request message.
425
+ */
426
+ interface SendOptions {
427
+ /** HTTP method (POST, PUT, GET, PATCH ...) */
428
+ method: string;
429
+ /** Request HTTP headers. */
430
+ headers?: {
431
+ [key: string]: string;
432
+ };
433
+ /** When specified, message body larger than the treshold is gzipped */
434
+ gzipThreshold?: number;
435
+ /** Abort signal */
436
+ signal?: AbortSignal;
437
+ }
438
+ /**
439
+ * Simpified platform-neutral transport layer for communication with InfluxDB.
440
+ */
441
+ interface Transport {
442
+ /**
443
+ * Send data to the server and receive communication events via callbacks.
444
+ *
445
+ * @param path - HTTP request path
446
+ * @param requestBody - HTTP request body
447
+ * @param options - send options
448
+ * @param callbacks - communication callbacks to received data in Uint8Array
449
+ */
450
+ send(path: string, requestBody: string, options: SendOptions, callbacks?: Partial<CommunicationObserver<Uint8Array>>): void;
451
+ /**
452
+ * Sends data to the server and receives decoded result. The type of the result depends on
453
+ * response's content-type (deserialized json, text).
454
+
455
+ * @param path - HTTP request path
456
+ * @param requestBody - request body
457
+ * @param options - send options
458
+ * @returns response data
459
+ */
460
+ request(path: string, requestBody: any, options: SendOptions, responseStarted?: ResponseStartedFn): Promise<any>;
461
+ /**
462
+ * Sends requestBody and returns response chunks in an async iterable
463
+ * that can be easily consumed in an `for-await` loop.
464
+ *
465
+ * @param path - HTTP request path
466
+ * @param requestBody - request body
467
+ * @param options - send options
468
+ * @returns async iterable
469
+ */
470
+ iterate(path: string, requestBody: any, options: SendOptions): AsyncIterableIterator<Uint8Array>;
471
+ /**
472
+ * Combines response chunks to create a single response object.
473
+ */
474
+ readonly chunkCombiner: ChunkCombiner;
475
+ }
476
+
477
+ /**
478
+ * Settings that control the way of how a {@link Point} is serialized
479
+ * to a protocol line.
480
+ */
481
+ interface PointSettings {
482
+ /** default tags to add to every point */
483
+ defaultTags?: {
484
+ [key: string]: string;
485
+ };
486
+ /** convertTime serializes Point's timestamp to a line protocol value */
487
+ convertTime?: (value: string | number | Date | undefined) => string | undefined;
488
+ }
489
+ /**
490
+ * Point defines values of a single measurement.
491
+ */
492
+ declare class Point {
493
+ private name;
494
+ private tags;
495
+ /** escaped field values */
496
+ fields: {
497
+ [key: string]: string;
498
+ };
499
+ private time;
500
+ /**
501
+ * Create a new Point with specified a measurement name.
502
+ *
503
+ * @param measurementName - the measurement name
504
+ */
505
+ constructor(measurementName?: string);
506
+ /**
507
+ * Sets point's measurement.
508
+ *
509
+ * @param name - measurement name
510
+ * @returns this
511
+ */
512
+ measurement(name: string): Point;
513
+ /**
514
+ * Adds a tag. The caller has to ensure that both name and value are not empty
515
+ * and do not end with backslash.
516
+ *
517
+ * @param name - tag name
518
+ * @param value - tag value
519
+ * @returns this
520
+ */
521
+ tag(name: string, value: string): Point;
522
+ /**
523
+ * Adds a boolean field.
524
+ *
525
+ * @param field - field name
526
+ * @param value - field value
527
+ * @returns this
528
+ */
529
+ booleanField(name: string, value: boolean | any): Point;
530
+ /**
531
+ * Adds an integer field.
532
+ *
533
+ * @param name - field name
534
+ * @param value - field value
535
+ * @returns this
536
+ * @throws NaN or out of int64 range value is supplied
537
+ */
538
+ intField(name: string, value: number | any): Point;
539
+ /**
540
+ * Adds an unsigned integer field.
541
+ *
542
+ * @param name - field name
543
+ * @param value - field value
544
+ * @returns this
545
+ * @throws NaN out of range value is supplied
546
+ */
547
+ uintField(name: string, value: number | any): Point;
548
+ /**
549
+ * Adds a number field.
550
+ *
551
+ * @param name - field name
552
+ * @param value - field value
553
+ * @returns this
554
+ * @throws NaN/Infinity/-Infinity is supplied
555
+ */
556
+ floatField(name: string, value: number | any): Point;
557
+ /**
558
+ * Adds a string field.
559
+ *
560
+ * @param name - field name
561
+ * @param value - field value
562
+ * @returns this
563
+ */
564
+ stringField(name: string, value: string | any): Point;
565
+ /**
566
+ * Sets point timestamp. Timestamp can be specified as a Date (preferred), number, string
567
+ * or an undefined value. An undefined value instructs to assign a local timestamp using
568
+ * the client's clock. An empty string can be used to let the server assign
569
+ * the timestamp. A number value represents time as a count of time units since epoch, the
570
+ * exact time unit then depends on the {@link InfluxDB.getWriteApi | precision} of the API
571
+ * that writes the point.
572
+ *
573
+ * Beware that the current time in nanoseconds can't precisely fit into a JS number,
574
+ * which can hold at most 2^53 integer number. Nanosecond precision numbers are thus supplied as
575
+ * a (base-10) string. An application can also use ES2020 BigInt to represent nanoseconds,
576
+ * BigInt's `toString()` returns the required high-precision string.
577
+ *
578
+ * Note that InfluxDB requires the timestamp to fit into int64 data type.
579
+ *
580
+ * @param value - point time
581
+ * @returns this
582
+ */
583
+ timestamp(value: Date | number | string | undefined): Point;
584
+ /**
585
+ * Creates an InfluxDB protocol line out of this instance.
586
+ * @param settings - settings control serialization of a point timestamp and can also add default tags,
587
+ * nanosecond timestamp precision is used when no `settings` or no `settings.convertTime` is supplied.
588
+ * @returns an InfluxDB protocol line out of this instance
589
+ */
590
+ toLineProtocol(settings?: Partial<PointSettings>): string | undefined;
591
+ toString(): string;
592
+ }
593
+
594
+ /**
595
+ * Asynchronous API that writes time-series data into InfluxDB.
596
+ * This API always buffers points/lines to create batches under the hood
597
+ * to optimize data transfer to InfluxDB server, use `flush` to send
598
+ * the buffered data to InfluxDB immediately.
599
+ */
600
+ interface WriteApi extends PointSettings {
601
+ /**
602
+ * Instructs to use the following default tags when writing points.
603
+ * Not applicable for writing records/lines.
604
+ * @param tags - default tags
605
+ * @returns this
606
+ */
607
+ useDefaultTags(tags: {
608
+ [key: string]: string;
609
+ }): WriteApi;
610
+ /**
611
+ * Write a line of [Line Protocol](https://bit.ly/2QL99fu).
612
+ *
613
+ * @param record - line of InfluxDB Line Protocol
614
+ */
615
+ writeRecord(record: string): void;
616
+ /**
617
+ * Write lines of [Line Protocol](https://bit.ly/2QL99fu).
618
+ *
619
+ * @param records - lines in InfluxDB Line Protocol
620
+ */
621
+ writeRecords(records: Array<string>): void;
622
+ /**
623
+ * Write point.
624
+ *
625
+ * @param point - point to write
626
+ */
627
+ writePoint(point: Point): void;
628
+ /**
629
+ * Write points.
630
+ *
631
+ * @param points - points to write
632
+ */
633
+ writePoints(points: ArrayLike<Point>): void;
634
+ /**
635
+ * Flushes pending writes to the server.
636
+ * @param withRetryBuffer - flush also all the scheduled retries
637
+ * @returns completition promise
638
+ */
639
+ flush(withRetryBuffer?: boolean): Promise<void>;
640
+ /**
641
+ * Flushes this writer and cancels retries of write operations that failed.
642
+ * @returns completition promise
643
+ */
644
+ close(): Promise<void>;
645
+ /**
646
+ * Unlike close, dispose simply quits without trying to flush
647
+ * the buffered data.
648
+ * @returns count of points that were not written to InfluxDB
649
+ */
650
+ dispose(): number;
651
+ /**
652
+ * HTTP path and query parameters of InfluxDB query API. It is
653
+ * automatically initialized to `/api/v2/write?org=...`,
654
+ * but it can be changed after the API is obtained.
655
+ */
656
+ path: string;
657
+ }
658
+
659
+ /**
660
+ * Option for the communication with InfluxDB server.
661
+ */
662
+ interface ConnectionOptions {
663
+ /** base URL */
664
+ url: string;
665
+ /** authentication token */
666
+ token?: string;
667
+ /**
668
+ * socket timeout, 10000 milliseconds by default in node.js
669
+ * @defaultValue 10000
670
+ */
671
+ timeout?: number;
672
+ /**
673
+ * TransportOptions supply extra options for the transport layer, they differ between node.js and browser/deno.
674
+ * Node.js transport accepts options specified in {@link https://nodejs.org/api/http.html#http_http_request_options_callback | http.request } or
675
+ * {@link https://nodejs.org/api/https.html#https_https_request_options_callback | https.request }. For example, an `agent` property can be set to
676
+ * {@link https://www.npmjs.com/package/proxy-http-agent | setup HTTP/HTTPS proxy }, {@link https://nodejs.org/api/tls.html#tls_tls_connect_options_callback | rejectUnauthorized }
677
+ * property can disable TLS server certificate verification. Additionally,
678
+ * {@link https://github.com/follow-redirects/follow-redirects | follow-redirects } property can be also specified
679
+ * in order to follow redirects in node.js.
680
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/fetch | fetch } is used under the hood in browser/deno.
681
+ * For example,
682
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/fetch | redirect } property can be set to 'error' to abort request if a redirect occurs.
683
+ */
684
+ transportOptions?: {
685
+ [key: string]: any;
686
+ };
687
+ /**
688
+ * Default HTTP headers to send with every request.
689
+ */
690
+ headers?: Record<string, string>;
691
+ /**
692
+ * Full HTTP web proxy URL including schema, for example http://your-proxy:8080.
693
+ */
694
+ proxyUrl?: string;
695
+ }
696
+ /** default connection options */
697
+ declare const DEFAULT_ConnectionOptions: Partial<ConnectionOptions>;
698
+ /**
699
+ * Options that configure strategy for retrying failed requests.
700
+ */
701
+ interface RetryDelayStrategyOptions {
702
+ /** add `random(retryJitter)` milliseconds delay when retrying HTTP calls */
703
+ retryJitter: number;
704
+ /** minimum delay when retrying write (milliseconds) */
705
+ minRetryDelay: number;
706
+ /** maximum delay when retrying write (milliseconds) */
707
+ maxRetryDelay: number;
708
+ /** base for the exponential retry delay */
709
+ exponentialBase: number;
710
+ /**
711
+ * randomRetry indicates whether the next retry delay is deterministic (false) or random (true).
712
+ * The deterministic delay starts with `minRetryDelay * exponentialBase` and it is multiplied
713
+ * by `exponentialBase` until it exceeds `maxRetryDelay`.
714
+ * When random is `true`, the next delay is computed as a random number between next retry attempt (upper)
715
+ * and the lower number in the deterministic sequence. `random(retryJitter)` is added to every returned value.
716
+ */
717
+ randomRetry: boolean;
718
+ }
719
+ /**
720
+ * Options that configure strategy for retrying failed InfluxDB write operations.
721
+ */
722
+ interface WriteRetryOptions extends RetryDelayStrategyOptions {
723
+ /**
724
+ * WriteFailed is called to inform about write errors.
725
+ * @param this - the instance of the API that failed
726
+ * @param error - write error
727
+ * @param lines - failed lines
728
+ * @param attempt - count of already failed attempts to write the lines (1 ... maxRetries+1)
729
+ * @param expires - expiration time for the lines to be retried in millis since epoch
730
+ * @returns a Promise to force the API to use it as a result of the flush operation,
731
+ * void/undefined to continue with default retry mechanism
732
+ */
733
+ writeFailed(this: WriteApi, error: Error, lines: Array<string>, attempt: number, expires: number): Promise<void> | void;
734
+ /**
735
+ * WriteSuccess is informed about successfully written lines.
736
+ * @param this - the instance of the API in use
737
+ * @param lines - written lines
738
+ */
739
+ writeSuccess(this: WriteApi, lines: Array<string>): void;
740
+ /**
741
+ * WriteRetrySkipped is informed about lines that were removed from the retry buffer
742
+ * to keep the size of the retry buffer under the configured limit (maxBufferLines).
743
+ * @param entry - lines that were skipped
744
+ */
745
+ writeRetrySkipped(entry: {
746
+ lines: Array<string>;
747
+ expires: number;
748
+ }): void;
749
+ /** max count of retries after the first write fails */
750
+ maxRetries: number;
751
+ /** max time (millis) that can be spent with retries */
752
+ maxRetryTime: number;
753
+ /** the maximum size of retry-buffer (in lines) */
754
+ maxBufferLines: number;
755
+ }
756
+ /**
757
+ * Options used by {@link WriteApi} .
758
+ */
759
+ interface WriteOptions extends WriteRetryOptions {
760
+ /** max number of records/lines to send in a batch */
761
+ batchSize: number;
762
+ /** delay between data flushes in milliseconds, at most `batch size` records are sent during flush */
763
+ flushInterval: number;
764
+ /** default tags, unescaped */
765
+ defaultTags?: Record<string, string>;
766
+ /** HTTP headers that will be sent with every write request */
767
+ headers?: {
768
+ [key: string]: string;
769
+ };
770
+ /** When specified, write bodies larger than the threshold are gzipped */
771
+ gzipThreshold?: number;
772
+ /** max size of a batch in bytes */
773
+ maxBatchBytes: number;
774
+ /** InfluxDB Enterprise write consistency as explained in https://docs.influxdata.com/enterprise_influxdb/v1.9/concepts/clustering/#write-consistency */
775
+ consistency?: 'any' | 'one' | 'quorum' | 'all';
776
+ }
777
+ /** default RetryDelayStrategyOptions */
778
+ declare const DEFAULT_RetryDelayStrategyOptions: {
779
+ retryJitter: number;
780
+ minRetryDelay: number;
781
+ maxRetryDelay: number;
782
+ exponentialBase: number;
783
+ randomRetry: boolean;
784
+ };
785
+ /** default writeOptions */
786
+ declare const DEFAULT_WriteOptions: WriteOptions;
787
+ /**
788
+ * Options used by {@link InfluxDB} .
789
+ */
790
+ interface ClientOptions extends ConnectionOptions {
791
+ /** supplies and overrides default writing options */
792
+ writeOptions?: Partial<WriteOptions>;
793
+ /** specifies custom transport */
794
+ transport?: Transport;
795
+ }
796
+ /**
797
+ * Timestamp precision used in write operations.
798
+ * See {@link https://docs.influxdata.com/influxdb/latest/api/#operation/PostWrite }
799
+ */
800
+ type WritePrecisionType = 'ns' | 'us' | 'ms' | 's';
801
+
802
+ /**
803
+ * Strategy for calculating retry delays.
804
+ */
805
+ interface RetryDelayStrategy {
806
+ /**
807
+ * Returns delay for a next retry
808
+ * @param error - reason for retrying
809
+ * @param failedAttempts - a count of already failed attempts, 1 being the first
810
+ * @returns milliseconds to wait before retrying
811
+ */
812
+ nextDelay(error?: Error, failedAttempts?: number): number;
813
+ /** Implementation should reset its state, this is mandatory to call upon success. */
814
+ success(): void;
815
+ }
816
+ /**
817
+ * Interface for errors to inform that an associated operation can be retried.
818
+ */
819
+ interface RetriableDecision {
820
+ /**
821
+ * Informs whether this can be retried.
822
+ */
823
+ canRetry(): boolean;
824
+ /**
825
+ * Get the delay in milliseconds to retry the action.
826
+ * @returns 0 to let the implementation decide, miliseconds delay otherwise
827
+ */
828
+ retryAfter(): number;
829
+ }
830
+ /** isStatusCodeRetriable checks whether the supplied HTTP status code is retriable. */
831
+ declare function isStatusCodeRetriable(statusCode: number): boolean;
832
+ /** IllegalArgumentError is thrown when illegal argument is supplied. */
833
+ declare class IllegalArgumentError extends Error {
834
+ constructor(message: string);
835
+ }
836
+ /**
837
+ * A general HTTP error.
838
+ */
839
+ declare class HttpError extends Error implements RetriableDecision {
840
+ readonly statusCode: number;
841
+ readonly statusMessage: string | undefined;
842
+ readonly body?: string | undefined;
843
+ readonly contentType?: string | undefined | null;
844
+ private _retryAfter;
845
+ /** application error code, when available */
846
+ code: string | undefined;
847
+ /** json error response */
848
+ json: any;
849
+ headers?: HttpHeaders | undefined;
850
+ constructor(statusCode: number, statusMessage: string | undefined, body?: string | undefined, retryAfter?: string | undefined | null, contentType?: string | undefined | null, message?: string, headers?: HttpHeaders | undefined);
851
+ private setRetryAfter;
852
+ canRetry(): boolean;
853
+ retryAfter(): number;
854
+ }
855
+ /**
856
+ * Tests the error in order to know if an HTTP call can be retried.
857
+ * @param error - error to test
858
+ * @returns true for a retriable error
859
+ */
860
+ declare function canRetryHttpCall(error: any): boolean;
861
+ /**
862
+ * Gets retry delay from the supplied error, possibly using random number up to retryJitter.
863
+ */
864
+ declare function getRetryDelay(error?: Error, retryJitter?: number): number;
865
+ /** RequestTimedOutError indicates request timeout in the communication with the server */
866
+ declare class RequestTimedOutError extends Error implements RetriableDecision {
867
+ constructor();
868
+ canRetry(): boolean;
869
+ retryAfter(): number;
870
+ }
871
+ /** AbortError indicates that the communication with the server was aborted */
872
+ declare class AbortError extends Error implements RetriableDecision {
873
+ constructor();
874
+ canRetry(): boolean;
875
+ retryAfter(): number;
876
+ }
877
+
878
+ /**
879
+ * Provides functions escape specific parts in InfluxDB line protocol.
880
+ */
881
+ declare const escape: {
882
+ /**
883
+ * Measurement escapes measurement names.
884
+ */
885
+ measurement: (value: string) => string;
886
+ /**
887
+ * Quoted escapes quoted values, such as database names.
888
+ */
889
+ quoted: (value: string) => string;
890
+ /**
891
+ * TagEscaper escapes tag keys, tag values, and field keys.
892
+ */
893
+ tag: (value: string) => string;
894
+ };
895
+
896
+ declare function useProcessHrtime(use: boolean): boolean;
897
+ /**
898
+ * Exposes functions that creates strings that represent a timestamp that
899
+ * can be used in the line protocol. Micro and nano timestamps are emulated
900
+ * depending on the js platform in use.
901
+ */
902
+ declare const currentTime: {
903
+ s: () => string;
904
+ ms: () => string;
905
+ us: () => string;
906
+ ns: () => string;
907
+ seconds: () => string;
908
+ millis: () => string;
909
+ micros: () => string;
910
+ nanos: () => string;
911
+ };
912
+ /**
913
+ * dateToProtocolTimestamp provides converters for JavaScript Date to InfluxDB Write Protocol Timestamp. Keys are supported precisions.
914
+ */
915
+ declare const dateToProtocolTimestamp: {
916
+ s: (d: Date) => string;
917
+ ms: (d: Date) => string;
918
+ us: (d: Date) => string;
919
+ ns: (d: Date) => string;
920
+ };
921
+ /**
922
+ * convertTimeToNanos converts Point's timestamp to a string.
923
+ * @param value - supported timestamp value
924
+ * @returns line protocol value
925
+ */
926
+ declare function convertTimeToNanos(value: string | number | Date | undefined): string | undefined;
927
+
928
+ /**
929
+ * Logging interface.
930
+ */
931
+ interface Logger {
932
+ error(message: string, err?: any): void;
933
+ warn(message: string, err?: any): void;
934
+ }
935
+ /**
936
+ * Logger that logs to console.out
937
+ */
938
+ declare const consoleLogger: Logger;
939
+ declare const Log: Logger;
940
+ /**
941
+ * Sets custom logger.
942
+ * @param logger - logger to use
943
+ * @returns previous logger
944
+ */
945
+ declare function setLogger(logger: Logger): Logger;
946
+
947
+ /** Property that offers a function that returns flux-sanitized value of an object. */
948
+ declare const FLUX_VALUE: unique symbol;
949
+ /**
950
+ * A flux parameter can print its (sanitized) flux value.
951
+ */
952
+ interface FluxParameterLike {
953
+ [FLUX_VALUE](): string;
954
+ }
955
+ /**
956
+ * Represents a parameterized query.
957
+ */
958
+ interface ParameterizedQuery {
959
+ /**
960
+ * Returns flux query with sanitized parameters.
961
+ */
962
+ toString(): string;
963
+ }
964
+ /**
965
+ * Creates a flux string literal.
966
+ */
967
+ declare function fluxString(value: any): FluxParameterLike;
968
+ /**
969
+ * Sanitizes float value to avoid injections.
970
+ * @param value - InfluxDB float literal
971
+ * @returns sanitized float value
972
+ * @throws Error if the the value cannot be sanitized
973
+ */
974
+ declare function sanitizeFloat(value: any): string;
975
+ /**
976
+ * Creates a flux float literal.
977
+ */
978
+ declare function fluxFloat(value: any): FluxParameterLike;
979
+ /**
980
+ * Sanitizes integer value to avoid injections.
981
+ * @param value - InfluxDB integer literal
982
+ * @returns sanitized integer value
983
+ * @throws Error if the the value cannot be sanitized
984
+ */
985
+ declare function sanitizeInteger(value: any): string;
986
+ /**
987
+ * Creates a flux integer literal.
988
+ */
989
+ declare function fluxInteger(value: any): FluxParameterLike;
990
+ /**
991
+ * Creates flux date-time literal.
992
+ */
993
+ declare function fluxDateTime(value: any): FluxParameterLike;
994
+ /**
995
+ * Creates flux date-time literal.
996
+ */
997
+ declare function fluxDuration(value: any): FluxParameterLike;
998
+ /**
999
+ * Creates flux regexp literal out of a regular expression. See
1000
+ * https://docs.influxdata.com/flux/latest/data-types/basic/regexp/#regular-expression-syntax
1001
+ * for details.
1002
+ */
1003
+ declare function fluxRegExp(value: any): FluxParameterLike;
1004
+ /**
1005
+ * Creates flux boolean literal.
1006
+ */
1007
+ declare function fluxBool(value: any): FluxParameterLike;
1008
+ /**
1009
+ * Assumes that the supplied value is flux expression or literal that does not need sanitizing.
1010
+ *
1011
+ * @param value - any value
1012
+ * @returns the supplied value as-is
1013
+ */
1014
+ declare function fluxExpression(value: any): FluxParameterLike;
1015
+ /**
1016
+ * Escapes content of the supplied parameter so that it can be safely embedded into flux query.
1017
+ * @param value - parameter value
1018
+ * @returns sanitized flux value or an empty string if it cannot be converted
1019
+ */
1020
+ declare function toFluxValue(value: any): string;
1021
+ /**
1022
+ * Flux is a tagged template that sanitizes supplied parameters
1023
+ * to avoid injection attacks in flux.
1024
+ */
1025
+ declare function flux(strings: TemplateStringsArray, ...values: any): ParameterizedQuery;
1026
+
1027
+ /** QueryOptions contains QueryApi configuration options. */
1028
+ interface QueryOptions {
1029
+ /**
1030
+ * Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably.
1031
+ */
1032
+ org: string;
1033
+ /**
1034
+ * Type of the query, default is "flux"
1035
+ */
1036
+ type?: 'flux';
1037
+ /**
1038
+ * Requests gzip encoded response.
1039
+ */
1040
+ gzip?: boolean;
1041
+ /**
1042
+ * Specifies the time that should be reported as "now" in the query. RFC3339 value must be returned,
1043
+ * for example `new Date().toISOString()`.
1044
+ */
1045
+ now?: () => string;
1046
+ /**
1047
+ * HTTP headers that will be sent with every query request.
1048
+ */
1049
+ headers?: {
1050
+ [key: string]: string;
1051
+ };
1052
+ }
1053
+ /**
1054
+ * Query InfluxDB. Provides methods that notify about result lines of the executed query.
1055
+ * See {@link https://docs.influxdata.com/influxdb/latest/api/#operation/PostQuery }
1056
+ */
1057
+ interface QueryApi {
1058
+ /**
1059
+ * Returns a new query API with extra options applied.
1060
+ * @param options - query options to use
1061
+ * @returns queryApi instance with the supplied options
1062
+ */
1063
+ with(options: Partial<QueryOptions>): QueryApi;
1064
+ /**
1065
+ * Response returns an AnnotatedCSVResponse instance that executes
1066
+ * the query when asked for data.
1067
+ *
1068
+ * @param query - query
1069
+ * @returns response with various methods to process data from the returned annotated
1070
+ * CSV response data stream
1071
+ */
1072
+ response(query: string | ParameterizedQuery): AnnotatedCSVResponse;
1073
+ /**
1074
+ * IterateLines executes the supplied query and returns results in
1075
+ * an async iterable of annotated CSV lines.
1076
+ * Async iterables are best consumed by `for-await` loop.
1077
+ *
1078
+ * @param query - query
1079
+ * @returns async iterable of CSV result lines
1080
+ */
1081
+ iterateLines(query: string | ParameterizedQuery): AsyncIterable<string>;
1082
+ /**
1083
+ * IterateRows executes the supplied query and returns results in
1084
+ * an async iterable of row data and table metadata pairs.
1085
+ * Async iterables are best consumed by `for-await` loop.
1086
+ *
1087
+ * @param query - query
1088
+ * @returns async iterable of CSV result lines
1089
+ */
1090
+ iterateRows(query: string | ParameterizedQuery): AsyncIterable<Row>;
1091
+ /**
1092
+ * Creates a cold observable of the lines returned by the given query.
1093
+ *
1094
+ * @param query - query
1095
+ * @returns observable of CSV result lines
1096
+ */
1097
+ lines(query: string | ParameterizedQuery): Observable<string>;
1098
+ /**
1099
+ * Creates a cold observable of the rows returned by the given query.
1100
+ *
1101
+ * @param query - query
1102
+ * @returns observable of result rows
1103
+ */
1104
+ rows(query: string | ParameterizedQuery): Observable<Row>;
1105
+ /**
1106
+ * Executes the query and receives result lines (including empty and annotation lines)
1107
+ * through the supplied consumer. See [annotated-csv](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/).
1108
+ *
1109
+ * @param query - query
1110
+ * @param consumer - csv result lines and error consumer
1111
+ */
1112
+ queryLines(query: string | ParameterizedQuery, consumer: CommunicationObserver<string>): void;
1113
+ /**
1114
+ * Executes the query and receives table metadata and rows through the supplied consumer.
1115
+ *
1116
+ * @param query - query
1117
+ * @param consumer - result rows and error consumer
1118
+ */
1119
+ queryRows(query: string | ParameterizedQuery, consumer: FluxResultObserver<string[]>): void;
1120
+ /**
1121
+ * QueryRaw executes a query and returns the full response as a string.
1122
+ * Use with caution, a possibly huge stream is copied to memory.
1123
+ *
1124
+ * @param query - query
1125
+ * @returns Promise of response text
1126
+ */
1127
+ queryRaw(query: string | ParameterizedQuery): Promise<string>;
1128
+ /**
1129
+ * CollectRows executes the query and collects all the results in the returned Promise.
1130
+ * This method is suitable to collect simple results. Use with caution,
1131
+ * a possibly huge stream of results is copied to memory.
1132
+ *
1133
+ * @param query - query
1134
+ * @param rowMapper - maps the supplied row to an item that is then collected,
1135
+ * undefined return values are not collected. If no rowMapper is supplied,
1136
+ * `row => tableMeta.toObject(row.values)` is used.
1137
+ * @returns Promise of mapped results
1138
+ */
1139
+ collectRows<T>(query: string | ParameterizedQuery, rowMapper?: (values: string[], tableMeta: FluxTableMetaData) => T | undefined): Promise<Array<T>>;
1140
+ /**
1141
+ * CollectLines executes the query and collects all result lines in the returned Promise.
1142
+ * This method is suitable to collect simple results. Use with caution,
1143
+ * a possibly huge stream of lines is copied to memory.
1144
+ *
1145
+ * @param query - query
1146
+ * @returns Promise of returned csv lines
1147
+ */
1148
+ collectLines(query: string | ParameterizedQuery): Promise<Array<string>>;
1149
+ }
1150
+
1151
+ /**
1152
+ * InfluxDB entry point that configures communication with InfluxDB server
1153
+ * and provide APIs to write and query data.
1154
+ */
1155
+ declare class InfluxDB {
1156
+ private _options;
1157
+ readonly transport: Transport;
1158
+ readonly processCSVResponse: (executor: APIExecutor, iterableResultExecutor: IterableResultExecutor) => AnnotatedCSVResponse;
1159
+ /**
1160
+ * Creates influxdb client options from an options object or url.
1161
+ * @param options - client options
1162
+ */
1163
+ constructor(options: ClientOptions | string);
1164
+ /**
1165
+ * Creates WriteApi for the supplied organization and bucket. BEWARE that returned instances must be closed
1166
+ * in order to flush the remaining data and close already scheduled retry executions.
1167
+ *
1168
+ * @remarks
1169
+ * Use {@link WriteOptions} to customize retry strategy options, data chunking
1170
+ * and flushing options. See {@link DEFAULT_WriteOptions} to see the defaults.
1171
+ *
1172
+ * See also {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/write.mjs | write example},
1173
+ * {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/writeAdvanced.mjs | writeAdvanced example},
1174
+ * and {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/index.html | browser example}.
1175
+ *
1176
+ * @param org - Specifies the destination organization for writes. Takes either the ID or Name interchangeably.
1177
+ * @param bucket - The destination bucket for writes.
1178
+ * @param precision - Timestamp precision for line items.
1179
+ * @param writeOptions - Custom write options.
1180
+ * @returns WriteApi instance
1181
+ */
1182
+ getWriteApi(org: string, bucket: string, precision?: WritePrecisionType, writeOptions?: Partial<WriteOptions>): WriteApi;
1183
+ /**
1184
+ * Creates QueryApi for the supplied organization .
1185
+ *
1186
+ * @remarks
1187
+ * See also {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/query.ts | query.ts example},
1188
+ * {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/queryWithParams.mjs | queryWithParams.mjs example},
1189
+ * {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/rxjs-query.ts | rxjs-query.ts example},
1190
+ * and {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/index.html | browser example},
1191
+ *
1192
+ * @param org - organization or query options
1193
+ * @returns QueryApi instance
1194
+ */
1195
+ getQueryApi(org: string | QueryOptions): QueryApi;
1196
+ }
1197
+
1198
+ export { type APIExecutor, AbortError, type AnnotatedCSVResponse, type Cancellable, type ChunkCombiner, type ClientOptions, type ColumnType, type CommunicationObserver, type ConnectionOptions, DEFAULT_ConnectionOptions, DEFAULT_RetryDelayStrategyOptions, DEFAULT_WriteOptions, FLUX_VALUE, type FluxParameterLike, type FluxResultObserver, type FluxTableColumn, type FluxTableMetaData, type HttpHeaders as Headers, HttpError, type HttpHeaders, IllegalArgumentError, InfluxDB, type IterableResultExecutor, LineSplitter, Log, type Logger, type Observable, type Observer, type ObserverComplete, type ObserverError, type ObserverNext, type ParameterizedQuery, Point, type PointSettings, type QueryApi, type QueryOptions, RequestTimedOutError, type ResponseStartedFn, type RetriableDecision, type RetryDelayStrategy, type RetryDelayStrategyOptions, type Row, type SendOptions, type Subscribable, type Subscription, type Transport, UNKNOWN_COLUMN, type WriteApi, type WriteOptions, type WritePrecisionType, type WriteRetryOptions, canRetryHttpCall, chunksToLines, chunksToLinesIterable, consoleLogger, convertTimeToNanos, createFluxTableColumn, createFluxTableMetaData, createTextDecoderCombiner, currentTime, dateToProtocolTimestamp, escape, flux, fluxBool, fluxDateTime, fluxDuration, fluxExpression, fluxFloat, fluxInteger, fluxRegExp, fluxString, getRetryDelay, isStatusCodeRetriable, linesToRowsIterable, linesToTables, newFluxTableColumn, sanitizeFloat, sanitizeInteger, serializeDateTimeAsDate, serializeDateTimeAsNumber, serializeDateTimeAsString, setLogger, stringToLines, symbolObservable, toFluxValue, typeSerializers, useProcessHrtime };