med-scribe-alliance-ts-sdk 2.0.9 → 2.0.10

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/index.d.ts CHANGED
@@ -415,6 +415,7 @@ export interface IRecorder {
415
415
  export interface StopRecordingResult {
416
416
  failedUploads: string[];
417
417
  totalFiles: number;
418
+ endSessionResponse?: EndSessionResponse;
418
419
  }
419
420
  /**
420
421
  * Audio chunk metadata tracked by AudioFileManager
package/dist/index.mjs CHANGED
@@ -1620,15 +1620,17 @@ var ie = class {
1620
1620
  };
1621
1621
  try {
1622
1622
  let e = await this.recorder.stop();
1623
- if (this.preserveRetryContext(), this.activeSession) try {
1624
- let t = e.totalFiles - e.failedUploads.length, n = await this.sessionManager.endSession(this.activeBaseUrl, {
1623
+ this.preserveRetryContext();
1624
+ let t = { ...e };
1625
+ if (this.activeSession) try {
1626
+ let n = e.totalFiles - e.failedUploads.length, r = await this.sessionManager.endSession(this.activeBaseUrl, {
1625
1627
  audio_files_sent: e.totalFiles,
1626
- audio_files_uploaded: t
1628
+ audio_files_uploaded: n
1627
1629
  }, this.activeSession.session_id);
1628
- this.callbackRegistry.dispatch("onSessionEvent", {
1630
+ t.endSessionResponse = r, this.callbackRegistry.dispatch("onSessionEvent", {
1629
1631
  type: "ended",
1630
1632
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1631
- data: n
1633
+ data: r
1632
1634
  });
1633
1635
  } catch (e) {
1634
1636
  console.error("[ScribeSDK] Failed to end session:", e), this.callbackRegistry.dispatch("onError", {
@@ -1643,11 +1645,11 @@ var ie = class {
1643
1645
  return this.callbackRegistry.dispatch("onRecordingStateChange", {
1644
1646
  type: "ended",
1645
1647
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1646
- data: e
1648
+ data: t
1647
1649
  }), this.config.debug && console.log("[ScribeSDK] Recording stopped:", {
1648
- totalFiles: e.totalFiles,
1649
- failedUploads: e.failedUploads.length
1650
- }), e;
1650
+ totalFiles: t.totalFiles,
1651
+ failedUploads: t.failedUploads.length
1652
+ }), t;
1651
1653
  } catch (e) {
1652
1654
  return console.error("[ScribeSDK] Error stopping recording:", e), this.callbackRegistry.dispatch("onError", {
1653
1655
  type: "transport_error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "med-scribe-alliance-ts-sdk",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "TypeScript SDK for the MedScribe Alliance Protocol",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",