From fd9afd3068e45df73d886c93ed835b838e31f58b Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 19 Oct 2025 21:15:54 +0000 Subject: [PATCH] Expand collab service with update and delete task operations cgen-2ef23b9f021f4198bebb0415db4d48d4 --- client/lib/aethex-collab-service.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/client/lib/aethex-collab-service.ts b/client/lib/aethex-collab-service.ts index 5e08ca5a..80532f53 100644 --- a/client/lib/aethex-collab-service.ts +++ b/client/lib/aethex-collab-service.ts @@ -142,6 +142,31 @@ export const aethexCollabService = { if (error) throw new Error(error.message || "Unable to update task"); }, + async updateTask( + taskId: string, + patch: Partial<{ + title: string; + description: string | null; + assignee_id: string | null; + due_date: string | null; + status: TaskStatus; + }>, + ) { + const { data, error } = await supabase + .from("project_tasks") + .update(patch as any) + .eq("id", taskId) + .select() + .single(); + if (error) throw new Error(error.message || "Unable to update task"); + return data as any; + }, + + async deleteTask(taskId: string) { + const { error } = await supabase.from("project_tasks").delete().eq("id", taskId); + if (error) throw new Error(error.message || "Unable to delete task"); + }, + // Activity bus publish async publishActivity(params: { actor_id: string;