med-scribe-alliance-ts-sdk 2.0.9 → 2.0.11
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 +1 -0
- package/dist/index.mjs +13 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -197,7 +197,7 @@ var r = "/.well-known/medscribealliance", i = 3600 * 1e3, a = /* @__PURE__ */ fu
|
|
|
197
197
|
age: e.string().optional(),
|
|
198
198
|
gender: e.string().optional(),
|
|
199
199
|
mobile: e.number().optional()
|
|
200
|
-
}).optional()
|
|
200
|
+
}).nullable().optional()
|
|
201
201
|
}), ne = e.object({
|
|
202
202
|
session_id: e.string().min(1, "session_id is required"),
|
|
203
203
|
status: e.string(),
|
|
@@ -234,7 +234,7 @@ var r = "/.well-known/medscribealliance", i = 3600 * 1e3, a = /* @__PURE__ */ fu
|
|
|
234
234
|
age: e.string().optional(),
|
|
235
235
|
gender: e.string().optional(),
|
|
236
236
|
mobile: e.number().optional()
|
|
237
|
-
}).optional(),
|
|
237
|
+
}).nullable().optional(),
|
|
238
238
|
message: e.string().optional()
|
|
239
239
|
}), A = e.object({
|
|
240
240
|
session_id: e.string().min(1, "session_id is required"),
|
|
@@ -1620,15 +1620,17 @@ var ie = class {
|
|
|
1620
1620
|
};
|
|
1621
1621
|
try {
|
|
1622
1622
|
let e = await this.recorder.stop();
|
|
1623
|
-
|
|
1624
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
1648
|
+
data: t
|
|
1647
1649
|
}), this.config.debug && console.log("[ScribeSDK] Recording stopped:", {
|
|
1648
|
-
totalFiles:
|
|
1649
|
-
failedUploads:
|
|
1650
|
-
}),
|
|
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",
|