/* * 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 CheckboxFieldConfig = { /** * The markdown text to display for the checkbox. */ label?: string | undefined; }; /** @internal */ export const CheckboxFieldConfig$inboundSchema: z.ZodType< CheckboxFieldConfig, z.ZodTypeDef, unknown > = z.object({ label: z.string().optional(), }); /** @internal */ export type CheckboxFieldConfig$Outbound = { label?: string | undefined; }; /** @internal */ export const CheckboxFieldConfig$outboundSchema: z.ZodType< CheckboxFieldConfig$Outbound, z.ZodTypeDef, CheckboxFieldConfig > = z.object({ label: z.string().optional(), }); export function checkboxFieldConfigToJSON( checkboxFieldConfig: CheckboxFieldConfig, ): string { return JSON.stringify( CheckboxFieldConfig$outboundSchema.parse(checkboxFieldConfig), ); } export function checkboxFieldConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckboxFieldConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckboxFieldConfig' from JSON`, ); }