feat: add webdav support

This commit is contained in:
Nicolas Meienberger
2025-09-26 19:13:09 +02:00
parent 323312ec7b
commit bc6e6c9700
18 changed files with 523 additions and 141 deletions

View File

@@ -6,7 +6,7 @@ import { resolver } from "hono-openapi/arktype";
const volumeSchema = type({
name: "string",
path: "string",
type: type.enumerated("nfs", "smb", "directory"),
type: type.enumerated("nfs", "smb", "directory", "webdav"),
status: type.enumerated("mounted", "unmounted", "error", "unknown"),
lastError: "string | null",
createdAt: "number",
@@ -100,13 +100,15 @@ export const deleteVolumeDto = describeRoute({
},
});
const statfsSchema = type({
total: "number",
used: "number",
free: "number",
});
const getVolumeResponse = type({
volume: volumeSchema,
statfs: type({
total: "number = 0",
used: "number = 0",
free: "number = 0",
}),
statfs: statfsSchema,
});
export type GetVolumeResponseDto = typeof getVolumeResponse.infer;