@eka-care/ekascribe-ts-sdk 2.1.42 → 2.1.44

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
@@ -674,6 +674,7 @@ export declare type TPostTransactionInitRequest = {
674
674
  batch_s3_url?: string;
675
675
  audio_file_names?: string[];
676
676
  additional_data?: Record<string, unknown>;
677
+ encounter_id?: string;
677
678
  };
678
679
 
679
680
  export declare type TPostTransactionResponse = {
package/dist/index.mjs CHANGED
@@ -353,8 +353,6 @@ const getConfigV2 = async () => {
353
353
  `${GET_EKA_VOICE_HOST_V2()}/transaction/${s}`,
354
354
  u
355
355
  );
356
- if (!d.ok)
357
- throw new Error(`Error: ${d.statusText}`);
358
356
  let h = await d.json();
359
357
  return h = {
360
358
  ...h,
@@ -30076,12 +30074,13 @@ async function postTransactionInit({
30076
30074
  batch_s3_url: e,
30077
30075
  audio_file_names: r,
30078
30076
  output_language: o,
30079
- additional_data: _
30077
+ additional_data: _,
30078
+ encounter_id: b
30080
30079
  }) {
30081
30080
  try {
30082
- const b = new Headers();
30083
- b.append("Content-Type", "application/json");
30084
- const g = {
30081
+ const g = new Headers();
30082
+ g.append("Content-Type", "application/json");
30083
+ const y = {
30085
30084
  mode: s,
30086
30085
  s3_url: i,
30087
30086
  input_language: c,
@@ -30096,24 +30095,25 @@ async function postTransactionInit({
30096
30095
  version: t,
30097
30096
  batch_s3_url: e,
30098
30097
  additional_data: _,
30099
- ...r ? { client_generated_files: r } : {}
30100
- }, y = {
30098
+ ...r ? { client_generated_files: r } : {},
30099
+ ...b ? { encounter_id: b } : {}
30100
+ }, m = {
30101
30101
  method: "POST",
30102
- headers: b,
30103
- body: JSON.stringify(g)
30104
- }, m = await fetchWrapper(
30102
+ headers: g,
30103
+ body: JSON.stringify(y)
30104
+ }, S = await fetchWrapper(
30105
30105
  `${GET_EKA_VOICE_HOST_V2()}/transaction/init/${n}`,
30106
- y
30106
+ m
30107
30107
  );
30108
- let S = await m.json();
30109
- return S = {
30110
- ...S,
30111
- code: m.status
30112
- }, S;
30113
- } catch (b) {
30114
- return console.error("%c Line:52 🥖 postTransactionInit -> error", "color:#f5ce50", b), {
30108
+ let T = await S.json();
30109
+ return T = {
30110
+ ...T,
30111
+ code: S.status
30112
+ }, T;
30113
+ } catch (g) {
30114
+ return console.error("%c Line:52 🥖 postTransactionInit -> error", "color:#f5ce50", g), {
30115
30115
  code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
30116
- message: `Something went wrong! ${b}`
30116
+ message: `Something went wrong! ${g}`
30117
30117
  };
30118
30118
  }
30119
30119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "2.1.42",
3
+ "version": "2.1.44",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",