@eka-care/ekascribe-ts-sdk 2.1.25 → 2.1.27
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 +17 -0
- package/dist/index.mjs +33 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -77,6 +77,9 @@ declare class EkaScribe {
|
|
|
77
77
|
getSessionHistory({ txn_count }: {
|
|
78
78
|
txn_count: number;
|
|
79
79
|
}): Promise<TGetTransactionHistoryResponse>;
|
|
80
|
+
deleteSession({ txn_id }: {
|
|
81
|
+
txn_id: string;
|
|
82
|
+
}): Promise<TDeleteTransactionResponse>;
|
|
80
83
|
getSuccessFiles(): string[];
|
|
81
84
|
getFailedFiles(): string[];
|
|
82
85
|
getTotalAudioFiles(): TAudioChunksInfo[];
|
|
@@ -217,6 +220,18 @@ export declare type TConfigSettings = {
|
|
|
217
220
|
};
|
|
218
221
|
};
|
|
219
222
|
|
|
223
|
+
declare type TDeleteTransactionResponse = {
|
|
224
|
+
code: number;
|
|
225
|
+
message?: string;
|
|
226
|
+
status?: string;
|
|
227
|
+
txn_id?: string;
|
|
228
|
+
error?: {
|
|
229
|
+
code: string;
|
|
230
|
+
message: string;
|
|
231
|
+
display_message?: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
|
|
220
235
|
declare type TDoctorHeaderFooterInfo = {
|
|
221
236
|
_id: string | null;
|
|
222
237
|
clinic_id: string | null;
|
|
@@ -464,6 +479,7 @@ export declare type TPatchVoiceApiV2ConfigRequest = {
|
|
|
464
479
|
request_type: string;
|
|
465
480
|
data: {
|
|
466
481
|
auto_download?: boolean;
|
|
482
|
+
auto_detect_language?: boolean;
|
|
467
483
|
input_languages?: TGetConfigItem[];
|
|
468
484
|
consultation_mode?: string;
|
|
469
485
|
model_type?: string;
|
|
@@ -697,6 +713,7 @@ export declare type TSelectedPreferences = {
|
|
|
697
713
|
auto_download?: boolean;
|
|
698
714
|
model_type?: string;
|
|
699
715
|
copy_overlay?: boolean;
|
|
716
|
+
auto_detect_language?: boolean;
|
|
700
717
|
};
|
|
701
718
|
|
|
702
719
|
export declare type TSessionHistoryData = {
|
package/dist/index.mjs
CHANGED
|
@@ -30178,6 +30178,29 @@ const initialiseTransaction = async (s) => {
|
|
|
30178
30178
|
message: `Something went wrong in fetching transactions. ${n}`
|
|
30179
30179
|
};
|
|
30180
30180
|
}
|
|
30181
|
+
}, deleteTransaction = async ({
|
|
30182
|
+
txn_id: s
|
|
30183
|
+
}) => {
|
|
30184
|
+
try {
|
|
30185
|
+
const n = new Headers();
|
|
30186
|
+
n.append("Content-Type", "application/json");
|
|
30187
|
+
const i = {
|
|
30188
|
+
method: "DELETE",
|
|
30189
|
+
headers: n
|
|
30190
|
+
}, c = await fetchWrapper(
|
|
30191
|
+
`${GET_EKA_VOICE_HOST_V2()}/transaction/${s}`,
|
|
30192
|
+
i
|
|
30193
|
+
);
|
|
30194
|
+
return {
|
|
30195
|
+
...await c.json(),
|
|
30196
|
+
code: c.status
|
|
30197
|
+
};
|
|
30198
|
+
} catch (n) {
|
|
30199
|
+
return {
|
|
30200
|
+
code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
30201
|
+
message: `Something went wrong in deleting transaction. ${n}`
|
|
30202
|
+
};
|
|
30203
|
+
}
|
|
30181
30204
|
};
|
|
30182
30205
|
async function getV1Templates() {
|
|
30183
30206
|
try {
|
|
@@ -31716,6 +31739,16 @@ const DEFAULT_HEADER_IMAGE = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2w
|
|
|
31716
31739
|
};
|
|
31717
31740
|
}
|
|
31718
31741
|
}
|
|
31742
|
+
async deleteSession({ txn_id: n }) {
|
|
31743
|
+
try {
|
|
31744
|
+
return await deleteTransaction({ txn_id: n });
|
|
31745
|
+
} catch (i) {
|
|
31746
|
+
return {
|
|
31747
|
+
code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
31748
|
+
message: `Failed to delete session, ${i}`
|
|
31749
|
+
};
|
|
31750
|
+
}
|
|
31751
|
+
}
|
|
31719
31752
|
getSuccessFiles() {
|
|
31720
31753
|
return this.audioFileManagerInstance.getSuccessfulAudioFileNames();
|
|
31721
31754
|
}
|