@eka-care/ekascribe-ts-sdk 2.1.45 → 2.1.46

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
@@ -5,11 +5,6 @@ export declare enum API_STATUS {
5
5
  COMMIT = "commit"
6
6
  }
7
7
 
8
- export declare enum AUTH_ERROR_STATUS {
9
- UNAUTHORIZED = "unauthorized",
10
- FORBIDDEN = "forbidden"
11
- }
12
-
13
8
  export declare enum CALLBACK_TYPE {
14
9
  AWS_CONFIGURE_STATUS = "aws_configure_status",
15
10
  FILE_UPLOAD_STATUS = "file_upload_status",
@@ -55,6 +50,7 @@ declare class EkaScribe {
55
50
  }): void;
56
51
  initTransaction(request: TPostTransactionInitRequest, sharedWorkerUrl?: string): Promise<TStartRecordingResponse>;
57
52
  startRecording(microphoneID?: string): Promise<TStartRecordingResponse>;
53
+ startRecordingForExistingSession(request: TStartRecordingForExistingSessionRequest): Promise<TStartRecordingResponse>;
58
54
  reinitializeVad(): void;
59
55
  destroyVad(): void;
60
56
  pauseVad(): void;
@@ -98,7 +94,6 @@ declare class EkaScribe {
98
94
  onVadFramesCallback(callback: TVadFramesCallback): void;
99
95
  onVadFrameProcessedCallback(callback: TVadFrameProcessedCallback): void;
100
96
  onPartialResultCallback(callback: TPartialResultCallback): void;
101
- onAuthErrorCallback(callback: TAuthErrorCallback): void;
102
97
  configureVadConstants({ pref_length, desp_length, max_length, sr, frame_size, pre_speech_pad_frames, short_thsld, long_thsld, }: {
103
98
  pref_length: number;
104
99
  desp_length: number;
@@ -134,11 +129,13 @@ declare class EkaScribe {
134
129
  getSuggestedMedications(txnId: string): Promise<TSuggestedMedicationResponse>;
135
130
  createDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
136
131
  updateDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
132
+ getDocument(document_id: string): Promise<TPostV1DocumentResponse>;
137
133
  deleteDocument(document_id: string): Promise<TDeleteV1DocumentResponse>;
138
134
  publishDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
139
135
  getChunkTranscript(txnId: string, chunkNumber: string): Promise<TFetchChunkTranscriptResult>;
140
136
  addSessionContext({ txn_id, context }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
141
137
  removeSessionContext({ txn_id, context }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
138
+ getSessionDetails({ session_id, presigned }: TGetV1SessionDetailsRequest): Promise<TGetV1SessionDetailsResponse>;
142
139
  }
143
140
 
144
141
  export declare enum ERROR_CODE {
@@ -205,10 +202,6 @@ declare type TAudioChunksInfo = {
205
202
  audioFrames?: undefined;
206
203
  });
207
204
 
208
- export declare type TAuthErrorCallback = (status: AUTH_ERROR_STATUS, code: number) => {
209
- access_token?: string;
210
- } | void;
211
-
212
205
  export declare type TChunkTranscriptResponse = {
213
206
  text: string;
214
207
  confidence: number;
@@ -470,6 +463,34 @@ export declare type TGetTransactionHistoryResponse = {
470
463
  retrieved_count?: number;
471
464
  };
472
465
 
466
+ export declare type TGetV1SessionDetailsData = {
467
+ schema_version: string;
468
+ session_id: string;
469
+ uuid: string;
470
+ wid: string;
471
+ created_at: number;
472
+ status: string;
473
+ user_status: 'init' | 'recording_started' | 'commit' | string;
474
+ transfer: string;
475
+ flavour: string;
476
+ patient_details: TPatientDetails | Record<string, unknown>;
477
+ audio_matrix: Record<string, unknown>;
478
+ additional_data: TSessionDetailsAdditionalData;
479
+ documents: TSessionDocument[];
480
+ };
481
+
482
+ export declare type TGetV1SessionDetailsRequest = {
483
+ session_id: string;
484
+ presigned?: boolean;
485
+ };
486
+
487
+ export declare type TGetV1SessionDetailsResponse = {
488
+ data?: TGetV1SessionDetailsData;
489
+ code: number;
490
+ message?: string;
491
+ [key: string]: unknown;
492
+ };
493
+
473
494
  export declare interface TGetV1TemplateSectionsResponse {
474
495
  items: TSection[];
475
496
  code: number;
@@ -551,6 +572,7 @@ export declare type TPatchTransactionRequest = {
551
572
  processing_status?: string;
552
573
  processing_error?: TPatchTransactionError;
553
574
  patient_details?: TPatientDetails;
575
+ user_status?: string;
554
576
  };
555
577
 
556
578
  export declare type TPatchVoiceApiV2ConfigRequest = {
@@ -674,7 +696,6 @@ export declare type TPostTransactionInitRequest = {
674
696
  batch_s3_url?: string;
675
697
  audio_file_names?: string[];
676
698
  additional_data?: Record<string, unknown>;
677
- encounter_id?: string;
678
699
  };
679
700
 
680
701
  export declare type TPostTransactionResponse = {
@@ -721,7 +742,6 @@ export declare type TPostV1DocumentRequest = {
721
742
  document_name?: string;
722
743
  type?: string;
723
744
  document_id?: string;
724
- publish?: Record<string, unknown>;
725
745
  };
726
746
 
727
747
  export declare type TPostV1DocumentResponse = {
@@ -746,13 +766,6 @@ export declare type TPostV1DocumentResponse = {
746
766
  presigned_url: string;
747
767
  created_at: string;
748
768
  updated_at: number;
749
- publish: {
750
- emr_webhook: {
751
- error: string | null;
752
- status: string;
753
- updated_at: string;
754
- };
755
- };
756
769
  };
757
770
  };
758
771
 
@@ -836,6 +849,38 @@ export declare type TSelectedPreferences = {
836
849
  auto_detect_language?: boolean;
837
850
  };
838
851
 
852
+ export declare type TSessionDetailsAdditionalData = {
853
+ input_languages?: {
854
+ id: string;
855
+ name: string;
856
+ }[];
857
+ output_format_template?: {
858
+ id: string;
859
+ name: string;
860
+ template_type: string;
861
+ }[];
862
+ model_type?: string;
863
+ consultation_mode?: string;
864
+ [key: string]: unknown;
865
+ };
866
+
867
+ export declare type TSessionDocument = {
868
+ document_id: string;
869
+ session_id: string;
870
+ template_id: string;
871
+ document_name: string;
872
+ document_type: 'document' | 'context' | 'transcript';
873
+ type: string;
874
+ status: string;
875
+ errors: unknown[];
876
+ warnings: unknown[];
877
+ publish: Record<string, unknown>;
878
+ created_at: number;
879
+ presigned_url: string | null;
880
+ presigned_url_expires_at: number | null;
881
+ vault_doc_id: string | null;
882
+ };
883
+
839
884
  export declare type TSessionHistoryData = {
840
885
  created_at: string;
841
886
  b_id: string;
@@ -862,6 +907,15 @@ export declare type TSessionStatus = {
862
907
  };
863
908
  };
864
909
 
910
+ declare type TStartRecordingForExistingSessionRequest = {
911
+ txn_id: string;
912
+ business_id: string;
913
+ created_at: number;
914
+ microphoneID?: string;
915
+ sharedWorkerUrl?: string;
916
+ flavour?: string;
917
+ };
918
+
865
919
  export declare type TStartRecordingResponse = {
866
920
  error_code?: ERROR_CODE;
867
921
  status_code: number;