@eka-care/ekascribe-ts-sdk 2.1.40 → 2.1.41
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 +1 -0
- package/dist/index.mjs +30 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ declare class EkaScribe {
|
|
|
129
129
|
createDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
|
|
130
130
|
updateDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
|
|
131
131
|
deleteDocument(document_id: string): Promise<TDeleteV1DocumentResponse>;
|
|
132
|
+
publishDocument(request: TPostV1DocumentRequest): Promise<TPostV1DocumentResponse>;
|
|
132
133
|
getChunkTranscript(txnId: string, chunkNumber: string): Promise<TFetchChunkTranscriptResult>;
|
|
133
134
|
addSessionContext({ txn_id, context }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
|
|
134
135
|
removeSessionContext({ txn_id, context }: TPatchSessionContextRequest): Promise<TPatchSessionContextResponse>;
|
package/dist/index.mjs
CHANGED
|
@@ -31664,6 +31664,33 @@ async function deleteSessionContext({
|
|
|
31664
31664
|
};
|
|
31665
31665
|
}
|
|
31666
31666
|
}
|
|
31667
|
+
async function postV1SessionDocumentPublish({
|
|
31668
|
+
session_id: s,
|
|
31669
|
+
document_id: n
|
|
31670
|
+
}) {
|
|
31671
|
+
try {
|
|
31672
|
+
const i = new Headers();
|
|
31673
|
+
i.append("Content-Type", "application/json");
|
|
31674
|
+
const c = {
|
|
31675
|
+
method: "POST",
|
|
31676
|
+
headers: i,
|
|
31677
|
+
body: JSON.stringify({})
|
|
31678
|
+
}, l = await fetchWrapper(
|
|
31679
|
+
`${GET_EKA_VOICE_HOST_V1()}/sessions/${s}/documents/${n}/publish`,
|
|
31680
|
+
c
|
|
31681
|
+
);
|
|
31682
|
+
let f = await l.json();
|
|
31683
|
+
return f = {
|
|
31684
|
+
...f,
|
|
31685
|
+
code: l.status
|
|
31686
|
+
}, f;
|
|
31687
|
+
} catch (i) {
|
|
31688
|
+
return console.error("%c postV1Document -> error", "color:#f5ce50", i), {
|
|
31689
|
+
code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
31690
|
+
message: `Something went wrong! ${i}`
|
|
31691
|
+
};
|
|
31692
|
+
}
|
|
31693
|
+
}
|
|
31667
31694
|
const _n = class _n {
|
|
31668
31695
|
// SystemCompatibilityManager Instance
|
|
31669
31696
|
// Private constructor to prevent direct instantiation
|
|
@@ -32030,6 +32057,9 @@ const _n = class _n {
|
|
|
32030
32057
|
async deleteDocument(n) {
|
|
32031
32058
|
return await deleteV1Document(n);
|
|
32032
32059
|
}
|
|
32060
|
+
async publishDocument(n) {
|
|
32061
|
+
return await postV1SessionDocumentPublish(n);
|
|
32062
|
+
}
|
|
32033
32063
|
async getChunkTranscript(n, i) {
|
|
32034
32064
|
return fetchChunkTranscript(n, i);
|
|
32035
32065
|
}
|