Download frontend/src/api/workspaces.js from shak3008/DocWeave: direct link, hf CLI and curl.
- Browser
- Download file 726 Bytes
-
https://huggingface.co/spaces/shak3008/DocWeave/resolve/main/frontend/src/api/workspaces.js
- Command line
-
hf download hf://spaces/shak3008/DocWeave/frontend/src/api/workspaces.js
-
curl -L -o workspaces.js https://huggingface.co/spaces/shak3008/DocWeave/resolve/main/frontend/src/api/workspaces.js
726 Bytes
| import { apiRequest } from "./client"; | |
| /** GET /workspaces → WorkspaceResponse[] (scoped to current user) */ | |
| export async function listWorkspaces() { | |
| return apiRequest("/workspaces"); | |
| } | |
| /** POST /workspaces { name, description? } → WorkspaceResponse */ | |
| export async function createWorkspace(payload) { | |
| return apiRequest("/workspaces", "POST", payload); | |
| } | |
| /** DELETE /workspaces/{id} → 204 (soft-delete) */ | |
| export async function deleteWorkspace(workspaceId) { | |
| return apiRequest(`/workspaces/${workspaceId}`, "DELETE"); | |
| } | |
| /** POST /workspaces/{id}/archive → WorkspaceResponse */ | |
| export async function archiveWorkspace(workspaceId) { | |
| return apiRequest(`/workspaces/${workspaceId}/archive`, "POST"); | |
| } | |