med-scribe-alliance-ts-sdk 2.0.24 → 2.0.25
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 +10 -2
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -544,7 +544,7 @@ export interface UploadEventRetry {
|
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
546
|
export type UploadEvent = UploadEventProgress | UploadEventFailed | UploadEventRetry;
|
|
547
|
-
export type SessionEventType = "created" | "ended" | "status_update" | "partial_result";
|
|
547
|
+
export type SessionEventType = "created" | "ended" | "discarded" | "status_update" | "partial_result";
|
|
548
548
|
export interface SessionEventCreated {
|
|
549
549
|
type: "created";
|
|
550
550
|
timestamp: string;
|
|
@@ -555,6 +555,14 @@ export interface SessionEventEnded {
|
|
|
555
555
|
timestamp: string;
|
|
556
556
|
data: EndSessionResponse;
|
|
557
557
|
}
|
|
558
|
+
export interface SessionEventDiscarded {
|
|
559
|
+
type: "discarded";
|
|
560
|
+
timestamp: string;
|
|
561
|
+
data: {
|
|
562
|
+
sessionId: string | null;
|
|
563
|
+
reason: "cleared" | "cancelled" | "reset";
|
|
564
|
+
};
|
|
565
|
+
}
|
|
558
566
|
export interface SessionEventStatusUpdate {
|
|
559
567
|
type: "status_update";
|
|
560
568
|
timestamp: string;
|
|
@@ -565,7 +573,7 @@ export interface SessionEventPartialResult {
|
|
|
565
573
|
timestamp: string;
|
|
566
574
|
data: any;
|
|
567
575
|
}
|
|
568
|
-
export type SessionEvent = SessionEventCreated | SessionEventEnded | SessionEventStatusUpdate | SessionEventPartialResult;
|
|
576
|
+
export type SessionEvent = SessionEventCreated | SessionEventEnded | SessionEventDiscarded | SessionEventStatusUpdate | SessionEventPartialResult;
|
|
569
577
|
export type ErrorEventType = "vad_error" | "worker_error" | "transport_error" | "validation_error";
|
|
570
578
|
interface ErrorEvent$1 {
|
|
571
579
|
type: ErrorEventType;
|
package/dist/index.mjs
CHANGED
|
@@ -1981,7 +1981,14 @@ var ie = class {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
async cancelSession(e) {
|
|
1983
1983
|
let t = e ?? this.recordingManager.getActiveSession()?.session_id ?? this.sessionManager.getCurrentSession()?.session_id;
|
|
1984
|
-
return this.recordingManager.isRecording() && this.recordingManager.forceStop(), this.recordingManager.reset(), this.sessionManager.clearCurrentSession(), this.
|
|
1984
|
+
return this.recordingManager.isRecording() && this.recordingManager.forceStop(), this.recordingManager.reset(), this.sessionManager.clearCurrentSession(), this.callbackRegistry.dispatch("onSessionEvent", {
|
|
1985
|
+
type: "discarded",
|
|
1986
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1987
|
+
data: {
|
|
1988
|
+
sessionId: t ?? null,
|
|
1989
|
+
reason: "cancelled"
|
|
1990
|
+
}
|
|
1991
|
+
}), this.updateSession({
|
|
1985
1992
|
user_status: "cancelled",
|
|
1986
1993
|
processing_status: "cancelled"
|
|
1987
1994
|
}, t);
|