@eka-care/ekascribe-ts-sdk 3.0.41 → 3.0.43

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
@@ -141,6 +141,7 @@ declare class EkaScribe {
141
141
  getSessionStatus(sessionId?: string, options?: {
142
142
  poll?: PollOptions;
143
143
  templateId?: string;
144
+ version?: string;
144
145
  }): Promise<SDKResult<GetSessionStatusResponse>>;
145
146
  retryUploadRecording(): Promise<TEndRecordingResponse>;
146
147
  cancelSession(sessionId?: string): Promise<SDKResult<PatchSessionResponse>>;
@@ -288,7 +289,7 @@ declare class SessionUtils {
288
289
  txn_id: string;
289
290
  }): Promise<TDeleteTransactionResponse>;
290
291
  patchSessionStatus(request: PatchSessionRequest, sessionId?: string): Promise<SDKResult<PatchSessionResponse>>;
291
- getSessionDetails({ session_id, presigned, }: TGetV1SessionDetailsRequest): Promise<TGetV1SessionDetailsResponse>;
292
+ getSessionDetails({ session_id, presigned, version, }: TGetV1SessionDetailsRequest): Promise<TGetV1SessionDetailsResponse>;
292
293
  getSuggestedMedications(txnId: string): Promise<TSuggestedMedicationResponse>;
