@eka-care/ekascribe-ts-sdk 2.1.50 → 3.0.0
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 +239 -159
- package/dist/index.mjs +5706 -31638
- package/package.json +6 -5
- package/dist/worker.bundle.js +0 -18
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { CallbackMap } from 'med-scribe-alliance-ts-sdk';
|
|
2
|
+
import { CallbackName as CallbackName_2 } from 'med-scribe-alliance-ts-sdk';
|
|
3
|
+
import { CreateSessionRequest } from 'med-scribe-alliance-ts-sdk';
|
|
4
|
+
import { CreateSessionResponse } from 'med-scribe-alliance-ts-sdk';
|
|
5
|
+
import { createWorkerBlobUrl } from 'med-scribe-alliance-ts-sdk';
|
|
6
|
+
import { DiscoveryDocument } from 'med-scribe-alliance-ts-sdk';
|
|
7
|
+
import { EndSessionRequest } from 'med-scribe-alliance-ts-sdk';
|
|
8
|
+
import { EndSessionResponse } from 'med-scribe-alliance-ts-sdk';
|
|
9
|
+
import { GetSessionStatusResponse } from 'med-scribe-alliance-ts-sdk';
|
|
10
|
+
import { getWorkerUrl } from 'med-scribe-alliance-ts-sdk';
|
|
11
|
+
import { IpcBridge as IpcBridge_2 } from 'med-scribe-alliance-ts-sdk';
|
|
12
|
+
import { PatchSessionRequest } from 'med-scribe-alliance-ts-sdk';
|
|
13
|
+
import { PatchSessionResponse } from 'med-scribe-alliance-ts-sdk';
|
|
14
|
+
import { PollOptions } from 'med-scribe-alliance-ts-sdk';
|
|
15
|
+
import { ProcessTemplateResponse } from 'med-scribe-alliance-ts-sdk';
|
|
16
|
+
import { ResolvedConfig } from 'med-scribe-alliance-ts-sdk';
|
|
17
|
+
import { ScribeClient } from 'med-scribe-alliance-ts-sdk';
|
|
18
|
+
import { SDKResult } from 'med-scribe-alliance-ts-sdk';
|
|
19
|
+
|
|
1
20
|
export declare enum API_STATUS {
|
|
2
21
|
NOT_INITIALIZED = "na",
|
|
3
22
|
INIT = "init",
|
|
@@ -15,6 +34,8 @@ export declare enum CALLBACK_TYPE {
|
|
|
15
34
|
STORAGE_STATUS = "storage_status"
|
|
16
35
|
}
|
|
17
36
|
|
|
37
|
+
export declare type CallbackName = 'onRecordingStateChange' | 'onAudioEvent' | 'onUploadEvent' | 'onSessionEvent' | 'onError' | 'onTokenRequired';
|
|
38
|
+
|
|
18
39
|
export declare enum COMPATIBILITY_TEST_STATUS {
|
|
19
40
|
SUCCESS = "success",
|
|
20
41
|
ERROR = "error",
|
|
@@ -29,47 +50,101 @@ export declare enum COMPATIBILITY_TEST_TYPE {
|
|
|
29
50
|
NETWORK_API = "NETWORK_API"
|
|
30
51
|
}
|
|
31
52
|
|
|
53
|
+
export { CreateSessionRequest }
|
|
54
|
+
|
|
55
|
+
export { CreateSessionResponse }
|
|
56
|
+
|
|
57
|
+
export { createWorkerBlobUrl }
|
|
58
|
+
|
|
59
|
+
export { DiscoveryDocument }
|
|
60
|
+
|
|
61
|
+
declare class DocumentManager {
|
|
62
|
+
private transport;
|
|
63
|
+
private hosts;
|
|
64
|
+
private allianceClient;
|
|
65
|
+
constructor(transport: ITransport, hosts: EkaHosts, allianceClient: ScribeClient);
|
|
66
|
+
getAllTemplates(): Promise<TGetV1TemplatesResponse>;
|
|
67
|
+
createTemplate({ title, desc, section_ids, }: TPostV1TemplateRequest): Promise<TPostV1TemplateResponse>;
|
|
68
|
+
updateTemplate({ template_id, title, desc, section_ids, }: TPostV1TemplateRequest): Promise<TPostV1TemplateResponse>;
|
|
69
|
+
deleteTemplate(templateId: string): Promise<TPostV1TemplateResponse>;
|
|
70
|
+
aiGenerateTemplate(formData: FormData): Promise<TPostCookV1MediaAiCreateTemplateResponse>;
|
|
71
|
+
convertToTemplate({ txn_id, template_id, }: {
|
|
72
|
+
txn_id: string;
|
|
73
|
+
template_id: string;
|
|
74
|
+
}): Promise<SDKResult<ProcessTemplateResponse>>;
|
|
75
|
+
convertTranscriptionToTemplate({ txn_id, template_id, transcript, target_language, }: TPostV1ConvertToTemplateRequest): Promise<TPostV1ConvertToTemplateResponse>;
|
|
76
|
+
getAllTemplateSections(): Promise<TGetV1TemplateSectionsResponse>;
|
|
77
|
+
createTemplateSection({ title, desc, format, example, }: TPostV1TemplateSectionRequest): Promise<TPostV1TemplateSectionResponse>;
|
|
78
|
+
updateTemplateSection({ section_id, title, desc, format, example, }: TPostV1TemplateSectionRequest): Promise<TPostV1TemplateSectionResponse>;
|
|
79
|
+
deleteTemplateSection(sectionId: string): Promise<TPostV1TemplateSectionResponse>;
|
|
80
|
+
getDocument(documentId: string): Promise<TPostV1DocumentResponse>;
|
|
81
|
+
createDocument({ session_id, document_name, type, document_id, publish, }: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
|
|
82
|
+
updateDocument({ session_id, document_name, type, document_id, publish, }: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
|
|
83
|
+
deleteDocument(documentId: string): Promise<TDeleteV1DocumentResponse>;
|
|
84
|
+
publishDocument({ session_id, document_id, }: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare type EkaHosts = {
|
|
88
|
+
voiceV1: string;
|
|
89
|
+
voiceV2: string;
|
|
90
|
+
voiceV3: string;
|
|
91
|
+
cookV1: string;
|
|
92
|
+
ekaHost: string;
|
|
93
|
+
parchiHost: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
32
96
|
declare class EkaScribe {
|
|
33
97
|
private static instance;
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
private
|
|
98
|
+
private transport;
|
|
99
|
+
private hosts;
|
|
100
|
+
private callbackRegistry;
|
|
101
|
+
private tracker;
|
|
102
|
+
private config;
|
|
103
|
+
private allianceClient;
|
|
104
|
+
private recording;
|
|
105
|
+
private output;
|
|
106
|
+
readonly documents: DocumentManager;
|
|
107
|
+
readonly sessions: SessionUtils;
|
|
38
108
|
private constructor();
|
|
39
|
-
static getInstance(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
clientId?: string;
|
|
43
|
-
flavour?: string;
|
|
44
|
-
enableSentryLogs?: boolean;
|
|
45
|
-
}): EkaScribe;
|
|
46
|
-
resetInstance(): void;
|
|
47
|
-
getEkascribeConfig(): Promise<TGetConfigV2Response>;
|
|
48
|
-
updateAuthTokens({ access_token }: {
|
|
49
|
-
access_token: string;
|
|
50
|
-
}): void;
|
|
51
|
-
initTransaction(request: TPostTransactionInitRequest, sharedWorkerUrl?: string): Promise<TStartRecordingResponse>;
|
|
109
|
+
static getInstance(config: EkaScribeConfig): EkaScribe;
|
|
110
|
+
/** @deprecated Backward compatible */
|
|
111
|
+
initTransaction(request: TPostTransactionInitRequest): Promise<TStartRecordingResponse>;
|
|
52
112
|
startRecording(microphoneID?: string): Promise<TStartRecordingResponse>;
|
|
53
113
|
startRecordingForExistingSession(request: TStartRecordingForExistingSessionRequest): Promise<TStartRecordingResponse>;
|
|
54
|
-
reinitializeVad(): Promise<void>;
|
|
55
|
-
destroyVad(): void;
|
|
56
|
-
pauseVad(): void;
|
|
57
114
|
pauseRecording(): TPauseRecordingResponse;
|
|
58
115
|
resumeRecording(): TPauseRecordingResponse;
|
|
59
116
|
endRecording(): Promise<TEndRecordingResponse>;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}): Promise<
|
|
63
|
-
|
|
64
|
-
|
|
117
|
+
getSessionStatus(sessionId?: string, options?: {
|
|
118
|
+
poll?: PollOptions;
|
|
119
|
+
}): Promise<SDKResult<GetSessionStatusResponse>>;
|
|
120
|
+
retryUploadRecording(): Promise<TEndRecordingResponse>;
|
|
121
|
+
cancelSession(sessionId?: string): Promise<SDKResult<PatchSessionResponse>>;
|
|
122
|
+
/**
|
|
123
|
+
* Upload a pre-recorded audio file to an existing session's upload URL.
|
|
124
|
+
*
|
|
125
|
+
* Client flow:
|
|
126
|
+
* 1. createSession() — via sessions.createSession()
|
|
127
|
+
* 2. processPreRecordedAudio(uploadUrl, audioFile, audioFileName) — this method
|
|
128
|
+
* 3. endSession — via sessions.endSession()
|
|
129
|
+
*/
|
|
130
|
+
processPreRecordedAudio(request: {
|
|
131
|
+
uploadUrl: string;
|
|
132
|
+
audioFile: File | Blob;
|
|
133
|
+
}): Promise<TStartRecordingResponse>;
|
|
134
|
+
/** @deprecated Backward compatible */
|
|
65
135
|
commitTransactionCall(): Promise<TEndRecordingResponse>;
|
|
136
|
+
/** @deprecated Backward compatible */
|
|
66
137
|
stopTransactionCall(): Promise<TEndRecordingResponse>;
|
|
67
|
-
|
|
138
|
+
/** @deprecated Backward compatible */
|
|
139
|
+
getTemplateOutput(request: {
|
|
68
140
|
txn_id: string;
|
|
69
141
|
}): Promise<TGetStatusResponse>;
|
|
70
|
-
|
|
142
|
+
/** @deprecated Backward compatible */
|
|
143
|
+
getOutputTranscription(request: {
|
|
71
144
|
txn_id: string;
|
|
72
145
|
}): Promise<TGetStatusResponse>;
|
|
146
|
+
getChunkTranscript(txnId: string, chunkNumber: string): Promise<TFetchChunkTranscriptResult>;
|
|
147
|
+
/** @deprecated Backward compatible */
|
|
73
148
|
pollSessionOutput(request: {
|
|
74
149
|
txn_id: string;
|
|
75
150
|
max_polling_time?: number;
|
|
@@ -78,66 +153,37 @@ declare class EkaScribe {
|
|
|
78
153
|
dlp?: boolean;
|
|
79
154
|
onPartialResultCb?: TPartialResultCallback;
|
|
80
155
|
}): Promise<TPollingResponse>;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
txn_id: string;
|
|
87
|
-
}): Promise<TDeleteTransactionResponse>;
|
|
88
|
-
getSuccessFiles(): string[];
|
|
89
|
-
getFailedFiles(): string[];
|
|
90
|
-
getTotalAudioFiles(): TAudioChunksInfo[];
|
|
91
|
-
resetEkaScribe(): void;
|
|
92
|
-
onUserSpeechCallback(callback: (isSpeech: boolean) => void): void;
|
|
93
|
-
onEventCallback(callback: TEventCallback): void;
|
|
94
|
-
onVadFramesCallback(callback: TVadFramesCallback): void;
|
|
95
|
-
onVadFrameProcessedCallback(callback: TVadFrameProcessedCallback): void;
|
|
96
|
-
onPartialResultCallback(callback: TPartialResultCallback): void;
|
|
97
|
-
configureVadConstants({ pref_length, desp_length, max_length, sr, frame_size, pre_speech_pad_frames, short_thsld, long_thsld, }: {
|
|
98
|
-
pref_length: number;
|
|
99
|
-
desp_length: number;
|
|
100
|
-
max_length: number;
|
|
101
|
-
sr: number;
|
|
102
|
-
frame_size: number;
|
|
103
|
-
pre_speech_pad_frames: number;
|
|
104
|
-
short_thsld: number;
|
|
105
|
-
long_thsld: number;
|
|
156
|
+
registerCallback<K extends CallbackName_2>(name: K, handler: CallbackMap[K]): void;
|
|
157
|
+
removeCallback<K extends CallbackName_2>(name: K, handler: CallbackMap[K]): void;
|
|
158
|
+
/** @future Rename to setAccessToken(token: string) once existing clients migrate */
|
|
159
|
+
updateAuthTokens({ access_token }: {
|
|
160
|
+
access_token: string;
|
|
106
161
|
}): void;
|
|
107
|
-
getAllTemplates(): Promise<TGetV1TemplatesResponse>;
|
|
108
|
-
createTemplate(template: TPostV1TemplateRequest): Promise<TPostV1TemplateResponse>;
|
|
109
|
-
updateTemplate(template: TPostV1TemplateRequest): Promise<TPostV1TemplateResponse>;
|
|
110
|
-
deleteTemplate(template_id: string): Promise<TPostV1TemplateResponse>;
|
|
111
|
-
aiGenerateTemplate(formData: FormData): Promise<TPostCookV1MediaAiCreateTemplateResponse>;
|
|
112
|
-
updateConfig(request: TPatchVoiceApiV2ConfigRequest): Promise<any>;
|
|
113
|
-
getAllTemplateSections(): Promise<TGetV1TemplateSectionsResponse>;
|
|
114
|
-
createTemplateSection(templateSection: TPostV1TemplateSectionRequest): Promise<TPostV1TemplateSectionResponse>;
|
|
115
|
-
updateTemplateSection(templateSection: TPostV1TemplateSectionRequest): Promise<TPostV1TemplateSectionResponse>;
|
|
116
|
-
deleteTemplateSection(section_id: string): Promise<TPostV1TemplateSectionResponse>;
|
|
117
|
-
postTransactionConvertToTemplate(request: TPostV1ConvertToTemplateRequest): Promise<TPostV1ConvertToTemplateResponse>;
|
|
118
|
-
convertTranscriptionToTemplate(request: TPostV1ConvertToTemplateRequest): Promise<TPostV1ConvertToTemplateResponse>;
|
|
119
|
-
searchPastSessions(request: TSearchSessionsRequest): Promise<TSessionHistoryData[]>;
|
|
120
|
-
searchSessionsByPatientName(request: TSearchSessionsByPatientRequest): Promise<TSessionHistoryData[]>;
|
|
121
|
-
searchSessionsBySessionId(request: TSearchSessionsByPatientRequest): Promise<TSessionHistoryData[]>;
|
|
122
|
-
uploadAudioWithPresignedUrl(request: TPostV1UploadAudioFilesRequest): Promise<TFullAudioUploadResponse>;
|
|
123
|
-
updateResultSummary(request: TPatchVoiceApiV3StatusRequest): Promise<TPatchVoiceApiV3StatusResponse>;
|
|
124
|
-
getConfigMyTemplates(): Promise<TGetConfigV2Response>;
|
|
125
162
|
runSystemCompatibilityTest(callback: TCompatibilityCallback, sharedWorker?: SharedWorker): Promise<TCompatibilityTestSummary>;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
163
|
+
resetInstance(): Promise<void>;
|
|
164
|
+
private handleUnauthorized;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export declare interface EkaScribeConfig {
|
|
168
|
+
access_token: string;
|
|
169
|
+
env: 'PROD' | 'DEV';
|
|
170
|
+
clientId?: string;
|
|
171
|
+
mode?: 'http' | 'ipc';
|
|
172
|
+
ipcBridge?: IpcBridge_2;
|
|
173
|
+
enableTracking?: boolean;
|
|
174
|
+
flavour?: string;
|
|
175
|
+
sharedWorkerUrl?: string;
|
|
176
|
+
allianceConfig?: {
|
|
177
|
+
baseUrl?: string;
|
|
178
|
+
useWorker?: boolean | 'auto';
|
|
179
|
+
debug?: boolean;
|
|
180
|
+
};
|
|
139
181
|
}
|
|
140
182
|
|
|
183
|
+
export { EndSessionRequest }
|
|
184
|
+
|
|
185
|
+
export { EndSessionResponse }
|
|
186
|
+
|
|
141
187
|
export declare enum ERROR_CODE {
|
|
142
188
|
MICROPHONE = "microphone",
|
|
143
189
|
TXN_INIT_FAILED = "txn_init_failed",
|
|
@@ -155,17 +201,36 @@ export declare enum ERROR_CODE {
|
|
|
155
201
|
GET_PRESIGNED_URL_FAILED = "get_presigned_url_failed",
|
|
156
202
|
UPLOAD_FULL_AUDIO = "upload_full_audio",
|
|
157
203
|
FETCH_WRAPPER_RESPONSE = "fetch_wrapper_response",
|
|
158
|
-
FETCH_WRAPPER_ERROR = "fetch_wrapper_error"
|
|
204
|
+
FETCH_WRAPPER_ERROR = "fetch_wrapper_error",
|
|
205
|
+
NETWORK_ERROR = "network_error",
|
|
206
|
+
UNKNOWN_ERROR = "unknown_error",
|
|
207
|
+
UNAUTHORIZED = "unauthorized",
|
|
208
|
+
FORBIDDEN = "forbidden"
|
|
159
209
|
}
|
|
160
210
|
|
|
161
211
|
declare type Gender = 'M' | 'F' | 'O';
|
|
162
212
|
|
|
163
|
-
export declare const getEkaScribeInstance: (
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
213
|
+
export declare const getEkaScribeInstance: (config: EkaScribeConfig) => EkaScribe;
|
|
214
|
+
|
|
215
|
+
export { GetSessionStatusResponse }
|
|
216
|
+
|
|
217
|
+
export { getWorkerUrl }
|
|
218
|
+
|
|
219
|
+
export declare interface IpcBridge {
|
|
220
|
+
send(message: unknown): void;
|
|
221
|
+
onResponse(handler: (message: unknown) => void): void;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
declare interface ITransport {
|
|
225
|
+
request<T = unknown>(config: TransportRequest): Promise<TransportResponse<T>>;
|
|
226
|
+
setAuthToken(token: string): void;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export { PatchSessionRequest }
|
|
230
|
+
|
|
231
|
+
export { PatchSessionResponse }
|
|
232
|
+
|
|
233
|
+
export { PollOptions }
|
|
169
234
|
|
|
170
235
|
export declare enum PROCESSING_STATUS {
|
|
171
236
|
SUCCESS = "success",
|
|
@@ -174,6 +239,10 @@ export declare enum PROCESSING_STATUS {
|
|
|
174
239
|
CANCELLED = "cancelled"
|
|
175
240
|
}
|
|
176
241
|
|
|
242
|
+
export { ProcessTemplateResponse }
|
|
243
|
+
|
|
244
|
+
export { ResolvedConfig }
|
|
245
|
+
|
|
177
246
|
export declare enum RESULT_STATUS {
|
|
178
247
|
SUCCESS = "success",
|
|
179
248
|
FAILURE = "failure",
|
|
@@ -181,26 +250,39 @@ export declare enum RESULT_STATUS {
|
|
|
181
250
|
IN_PROGRESS = "in-progress"
|
|
182
251
|
}
|
|
183
252
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
})
|
|
253
|
+
export { SDKResult }
|
|
254
|
+
|
|
255
|
+
declare class SessionUtils {
|
|
256
|
+
private transport;
|
|
257
|
+
private hosts;
|
|
258
|
+
private allianceClient;
|
|
259
|
+
constructor(transport: ITransport, hosts: EkaHosts, allianceClient: ScribeClient);
|
|
260
|
+
getSessionHistory({ txn_count, oid, }: {
|
|
261
|
+
txn_count: number;
|
|
262
|
+
oid?: string;
|
|
263
|
+
}): Promise<TGetTransactionHistoryResponse>;
|
|
264
|
+
deleteSession({ txn_id }: {
|
|
265
|
+
txn_id: string;
|
|
266
|
+
}): Promise<TDeleteTransactionResponse>;
|
|
267
|
+
patchSessionStatus(request: PatchSessionRequest, sessionId?: string): Promise<SDKResult<PatchSessionResponse>>;
|
|
268
|
+
getSessionDetails({ session_id, presigned, }: TGetV1SessionDetailsRequest): Promise<TGetV1SessionDetailsResponse>;
|
|
269
|
+
getSuggestedMedications(txnId: string): Promise<TSuggestedMedicationResponse>;
|
|
270
|
+
addSessionContext({ txn_id, context, }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
|
|
271
|
+
removeSessionContext({ txn_id, context, }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
|
|
272
|
+
updateResultSummary({ txnId, data, }: TPatchVoiceApiV3StatusRequest): Promise<TPatchVoiceApiV3StatusResponse>;
|
|
273
|
+
getConfig(): Promise<TGetConfigV2Response>;
|
|
274
|
+
getConfigMyTemplates(): Promise<TGetConfigV2Response>;
|
|
275
|
+
updateConfig(request: TPatchVoiceApiV2ConfigRequest): Promise<TPatchVoiceApiV2ConfigResponse>;
|
|
276
|
+
getDoctorHeaderFooter({ doctor_oid, clinic_id, }: TGetDoctorHeaderFooterRequest): Promise<TGetDoctorHeaderFooterResponse>;
|
|
277
|
+
getDoctorClinics({ doctor_id, }: TGetDoctorClinicsRequest): Promise<TGetDoctorClinicsResponse>;
|
|
278
|
+
createSession(request: CreateSessionRequest): Promise<SDKResult<CreateSessionResponse>>;
|
|
279
|
+
endSession(request: EndSessionRequest, sessionId?: string): Promise<SDKResult<EndSessionResponse>>;
|
|
280
|
+
getDiscoveryDocument(): DiscoveryDocument | null;
|
|
281
|
+
getDiscoveryConfig(): SDKResult<ResolvedConfig>;
|
|
282
|
+
refreshDiscovery(): Promise<SDKResult<ResolvedConfig>>;
|
|
283
|
+
private getDefaultHeaderFooterInfo;
|
|
284
|
+
private extractHeaderFooterInfo;
|
|
285
|
+
}
|
|
204
286
|
|
|
205
287
|
export declare type TChunkTranscriptResponse = {
|
|
206
288
|
text: string;
|
|
@@ -251,7 +333,7 @@ export declare type TConfigSettings = {
|
|
|
251
333
|
};
|
|
252
334
|
|
|
253
335
|
declare type TDeleteTransactionResponse = {
|
|
254
|
-
|
|
336
|
+
status_code: number;
|
|
255
337
|
message?: string;
|
|
256
338
|
status?: string;
|
|
257
339
|
txn_id?: string;
|
|
@@ -263,7 +345,7 @@ declare type TDeleteTransactionResponse = {
|
|
|
263
345
|
};
|
|
264
346
|
|
|
265
347
|
export declare type TDeleteV1DocumentResponse = {
|
|
266
|
-
|
|
348
|
+
status_code: number;
|
|
267
349
|
message?: string;
|
|
268
350
|
[key: string]: unknown;
|
|
269
351
|
};
|
|
@@ -345,12 +427,6 @@ export declare type TFetchChunkTranscriptResult = {
|
|
|
345
427
|
error: string;
|
|
346
428
|
};
|
|
347
429
|
|
|
348
|
-
declare type TFullAudioUploadResponse = {
|
|
349
|
-
error_code?: ERROR_CODE;
|
|
350
|
-
status_code: number;
|
|
351
|
-
message: string;
|
|
352
|
-
};
|
|
353
|
-
|
|
354
430
|
export declare type TGetConfigItem = {
|
|
355
431
|
id: string;
|
|
356
432
|
name: string;
|
|
@@ -399,7 +475,15 @@ export declare type TGetConfigV2Response = {
|
|
|
399
475
|
onboarding_step?: string;
|
|
400
476
|
};
|
|
401
477
|
message?: string;
|
|
402
|
-
|
|
478
|
+
status_code: number;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
export declare type TGetConfigV2TimezoneResponse = {
|
|
482
|
+
timezone: string;
|
|
483
|
+
current_time_utc: string;
|
|
484
|
+
timestamp: number;
|
|
485
|
+
status_code: number;
|
|
486
|
+
message?: string;
|
|
403
487
|
};
|
|
404
488
|
|
|
405
489
|
export declare type TGetDoctorClinicsRequest = {
|
|
@@ -408,7 +492,7 @@ export declare type TGetDoctorClinicsRequest = {
|
|
|
408
492
|
|
|
409
493
|
export declare type TGetDoctorClinicsResponse = {
|
|
410
494
|
data: TClinicInfo[] | null;
|
|
411
|
-
|
|
495
|
+
status_code: number;
|
|
412
496
|
message?: string;
|
|
413
497
|
};
|
|
414
498
|
|
|
@@ -419,11 +503,11 @@ export declare type TGetDoctorHeaderFooterRequest = {
|
|
|
419
503
|
|
|
420
504
|
export declare type TGetDoctorHeaderFooterResponse = {
|
|
421
505
|
data: TDoctorHeaderFooterInfo;
|
|
422
|
-
|
|
506
|
+
status_code: number;
|
|
423
507
|
message?: string;
|
|
424
508
|
};
|
|
425
509
|
|
|
426
|
-
declare type TGetStatusApiResponse = {
|
|
510
|
+
export declare type TGetStatusApiResponse = {
|
|
427
511
|
data: {
|
|
428
512
|
output: TOutputSummary[];
|
|
429
513
|
audio_matrix?: {
|
|
@@ -486,14 +570,14 @@ export declare type TGetV1SessionDetailsRequest = {
|
|
|
486
570
|
|
|
487
571
|
export declare type TGetV1SessionDetailsResponse = {
|
|
488
572
|
data?: TGetV1SessionDetailsData;
|
|
489
|
-
|
|
573
|
+
status_code: number;
|
|
490
574
|
message?: string;
|
|
491
575
|
[key: string]: unknown;
|
|
492
576
|
};
|
|
493
577
|
|
|
494
578
|
export declare interface TGetV1TemplateSectionsResponse {
|
|
495
579
|
items: TSection[];
|
|
496
|
-
|
|
580
|
+
status_code: number;
|
|
497
581
|
error?: {
|
|
498
582
|
code: string;
|
|
499
583
|
message: string;
|
|
@@ -502,7 +586,7 @@ export declare interface TGetV1TemplateSectionsResponse {
|
|
|
502
586
|
|
|
503
587
|
export declare interface TGetV1TemplatesResponse {
|
|
504
588
|
items: TTemplate[];
|
|
505
|
-
|
|
589
|
+
status_code: number;
|
|
506
590
|
error?: {
|
|
507
591
|
code: string;
|
|
508
592
|
message: string;
|
|
@@ -516,7 +600,7 @@ declare type TNetworkInfo = {
|
|
|
516
600
|
connection_type: String;
|
|
517
601
|
};
|
|
518
602
|
|
|
519
|
-
declare type TOutputSummary = {
|
|
603
|
+
export declare type TOutputSummary = {
|
|
520
604
|
template_id: string;
|
|
521
605
|
value?: any;
|
|
522
606
|
type: string;
|
|
@@ -554,7 +638,7 @@ export declare type TPatchSessionContextRequest = {
|
|
|
554
638
|
};
|
|
555
639
|
|
|
556
640
|
export declare type TPatchSessionContextResponse = {
|
|
557
|
-
|
|
641
|
+
status_code: number;
|
|
558
642
|
message?: string;
|
|
559
643
|
[key: string]: unknown;
|
|
560
644
|
};
|
|
@@ -601,7 +685,7 @@ export declare type TPatchVoiceApiV2ConfigRequest = {
|
|
|
601
685
|
|
|
602
686
|
export declare interface TPatchVoiceApiV2ConfigResponse extends TPatchVoiceApiV2ConfigRequest {
|
|
603
687
|
msg: string;
|
|
604
|
-
|
|
688
|
+
status_code: number;
|
|
605
689
|
error?: {
|
|
606
690
|
code: string;
|
|
607
691
|
message: string;
|
|
@@ -621,7 +705,7 @@ export declare type TPatchVoiceApiV3StatusResponse = {
|
|
|
621
705
|
message: string;
|
|
622
706
|
txn_id: string;
|
|
623
707
|
b_id: string;
|
|
624
|
-
|
|
708
|
+
status_code: number;
|
|
625
709
|
error?: {
|
|
626
710
|
code: string;
|
|
627
711
|
message: string;
|
|
@@ -645,7 +729,7 @@ export declare type TPauseRecordingResponse = {
|
|
|
645
729
|
is_paused?: boolean;
|
|
646
730
|
};
|
|
647
731
|
|
|
648
|
-
declare type TPollingResponse = {
|
|
732
|
+
export declare type TPollingResponse = {
|
|
649
733
|
response?: TGetStatusApiResponse | null;
|
|
650
734
|
status_code: number;
|
|
651
735
|
errorMessage?: string;
|
|
@@ -669,7 +753,7 @@ declare type TPostCookV1MediaAiCreateTemplateResponse = {
|
|
|
669
753
|
title: string;
|
|
670
754
|
desc: string;
|
|
671
755
|
sections: TSection[];
|
|
672
|
-
|
|
756
|
+
status_code: number;
|
|
673
757
|
message: string;
|
|
674
758
|
};
|
|
675
759
|
|
|
@@ -696,6 +780,7 @@ export declare type TPostTransactionInitRequest = {
|
|
|
696
780
|
batch_s3_url?: string;
|
|
697
781
|
audio_file_names?: string[];
|
|
698
782
|
additional_data?: Record<string, unknown>;
|
|
783
|
+
encounter_id?: string;
|
|
699
784
|
};
|
|
700
785
|
|
|
701
786
|
export declare type TPostTransactionResponse = {
|
|
@@ -706,7 +791,7 @@ export declare type TPostTransactionResponse = {
|
|
|
706
791
|
oid: string;
|
|
707
792
|
uuid: string;
|
|
708
793
|
data: unknown;
|
|
709
|
-
|
|
794
|
+
status_code: number;
|
|
710
795
|
error?: {
|
|
711
796
|
code: string;
|
|
712
797
|
message: string;
|
|
@@ -728,7 +813,7 @@ export declare type TPostV1ConvertToTemplateResponse = {
|
|
|
728
813
|
template_id: string;
|
|
729
814
|
document_id: string;
|
|
730
815
|
b_id: string;
|
|
731
|
-
|
|
816
|
+
status_code: number;
|
|
732
817
|
msg: string;
|
|
733
818
|
error?: {
|
|
734
819
|
code: string;
|
|
@@ -746,7 +831,7 @@ export declare type TPostV1DocumentRequest = {
|
|
|
746
831
|
};
|
|
747
832
|
|
|
748
833
|
export declare type TPostV1DocumentResponse = {
|
|
749
|
-
|
|
834
|
+
status_code: number;
|
|
750
835
|
status?: string;
|
|
751
836
|
message?: string;
|
|
752
837
|
data?: {
|
|
@@ -779,7 +864,7 @@ export declare interface TPostV1TemplateRequest {
|
|
|
779
864
|
}
|
|
780
865
|
|
|
781
866
|
export declare interface TPostV1TemplateResponse {
|
|
782
|
-
|
|
867
|
+
status_code: number;
|
|
783
868
|
msg: string;
|
|
784
869
|
template_id?: string;
|
|
785
870
|
message?: string;
|
|
@@ -800,7 +885,7 @@ export declare interface TPostV1TemplateSectionRequest {
|
|
|
800
885
|
export declare interface TPostV1TemplateSectionResponse {
|
|
801
886
|
msg: string;
|
|
802
887
|
section_id: string;
|
|
803
|
-
|
|
888
|
+
status_code: number;
|
|
804
889
|
action: 'updated' | 'created_custom';
|
|
805
890
|
error?: {
|
|
806
891
|
code: string;
|
|
@@ -809,26 +894,23 @@ export declare interface TPostV1TemplateSectionResponse {
|
|
|
809
894
|
}
|
|
810
895
|
|
|
811
896
|
export declare interface TPostV1UploadAudioFilesRequest extends TPostTransactionInitRequest {
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
audioFileNames: string[];
|
|
897
|
+
audioFile: File | Blob;
|
|
898
|
+
audioFileName: string;
|
|
815
899
|
}
|
|
816
900
|
|
|
817
|
-
declare
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
patientName?: string;
|
|
825
|
-
sessionId?: string;
|
|
826
|
-
};
|
|
901
|
+
declare interface TransportRequest {
|
|
902
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
903
|
+
url: string;
|
|
904
|
+
headers?: Record<string, string>;
|
|
905
|
+
body?: unknown;
|
|
906
|
+
timeout?: number;
|
|
907
|
+
}
|
|
827
908
|
|
|
828
|
-
declare
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
909
|
+
declare interface TransportResponse<T = unknown> {
|
|
910
|
+
status: number;
|
|
911
|
+
data: T;
|
|
912
|
+
headers?: Record<string, string>;
|
|
913
|
+
}
|
|
832
914
|
|
|
833
915
|
export declare interface TSection {
|
|
834
916
|
id: string;
|
|
@@ -909,13 +991,11 @@ export declare type TSessionStatus = {
|
|
|
909
991
|
};
|
|
910
992
|
};
|
|
911
993
|
|
|
912
|
-
declare type TStartRecordingForExistingSessionRequest = {
|
|
994
|
+
export declare type TStartRecordingForExistingSessionRequest = {
|
|
913
995
|
txn_id: string;
|
|
914
996
|
business_id: string;
|
|
915
997
|
created_at: number;
|
|
916
998
|
microphoneID?: string;
|
|
917
|
-
sharedWorkerUrl?: string;
|
|
918
|
-
flavour?: string;
|
|
919
999
|
};
|
|
920
1000
|
|
|
921
1001
|
export declare type TStartRecordingResponse = {
|
|
@@ -952,7 +1032,7 @@ export declare type TSuggestedMedication = {
|
|
|
952
1032
|
};
|
|
953
1033
|
|
|
954
1034
|
declare type TSuggestedMedicationResponse = {
|
|
955
|
-
|
|
1035
|
+
status_code: number;
|
|
956
1036
|
message?: string;
|
|
957
1037
|
session_id?: string;
|
|
958
1038
|
medications?: TSuggestedMedication[];
|
|
@@ -976,13 +1056,13 @@ export declare interface TTemplate {
|
|
|
976
1056
|
is_favorite?: boolean;
|
|
977
1057
|
}
|
|
978
1058
|
|
|
979
|
-
declare type TTemplateMessage = {
|
|
1059
|
+
export declare type TTemplateMessage = {
|
|
980
1060
|
type: 'warning' | 'error';
|
|
981
1061
|
code?: string;
|
|
982
1062
|
msg: string;
|
|
983
1063
|
};
|
|
984
1064
|
|
|
985
|
-
declare type TTemplateStatus = 'success' | 'partial_success' | 'failure';
|
|
1065
|
+
export declare type TTemplateStatus = 'success' | 'partial_success' | 'failure';
|
|
986
1066
|
|
|
987
1067
|
export declare type TVadFrameProcessedCallback = (args: {
|
|
988
1068
|
probabilities: {
|