@eka-care/ekascribe-ts-sdk 3.0.26 → 3.0.28

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
@@ -77,9 +77,12 @@ declare class DocumentManager {
77
77
  createTemplateSection({ title, desc, format, example, }: TPostV1TemplateSectionRequest): Promise<TPostV1TemplateSectionResponse>;
78
78
  updateTemplateSection({ section_id, title, desc, format, example, }: TPostV1TemplateSectionRequest): Promise<TPostV1TemplateSectionResponse>;
79
79
  deleteTemplateSection(sectionId: string): Promise<TPostV1TemplateSectionResponse>;
80
- getDocument(documentId: string): Promise<TPostV1DocumentResponse>;
80
+ getDocument({ documentId, params, }: {
81
+ documentId: string;
82
+ params?: string;
83
+ }): Promise<TPostV1DocumentResponse>;
81
84
  createDocument({ session_id, document_name, type, document_id, publish, }: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
82
- updateDocument({ session_id, document_name, type, document_id, publish, }: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
85
+ updateDocument({ session_id, document_name, type, document_id, publish, tiptap_json, params, }: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
83
86
  deleteDocument(documentId: string): Promise<TDeleteV1DocumentResponse>;
84
87
  publishDocument({ session_id, document_id, }: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
85
88
  }
@@ -876,6 +879,8 @@ export declare type TPostV1DocumentRequest = {
876
879
  type?: string;
877
880
  document_id?: string;
878
881
  publish?: Record<string, unknown>;
882
+ tiptap_json?: Record<string, unknown>;
883
+ params?: string;
879
884
  };
880
885
 
881
886
  export declare type TPostV1DocumentResponse = {
@@ -901,6 +906,7 @@ export declare type TPostV1DocumentResponse = {
901
906
  created_at: string;
902
907
  updated_at: number;
903
908
  publish: Record<string, unknown>;
909
+ tiptap_json?: Record<string, unknown>;
904
910
  };
905
911
  };
906
912
 
package/dist/index.mjs CHANGED
@@ -4968,15 +4968,18 @@ class Jl {
4968
4968
  }
4969
4969
  }
4970
4970
  // --- Documents ---
4971
- async getDocument(e) {
4971
+ async getDocument({
4972
+ documentId: e,
4973
+ params: n
4974
+ }) {
4972
4975
  try {
4973
- const n = await this.transport.request({
4976
+ const r = n ? `?${n}` : "", s = await this.transport.request({
4974
4977
  method: "GET",
4975
- url: `${this.hosts.voiceV1}/documents/${e}`
4978
+ url: `${this.hosts.voiceV1}/documents/${e}/${r}`
4976
4979
  });
4977
- return { ...n.data, status_code: n.status };
4978
- } catch (n) {
4979
- return { status_code: E(n, "Failed to fetch document,").status_code };
4980
+ return { ...s.data, status_code: s.status };
4981
+ } catch (r) {
4982
+ return { status_code: E(r, "Failed to fetch document,").status_code };
4980
4983
  }
4981
4984
  }
4982
4985
  async createDocument({
@@ -5012,26 +5015,29 @@ class Jl {
5012
5015
  document_name: n,
5013
5016
  type: r,
5014
5017
  document_id: s,
5015
- publish: i
5018
+ publish: i,
5019
+ tiptap_json: o,
5020
+ params: a
5016
5021
  }) {
5017
5022
  try {
5018
- const o = await this.transport.request({
5023
+ const c = await this.transport.request({
5019
5024
  method: "POST",
5020
- url: `${this.hosts.voiceV1}/documents`,
5025
+ url: `${this.hosts.voiceV1}/documents/${a ? `?${a}` : ""}`,
5021
5026
  body: {
5022
5027
  session_id: e,
5023
5028
  type: r,
5024
5029
  ...n ? { document_name: n } : {},
5025
5030
  ...s ? { document_id: s } : {},
5026
- ...i ? { publish: i } : {}
5031
+ ...i ? { publish: i } : {},
5032
+ ...o ? { tiptap_json: o } : {}
5027
5033
  }
5028
5034
  });
5029
- return { ...o.data, status_code: o.status };
5030
- } catch (o) {
5031
- const a = E(o, "Failed to update document,");
5035
+ return { ...c.data, status_code: c.status };
5036
+ } catch (c) {
5037
+ const l = E(c, "Failed to update document,");
5032
5038
  return {
5033
- status_code: a.status_code,
5034
- message: a.message
5039
+ status_code: l.status_code,
5040
+ message: l.message
5035
5041
  };
5036
5042
  }
5037
5043
  }
@@ -5580,7 +5586,7 @@ class eu {
5580
5586
  failed_files: e.data.failedUploads.length
5581
5587
  }), this.storedSession = null, e.data.failedUploads.length > 0 ? {
5582
5588
  error_code: S.AUDIO_UPLOAD_FAILED,
5583
- status_code: e.httpStatus ?? y.SUCCESS,
5589
+ status_code: e.httpStatus ?? y.AUDIO_ERROR,
5584
5590
  message: `Recording ended but ${e.data.failedUploads.length} audio file(s) failed to upload.`,
5585
5591
  failed_files: e.data.failedUploads,
5586
5592
  total_audio_files: e.data.endSessionResponse?.audio_files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "3.0.26",
3
+ "version": "3.0.28",
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.27"
41
+ "med-scribe-alliance-ts-sdk": "2.0.30"
42
42
  },
43
43
  "devDependencies": {
44
44
  "vite-bundle-analyzer": "^1.3.6"