Add bulk gallery management and direct organizer uploads

This commit is contained in:
2026-09-11 18:23:54 -04:00
parent 815640d919
commit 4bc48db656
12 changed files with 333 additions and 6 deletions
+8
View File
@@ -0,0 +1,8 @@
import { z } from "zod";
export const bulkPhotosInputSchema = z.object({
eventId: z.string().uuid(),
photoIds: z.array(z.string().uuid()).min(1).max(100).refine(ids => new Set(ids).size === ids.length, "Duplicate photo IDs"),
action: z.enum(["public", "hidden", "private", "rejected", "delete"]),
});
export const applyBulkPhotosInputSchema = bulkPhotosInputSchema.extend({ confirm: z.literal(true) });
+7
View File
@@ -175,6 +175,12 @@ export const completePhotoInputSchema = z.object({
photoId: z.string().uuid(),
});
export const createGalleryPhotosInputSchema = z.object({
eventId: z.string().uuid(),
files: z.array(createPhotoInputSchema.pick({ contentType: true, byteSize: true, fileName: true })).min(1).max(25),
});
export const completeGalleryPhotosInputSchema = z.object({ eventId: z.string().uuid(), photoIds: z.array(z.string().uuid()).min(1).max(25) });
export const BANNER_ASPECT_RATIO = 8 / 3;
export const bannerCropSchema = z.object({
x: z.number().finite().min(0).max(100),
@@ -275,3 +281,4 @@ export type PhotoProcessingStatus = z.infer<typeof photoProcessingStatusSchema>;
export type PhotoVisibility = z.infer<typeof photoVisibilitySchema>;
export type AllowedImageType = z.infer<typeof allowedImageTypeSchema>;
export { createAssistantTokenInputSchema } from "./assistant";
export * from "./bulk-photos";