@formant/data-sdk 1.14.1 → 1.16.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 +84 -67
- package/dist/data-sdk.es.js.map +1 -1
- package/dist/data-sdk.es6.js +18 -1
- package/dist/data-sdk.umd.js +2 -2
- package/dist/types/data-sdk/src/devices/Device.d.ts +7 -0
- package/package.json +1 -1
package/dist/data-sdk.es6.js
CHANGED
|
@@ -23968,6 +23968,23 @@ class Device extends BaseDevice {
|
|
|
23968
23968
|
}
|
|
23969
23969
|
), (await n.json()).document;
|
|
23970
23970
|
}
|
|
23971
|
+
/**
|
|
23972
|
+
* Asynchronously retrieves the device's agent version string
|
|
23973
|
+
*
|
|
23974
|
+
* @returns {Promise<string | undefined | null>} A promise that resolves to the agent version
|
|
23975
|
+
* @throws {Error} Throws an error if the device info cannot be fetched
|
|
23976
|
+
*/
|
|
23977
|
+
async getAgentVersion() {
|
|
23978
|
+
var r;
|
|
23979
|
+
const n = await (await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`, {
|
|
23980
|
+
method: "GET",
|
|
23981
|
+
headers: {
|
|
23982
|
+
"Content-Type": "application/json",
|
|
23983
|
+
Authorization: "Bearer " + Authentication.token
|
|
23984
|
+
}
|
|
23985
|
+
})).json();
|
|
23986
|
+
return (r = n == null ? void 0 : n.state) == null ? void 0 : r.agentVersion;
|
|
23987
|
+
}
|
|
23971
23988
|
async getFileUrl(t) {
|
|
23972
23989
|
return (await (await fetch(`${FORMANT_API_URL}/v1/admin/files/query`, {
|
|
23973
23990
|
method: "POST",
|
|
@@ -24513,7 +24530,7 @@ async function getDevices() {
|
|
|
24513
24530
|
(n) => new Device(
|
|
24514
24531
|
n.id,
|
|
24515
24532
|
n.name,
|
|
24516
|
-
|
|
24533
|
+
defined(Authentication.currentOrganization),
|
|
24517
24534
|
n.tags
|
|
24518
24535
|
)
|
|
24519
24536
|
);
|