22/* eslint-disable */
33export declare class InfluxDbClient {
44 constructor ( addr : string , token ?: string | undefined | null , serializer ?: Serializer | undefined | null , options ?: FlightOptions | undefined | null )
5- query ( queryPayload : QueryPayload ) : ReadableStream < LibraryReturnType > | ReadableStream < Record < string , any > > | ReadableStream < Buffer >
6- /**
7- * # Safety
8- *
9- * This function should not be called before the horsemen are ready.
10- */
11- write ( lines : Array < string > , database : string , writeOptions ?: WriteOptions | undefined | null , org ?: string | undefined | null ) : Promise < void >
5+ query ( queryPayload : QueryPayload ) : ReadableStream < Record < string , any > > | ReadableStream < Buffer >
6+ write ( lines : Array < string > , database : string , writeOptions ?: WriteOptions | undefined | null , org ?: string | undefined | null ) : void
127}
138export type InfluxDBClient = InfluxDbClient
149
@@ -76,14 +71,13 @@ export interface FlightOptions {
7671 keepAliveTimeout ?: number
7772}
7873
79- export type LibraryReturnType =
80- Record < string , any | undefined | null >
81-
82- export type PointFieldType = 'float' |
83- 'integer' |
84- 'uinteger' |
85- 'string' |
86- 'boolean' ;
74+ export declare const enum PointFieldType {
75+ Float = 'float' ,
76+ Integer = 'integer' ,
77+ UInteger = 'uinteger' ,
78+ String = 'string' ,
79+ Boolean = 'boolean'
80+ }
8781
8882export type PointFieldValue =
8983 | { type : 'Float' , field0 : number }
@@ -103,34 +97,40 @@ export interface QueryPayload {
10397 params ?: Record < string , string >
10498}
10599
106- export type QueryType = 'sql' |
107- 'influxql' |
108- 'flight_sql' ;
100+ export declare const enum QueryType {
101+ Sql = 'sql' ,
102+ InfluxQl = 'influxql' ,
103+ FlightSql = 'flight_sql'
104+ }
109105
110106export type ReturnDataType =
111107 Record < string , any | undefined | null >
112108
113- export type Serializer = 'unsafe' |
114- 'library' |
115- 'raw' ;
109+ export declare const enum Serializer {
110+ Unsafe = 0
111+ }
116112
117- export type TimeUnitV2 = /** Time in seconds. */
118- 's' |
119- /** Time in milliseconds. */
120- 'ms' |
121- /** Time in microseconds. */
122- 'us' |
123- /** Time in nanoseconds. */
124- 'ns' ;
113+ export declare const enum TimeUnitV2 {
114+ /** Time in seconds. */
115+ Second = 's' ,
116+ /** Time in milliseconds. */
117+ Millisecond = 'ms' ,
118+ /** Time in microseconds. */
119+ Microsecond = 'us' ,
120+ /** Time in nanoseconds. */
121+ Nanosecond = 'ns'
122+ }
125123
126- export type TimeUnitV3 = /** Time in seconds. */
127- 'second' |
128- /** Time in milliseconds. */
129- 'millisecond' |
130- /** Time in microseconds. */
131- 'microsecond' |
132- /** Time in nanoseconds. */
133- 'nanosecond' ;
124+ export declare const enum TimeUnitV3 {
125+ /** Time in seconds. */
126+ Second = 'second' ,
127+ /** Time in milliseconds. */
128+ Millisecond = 'millisecond' ,
129+ /** Time in microseconds. */
130+ Microsecond = 'microsecond' ,
131+ /** Time in nanoseconds. */
132+ Nanosecond = 'nanosecond'
133+ }
134134
135135export interface WriteOptions {
136136 /** Precision to use in writes for timestamp. default ns */
0 commit comments