/* * 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"; export type CustomControlDto = { /** * Custom control values for the step. */ custom?: { [k: string]: any } | undefined; }; /** @internal */ export const CustomControlDto$inboundSchema: z.ZodType< CustomControlDto, z.ZodTypeDef, unknown > = z.object({ custom: z.record(z.any()).optional(), }); /** @internal */ export type CustomControlDto$Outbound = { custom?: { [k: string]: any } | undefined; }; /** @internal */ export const CustomControlDto$outboundSchema: z.ZodType< CustomControlDto$Outbound, z.ZodTypeDef, CustomControlDto > = z.object({ custom: z.record(z.any()).optional(), }); export function customControlDtoToJSON( customControlDto: CustomControlDto, ): string { return JSON.stringify( CustomControlDto$outboundSchema.parse(customControlDto), ); } export function customControlDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CustomControlDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomControlDto' from JSON`, ); }