@eka-care/ekascribe-ts-sdk 2.1.28 → 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 +74 -3
  2. package/dist/index.mjs +1464 -1370
  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 {
@@ -146,12 +151,11 @@ export declare enum ERROR_CODE {
146
151
 
147
152
  declare type Gender = 'M' | 'F' | 'O';
148
153
 
149
- export declare const getEkaScribeInstance: ({ access_token, env, clientId, flavour, enableSentryLogs, }: {
154
+ export declare const getEkaScribeInstance: ({ access_token, env, clientId, flavour, }: {
150
155
  access_token?: string;
151
156
  env?: "PROD" | "DEV";
152
157
  clientId?: string;
153
158
  flavour?: string;
154
- enableSentryLogs?: boolean;
155
159
  }) => EkaScribe;
156
160
 
157
161
  export declare enum PROCESSING_STATUS {
@@ -189,6 +193,22 @@ declare type TAudioChunksInfo = {
189
193
  audioFrames?: undefined;
190
194
  });
191
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
+
192
212
  declare type TClinicInfo = {
193
213
  clinic_id: string;
194
214
  name: string;
@@ -233,6 +253,12 @@ declare type TDeleteTransactionResponse = {
233
253
  };
234
254
  };
235
255
 
256
+ export declare type TDeleteV1DocumentResponse = {
257
+ code: number;
258
+ message?: string;
259
+ [key: string]: unknown;
260
+ };
261
+
236
262
  declare type TDoctorHeaderFooterInfo = {
237
263
  _id: string | null;
238
264
  clinic_id: string | null;
@@ -302,6 +328,14 @@ export declare type TEventCallbackData = {
302
328
  error_code?: ERROR_CODE;
303
329
  };
304
330
 
331
+ export declare type TFetchChunkTranscriptResult = {
332
+ success: true;
333
+ data: TChunkTranscriptResponse;
334
+ } | {
335
+ success: false;
336
+ error: string;
337
+ };
338
+
305
339
  declare type TFullAudioUploadResponse = {
306
340
  error_code?: ERROR_CODE;
307
341
  status_code: number;
@@ -452,6 +486,12 @@ declare type TOutputSummary = {
452
486
  status: TTemplateStatus;
453
487
  errors?: TTemplateMessage[];
454
488
  warnings?: TTemplateMessage[];
489
+ document_id: string;
490
+ document_path: {
491
+ bucket: string;
492
+ folder: string;
493
+ filename: string;
494
+ };
455
495
  };
456
496
 
457
497
  export declare type TPartialResultCallback = (data: {
@@ -512,7 +552,7 @@ export declare interface TPatchVoiceApiV2ConfigResponse extends TPatchVoiceApiV2
512
552
  export declare type TPatchVoiceApiV3StatusRequest = {
513
553
  txnId: string;
514
554
  data: {
515
- 'template-id': string;
555
+ 'document-id': string;
516
556
  data: string;
517
557
  }[];
518
558
  };
@@ -627,6 +667,7 @@ export declare type TPostV1ConvertToTemplateResponse = {
627
667
  message: string;
628
668
  txn_id: string;
629
669
  template_id: string;
670
+ document_id: string;
630
671
  b_id: string;
631
672
  code: number;
632
673
  msg: string;
@@ -637,6 +678,36 @@ export declare type TPostV1ConvertToTemplateResponse = {
637
678
  };
638
679
  };
639
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
+
640
711
  export declare interface TPostV1TemplateRequest {
641
712
  title: string;
642
713
  desc?: string;