influx 5.9.5 → 5.9.7

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.
@@ -264,7 +264,7 @@ class NanosecondsDateManipulator {
264
264
  case "u":
265
265
  timestamp *= 1000;
266
266
  case "n": {
267
- const date = new Date(timestamp / nsPer.ms);
267
+ const date = new Date(Math.round(timestamp / nsPer.ms));
268
268
  date._nanoTime = String(timestamp);
269
269
  date.getNanoTime = nanoDateMethods.getNanoTimeFromStamp;
270
270
  date.toNanoISOString = nanoDateMethods.toNanoISOStringFromStamp;
@@ -763,8 +763,12 @@ export declare class InfluxDB {
763
763
  * ])
764
764
  */
765
765
  writeMeasurement(measurement: string, points: IPoint[], options?: IWriteOptions): Promise<void>;
766
- query<T>(query: string[], options?: IQueryOptions): Promise<Array<IResults<T>>>;
767
- query<T>(query: string, options?: IQueryOptions): Promise<IResults<T>>;
766
+ query<T>(query: string[], options?: IQueryOptions): Promise<Array<IResults<T & {
767
+ time: grammar.INanoDate;
768
+ }>>>;
769
+ query<T>(query: string, options?: IQueryOptions): Promise<IResults<T & {
770
+ time: grammar.INanoDate;
771
+ }>>;
768
772
  /**
769
773
  * QueryRaw functions similarly to .query() but it does no fancy
770
774
  * transformations on the returned data; it calls `JSON.parse` and returns
@@ -1,3 +1,4 @@
1
+ import type { INanoDate } from "./grammar";
1
2
  import { TimePrecision } from "./grammar";
2
3
  /**
3
4
  * A ResultError is thrown when a query generates errorful results from Influx.
@@ -108,7 +109,11 @@ export declare function assertNoErrors(res: IResponse): IResponse;
108
109
  * 3. Multiple queries of types 1 and 2
109
110
  * @private
110
111
  */
111
- export declare function parse<T>(res: IResponse, precision?: TimePrecision): Array<IResults<T>> | IResults<T>;
112
+ export declare function parse<T>(res: IResponse, precision?: TimePrecision): Array<IResults<T & {
113
+ time: INanoDate;
114
+ }>> | IResults<T & {
115
+ time: INanoDate;
116
+ }>;
112
117
  /**
113
118
  * ParseSingle asserts that the response contains a single result,
114
119
  * and returns that result.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "influx",
3
- "version": "5.9.5",
3
+ "version": "5.9.7",
4
4
  "description": "InfluxDB Client",
5
5
  "main": "./lib/src/index.js",
6
6
  "typings": "./lib/src/index",