import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CustomFieldType } from "./customfieldtype.js"; /** * Configuration for text field type. */ export type Text = { /** * Maximum character length constraint for the input. */ maxLength?: number | null | undefined; /** * Minimum character length requirement for the input. */ minimumLength?: number | null | undefined; /** * The value of the input. */ value?: string | null | undefined; }; /** * Configuration for checkbox field type. */ export type Checkbox = { /** * The markdown text to display for the checkbox. */ label?: string | null | undefined; /** * The value of the checkbox (checked or not). */ value?: boolean | null | undefined; }; export type CustomField = { /** * The type of the field. */ type: CustomFieldType; /** * Unique key for custom field. Must be unique to this field, alphanumeric, and up to 200 characters. */ key: string; /** * The label for the field, displayed to the customer, up to 50 characters */ label: string; /** * Whether the customer is required to complete the field. Defaults to `false`. */ optional?: boolean | null | undefined; /** * Configuration for text field type. */ text?: Text | null | undefined; /** * Configuration for checkbox field type. */ checkbox?: Checkbox | null | undefined; }; /** @internal */ export declare const Text$inboundSchema: z.ZodType; /** @internal */ export type Text$Outbound = { max_length?: number | null | undefined; minimum_length?: number | null | undefined; value?: string | null | undefined; }; /** @internal */ export declare const Text$outboundSchema: z.ZodType; export declare function textToJSON(text: Text): string; export declare function textFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Checkbox$inboundSchema: z.ZodType; /** @internal */ export type Checkbox$Outbound = { label?: string | null | undefined; value?: boolean | null | undefined; }; /** @internal */ export declare const Checkbox$outboundSchema: z.ZodType; export declare function checkboxToJSON(checkbox: Checkbox): string; export declare function checkboxFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const CustomField$inboundSchema: z.ZodType; /** @internal */ export type CustomField$Outbound = { type: string; key: string; label: string; optional?: boolean | null | undefined; text?: Text$Outbound | null | undefined; checkbox?: Checkbox$Outbound | null | undefined; }; /** @internal */ export declare const CustomField$outboundSchema: z.ZodType; export declare function customFieldToJSON(customField: CustomField): string; export declare function customFieldFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=customfield.d.ts.map