@formant/data-sdk 1.34.0 → 1.36.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.
- package/dist/data-sdk.cjs.js +1 -1
- package/dist/data-sdk.cjs.js.map +1 -1
- package/dist/data-sdk.es.js +11 -1
- package/dist/data-sdk.es.js.map +1 -1
- package/dist/data-sdk.es6.js +11 -1
- package/dist/data-sdk.umd.js +1 -1
- package/dist/types/data-sdk/src/devices/BaseDevice.d.ts +4 -0
- package/dist/types/data-sdk/src/devices/Device.d.ts +2 -1
- package/dist/types/data-sdk/src/devices/PeerDevice.d.ts +4 -0
- package/package.json +1 -1
package/dist/data-sdk.es.js
CHANGED
|
@@ -24236,7 +24236,9 @@ class Device extends BaseDevice {
|
|
|
24236
24236
|
})).json();
|
|
24237
24237
|
return new CaptureStream(r);
|
|
24238
24238
|
}
|
|
24239
|
-
async getTelemetry(t, n, r, l) {
|
|
24239
|
+
async getTelemetry(t, n, r, l, s, c) {
|
|
24240
|
+
if (s !== void 0 || c !== void 0)
|
|
24241
|
+
throw new Error("Limit and offset are not supported in this method");
|
|
24240
24242
|
return await getTelemetry(
|
|
24241
24243
|
this.id,
|
|
24242
24244
|
t,
|
|
@@ -24342,6 +24344,14 @@ class PeerDevice extends BaseDevice {
|
|
|
24342
24344
|
tags: {}
|
|
24343
24345
|
}));
|
|
24344
24346
|
}
|
|
24347
|
+
async getTelemetry(n, r, l, s, c, o) {
|
|
24348
|
+
if (Array.isArray(n))
|
|
24349
|
+
throw new Error("Multiple stream names not supported");
|
|
24350
|
+
if (s)
|
|
24351
|
+
throw new Error("Tags not supported");
|
|
24352
|
+
let d = `${this.peerUrl}/v1/querydatapoints?stream_name=${n}&start=${r.toISOString()}&end=${l.toISOString()}`;
|
|
24353
|
+
return c != null && c > 0 && (d += `&limit=${c}`), o != null && o >= 0 && (d += `&offset=${o}`), (await (await fetch(d)).json()).results;
|
|
24354
|
+
}
|
|
24345
24355
|
subscribeToTelemetry() {
|
|
24346
24356
|
this.telemetryStreamActive = !0;
|
|
24347
24357
|
let n = 0;
|