@eka-care/ekascribe-ts-sdk 2.1.35 → 2.1.37

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
@@ -60,6 +60,7 @@ declare class EkaScribe {
60
60
  force_commit?: boolean;
61
61
  }): Promise<TEndRecordingResponse>;
62
62
  patchSessionStatus(request: TPatchTransactionRequest): Promise<TPostTransactionResponse>;
63
+ discardSession(request: TPatchTransactionRequest): Promise<TPostTransactionResponse>;
63
64
  commitTransactionCall(): Promise<TEndRecordingResponse>;
64
65
  stopTransactionCall(): Promise<TEndRecordingResponse>;
65
66
  getTemplateOutput({ txn_id }: {
@@ -510,7 +511,10 @@ export declare type TPatchSessionContextRequest = {
510
511
  txn_id: string;
511
512
  context: {
512
513
  past_sessions?: string[];
513
- attachments?: string[];
514
+ attachments?: {
515
+ id: string;
516
+ patient_oid?: string;
517
+ }[];
514
518
  };
515
519
  };
516
520
 
package/dist/index.mjs CHANGED
@@ -31624,7 +31624,10 @@ const REQUEST_TIMEOUT_MS = 1e4, fetchChunkTranscript = async (s, n) => {
31624
31624
  return { success: !1, error: "network_error" };
31625
31625
  }
31626
31626
  };
31627
- async function patchSessionContext(s, n) {
31627
+ async function patchSessionContext({
31628
+ txn_id: s,
31629
+ context: n
31630
+ }) {
31628
31631
  try {
31629
31632
  const i = new Headers();
31630
31633
  i.append("Content-Type", "application/json");
@@ -31648,7 +31651,10 @@ async function patchSessionContext(s, n) {
31648
31651
  };
31649
31652
  }
31650
31653
  }
31651
- async function deleteSessionContext(s, n) {
31654
+ async function deleteSessionContext({
31655
+ txn_id: s,
31656
+ context: n
31657
+ }) {
31652
31658
  try {
31653
31659
  const i = new Headers();
31654
31660
  i.append("Content-Type", "application/json");
@@ -31781,6 +31787,16 @@ const _n = class _n {
31781
31787
  return console.log("%c Line:138 🍖 retryUploadResponse", "color:#3f7cff", i), i;
31782
31788
  }
31783
31789
  async patchSessionStatus(n) {
31790
+ try {
31791
+ return await patchTransactionStatus(n);
31792
+ } catch (i) {
31793
+ return {
31794
+ code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
31795
+ message: `Failed to patch session, ${i}`
31796
+ };
31797
+ }
31798
+ }
31799
+ async discardSession(n) {
31784
31800
  try {
31785
31801
  const i = EkaScribeStore$1.eventCallback;
31786
31802
  this.vadInstance.pauseVad(), this.vadInstance.destroyVad();
@@ -32033,10 +32049,10 @@ const _n = class _n {
32033
32049
  return fetchChunkTranscript(n, i);
32034
32050
  }
32035
32051
  async addSessionContext({ txn_id: n, context: i }) {
32036
- return await patchSessionContext(n, i);
32052
+ return await patchSessionContext({ txn_id: n, context: i });
32037
32053
  }
32038
32054
  async removeSessionContext({ txn_id: n, context: i }) {
32039
- return await deleteSessionContext(n, i);
32055
+ return await deleteSessionContext({ txn_id: n, context: i });
32040
32056
  }
32041
32057
  };
32042
32058
  _n.instance = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "2.1.35",
3
+ "version": "2.1.37",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",