/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { EmailControlsDto, EmailControlsDto$Outbound, EmailControlsDto$outboundSchema, } from "./emailcontrolsdto.js"; /** * Control values for the layout. Omit to leave unchanged, or set to null to clear stored control values. */ export type ControlValues = { /** * Email layout controls */ email?: EmailControlsDto | undefined; }; export type UpdateLayoutDto = { /** * Name of the layout */ name: string; /** * Enable or disable translations for this layout */ isTranslationEnabled?: boolean | undefined; /** * Control values for the layout. Omit to leave unchanged, or set to null to clear stored control values. */ controlValues?: ControlValues | null | undefined; }; /** @internal */ export type ControlValues$Outbound = { email?: EmailControlsDto$Outbound | undefined; }; /** @internal */ export const ControlValues$outboundSchema: z.ZodType< ControlValues$Outbound, z.ZodTypeDef, ControlValues > = z.object({ email: EmailControlsDto$outboundSchema.optional(), }); export function controlValuesToJSON(controlValues: ControlValues): string { return JSON.stringify(ControlValues$outboundSchema.parse(controlValues)); } /** @internal */ export type UpdateLayoutDto$Outbound = { name: string; isTranslationEnabled: boolean; controlValues?: ControlValues$Outbound | null | undefined; }; /** @internal */ export const UpdateLayoutDto$outboundSchema: z.ZodType< UpdateLayoutDto$Outbound, z.ZodTypeDef, UpdateLayoutDto > = z.object({ name: z.string(), isTranslationEnabled: z.boolean().default(false), controlValues: z.nullable(z.lazy(() => ControlValues$outboundSchema)) .optional(), }); export function updateLayoutDtoToJSON( updateLayoutDto: UpdateLayoutDto, ): string { return JSON.stringify(UpdateLayoutDto$outboundSchema.parse(updateLayoutDto)); }