@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 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, n = t.map((s) => ({
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: s.name,
16681
- mimeType: s.type || void 0
16682
- })), { data: o } = await Ke.post(`/agents/${r}/uploads/signed-urls`, {
16683
- documents: n
16684
- }), a = o.data;
16685
- for (let s = 0; s < t.length; s++) {
16686
- const c = a[s];
16687
- c && await W.put(c.signedUrl, t[s], {
16688
- headers: { ...c.headers, "Content-Type": t[s].type || "application/octet-stream" }
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 a.map((s, c) => ({
16692
+ return s.map((c, u) => ({
16692
16693
  id: Ri(),
16693
- documentId: s.documentId,
16694
- file: t[c],
16695
- mimetype: t[c].type,
16696
- name: t[c].name,
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(