@formant/data-sdk 1.6.0 → 1.7.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 +2 -2
- package/dist/data-sdk.cjs.js.map +1 -1
- package/dist/data-sdk.es.js +107 -92
- package/dist/data-sdk.es.js.map +1 -1
- package/dist/data-sdk.es6.js +17 -2
- package/dist/data-sdk.umd.js +2 -2
- package/dist/types/data-sdk/src/api/disableDevice.d.ts +2 -0
- package/dist/types/data-sdk/src/devices/Device.d.ts +2 -0
- package/dist/types/data-sdk/src/main.d.ts +1 -0
- package/package.json +1 -1
package/dist/data-sdk.es6.js
CHANGED
|
@@ -22876,6 +22876,20 @@ async function queryDevicesData(e) {
|
|
|
22876
22876
|
}
|
|
22877
22877
|
})).json()).items;
|
|
22878
22878
|
}
|
|
22879
|
+
async function disableDevice(e) {
|
|
22880
|
+
if (!Authentication.token)
|
|
22881
|
+
throw new Error("Not authenticated");
|
|
22882
|
+
return await (await fetch(
|
|
22883
|
+
`${FORMANT_API_URL}/v1/admin/devices/${e}/disable`,
|
|
22884
|
+
{
|
|
22885
|
+
method: "POST",
|
|
22886
|
+
headers: {
|
|
22887
|
+
"Content-Type": "application/json",
|
|
22888
|
+
Authorization: "Bearer " + Authentication.token
|
|
22889
|
+
}
|
|
22890
|
+
}
|
|
22891
|
+
)).json();
|
|
22892
|
+
}
|
|
22879
22893
|
class Device extends BaseDevice {
|
|
22880
22894
|
constructor(t, n, r, o) {
|
|
22881
22895
|
super(), this.id = t, this.name = n, this.organizationId = r, this.tags = o;
|
|
@@ -23204,7 +23218,7 @@ class Device extends BaseDevice {
|
|
|
23204
23218
|
return t.scope.deviceIds = [this.id], await createShareLink(t, n);
|
|
23205
23219
|
}
|
|
23206
23220
|
}
|
|
23207
|
-
be(Device, "createDevice", createDevice), be(Device, "patchDevice", patchDevice), be(Device, "getDevicesData", getDevicesData), be(Device, "queryDevicesData", queryDevicesData);
|
|
23221
|
+
be(Device, "createDevice", createDevice), be(Device, "patchDevice", patchDevice), be(Device, "getDevicesData", getDevicesData), be(Device, "queryDevicesData", queryDevicesData), be(Device, "disableDevice", disableDevice);
|
|
23208
23222
|
class PeerDevice extends BaseDevice {
|
|
23209
23223
|
constructor(n) {
|
|
23210
23224
|
super();
|
|
@@ -24104,7 +24118,7 @@ const accessLevels = ["viewer", "operator", "administrator"], viewer = "viewer",
|
|
|
24104
24118
|
"operational",
|
|
24105
24119
|
"offline",
|
|
24106
24120
|
"error"
|
|
24107
|
-
], interventionTypes = ["selection", "labeling", "teleop"], severities = ["info", "warning", "error", "critical"], videoMimeTypes = ["video/mp4"];
|
|
24121
|
+
], interventionTypes = ["selection", "labeling", "teleop"], severities = ["info", "warning", "error", "critical"], videoMimeTypes = ["video/mp4"], timeout = (e) => new Promise((t) => setTimeout(t, e * 1e3));
|
|
24108
24122
|
try {
|
|
24109
24123
|
const e = typeof window < "u" && window.location ? new URLSearchParams(window.location.search) : new URLSearchParams(""), t = e.get("device");
|
|
24110
24124
|
t && Fleet.setDefaultDevice(t);
|
|
@@ -24149,6 +24163,7 @@ export {
|
|
|
24149
24163
|
interventionTypes,
|
|
24150
24164
|
operator,
|
|
24151
24165
|
severities,
|
|
24166
|
+
timeout,
|
|
24152
24167
|
vailableAggregationIntervals,
|
|
24153
24168
|
videoMimeTypes,
|
|
24154
24169
|
viewer
|