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

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
@@ -287,7 +287,7 @@ export interface CreateSessionRequest {
287
287
  additional_data?: Record<string, any>;
288
288
  session_mode?: string;
289
289
  patient_details?: PatientDetails;
290
- txn_id?: string;
290
+ session_id?: string;
291
291
  }
292
292
  export interface CreateSessionResponse {
293
293
  session_id: string;
@@ -395,7 +395,7 @@ export interface RecordingOptions {
395
395
  deviceId?: string;
396
396
  sessionMode?: string;
397
397
  patientDetails?: PatientDetails;
398
- txnId?: string;
398
+ sessionId?: string;
399
399
  }
400
400
  export interface RecorderConfig {
401
401
  accessToken?: string;
@@ -660,6 +660,11 @@ export declare class ScribeClient {
660
660
  * Create a session directly (without starting a recording).
661
661
  */
662
662
  createSession(sessionRequest: CreateSessionRequest): Promise<SDKResult<CreateSessionResponse>>;
663
+ /**
664
+ * End a session directly (without stopping a recording).
665
+ * Uses the current active session if no sessionId is provided.
666
+ */
667
+ endSession(request: EndSessionRequest, sessionId?: string): Promise<SDKResult<EndSessionResponse>>;
663
668
  /**
664
669
  * Get the status of a session.
665
670
  * Uses the current active session if no sessionId is provided.
package/dist/index.mjs CHANGED
@@ -169,7 +169,7 @@ var r = "/.well-known/medscribealliance", i = 3600 * 1e3, a = /* @__PURE__ */ fu
169
169
  gender: e.string().optional(),
170
170
  mobile: e.number().optional()
171
171
  }).optional(),
172
- txn_id: e.string().optional()
172
+ session_id: e.string().optional()
173
173
  }), k = e.object({
174
174
  audio_files_sent: e.number().int().min(0, "audio_files_sent must be a non-negative integer"),
175
175
  audio_files_uploaded: e.number().int().min(0, "audio_files_uploaded must be a non-negative integer")
@@ -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"),
@@ -261,7 +261,7 @@ var r = "/.well-known/medscribealliance", i = 3600 * 1e3, a = /* @__PURE__ */ fu
261
261
  gender: e.string().optional(),
262
262
  mobile: e.number().optional()
263
263
  }).optional(),
264
- txnId: e.string().optional()
264
+ sessionId: e.string().optional()
265
265
  }), P = class {
266
266
  validateDiscoveryResponse(e) {
267
267
  this.parseWithValidationError(D, e, "Invalid discovery response");
@@ -1530,7 +1530,7 @@ var ie = class {
1530
1530
  additional_data: t.additionalData,
1531
1531
  session_mode: t.sessionMode,
1532
1532
  patient_details: t.patientDetails,
1533
- txn_id: t.txnId
1533
+ session_id: t.sessionId
1534
1534
  };
1535
1535
  try {
1536
1536
  let i;
@@ -1851,6 +1851,10 @@ var ie = class {
1851
1851
  let t = this.getEffectiveBaseUrl();
1852
1852
  return this.wrapResult(() => this.sessionManager.createSession(t, e));
1853
1853
  }
1854
+ async endSession(e, t) {
1855
+ let n = this.getEffectiveBaseUrl();
1856
+ return this.wrapResult(() => this.sessionManager.endSession(n, e, t));
1857
+ }
1854
1858
  async getSessionStatus(e, t) {
1855
1859
  let n = this.getEffectiveBaseUrl();
1856
1860
  return t?.poll ? this.wrapResult(() => this.sessionManager.pollForCompletion(n, e, t.poll)) : this.wrapResult(() => this.sessionManager.getSessionStatus(n, e, t?.templateId));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "med-scribe-alliance-ts-sdk",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "TypeScript SDK for the MedScribe Alliance Protocol",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",