@eka-care/ekascribe-ts-sdk 2.1.40 → 2.1.42

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,6 +5,11 @@ 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
+
8
13
  export declare enum CALLBACK_TYPE {
9
14
  AWS_CONFIGURE_STATUS = "aws_configure_status",
10
15
  FILE_UPLOAD_STATUS = "file_upload_status",
@@ -93,6 +98,7 @@ declare class EkaScribe {
93
98
  onVadFramesCallback(callback: TVadFramesCallback): void;
94
99
  onVadFrameProcessedCallback(callback: TVadFrameProcessedCallback): void;
95
100
  onPartialResultCallback(callback: TPartialResultCallback): void;
101
+ onAuthErrorCallback(callback: TAuthErrorCallback): void;
96
102
  configureVadConstants({ pref_length, desp_length, max_length, sr, frame_size, pre_speech_pad_frames, short_thsld, long_thsld, }: {
97
103
  pref_length: number;
98
104
  desp_length: number;
@@ -129,6 +135,7 @@ declare class EkaScribe {
129
135
  createDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
130
136
  updateDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
131
137
  deleteDocument(document_id: string): Promise<TDeleteV1DocumentResponse>;
138
+ publishDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
132
139
  getChunkTranscript(txnId: string, chunkNumber: string): Promise<TFetchChunkTranscriptResult>;
133
140
  addSessionContext({ txn_id, context }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
134
141
  removeSessionContext({ txn_id, context }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
@@ -198,6 +205,10 @@ declare type TAudioChunksInfo = {
198
205
  audioFrames?: undefined;
199
206
  });
200
207
 
208
+ export declare type TAuthErrorCallback = (status: AUTH_ERROR_STATUS, code: number) => {
209
+ access_token?: string;
210
+ } | void;
211
+
201
212
  export declare type TChunkTranscriptResponse = {
202
213
  text: string;
203
214
  confidence: number;