33 lines
735 B
TypeScript
33 lines
735 B
TypeScript
import { z } from "zod"
|
|
|
|
import { systemSchema } from "../schemas/system"
|
|
|
|
export const campaignPageSchema = z.object({
|
|
campaign_page: z.object({
|
|
title: z.string(),
|
|
campaign_identifier: z.string().nullish(),
|
|
heading: z.string(),
|
|
subheading: z.string().nullish(),
|
|
preamble: z.object({
|
|
is_two_columns: z.boolean().default(false),
|
|
first_column: z.string(),
|
|
second_column: z.string(),
|
|
}),
|
|
system: systemSchema.merge(
|
|
z.object({
|
|
created_at: z.string(),
|
|
updated_at: z.string(),
|
|
})
|
|
),
|
|
}),
|
|
trackingProps: z.object({
|
|
url: z.string(),
|
|
}),
|
|
})
|
|
|
|
export const campaignPageRefsSchema = z.object({
|
|
campaign_page: z.object({
|
|
system: systemSchema,
|
|
}),
|
|
})
|