@senx/warp10
Advanced tools
Comparing version 2.0.0 to 2.0.2
Warp 10 js lib | ||
--- | ||
## v2.0.0 | ||
> + 2023/10/24 | v2.0.1 | ||
> + 2023/10/24 | Update package | ||
> + 2023/10/24 | Update doc and changelog | ||
> + 2023/10/24 | Update unit tests | ||
> + 2023/10/24 | Add a pseudo builder implementation | ||
> + 2023/10/24 | Unit tests refactoring | ||
> + 2023/10/24 | Unit tests refactoring | ||
> + 2023/10/24 | Update logger | ||
> + 2023/10/24 | Unit tests refactoring | ||
> + 2023/10/24 | Fix update and provide a formatted output | ||
> + 2023/10/23 | Bump minimatch from 3.0.4 to 3.1.2 | ||
## v1.1.4 | ||
@@ -5,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
export { Warp10 } from './lib/warp10'; | ||
export { Warp10, TimeUnits, GTS } from './lib/warp10'; | ||
export { DataPoint } from './lib/DataPoint'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DataPoint = exports.Warp10 = void 0; | ||
exports.DataPoint = exports.TimeUnits = exports.Warp10 = void 0; | ||
/* | ||
* Copyright 2020 SenX S.A.S. | ||
* Copyright 2020-2023 SenX S.A.S. | ||
* | ||
@@ -21,3 +21,4 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
Object.defineProperty(exports, "Warp10", { enumerable: true, get: function () { return warp10_1.Warp10; } }); | ||
Object.defineProperty(exports, "TimeUnits", { enumerable: true, get: function () { return warp10_1.TimeUnits; } }); | ||
var DataPoint_1 = require("./lib/DataPoint"); | ||
Object.defineProperty(exports, "DataPoint", { enumerable: true, get: function () { return DataPoint_1.DataPoint; } }); |
@@ -7,2 +7,13 @@ import { DataPoint } from './DataPoint'; | ||
} | ||
export interface GTS { | ||
c: string; | ||
v: any[]; | ||
a: { | ||
[key: string]: string; | ||
}; | ||
l: { | ||
[key: string]: string; | ||
}; | ||
la: number; | ||
} | ||
/** | ||
@@ -104,3 +115,5 @@ * | ||
*/ | ||
fetch(readToken: string, className: string, labels: object, start: string, stop: any, format?: 'text' | 'fulltext' | 'json' | 'tsv' | 'fulltsv' | 'pack' | 'raw' | 'formatted', dedup?: boolean): Promise<{ | ||
fetch(readToken: string, className: string, labels: { | ||
[key: string]: string; | ||
}, start: string, stop: any, format?: 'text' | 'fulltext' | 'json' | 'tsv' | 'fulltsv' | 'pack' | 'raw' | 'formatted', dedup?: boolean): Promise<{ | ||
result: any[]; | ||
@@ -117,3 +130,3 @@ meta: { | ||
* @param writeToken - Write token | ||
* @param datapoints - Datapoints to update | ||
* @param dataPoints | ||
* | ||
@@ -129,3 +142,3 @@ * @example | ||
*/ | ||
update(writeToken: string, datapoints: (DataPoint | string)[]): Promise<{ | ||
update(writeToken: string, dataPoints: (DataPoint | string)[]): Promise<{ | ||
response: string | undefined; | ||
@@ -153,3 +166,5 @@ count: number; | ||
*/ | ||
delete(deleteToken: string, className: string, labels: object, start: string, end: string, deleteAll?: boolean): Promise<{ | ||
delete(deleteToken: string, className: string, labels: { | ||
[key: string]: string; | ||
}, start: string, end: string, deleteAll?: boolean): Promise<{ | ||
result: string; | ||
@@ -174,4 +189,8 @@ }>; | ||
className: string; | ||
labels: object; | ||
attributes: object; | ||
labels: { | ||
[key: string]: string; | ||
}; | ||
attributes: { | ||
[key: string]: string; | ||
}; | ||
}[]): Promise<{ | ||
@@ -178,0 +197,0 @@ response: string; |
@@ -251,3 +251,3 @@ /* | ||
* @param writeToken - Write token | ||
* @param datapoints - Datapoints to update | ||
* @param dataPoints | ||
* | ||
@@ -263,4 +263,4 @@ * @example | ||
*/ | ||
async update(writeToken, datapoints) { | ||
const payload = datapoints.map(d => { | ||
async update(writeToken, dataPoints) { | ||
const payload = dataPoints.map(d => { | ||
var _a, _b, _c; | ||
@@ -341,3 +341,3 @@ let pos = ''; | ||
formatLabels(labels) { | ||
return `{${Object.keys(labels).map(k => `${k}=${encodeURIComponent(`${labels[k]}`)}`)}}`; | ||
return `{${Object.keys(labels !== null && labels !== void 0 ? labels : {}).map(k => `${k}=${encodeURIComponent(`${labels[k]}`)}`)}}`; | ||
} | ||
@@ -344,0 +344,0 @@ static formatValues(value) { |
{ | ||
"name": "@senx/warp10", | ||
"version": "2.0.0", | ||
"version": "2.0.2", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
44673
754
3