/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { LayoutControlValuesDto, LayoutControlValuesDto$inboundSchema, } from "./layoutcontrolvaluesdto.js"; import { UiSchema, UiSchema$inboundSchema } from "./uischema.js"; export type LayoutControlsDto = { /** * JSON Schema for data */ dataSchema?: { [k: string]: any } | undefined; /** * UI Schema for rendering */ uiSchema?: UiSchema | undefined; /** * Email layout controls */ values: LayoutControlValuesDto; }; /** @internal */ export const LayoutControlsDto$inboundSchema: z.ZodType< LayoutControlsDto, z.ZodTypeDef, unknown > = z.object({ dataSchema: z.record(z.any()).optional(), uiSchema: UiSchema$inboundSchema.optional(), values: LayoutControlValuesDto$inboundSchema, }); export function layoutControlsDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LayoutControlsDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LayoutControlsDto' from JSON`, ); }