feat: add zip file extraction support with error handling for invalid archives

This commit is contained in:
2026-06-08 23:32:57 +00:00
parent 547e4eda8c
commit 317126efc2
30 changed files with 1594 additions and 10 deletions
@@ -280,6 +280,30 @@ ACTIONS: tuple[Action, ...] = (
body("path", "Relative path to delete.", required=True),
),
),
Action(
name="zip_project",
method="POST",
path="/projects/{project_slug}/zip",
summary="Build a downloadable zip archive of a whole project",
description=(
"Queues a background zip job and returns {uid, status_url}. Poll the status_url with "
"zip_status until status is 'done', then give the user the download_url."
),
params=(path("project_slug", "Project slug or uid."),),
requires_auth=False,
),
Action(
name="zip_status",
method="GET",
path="/zips/{uid}",
summary="Check a zip job and obtain its download link once finished",
description=(
"Returns the job status and stats. When status is 'done', download_url points at the "
"ready archive; while 'pending' or 'running', poll again shortly."
),
params=(path("uid", "Zip job uid returned by zip_project."),),
requires_auth=False,
),
Action(
name="search_users",
method="GET",