import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { FormFieldOption, FormFieldOption$Outbound } from "./formfieldoption.js"; export declare const FormFieldType: { readonly Text: "text"; readonly Checkbox: "checkbox"; readonly Tel: "tel"; readonly Email: "email"; readonly Url: "url"; readonly Textarea: "textarea"; readonly Select: "select"; readonly FilteredSelect: "filtered-select"; readonly MultiSelect: "multi-select"; readonly Datetime: "datetime"; readonly Date: "date"; readonly Time: "time"; readonly Number: "number"; }; export type FormFieldType = ClosedEnum; export type FormField = { /** * The unique identifier of the form field. */ id?: string | undefined; /** * The label of the field */ label?: string | undefined; /** * The placeholder for the form field */ placeholder?: string | null | undefined; /** * The description of the form field */ description?: string | null | undefined; type?: FormFieldType | undefined; /** * Indicates if the form field is required, which means it must be filled in before the form can be submitted */ required?: boolean | undefined; customField?: boolean | undefined; /** * Only applicable to select fields. Allow the user to add a custom value though the option select if the desired value is not in the option select list. */ allowCustomValues?: boolean | undefined; /** * Indicates if the form field is displayed in a “read-only” mode. */ disabled?: boolean | null | undefined; /** * Indicates if the form field is not displayed but the value that is being stored on the connection. */ hidden?: boolean | null | undefined; /** * When the setting is deprecated, it should be hidden from the user interface. The value will still be stored on the connection for the sake of backwards compatibility. */ deprecated?: boolean | null | undefined; /** * Indicates if the form field contains sensitive data, which will display the value as a masked input. */ sensitive?: boolean | null | undefined; /** * Prefix to display in front of the form field. */ prefix?: string | null | undefined; /** * Suffix to display next to the form field. */ suffix?: string | null | undefined; options?: Array | undefined; }; /** @internal */ export declare const FormFieldType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const FormFieldType$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace FormFieldType$ { /** @deprecated use `FormFieldType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Text: "text"; readonly Checkbox: "checkbox"; readonly Tel: "tel"; readonly Email: "email"; readonly Url: "url"; readonly Textarea: "textarea"; readonly Select: "select"; readonly FilteredSelect: "filtered-select"; readonly MultiSelect: "multi-select"; readonly Datetime: "datetime"; readonly Date: "date"; readonly Time: "time"; readonly Number: "number"; }>; /** @deprecated use `FormFieldType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Text: "text"; readonly Checkbox: "checkbox"; readonly Tel: "tel"; readonly Email: "email"; readonly Url: "url"; readonly Textarea: "textarea"; readonly Select: "select"; readonly FilteredSelect: "filtered-select"; readonly MultiSelect: "multi-select"; readonly Datetime: "datetime"; readonly Date: "date"; readonly Time: "time"; readonly Number: "number"; }>; } /** @internal */ export declare const FormField$inboundSchema: z.ZodType; /** @internal */ export type FormField$Outbound = { id?: string | undefined; label?: string | undefined; placeholder?: string | null | undefined; description?: string | null | undefined; type?: string | undefined; required?: boolean | undefined; custom_field?: boolean | undefined; allow_custom_values: boolean; disabled?: boolean | null | undefined; hidden?: boolean | null | undefined; deprecated?: boolean | null | undefined; sensitive?: boolean | null | undefined; prefix?: string | null | undefined; suffix?: string | null | undefined; options?: Array | undefined; }; /** @internal */ export declare const FormField$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace FormField$ { /** @deprecated use `FormField$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `FormField$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `FormField$Outbound` instead. */ type Outbound = FormField$Outbound; } export declare function formFieldToJSON(formField: FormField): string; export declare function formFieldFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=formfield.d.ts.map