update: dir tree
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user