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

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