@eka-care/ekascribe-ts-sdk 2.1.30 → 2.1.31

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
@@ -76,8 +76,9 @@ declare class EkaScribe {
76
76
  dlp?: boolean;
77
77
  onPartialResultCb?: TPartialResultCallback;
78
78
  }): Promise<TPollingResponse>;
79
- getSessionHistory({ txn_count }: {
79
+ getSessionHistory({ txn_count, oid }: {
80
80
  txn_count: number;
81
+ oid?: string;
81
82
  }): Promise<TGetTransactionHistoryResponse>;
82
83
  deleteSession({ txn_id }: {
83
84
  txn_id: string;
package/dist/index.mjs CHANGED
@@ -30171,27 +30171,28 @@ const initialiseTransaction = async (s) => {
30171
30171
  };
30172
30172
  }
30173
30173
  }, getTransactionHistory = async ({
30174
- txn_count: s
30174
+ txn_count: s,
30175
+ oid: n
30175
30176
  }) => {
30176
30177
  try {
30177
- const n = new Headers();
30178
- n.append("Content-Type", "application/json");
30179
- const i = {
30178
+ const i = new Headers();
30179
+ i.append("Content-Type", "application/json");
30180
+ const c = {
30180
30181
  method: "GET",
30181
- headers: n
30182
- }, c = await fetchWrapper(
30183
- `${GET_EKA_VOICE_HOST_V2()}/transaction/history?count=${s}`,
30184
- i
30182
+ headers: i
30183
+ }, l = await fetchWrapper(
30184
+ `${GET_EKA_VOICE_HOST_V2()}/transaction/history?count=${s}${n ? `&oid=${n}` : ""}`,
30185
+ c
30185
30186
  );
30186
30187
  return {
30187
- data: (await c.json()).data,
30188
- status_code: c.status,
30188
+ data: (await l.json()).data,
30189
+ status_code: l.status,
30189
30190
  message: `Past ${s} transactions fetched successfully.`
30190
30191
  };
30191
- } catch (n) {
30192
+ } catch (i) {
30192
30193
  return {
30193
30194
  status_code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
30194
- message: `Something went wrong in fetching transactions. ${n}`
30195
+ message: `Something went wrong in fetching transactions. ${i}`
30195
30196
  };
30196
30197
  }
30197
30198
  }, deleteTransaction = async ({
@@ -31831,15 +31832,16 @@ const REQUEST_TIMEOUT_MS = 1e4, fetchChunkTranscript = async (s, n) => {
31831
31832
  async pollSessionOutput(n) {
31832
31833
  return await pollOutputSummary(n);
31833
31834
  }
31834
- async getSessionHistory({ txn_count: n }) {
31835
+ async getSessionHistory({ txn_count: n, oid: i }) {
31835
31836
  try {
31836
31837
  return await getTransactionHistory({
31837
- txn_count: n
31838
+ txn_count: n,
31839
+ oid: i
31838
31840
  });
31839
- } catch (i) {
31841
+ } catch (c) {
31840
31842
  return {
31841
31843
  status_code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
31842
- message: `Failed to fetch previous transactions, ${i}`
31844
+ message: `Failed to fetch previous transactions, ${c}`
31843
31845
  };
31844
31846
  }
31845
31847
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "2.1.30",
3
+ "version": "2.1.31",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",