import { z } from "zod"; export const cmsTypeEnum = z.enum(["splash", "promo", "article", "banner", "floatingWidget"]); export const corpTypeEnum = z.enum(["walanja", "simaya", "cifo"]); export const contentSchema = z.object({ title: z.string().min(1, "Title is required"), description: z.string().nullable().optional(), image: z.any().optional(), type: cmsTypeEnum, corp: corpTypeEnum, targetUrl: z.string().url("Invalid URL").optional().or(z.literal("")), }); export const contentUpdateSchema = contentSchema.partial(); export type ContentInput = z.infer; export type ContentUpdateInput = z.infer; export type CmsType = z.infer; export type CorpType = z.infer; export interface Content { UUID_APC: string; Title_APC: string; Content_APC?: string; Type_APC: CmsType; CorpType_APC: CorpType; Url_APC?: string; Filename_APC?: string; TargetUrl_APC?: string; UpdatedAt_APC: string; CreatedAt_APC: string; }