@uptiqai/widgets-sdk 1.253.0 → 1.259.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/headless.js +18 -16
- package/dist/index.css +1 -1
- package/dist/index.js +12001 -11996
- package/dist/index.umd.cjs +127 -127
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -16674,26 +16674,27 @@ const ew = (e) => e?.map((t) => ({
|
|
|
16674
16674
|
fileName: t.name,
|
|
16675
16675
|
mimeType: t.mimetype
|
|
16676
16676
|
})), tw = async (e) => {
|
|
16677
|
-
const { files: t, agentId: r, sourceId: i } = e,
|
|
16677
|
+
const { files: t, agentId: r, sourceId: i, projectId: n } = e, o = t.map((c) => ({
|
|
16678
16678
|
sourceId: i,
|
|
16679
16679
|
sourceType: Xp.AgentExecutorDocument,
|
|
16680
|
-
fileName:
|
|
16681
|
-
mimeType:
|
|
16682
|
-
})), { data:
|
|
16683
|
-
documents:
|
|
16684
|
-
|
|
16685
|
-
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
|
|
16680
|
+
fileName: c.name,
|
|
16681
|
+
mimeType: c.type || void 0
|
|
16682
|
+
})), { data: a } = await Ke.post(`/agents/${r}/uploads/signed-urls`, {
|
|
16683
|
+
documents: o,
|
|
16684
|
+
...n && { projectId: n }
|
|
16685
|
+
}), s = a.data;
|
|
16686
|
+
for (let c = 0; c < t.length; c++) {
|
|
16687
|
+
const u = s[c];
|
|
16688
|
+
u && await W.put(u.signedUrl, t[c], {
|
|
16689
|
+
headers: { ...u.headers, "Content-Type": t[c].type || "application/octet-stream" }
|
|
16689
16690
|
});
|
|
16690
16691
|
}
|
|
16691
|
-
return
|
|
16692
|
+
return s.map((c, u) => ({
|
|
16692
16693
|
id: Ri(),
|
|
16693
|
-
documentId:
|
|
16694
|
-
file: t[
|
|
16695
|
-
mimetype: t[
|
|
16696
|
-
name: t[
|
|
16694
|
+
documentId: c.documentId,
|
|
16695
|
+
file: t[u],
|
|
16696
|
+
mimetype: t[u].type,
|
|
16697
|
+
name: t[u].name,
|
|
16697
16698
|
status: "uploaded"
|
|
16698
16699
|
}));
|
|
16699
16700
|
}, nw = (e) => {
|
|
@@ -16723,7 +16724,8 @@ const ew = (e) => e?.map((t) => ({
|
|
|
16723
16724
|
y?.length && (S = await tw({
|
|
16724
16725
|
files: y,
|
|
16725
16726
|
agentId: r,
|
|
16726
|
-
sourceId: c() ?? r
|
|
16727
|
+
sourceId: c() ?? r,
|
|
16728
|
+
projectId: n
|
|
16727
16729
|
}));
|
|
16728
16730
|
const j = S?.length ? ew(S) || [] : [];
|
|
16729
16731
|
b?.length && b.forEach((x) => j.push(x)), t.emit(
|