293
294
  addSessionContext({ txn_id, context, }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
294
295
  removeSessionContext({ txn_id, context, }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
@@ -299,7 +300,7 @@ declare class SessionUtils {
299
300
  updateConfig(request: TPatchVoiceApiV2ConfigRequest): Promise<TPatchVoiceApiV2ConfigResponse>;
300
301
  getDoctorHeaderFooter({ doctor_oid, clinic_id, }: TGetDoctorHeaderFooterRequest): Promise<TGetDoctorHeaderFooterResponse>;
301
302
  getDoctorClinics({ doctor_id, }: TGetDoctorClinicsRequest): Promise<TGetDoctorClinicsResponse>;
302
- createSession(request: CreateSessionRequest): Promise<SDKResult<CreateSessionResponse>>;
303
+ createSession(request: CreateSessionRequest, version?: string): Promise<SDKResult<CreateSessionResponse>>;
303
304
  endSession(request: EndSessionRequest, sessionId?: string): Promise<SDKResult<EndSessionResponse>>;
304
305
  getDiscoveryDocument(): DiscoveryDocument | null;
305
306
  getDiscoveryConfig(): SDKResult<ResolvedConfig>;
@@ -630,6 +631,7 @@ export declare type TGetV1SessionDetailsData = {
630
631
  export declare type TGetV1SessionDetailsRequest = {
631
632
  session_id: string;
632
633
  presigned?: boolean;
634
+ version?: string;
633
635
  };
634
636
 
635
637
  export declare type TGetV1SessionDetailsResponse = {
@@ -834,6 +836,7 @@ export declare type TPostTransactionInitRequest = {
834
836
  patient_details?: TPatientDetails;
835
837
  model_type: string;
836
838
  version?: string;
839
+ api_version?: string;
837
840
  flavour?: string;
838
841
  batch_s3_url?: string;
839
842
  audio_file_names?: string[];
@@ -1072,6 +1075,7 @@ export declare type TStartRecordingForExistingSessionRequest = {
1072
1075
  upload_url: SessionUploadInfo;
1073
1076
  business_id?: string;
1074
1077
  microphoneID?: string;
1078
+ version?: string;
1075
1079
  };
1076
1080
 
1077
1081
  export declare type TStartRecordingResponse = {
package/dist/index.mjs CHANGED
@@ -221,7 +221,7 @@ const js = [
221
221
  "log",
222
222
  "assert",
223
223
  "trace"
224
- ], qs = "Sentry Logger ", Xe = {};
224
+ ], Vs = "Sentry Logger ", Xe = {};
225
225
  function me(t) {
226
226
  if (!("console" in x))
227
227
  return t();
@@ -238,7 +238,7 @@ function me(t) {
238
238
  });
239
239
  }
240
240
  }
241
- function Vs() {
241
+ function qs() {
242
242
  Gt().enabled = !0;
243
243
  }
244
244
  function Gs() {
@@ -248,17 +248,17 @@ function wr() {
248
248
  return Gt().enabled;
249
249
  }
250
250
  function Ws(...t) {
251
- Vt("log", ...t);
251
+ qt("log", ...t);
252
252
  }
253
253
  function Xs(...t) {
254
- Vt("warn", ...t);
254
+ qt("warn", ...t);
255
255
  }
256
256
  function Ks(...t) {
257
- Vt("error", ...t);
257
+ qt("error", ...t);
258
258
  }
259
- function Vt(t, ...e) {
259
+ function qt(t, ...e) {
260
260
  y && wr() && me(() => {
261
- x.console[t](`${qs}[${t}]:`, ...e);
261
+ x.console[t](`${Vs}[${t}]:`, ...e);
262
262
  });
263
263
  }
264
264
  function Gt() {
@@ -266,7 +266,7 @@ function Gt() {
266
266
  }
267
267
  const m = {
268
268
  /** Enable logging. */
269
- enable: Vs,
269
+ enable: qs,
270
270
  /** Disable logging. */
271
271
  disable: Gs,
272
272
  /** Check if logging is enabled. */
@@ -422,7 +422,7 @@ function kn(t) {
422
422
  function ni(t) {
423
423
  return _e(t, "DOMException");
424
424
  }
425
- function q(t) {
425
+ function V(t) {
426
426
  return _e(t, "String");
427
427
  }
428
428
  function Wt(t) {
@@ -499,7 +499,7 @@ function ai(t, e) {
499
499
  else {
500
500
  n.id && r.push(`#${n.id}`);
501
501
  const o = n.className;
502
- if (o && q(o)) {
502
+ if (o && V(o)) {
503
503
  const a = o.split(/\s+/);
504
504
  for (const c of a)
505
505
  r.push(`.${c}`);
@@ -643,7 +643,7 @@ function wn(t, e) {
643
643
  return n.join(e);
644
644
  }
645
645
  function je(t, e, n = !1) {
646
- return q(t) ? si(e) ? e.test(t) : q(e) ? n ? t === e : t.includes(e) : !1 : !1;
646
+ return V(t) ? si(e) ? e.test(t) : V(e) ? n ? t === e : t.includes(e) : !1 : !1;
647
647
  }
648
648
  function at(t, e = [], n = !1) {
649
649
  return e.some((r) => je(t, r, n));
@@ -721,11 +721,11 @@ function hi() {
721
721
  return () => (e + it(() => t.now())) / Mr;
722
722
  }
723
723
  let vn;
724
- function V() {
724
+ function q() {
725
725
  return (vn ?? (vn = hi()))();
726
726
  }
727
727
  function fi(t) {
728
- const e = V(), n = {
728
+ const e = q(), n = {
729
729
  sid: L(),
730
730
  init: !0,
731
731
  timestamp: e,
@@ -739,7 +739,7 @@ function fi(t) {
739
739
  return t && pe(n, t), n;
740
740
  }
741
741
  function pe(t, e = {}) {
742
- if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || V(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : L()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration)
742
+ if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || q(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : L()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration)
743
743
  t.duration = void 0;
744
744
  else if (typeof e.duration == "number")
745
745
  t.duration = e.duration;
@@ -1387,7 +1387,7 @@ function Bi(t) {
1387
1387
  return n;
1388
1388
  }
1389
1389
  function Hi(t) {
1390
- if (!(!t || !q(t) && !Array.isArray(t)))
1390
+ if (!(!t || !V(t) && !Array.isArray(t)))
1391
1391
  return Array.isArray(t) ? t.reduce((e, n) => {
1392
1392
  const r = Dn(n);
1393
1393
  return Object.entries(r).forEach(([s, i]) => {
@@ -1411,14 +1411,14 @@ function Dn(t) {
1411
1411
  }).reduce((e, [n, r]) => (n && r && (e[n] = r), e), {});
1412
1412
  }
1413
1413
  const zi = /^o(\d+)\./, ji = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
1414
- function qi(t) {
1414
+ function Vi(t) {
1415
1415
  return t === "http" || t === "https";
1416
1416
  }
1417
1417
  function De(t, e = !1) {
1418
1418
  const { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = t;
1419
1419
  return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`;
1420
1420
  }
1421
- function Vi(t) {
1421
+ function qi(t) {
1422
1422
  const e = ji.exec(t);
1423
1423
  if (!e) {
1424
1424
  me(() => {
@@ -1450,7 +1450,7 @@ function Gi(t) {
1450
1450
  if (!y)
1451
1451
  return !0;
1452
1452
  const { port: e, projectId: n, protocol: r } = t;
1453
- return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ? qi(r) ? e && isNaN(parseInt(e, 10)) ? (m.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
1453
+ return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ? Vi(r) ? e && isNaN(parseInt(e, 10)) ? (m.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
1454
1454
  }
1455
1455
  function Wi(t) {
1456
1456
  return t.match(zi)?.[1];
@@ -1461,7 +1461,7 @@ function Xi(t) {
1461
1461
  return e.orgId ? r = String(e.orgId) : n && (r = Wi(n)), r;
1462
1462
  }
1463
1463
  function Ki(t) {
1464
- const e = typeof t == "string" ? Vi(t) : zr(t);
1464
+ const e = typeof t == "string" ? qi(t) : zr(t);
1465
1465
  if (!(!e || !Gi(e)))
1466
1466
  return e;
1467
1467
  }
@@ -1493,7 +1493,7 @@ function Ji(t) {
1493
1493
  }));
1494
1494
  }
1495
1495
  function $n(t) {
1496
- return typeof t == "number" ? Ln(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? Ln(t.getTime()) : V();
1496
+ return typeof t == "number" ? Ln(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? Ln(t.getTime()) : q();
1497
1497
  }
1498
1498
  function Ln(t) {
1499
1499
  return t > 9999999999 ? t / 1e3 : t;
@@ -1542,7 +1542,7 @@ function no(t) {
1542
1542
  return t.code === $i ? "ok" : t.message || "internal_error";
1543
1543
  }
1544
1544
  const ro = "_sentryRootSpan";
1545
- function qr(t) {
1545
+ function Vr(t) {
1546
1546
  return t[ro] || t;
1547
1547
  }
1548
1548
  function Pn() {
@@ -1589,7 +1589,7 @@ function oo(t) {
1589
1589
  return typeof t == "string" || t instanceof RegExp;
1590
1590
  }
1591
1591
  const Qt = "production", ao = "_frozenDsc";
1592
- function Vr(t, e) {
1592
+ function qr(t, e) {
1593
1593
  const n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, s = {
1594
1594
  environment: n.environment || Qt,
1595
1595
  release: n.release,
@@ -1601,13 +1601,13 @@ function Vr(t, e) {
1601
1601
  }
1602
1602
  function co(t, e) {
1603
1603
  const n = e.getPropagationContext();
1604
- return n.dsc || Vr(n.traceId, t);
1604
+ return n.dsc || qr(n.traceId, t);
1605
1605
  }
1606
1606
  function lo(t) {
1607
1607
  const e = C();
1608
1608
  if (!e)
1609
1609
  return {};
1610
- const n = qr(t), r = Jt(n), s = r.data, i = n.spanContext().traceState, o = i?.get("sentry.sample_rate") ?? s[Ii] ?? s[Ci];
1610
+ const n = Vr(t), r = Jt(n), s = r.data, i = n.spanContext().traceState, o = i?.get("sentry.sample_rate") ?? s[Ii] ?? s[Ci];
1611
1611
  function a(f) {
1612
1612
  return (typeof o == "number" || typeof o == "string") && (f.sample_rate = `${o}`), f;
1613
1613
  }
@@ -1617,7 +1617,7 @@ function lo(t) {
1617
1617
  const l = i?.get("sentry.dsc"), d = l && Bi(l);
1618
1618
  if (d)
1619
1619
  return a(d);
1620
- const u = Vr(t.spanContext().traceId, e), p = s[vi], h = r.description;
1620
+ const u = qr(t.spanContext().traceId, e), p = s[vi], h = r.description;
1621
1621
  return p !== "url" && h && (u.transaction = h), so() && (u.sampled = String(to(n)), u.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
1622
1622
  // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span
1623
1623
  i?.get("sentry.sample_rand") ?? // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)
@@ -2004,7 +2004,7 @@ function Io(t, e) {
2004
2004
  const { fingerprint: n, span: r, breadcrumbs: s, sdkProcessingMetadata: i } = e;
2005
2005
  Co(t, e), r && Do(t, r), Oo(t, n), No(t, s), Ao(t, i);
2006
2006
  }
2007
- function qn(t, e) {
2007
+ function Vn(t, e) {
2008
2008
  const {
2009
2009
  extra: n,
2010
2010
  tags: r,
@@ -2028,7 +2028,7 @@ function ke(t, e, n) {
2028
2028
  }
2029
2029
  function Xr(t, e) {
2030
2030
  const n = xi().getScopeData();
2031
- return t && qn(n, t.getScopeData()), e && qn(n, e.getScopeData()), n;
2031
+ return t && Vn(n, t.getScopeData()), e && Vn(n, e.getScopeData()), n;
2032
2032
  }
2033
2033
  function Co(t, e) {
2034
2034
  const { extra: n, tags: r, user: s, contexts: i, level: o, transactionName: a } = e;
@@ -2052,7 +2052,7 @@ function Do(t, e) {
2052
2052
  dynamicSamplingContext: lo(e),
2053
2053
  ...t.sdkProcessingMetadata
2054
2054
  };
2055
- const n = qr(e), r = Jt(n).description;
2055
+ const n = Vr(e), r = Jt(n).description;
2056
2056
  r && !t.transaction && t.type === "transaction" && (t.transaction = r);
2057
2057
  }
2058
2058
  function Oo(t, e) {
@@ -2151,7 +2151,7 @@ function Bo(t, e) {
2151
2151
  }
2152
2152
  function Ho(t) {
2153
2153
  if (t)
2154
- return zo(t) ? { captureContext: t } : qo(t) ? {
2154
+ return zo(t) ? { captureContext: t } : Vo(t) ? {
2155
2155
  captureContext: t
2156
2156
  } : t;
2157
2157
  }
@@ -2167,13 +2167,13 @@ const jo = [
2167
2167
  "fingerprint",
2168
2168
  "propagationContext"
2169
2169
  ];
2170
- function qo(t) {
2170
+ function Vo(t) {
2171
2171
  return Object.keys(t).some((e) => jo.includes(e));
2172
2172
  }
2173
2173
  function Kr(t, e) {
2174
2174
  return H().captureException(t, Ho(e));
2175
2175
  }
2176
- function Vo(t, e) {
2176
+ function qo(t, e) {
2177
2177
  const n = typeof e == "string" ? e : void 0, r = typeof e != "string" ? { captureContext: e } : void 0;
2178
2178
  return H().captureMessage(t, n, r);
2179
2179
  }
@@ -2183,7 +2183,7 @@ function Yr(t, e) {
2183
2183
  function Go(t) {
2184
2184
  J().setUser(t);
2185
2185
  }
2186
- function Vn(t) {
2186
+ function qn(t) {
2187
2187
  const e = J(), { user: n } = Xr(e, H()), { userAgent: r } = x.navigator || {}, s = fi({
2188
2188
  user: n,
2189
2189
  ...r && { userAgent: r },
@@ -2515,7 +2515,7 @@ function ga(t) {
2515
2515
  };
2516
2516
  }
2517
2517
  const Xn = "Not capturing exception because it's already been captured.", Kn = "Discarded session because of missing or non-string release", os = Symbol.for("SentryInternalError"), as = Symbol.for("SentryDoNotSendEventError"), ma = 5e3;
2518
- function qe(t) {
2518
+ function Ve(t) {
2519
2519
  return {
2520
2520
  message: t,
2521
2521
  [os]: !0
@@ -2985,7 +2985,7 @@ class _a {
2985
2985
  __sentry__: !0
2986
2986
  },
2987
2987
  originalException: h
2988
- }), qe(
2988
+ }), Ve(
2989
2989
  `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
2990
2990
  Reason: ${h}`
2991
2991
  ));
@@ -3045,15 +3045,15 @@ function ya(t, e) {
3045
3045
  return t.then(
3046
3046
  (r) => {
3047
3047
  if (!Te(r) && r !== null)
3048
- throw qe(n);
3048
+ throw Ve(n);
3049
3049
  return r;
3050
3050
  },
3051
3051
  (r) => {
3052
- throw qe(`${e} rejected with ${r}`);
3052
+ throw Ve(`${e} rejected with ${r}`);
3053
3053
  }
3054
3054
  );
3055
3055
  if (!Te(t) && t !== null)
3056
- throw qe(n);
3056
+ throw Ve(n);
3057
3057
  return t;
3058
3058
  }
3059
3059
  function Ea(t, e, n, r) {
@@ -3416,11 +3416,11 @@ function or(t, e, n, r) {
3416
3416
  parent_id: r
3417
3417
  };
3418
3418
  }
3419
- function qa(t) {
3419
+ function Va(t) {
3420
3420
  const e = "console";
3421
- oe(e, t), ae(e, Va);
3421
+ oe(e, t), ae(e, qa);
3422
3422
  }
3423
- function Va() {
3423
+ function qa() {
3424
3424
  "console" in x && js.forEach(function(t) {
3425
3425
  t in x.console && $(x.console, t, function(e) {
3426
3426
  return Xe[t] = e, function(...n) {
@@ -3548,7 +3548,7 @@ function oc(t, e = !1) {
3548
3548
  method: i,
3549
3549
  url: o
3550
3550
  },
3551
- startTimestamp: V() * 1e3,
3551
+ startTimestamp: q() * 1e3,
3552
3552
  // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation
3553
3553
  virtualError: s,
3554
3554
  headers: cc(r)
@@ -3558,13 +3558,13 @@ function oc(t, e = !1) {
3558
3558
  }), n.apply(x, r).then(
3559
3559
  async (c) => (F("fetch", {
3560
3560
  ...a,
3561
- endTimestamp: V() * 1e3,
3561
+ endTimestamp: q() * 1e3,
3562
3562
  response: c
3563
3563
  }), c),
3564
3564
  (c) => {
3565
3565
  F("fetch", {
3566
3566
  ...a,
3567
- endTimestamp: V() * 1e3,
3567
+ endTimestamp: q() * 1e3,
3568
3568
  error: c
3569
3569
  }), nt(c) && c.stack === void 0 && (c.stack = s.stack, Y(c, "framesToPop", 1));
3570
3570
  const d = C()?.getOptions().enhanceFetchErrorMessages ?? "always";
@@ -3580,11 +3580,11 @@ function oc(t, e = !1) {
3580
3580
  };
3581
3581
  });
3582
3582
  }
3583
- function Ve(t, e) {
3583
+ function qe(t, e) {
3584
3584
  return !!t && typeof t == "object" && !!t[e];
3585
3585
  }
3586
3586
  function cr(t) {
3587
- return typeof t == "string" ? t : t ? Ve(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
3587
+ return typeof t == "string" ? t : t ? qe(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
3588
3588
  }
3589
3589
  function ac(t) {
3590
3590
  if (t.length === 0)
@@ -3593,16 +3593,16 @@ function ac(t) {
3593
3593
  const [n, r] = t;
3594
3594
  return {
3595
3595
  url: cr(n),
3596
- method: Ve(r, "method") ? String(r.method).toUpperCase() : (
3596
+ method: qe(r, "method") ? String(r.method).toUpperCase() : (
3597
3597
  // Request object as first argument
3598
- Dr(n) && Ve(n, "method") ? String(n.method).toUpperCase() : "GET"
3598
+ Dr(n) && qe(n, "method") ? String(n.method).toUpperCase() : "GET"
3599
3599
  )
3600
3600
  };
3601
3601
  }
3602
3602
  const e = t[0];
3603
3603
  return {
3604
3604
  url: cr(e),
3605
- method: Ve(e, "method") ? String(e.method).toUpperCase() : "GET"
3605
+ method: qe(e, "method") ? String(e.method).toUpperCase() : "GET"
3606
3606
  };
3607
3607
  }
3608
3608
  function cc(t) {
@@ -4010,7 +4010,7 @@ function Mc() {
4010
4010
  const t = XMLHttpRequest.prototype;
4011
4011
  t.open = new Proxy(t.open, {
4012
4012
  apply(e, n, r) {
4013
- const s = new Error(), i = V() * 1e3, o = q(r[0]) ? r[0].toUpperCase() : void 0, a = Fc(r[1]);
4013
+ const s = new Error(), i = q() * 1e3, o = V(r[0]) ? r[0].toUpperCase() : void 0, a = Fc(r[1]);
4014
4014
  if (!o || !a)
4015
4015
  return e.apply(n, r);
4016
4016
  n[xe] = {
@@ -4026,7 +4026,7 @@ function Mc() {
4026
4026
  } catch {
4027
4027
  }
4028
4028
  const d = {
4029
- endTimestamp: V() * 1e3,
4029
+ endTimestamp: q() * 1e3,
4030
4030
  startTimestamp: i,
4031
4031
  xhr: n,
4032
4032
  virtualError: s
@@ -4041,7 +4041,7 @@ function Mc() {
4041
4041
  }) : n.addEventListener("readystatechange", c), n.setRequestHeader = new Proxy(n.setRequestHeader, {
4042
4042
  apply(l, d, u) {
4043
4043
  const [p, h] = u, f = d[xe];
4044
- return f && q(p) && q(h) && (f.request_headers[p.toLowerCase()] = h), l.apply(d, u);
4044
+ return f && V(p) && V(h) && (f.request_headers[p.toLowerCase()] = h), l.apply(d, u);
4045
4045
  }
4046
4046
  }), e.apply(n, r);
4047
4047
  }
@@ -4052,7 +4052,7 @@ function Mc() {
4052
4052
  return e.apply(n, r);
4053
4053
  r[0] !== void 0 && (s.body = r[0]);
4054
4054
  const i = {
4055
- startTimestamp: V() * 1e3,
4055
+ startTimestamp: q() * 1e3,
4056
4056
  xhr: n
4057
4057
  };
4058
4058
  return F("xhr", i), e.apply(n, r);
@@ -4060,7 +4060,7 @@ function Mc() {
4060
4060
  });
4061
4061
  }
4062
4062
  function Fc(t) {
4063
- if (q(t))
4063
+ if (V(t))
4064
4064
  return t;
4065
4065
  try {
4066
4066
  return t.toString();
@@ -4123,7 +4123,7 @@ function Bt(t, e, n, r) {
4123
4123
  };
4124
4124
  return n !== void 0 && (s.lineno = n), r !== void 0 && (s.colno = r), s;
4125
4125
  }
4126
- const jc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, qc = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, Vc = /\((\S*)(?::(\d+))(?::(\d+))\)/, Gc = /at (.+?) ?\(data:(.+?),/, Wc = (t) => {
4126
+ const jc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Vc = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, qc = /\((\S*)(?::(\d+))(?::(\d+))\)/, Gc = /at (.+?) ?\(data:(.+?),/, Wc = (t) => {
4127
4127
  const e = t.match(Gc);
4128
4128
  if (e)
4129
4129
  return {
@@ -4135,10 +4135,10 @@ const jc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, qc = /^\s*at (?:(.+?\)(?: \
4135
4135
  const [, s, i, o] = n;
4136
4136
  return Bt(s, se, +i, +o);
4137
4137
  }
4138
- const r = qc.exec(t);
4138
+ const r = Vc.exec(t);
4139
4139
  if (r) {
4140
4140
  if (r[2] && r[2].indexOf("eval") === 0) {
4141
- const a = Vc.exec(r[2]);
4141
+ const a = qc.exec(r[2]);
4142
4142
  a && (r[2] = a[1], r[3] = a[2], r[4] = a[3]);
4143
4143
  }
4144
4144
  const [i, o] = _s(r[1] || se, r[2]);
@@ -4173,7 +4173,7 @@ const jc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, qc = /^\s*at (?:(.+?\)(?: \
4173
4173
  return {
4174
4174
  name: tl,
4175
4175
  setup(n) {
4176
- e.console && qa(ol(n)), e.dom && vc(il(n, e.dom)), e.xhr && Pc(al(n)), e.fetch && ic(cl(n)), e.history && ms(ll(n)), e.sentry && n.on("beforeSendEvent", sl(n));
4176
+ e.console && Va(ol(n)), e.dom && vc(il(n, e.dom)), e.xhr && Pc(al(n)), e.fetch && ic(cl(n)), e.history && ms(ll(n)), e.sentry && n.on("beforeSendEvent", sl(n));
4177
4177
  }
4178
4178
  };
4179
4179
  }), rl = nl;
@@ -4484,14 +4484,14 @@ const bl = (t = {}) => {
4484
4484
  ct && m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");
4485
4485
  return;
4486
4486
  }
4487
- Vn({ ignoreDuration: !0 }), _t();
4487
+ qn({ ignoreDuration: !0 }), _t();
4488
4488
  const n = J();
4489
4489
  let r = n.getUser();
4490
4490
  n.addScopeListener((s) => {
4491
4491
  const i = s.getUser();
4492
4492
  (r?.id !== i?.id || r?.ip_address !== i?.ip_address) && (_t(), r = i);
4493
4493
  }), e === "route" && ms(({ from: s, to: i }) => {
4494
- s !== i && (Vn({ ignoreDuration: !0 }), _t());
4494
+ s !== i && (qn({ ignoreDuration: !0 }), _t());
4495
4495
  });
4496
4496
  }
4497
4497
  };
@@ -4616,7 +4616,7 @@ function ys() {
4616
4616
  };
4617
4617
  }
4618
4618
  function Ol(t) {
4619
- if (!(!q(t) || t.length === 0))
4619
+ if (!(!V(t) || t.length === 0))
4620
4620
  return t.startsWith("data:") ? `<${wa(t, !1)}>` : t;
4621
4621
  }
4622
4622
  const $l = () => ({
@@ -4700,14 +4700,14 @@ function jl(t = {}) {
4700
4700
  };
4701
4701
  return Ra(Rc, r);
4702
4702
  }
4703
- const ql = "https://06451c8d861702902d2e6b2088fa9b62@o1128948.ingest.us.sentry.io/4509207135387648";
4704
- class Vl {
4703
+ const Vl = "https://06451c8d861702902d2e6b2088fa9b62@o1128948.ingest.us.sentry.io/4509207135387648";
4704
+ class ql {
4705
4705
  constructor(e) {
4706
4706
  this.enabled = e;
4707
4707
  }
4708
4708
  init(e) {
4709
4709
  this.enabled && jl({
4710
- dsn: ql,
4710
+ dsn: Vl,
4711
4711
  environment: e,
4712
4712
  defaultIntegrations: !1,
4713
4713
  tracesSampleRate: 0
@@ -4723,7 +4723,7 @@ class Vl {
4723
4723
  this.enabled && Z({ category: e, message: n, data: r, level: "info", timestamp: Date.now() / 1e3 });
4724
4724
  }
4725
4725
  captureEvent(e, n) {
4726
- this.enabled && Vo(e, {
4726
+ this.enabled && qo(e, {
4727
4727
  level: "info",
4728
4728
  tags: { txn_id: this.txnId, flavour: this.flavour },
4729
4729
  extra: n,
@@ -5127,19 +5127,22 @@ class Ql {
5127
5127
  }
5128
5128
  async getSessionDetails({
5129
5129
  session_id: e,
5130
- presigned: n = !1
5130
+ presigned: n = !1,
5131
+ version: r
5131
5132
  }) {
5132
5133
  try {
5133
- const r = await this.transport.request({
5134
+ const s = new URLSearchParams({ presigned: String(n) });
5135
+ r && s.append("version", r);
5136
+ const i = await this.transport.request({
5134
5137
  method: "GET",
5135
- url: `${this.hosts.voiceV1}/sessions/${e}?presigned=${n}`
5138
+ url: `${this.hosts.voiceV1}/sessions/${e}?${s.toString()}`
5136
5139
  });
5137
- return { ...r.data, status_code: r.status };
5138
- } catch (r) {
5139
- const s = S(r, "Failed to fetch session details,");
5140
+ return { ...i.data, status_code: i.status };
5141
+ } catch (s) {
5142
+ const i = S(s, "Failed to fetch session details,");
5140
5143
  return {
5141
- status_code: s.status_code,
5142
- message: s.message
5144
+ status_code: i.status_code,
5145
+ message: i.message
5143
5146
  };
5144
5147
  }
5145
5148
  }
@@ -5340,8 +5343,8 @@ class Ql {
5340
5343
  }
5341
5344
  }
5342
5345
  // --- Alliance SDK methods ---
5343
- async createSession(e) {
5344
- return this.allianceClient.createSession(e);
5346
+ async createSession(e, n) {
5347
+ return this.allianceClient.createSession(e, n);
5345
5348
  }
5346
5349
  async endSession(e, n) {
5347
5350
  return this.allianceClient.endSession(e, n);
@@ -5441,7 +5444,8 @@ class eu {
5441
5444
  ...e.additional_data || {}
5442
5445
  }
5443
5446
  }, r = await this.allianceClient.createSession(
5444
- n
5447
+ n,
5448
+ e.api_version
5445
5449
  );
5446
5450
  return r.success ? (this.storedSession = r.data, this.txnID = r.data.session_id, this.tracker.setTransactionId(this.txnID), this.tracker.captureEvent("Session started", {
5447
5451
  txn_id: this.txnID,
@@ -5536,7 +5540,8 @@ class eu {
5536
5540
  n,
5537
5541
  {
5538
5542
  uploadType: "chunked",
5539
- deviceId: e.microphoneID
5543
+ deviceId: e.microphoneID,
5544
+ version: e.version
5540
5545
  }
5541
5546
  );
5542
5547
  return r.success ? (this.storedSession = n, this.txnID = e.txn_id, this.tracker.setTransactionId(this.txnID), {
@@ -6287,7 +6292,7 @@ function ju(t, e) {
6287
6292
  else if (t[r] === e[1] && (n--, n < 0)) return r;
6288
6293
  return n > 0 ? -2 : -1;
6289
6294
  }
6290
- function qu(t, e = 0) {
6295
+ function Vu(t, e = 0) {
6291
6296
  let n = e, r = "";
6292
6297
  for (let s of t) if (s === " ") {
6293
6298
  let i = 4 - n % 4;
@@ -6301,7 +6306,7 @@ function kr(t, e, n, r, s) {
6301
6306
  let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: i, title: o, text: a, tokens: r.inlineTokens(a) };
6302
6307
  return r.state.inLink = !1, c;
6303
6308
  }
6304
- function Vu(t, e, n) {
6309
+ function qu(t, e, n) {
6305
6310
  let r = t.match(n.other.indentCodeCompensation);
6306
6311
  if (r === null) return e;
6307
6312
  let s = r[1];
@@ -6335,7 +6340,7 @@ var Je = class {
6335
6340
  fences(t) {
6336
6341
  let e = this.rules.block.fences.exec(t);
6337
6342
  if (e) {
6338
- let n = e[0], r = Vu(n, e[3] || "", this.rules);
6343
+ let n = e[0], r = qu(n, e[3] || "", this.rules);
6339
6344
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
6340
6345
  }
6341
6346
  }
@@ -6406,7 +6411,7 @@ ${d}` : d;
6406
6411
  let c = !1, l = "", d = "";
6407
6412
  if (!(e = i.exec(t)) || this.rules.block.hr.test(t)) break;
6408
6413
  l = e[0], t = t.substring(l.length);
6409
- let u = qu(e[2].split(`
6414
+ let u = Vu(e[2].split(`
6410
6415
  `, 1)[0], e[1].length), p = t.split(`
6411
6416
  `, 1)[0], h = !u.trim(), f = 0;
6412
6417
  if (this.options.pedantic ? (f = 2, d = u.trimStart()) : h ? f = e[1].length + 1 : (f = u.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, d = u.slice(f), f += e[1].length), h && this.rules.other.blankLine.test(p) && (l += p + `
@@ -8060,7 +8065,10 @@ class rd {
8060
8065
  }
8061
8066
  async startForPatient(e) {
8062
8067
  if (this.isStarting) {
8063
- this.callbacks.onError?.({ error_code: "session_starting", message: "A session is already being started." });
8068
+ this.callbacks.onError?.({
8069
+ error_code: "session_starting",
8070
+ message: "A session is already being started."
8071
+ });
8064
8072
  return;
8065
8073
  }
8066
8074
  const n = this.stateMachine.current;
@@ -8206,7 +8214,7 @@ class rd {
8206
8214
  }
8207
8215
  const O = class O {
8208
8216
  constructor(e) {
8209
- this.widgetManager = null, this.config = e, this.hosts = Hs(e.env), this.callbackRegistry = new zs(), this.tracker = new Vl(e.enableTracking ?? !1);
8217
+ this.widgetManager = null, this.config = e, this.hosts = Hs(e.env), this.callbackRegistry = new zs(), this.tracker = new ql(e.enableTracking ?? !1);
8210
8218
  const n = {
8211
8219
  access_token: e.access_token,
8212
8220
  clientId: e.clientId,
@@ -8371,8 +8379,8 @@ const O = class O {
8371
8379
  }
8372
8380
  };
8373
8381
  O.instance = null;
8374
- let qt = O;
8375
- const od = (t) => qt.getInstance(t);
8382
+ let Vt = O;
8383
+ const od = (t) => Vt.getInstance(t);
8376
8384
  export {
8377
8385
  Gl as API_STATUS,
8378
8386
  Zl as CALLBACK_TYPE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "3.0.41",
3
+ "version": "3.0.43",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "marked": "^18.0.4",
41
- "med-scribe-alliance-ts-sdk": "2.0.38"
41
+ "med-scribe-alliance-ts-sdk": "^2.0.40"
42
42
  },
43
43
  "devDependencies": {
44
44
  "vite-bundle-analyzer": "^1.3.6"