21 lines
582 B
TypeScript
21 lines
582 B
TypeScript
import { z } from "zod";
|
|
|
|
export const bucketSchema = z.object({
|
|
bucketName: z.string().min(1, "Bucket name is required"),
|
|
});
|
|
|
|
export const bucketUpdateSchema = z.object({
|
|
oldBucket: z.string().min(1, "Old bucket name is required"),
|
|
newBucket: z.string().min(1, "New bucket name is required"),
|
|
policy: z.enum(["public", "private"]).optional(),
|
|
});
|
|
|
|
export type BucketInput = z.infer<typeof bucketSchema>;
|
|
export type BucketUpdateInput = z.infer<typeof bucketUpdateSchema>;
|
|
|
|
export interface Bucket {
|
|
name: string;
|
|
policy?: string;
|
|
createdAt?: string;
|
|
}
|