update: dir tree

This commit is contained in:
tao.chen
2026-08-14 15:02:55 +08:00
parent 4530811441
commit 65d14b8610
6 changed files with 73 additions and 21 deletions
+14
View File
@@ -428,6 +428,17 @@ export async function listResources(
);
}
export async function deleteResource(
workspaceId: string,
resourceId: string,
): Promise<{ resource_id: string; status: string }> {
return apiRequest<{ resource_id: string; status: string }>(
`/api/v1/data-resources/${encodeURIComponent(resourceId)}`,
{ method: "DELETE" },
workspaceId,
);
}
export async function createResourceUpload(
workspaceId: string,
body: {
@@ -1462,6 +1473,9 @@ export type WorkspaceBoundApi = {
uploadId: string,
body: Parameters<typeof bindResourceUpload>[2],
) => Promise<ResourceItem>;
deleteResource: (
resourceId: string,
) => Promise<{ resource_id: string; status: string }>;
updateScript: (
scriptId: string,
input: Parameters<typeof updateScript>[2],