@eka-care/ekascribe-ts-sdk 2.1.47 → 2.1.48
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 +2 -0
- package/dist/index.mjs +19 -17
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -742,6 +742,7 @@ export declare type TPostV1DocumentRequest = {
|
|
|
742
742
|
document_name?: string;
|
|
743
743
|
type?: string;
|
|
744
744
|
document_id?: string;
|
|
745
|
+
publish?: Record<string, unknown>;
|
|
745
746
|
};
|
|
746
747
|
|
|
747
748
|
export declare type TPostV1DocumentResponse = {
|
|
@@ -766,6 +767,7 @@ export declare type TPostV1DocumentResponse = {
|
|
|
766
767
|
presigned_url: string;
|
|
767
768
|
created_at: string;
|
|
768
769
|
updated_at: number;
|
|
770
|
+
publish: Record<string, unknown>;
|
|
769
771
|
};
|
|
770
772
|
};
|
|
771
773
|
|
package/dist/index.mjs
CHANGED
|
@@ -31606,30 +31606,32 @@ async function postV1Document({
|
|
|
31606
31606
|
session_id: s,
|
|
31607
31607
|
document_name: n,
|
|
31608
31608
|
type: i,
|
|
31609
|
-
document_id: c
|
|
31609
|
+
document_id: c,
|
|
31610
|
+
publish: l
|
|
31610
31611
|
}) {
|
|
31611
31612
|
try {
|
|
31612
|
-
const
|
|
31613
|
-
|
|
31614
|
-
const
|
|
31613
|
+
const f = new Headers();
|
|
31614
|
+
f.append("Content-Type", "application/json");
|
|
31615
|
+
const u = {
|
|
31615
31616
|
session_id: s,
|
|
31616
31617
|
type: i,
|
|
31617
31618
|
...n ? { document_name: n } : {},
|
|
31618
|
-
...c ? { document_id: c } : {}
|
|
31619
|
-
|
|
31619
|
+
...c ? { document_id: c } : {},
|
|
31620
|
+
...l ? { publish: l } : {}
|
|
31621
|
+
}, d = {
|
|
31620
31622
|
method: "POST",
|
|
31621
|
-
headers:
|
|
31622
|
-
body: JSON.stringify(
|
|
31623
|
-
},
|
|
31624
|
-
let
|
|
31625
|
-
return
|
|
31626
|
-
...
|
|
31627
|
-
code:
|
|
31628
|
-
},
|
|
31629
|
-
} catch (
|
|
31630
|
-
return console.error("%c postV1Document -> error", "color:#f5ce50",
|
|
31623
|
+
headers: f,
|
|
31624
|
+
body: JSON.stringify(u)
|
|
31625
|
+
}, h = await fetchWrapper(`${GET_EKA_VOICE_HOST_V1()}/documents`, d);
|
|
31626
|
+
let p = await h.json();
|
|
31627
|
+
return p = {
|
|
31628
|
+
...p,
|
|
31629
|
+
code: h.status
|
|
31630
|
+
}, p;
|
|
31631
|
+
} catch (f) {
|
|
31632
|
+
return console.error("%c postV1Document -> error", "color:#f5ce50", f), {
|
|
31631
31633
|
code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
31632
|
-
message: `Something went wrong! ${
|
|
31634
|
+
message: `Something went wrong! ${f}`
|
|
31633
31635
|
};
|
|
31634
31636
|
}
|
|
31635
31637
|
}
|