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

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +73 -1
  2. package/dist/index.mjs +1461 -1366
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -72,6 +72,8 @@ declare class EkaScribe {
72
72
  txn_id: string;
73
73
  max_polling_time?: number;
74
74
  template_id?: string;
75
+ document_id?: string;
76
+ dlp?: boolean;
75
77
  onPartialResultCb?: TPartialResultCallback;
76
78
  }): Promise<TPollingResponse>;
77
79
  getSessionHistory({ txn_count }: {
@@ -122,6 +124,9 @@ declare class EkaScribe {
122
124
  getDoctorHeaderFooter(request: TGetDoctorHeaderFooterRequest): Promise<TGetDoctorHeaderFooterResponse>;
123
125
  getDoctorClinics(request: TGetDoctorClinicsRequest): Promise<TGetDoctorClinicsResponse>;
124
126
  getSuggestedMedications(txnId: string): Promise<TSuggestedMedicationResponse>;
127
+ createDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
128
+ deleteDocument(document_id: string): Promise<TDeleteV1DocumentResponse>;
129
+ getChunkTranscript(txnId: string, chunkNumber: string): Promise<TFetchChunkTranscriptResult>;
125
130
  }
126
131
 
127
132
  export declare enum ERROR_CODE {
@@ -188,6 +193,22 @@ declare type TAudioChunksInfo = {
188
193
  audioFrames?: undefined;
189
194
  });
190
195
 
196
+ export declare type TChunkTranscriptResponse = {
197
+ text: string;
198
+ confidence: number;
199
+ segments: unknown[];
200
+ audio_length: number;
201
+ audio_quality: string;
202
+ metadata: {
203
+ model_id: string;
204
+ commit_id: string;
205
+ context_used: unknown[];
206
+ lang_input: string[];
207
+ lang_output: string;
208
+ task: string | null;
209
+ };
210
+ };
211
+
191
212
  declare type TClinicInfo = {
192
213
  clinic_id: string;
193
214
  name: string;
@@ -232,6 +253,12 @@ declare type TDeleteTransactionResponse = {
232
253
  };
233
254
  };
234
255
 
256
+ export declare type TDeleteV1DocumentResponse = {
257
+ code: number;
258
+ message?: string;
259
+ [key: string]: unknown;
260
+ };
261
+
235
262
  declare type TDoctorHeaderFooterInfo = {
236
263
  _id: string | null;
237
264
  clinic_id: string | null;
@@ -301,6 +328,14 @@ export declare type TEventCallbackData = {
301
328
  error_code?: ERROR_CODE;
302
329
  };
303
330
 
331
+ export declare type TFetchChunkTranscriptResult = {
332
+ success: true;
333
+ data: TChunkTranscriptResponse;
334
+ } | {
335
+ success: false;
336
+ error: string;
337
+ };
338
+
304
339
  declare type TFullAudioUploadResponse = {
305
340
  error_code?: ERROR_CODE;
306
341
  status_code: number;
@@ -451,6 +486,12 @@ declare type TOutputSummary = {
451
486
  status: TTemplateStatus;
452
487
  errors?: TTemplateMessage[];
453
488
  warnings?: TTemplateMessage[];
489
+ document_id: string;
490
+ document_path: {
491
+ bucket: string;
492
+ folder: string;
493
+ filename: string;
494
+ };
454
495
  };
455
496
 
456
497
  export declare type TPartialResultCallback = (data: {
@@ -511,7 +552,7 @@ export declare interface TPatchVoiceApiV2ConfigResponse extends TPatchVoiceApiV2
511
552
  export declare type TPatchVoiceApiV3StatusRequest = {
512
553
  txnId: string;
513
554
  data: {
514
- 'template-id': string;
555
+ 'document-id': string;
515
556
  data: string;
516
557
  }[];
517
558
  };
@@ -626,6 +667,7 @@ export declare type TPostV1ConvertToTemplateResponse = {
626
667
  message: string;
627
668
  txn_id: string;
628
669
  template_id: string;
670
+ document_id: string;
629
671
  b_id: string;
630
672
  code: number;
631
673
  msg: string;
@@ -636,6 +678,36 @@ export declare type TPostV1ConvertToTemplateResponse = {
636
678
  };
637
679
  };
638
680
 
681
+ export declare type TPostV1DocumentRequest = {
682
+ session_id: string;
683
+ document_name: string;
684
+ };
685
+
686
+ export declare type TPostV1DocumentResponse = {
687
+ code: number;
688
+ status?: string;
689
+ message?: string;
690
+ data?: {
691
+ document_id: string;
692
+ session_id: string;
693
+ template_id: string;
694
+ document_name: string;
695
+ type: string;
696
+ status: string;
697
+ errors: unknown[];
698
+ warnings: unknown[];
699
+ usage_information: Record<string, unknown>;
700
+ document_path: {
701
+ bucket: string;
702
+ folder: string;
703
+ filename: string;
704
+ };
705
+ presigned_url: string;
706
+ created_at: string;
707
+ updated_at: number;
708
+ };
709
+ };
710
+
639
711
  export declare interface TPostV1TemplateRequest {
640
712
  title: string;
641
713
  desc?: string;