@wacht/jsx 1.0.0-beta.37 → 1.0.0-beta.39

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 CHANGED
@@ -1359,7 +1359,7 @@ export declare function useProjectTaskBoardItemComments(projectId?: string, item
1359
1359
  comments: ProjectTaskBoardItemComment[];
1360
1360
  loading: boolean;
1361
1361
  error: any;
1362
- createComment: (body: string) => Promise<ApiResult<ProjectTaskBoardItemComment>>;
1362
+ createComment: (body: string, files?: File[]) => Promise<ApiResult<ProjectTaskBoardItemComment>>;
1363
1363
  refetch: () => Promise<void>;
1364
1364
  };
1365
1365
 
package/dist/index.es.js CHANGED
@@ -4647,16 +4647,18 @@ function zb(e, r, a = !0) {
4647
4647
  revalidateOnFocus: !1,
4648
4648
  refreshInterval: 5e3
4649
4649
  }), d = N(
4650
- async (u) => {
4650
+ async (u, m) => {
4651
4651
  if (!e || !r)
4652
4652
  throw new Error("projectId and itemId are required");
4653
- const m = new URLSearchParams();
4654
- m.set("body", u);
4655
- const p = await n(
4653
+ const p = new FormData();
4654
+ if (p.set("body", u), m)
4655
+ for (const v of m)
4656
+ p.append("attachments", v, v.name);
4657
+ const f = await n(
4656
4658
  `/ai/projects/${e}/board/items/${r}/comments`,
4657
- { method: "POST", body: m }
4658
- ), f = await U(p);
4659
- return await h.mutate(), f;
4659
+ { method: "POST", body: p }
4660
+ ), g = await U(f);
4661
+ return await h.mutate(), g;
4660
4662
  },
4661
4663
  [e, r, n, h]
4662
4664
  );