mirror of
https://github.com/khairul169/garage-webui.git
synced 2025-12-15 20:11:05 +07:00
19 lines
489 B
TypeScript
19 lines
489 B
TypeScript
|
|
import { z } from "zod";
|
||
|
|
|
||
|
|
export const websiteConfigSchema = z.object({
|
||
|
|
websiteAccess: z.boolean(),
|
||
|
|
websiteConfig: z
|
||
|
|
.object({ indexDocument: z.string(), errorDocument: z.string() })
|
||
|
|
.nullish(),
|
||
|
|
});
|
||
|
|
|
||
|
|
export type WebsiteConfigSchema = z.infer<typeof websiteConfigSchema>;
|
||
|
|
|
||
|
|
export const quotaSchema = z.object({
|
||
|
|
enabled: z.boolean(),
|
||
|
|
maxObjects: z.coerce.number().nullish(),
|
||
|
|
maxSize: z.coerce.number().nullish(),
|
||
|
|
});
|
||
|
|
|
||
|
|
export type QuotaSchema = z.infer<typeof quotaSchema>;
|