@eka-care/ekascribe-ts-sdk 2.1.43 → 2.1.45

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
@@ -721,6 +721,7 @@ export declare type TPostV1DocumentRequest = {
721
721
  document_name?: string;
722
722
  type?: string;
723
723
  document_id?: string;
724
+ publish?: Record<string, unknown>;
724
725
  };
725
726
 
726
727
  export declare type TPostV1DocumentResponse = {
@@ -745,6 +746,13 @@ export declare type TPostV1DocumentResponse = {
745
746
  presigned_url: string;
746
747
  created_at: string;
747
748
  updated_at: number;
749
+ publish: {
750
+ emr_webhook: {
751
+ error: string | null;
752
+ status: string;
753
+ updated_at: string;
754
+ };
755
+ };
748
756
  };
749
757
  };
750
758
 
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,
@@ -31577,30 +31575,32 @@ async function postV1Document({
31577
31575
  session_id: s,
31578
31576
  document_name: n,
31579
31577
  type: i,
31580
- document_id: c
31578
+ document_id: c,
31579
+ publish: l
31581
31580
  }) {
31582
31581
  try {
31583
- const l = new Headers();
31584
- l.append("Content-Type", "application/json");
31585
- const f = {
31582
+ const f = new Headers();
31583
+ f.append("Content-Type", "application/json");
31584
+ const u = {
31586
31585
  session_id: s,
31587
31586
  type: i,
31588
31587
  ...n ? { document_name: n } : {},
31589
- ...c ? { document_id: c } : {}
31590
- }, u = {
31588
+ ...c ? { document_id: c } : {},
31589
+ ...l ? { publish: l } : {}
31590
+ }, d = {
31591
31591
  method: "POST",
31592
- headers: l,
31593
- body: JSON.stringify(f)
31594
- }, d = await fetchWrapper(`${GET_EKA_VOICE_HOST_V1()}/documents`, u);
31595
- let h = await d.json();
31596
- return h = {
31597
- ...h,
31598
- code: d.status
31599
- }, h;
31600
- } catch (l) {
31601
- return console.error("%c postV1Document -> error", "color:#f5ce50", l), {
31592
+ headers: f,
31593
+ body: JSON.stringify(u)
31594
+ }, h = await fetchWrapper(`${GET_EKA_VOICE_HOST_V1()}/documents`, d);
31595
+ let p = await h.json();
31596
+ return p = {
31597
+ ...p,
31598
+ code: h.status
31599
+ }, p;
31600
+ } catch (f) {
31601
+ return console.error("%c postV1Document -> error", "color:#f5ce50", f), {
31602
31602
  code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
31603
- message: `Something went wrong! ${l}`
31603
+ message: `Something went wrong! ${f}`
31604
31604
  };
31605
31605
  }
31606
31606
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "2.1.43",
3
+ "version": "2.1.45",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",