import type { JSONSchema } from '../jsonSchema/index.js'; import { type SchemaShape } from '../jsonSchema/schemaShape.js'; import type { InputConstraints } from '../jsonSchema/constraints.js'; import type { Schema, ValidationResult, Infer as InferSchema, InferIn as InferInSchema, Registry } from './typeSchema.js'; export type { Schema, ValidationIssue, ValidationResult } from './typeSchema.js'; export type Infer = NonNullable>; export type InferIn = NonNullable>; export type ValidationLibrary = 'arktype' | 'classvalidator' | 'custom' | 'joi' | 'superform' | 'typebox' | 'valibot' | 'yup' | 'zod' | 'zod4' | 'vine' | 'schemasafe' | 'superstruct' | 'effect'; export type AdapterOptions = { jsonSchema?: JSONSchema; defaults?: T; }; export type RequiredDefaultsOptions = { defaults: T; jsonSchema?: JSONSchema; }; export type ClientValidationAdapter = { superFormValidationLibrary: ValidationLibrary; validate: (data: unknown) => Promise>; shape?: SchemaShape; }; type BaseValidationAdapter = ClientValidationAdapter & { jsonSchema: JSONSchema; defaults?: Out; constraints?: InputConstraints; }; export type ValidationAdapter = BaseValidationAdapter & { defaults: Out; constraints: InputConstraints; shape: SchemaShape; id: string; }; /** * If the adapter options doesn't have a "defaults" or "jsonSchema" fields, * this is a convenient function for creating a JSON schema. * If no transformer exist for the adapter, use RequiredDefaultsOptions. * @see {AdapterOptions} * @see {RequiredDefaultsOptions} * @__NO_SIDE_EFFECTS__ */ export declare function createJsonSchema(options: object, transformer?: () => JSONSchema): {}; export declare function createAdapter(adapter: BaseValidationAdapter, jsonSchema?: JSONSchema): ValidationAdapter;