diff --git a/src/lib/openapi.generated.json b/src/lib/openapi.generated.json index bcd8a41..9ee68f3 100644 --- a/src/lib/openapi.generated.json +++ b/src/lib/openapi.generated.json @@ -3603,6 +3603,12 @@ "flags": { "type": "string" }, + "backupFlags": { + "type": "string" + }, + "restoreFlags": { + "type": "string" + }, "hostPath": { "type": "string" }, @@ -3741,6 +3747,12 @@ "flags": { "type": "string" }, + "backupFlags": { + "type": "string" + }, + "restoreFlags": { + "type": "string" + }, "hostPath": { "type": "string" }, diff --git a/src/routes/api/backup/destinations/+server.ts b/src/routes/api/backup/destinations/+server.ts index 6ae3fc5..3d575fe 100644 --- a/src/routes/api/backup/destinations/+server.ts +++ b/src/routes/api/backup/destinations/+server.ts @@ -65,7 +65,7 @@ export const GET: RequestHandler = async ({ cookies }) => { * @openapi * summary: Create a restic backup destination, auto-initialize and test the repository, and register its default maintenance schedules * description: Permission denial (403, "backups:manage") is produced by the shared requireBackups route guard. - * body: {name:string!, repository:string!, password:string!, envVars:{}, flags:string, hostPath:string, cacert:string, tlsClientCert:string, policies:string} + * body: {name:string!, repository:string!, password:string!, envVars:{}, flags:string, backupFlags:string, restoreFlags:string, hostPath:string, cacert:string, tlsClientCert:string, policies:string} * body-example: {"name":"S3 Offsite","repository":"s3:s3.amazonaws.com/my-bucket/restic","password":"***","envVars":{"AWS_ACCESS_KEY_ID":"***","AWS_SECRET_ACCESS_KEY":"***"}} * resp-201: The created backup destination object (includes decrypted envVars since the caller just supplied them; password is stripped) * resp-400: Invalid input — missing name/repository/password, unsupported/SSRF-blocked repository, invalid restic flags, or an invalid cron schedule in the policies diff --git a/src/routes/api/backup/destinations/[id]/+server.ts b/src/routes/api/backup/destinations/[id]/+server.ts index 54d02bd..9fca230 100644 --- a/src/routes/api/backup/destinations/[id]/+server.ts +++ b/src/routes/api/backup/destinations/[id]/+server.ts @@ -79,7 +79,7 @@ export const GET: RequestHandler = async ({ params, cookies }) => { * summary: Update a backup destination, re-validating repository and flags when supplied and re-registering maintenance schedules when policies change * description: Permission denial (403, "backups:manage") is produced by the shared requireBackups route guard. * path: id:integer! Backup destination id (from GET /api/backup/destinations) - * body: {name:string, repository:string, password:string, envVars:{}, flags:string, hostPath:string, cacert:string, tlsClientCert:string, policies:string} + * body: {name:string, repository:string, password:string, envVars:{}, flags:string, backupFlags:string, restoreFlags:string, hostPath:string, cacert:string, tlsClientCert:string, policies:string} * body-example: {"name":"S3 Offsite (renamed)","policies":"{\"pruneEnabled\":true,\"pruneSchedule\":\"0 0 1 * *\"}"} * resp-200: The updated backup destination object (password stripped, envVars echoed back to the managing caller) * resp-400: Invalid input — invalid id, unsupported/SSRF-blocked repository, invalid restic flags, invalid policy cron, or switching to a local repository used by a remote-environment config diff --git a/static/openapi.json b/static/openapi.json index 8d67400..8dbb9e7 100644 --- a/static/openapi.json +++ b/static/openapi.json @@ -3603,6 +3603,12 @@ "flags": { "type": "string" }, + "backupFlags": { + "type": "string" + }, + "restoreFlags": { + "type": "string" + }, "hostPath": { "type": "string" }, @@ -3741,6 +3747,12 @@ "flags": { "type": "string" }, + "backupFlags": { + "type": "string" + }, + "restoreFlags": { + "type": "string" + }, "hostPath": { "type": "string" },