@eka-care/ekascribe-ts-sdk 3.0.38 → 3.0.40

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
@@ -69,7 +69,7 @@ declare class DocumentManager {
69
69
  createTemplate({ title, desc, section_ids, }: TPostV1TemplateRequest): Promise<TPostV1TemplateResponse>;
70
70
  updateTemplate({ template_id, title, desc, section_ids, }: TPostV1TemplateRequest): Promise<TPostV1TemplateResponse>;
71
71
  deleteTemplate(templateId: string): Promise<TPostV1TemplateResponse>;
72
- aiGenerateTemplate(formData: FormData): Promise<TPostCookV1MediaAiCreateTemplateResponse>;
72
+ aiGenerateTemplate({ file, instruction, }: TPostV1AiCreateTemplateRequest): Promise<TPostV1AiCreateTemplateResponse>;
73
73
  convertToTemplate({ txn_id, template_id, }: {
74
74
  txn_id: string;
75
75
  template_id: string;
@@ -132,6 +132,11 @@ declare class EkaScribe {
132
132
  startRecordingForExistingSession(request: TStartRecordingForExistingSessionRequest): Promise<TStartRecordingResponse>;
133
133
  pauseRecording(): TPauseRecordingResponse;
134
134
  resumeRecording(): TPauseRecordingResponse;
135
+ /**
136
+ * Lifts the maximum chunk limit so recording can continue uploading audio
137
+ * chunks beyond the default cap.
138
+ */
139
+ forceAllowMoreChunks(): void;
135
140
  endRecording(): Promise<TEndRecordingResponse>;
136
141
  getSessionStatus(sessionId?: string, options?: {
137
142
  poll?: PollOptions;
@@ -810,14 +815,6 @@ export declare type TPostCogResponse = {
810
815
  is_session_expired?: boolean;
811
816
  };
812
817
 
813
- declare type TPostCookV1MediaAiCreateTemplateResponse = {
814
- title: string;
815
- desc: string;
816
- sections: TSection[];
817
- status_code: number;
818
- message: string;
819
- };
820
-
821
818
  export declare type TPostTransactionInitRequest = {
822
819
  mode: string;
823
820
  s3Url?: string;
@@ -860,6 +857,18 @@ export declare type TPostTransactionResponse = {
860
857
  };
861
858
  };
862
859
 
860
+ declare interface TPostV1AiCreateTemplateRequest {
861
+ file?: File;
862
+ instruction?: string;
863
+ }
864
+
865
+ declare type TPostV1AiCreateTemplateResponse = {
866
+ title: string;
867
+ template_instructions: string;
868
+ status_code: number;
869
+ message: string;
870
+ };
871
+
863
872
  export declare type TPostV1ConvertToTemplateRequest = {
864
873
  txn_id: string;
865
874
  template_id?: string;
package/dist/index.mjs CHANGED
@@ -4844,20 +4844,30 @@ class Jl {
4844
4844
  return { status_code: r.status_code, msg: r.message };
4845
4845
  }
4846
4846
  }
4847
- async aiGenerateTemplate(e) {
4847
+ async aiGenerateTemplate({
4848
+ file: e,
4849
+ instruction: n
4850
+ }) {
4848
4851
  try {
4849
- const n = await this.transport.request({
4852
+ const r = n?.trim();
4853
+ let s;
4854
+ if (e) {
4855
+ const o = new FormData();
4856
+ o.append("file", e), r && o.append("instruction", r), s = o;
4857
+ } else
4858
+ s = { instruction: r ?? "" };
4859
+ const i = await this.transport.request({
4850
4860
  method: "POST",
4851
- url: `${this.hosts.cookV1}/medai/ai-create-template`,
4852
- body: e,
4853
- timeout: 6e4
4861
+ url: `${this.hosts.voiceV1}/template/ai-create-template`,
4862
+ body: s,
4863
+ timeout: 3e4
4854
4864
  });
4855
- return { ...n.data, status_code: n.status };
4856
- } catch (n) {
4857
- const r = S(n, "Failed to AI generate template,");
4865
+ return { ...i.data, status_code: i.status };
4866
+ } catch (r) {
4867
+ const s = S(r, "Failed to AI generate template,");
4858
4868
  return {
4859
- status_code: r.status_code,
4860
- message: r.message
4869
+ status_code: s.status_code,
4870
+ message: s.message
4861
4871
  };
4862
4872
  }
4863
4873
  }
@@ -5561,6 +5571,9 @@ class eu {
5561
5571
  };
5562
5572
  }
5563
5573
  }
5574
+ forceAllowMoreChunks() {
5575
+ this.allianceClient.forceAllowMoreChunks();
5576
+ }
5564
5577
  resumeRecording() {
5565
5578
  try {
5566
5579
  return this.allianceClient.resumeRecording(), {
@@ -8266,6 +8279,13 @@ const O = class O {
8266
8279
  resumeRecording() {
8267
8280
  return this.recording.resumeRecording();
8268
8281
  }
8282
+ /**
8283
+ * Lifts the maximum chunk limit so recording can continue uploading audio
8284
+ * chunks beyond the default cap.
8285
+ */
8286
+ forceAllowMoreChunks() {
8287
+ return this.recording.forceAllowMoreChunks();
8288
+ }
8269
8289
  endRecording() {
8270
8290
  return this.recording.endRecording();
8271
8291
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "3.0.38",
3
+ "version": "3.0.40",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",