@formant/data-sdk 1.80.9 → 1.81.1

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.
@@ -25655,13 +25655,16 @@ class Device extends BaseDevice {
25655
25655
  */
25656
25656
  async getAgentVersion() {
25657
25657
  var r;
25658
- const n = await (await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`, {
25659
- method: "GET",
25660
- headers: {
25661
- "Content-Type": "application/json",
25662
- Authorization: "Bearer " + Authentication.token
25658
+ const n = await (await fetch(
25659
+ `${FORMANT_API_URL}/v1/admin/devices/${this.id}`,
25660
+ {
25661
+ method: "GET",
25662
+ headers: {
25663
+ "Content-Type": "application/json",
25664
+ Authorization: "Bearer " + Authentication.token
25665
+ }
25663
25666
  }
25664
- })).json();
25667
+ )).json();
25665
25668
  return (r = n == null ? void 0 : n.state) == null ? void 0 : r.agentVersion;
25666
25669
  }
25667
25670
  async getFileUrl(t) {
@@ -25697,6 +25700,7 @@ class Device extends BaseDevice {
25697
25700
  } = typeof t == "number" ? { sessionType: t } : t, c = getRtcClientPool({
25698
25701
  sessionType: n
25699
25702
  }).get(this.handleMessage);
25703
+ this.rtcClient = c;
25700
25704
  let l = !1;
25701
25705
  const u = new Promise(
25702
25706
  (h, R) => setTimeout(() => {
@@ -25727,12 +25731,12 @@ class Device extends BaseDevice {
25727
25731
  ), h;
25728
25732
  };
25729
25733
  return Promise.race([d(), u]).then((h) => {
25730
- this.remoteDevicePeerId = h, this.initConnectionMonitoring(), this.rtcClient = c, this.emit("connect");
25734
+ this.remoteDevicePeerId = h, this.initConnectionMonitoring(), this.emit("connect");
25731
25735
  }).catch((h) => {
25732
25736
  throw console.debug(
25733
25737
  `${(/* @__PURE__ */ new Date()).toISOString()} :: Connection failed: %o`,
25734
25738
  h
25735
- ), this.remoteDevicePeerId = null, c.shutdown().catch((R) => {
25739
+ ), this.rtcClient = void 0, this.remoteDevicePeerId = null, c.shutdown().catch((R) => {
25736
25740
  console.error("rtcClient cannot shutdown: %o", R);
25737
25741
  }), this.emit("connection_failed", h), h;
25738
25742
  });
@@ -25805,7 +25809,7 @@ class Device extends BaseDevice {
25805
25809
  throw new Error(`Could not find command with name "${t}"`);
25806
25810
  let u = "";
25807
25811
  n === void 0 ? l.parameterEnabled && l.parameterValue && (u = l.parameterValue) : u = n;
25808
- let d = {
25812
+ const d = {
25809
25813
  value: u,
25810
25814
  scrubberTime: (r || /* @__PURE__ */ new Date()).toISOString(),
25811
25815
  meta: {