103 lines
3.1 KiB
TypeScript
103 lines
3.1 KiB
TypeScript
// ---------------------------------------------------------------------------
|
|
// Core
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
addIssue,
|
|
BaseSchema,
|
|
INVALID,
|
|
NullableSchema,
|
|
OptionalSchema,
|
|
TransformSchema,
|
|
} from "./core/schema/schema.js";
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Types
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export type {
|
|
AnySchema,
|
|
AsyncRefineFn,
|
|
CustomRule,
|
|
FlattenedErrors,
|
|
Infer,
|
|
InferInput,
|
|
NumberRuleOptions,
|
|
ObjectShape,
|
|
ParseContext,
|
|
ParseFailure,
|
|
ParseResult,
|
|
ParseSuccess,
|
|
RefineFn,
|
|
SchemaInput,
|
|
SchemaOutput,
|
|
StringRuleOptions,
|
|
TransformFn,
|
|
ValidationCode,
|
|
ValidationIssue,
|
|
} from "./types/common.js";
|
|
|
|
export type {
|
|
ValidationHookData,
|
|
ValidationHookMap,
|
|
ValidationValidatingHandler,
|
|
} from "./types/validation-hooks.js";
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Errors
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export type { ValidationErrorOptions } from "./errors/errors.js";
|
|
export {
|
|
VALIDATION_CODES,
|
|
ValidationError,
|
|
} from "./errors/errors.js";
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Schemas
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export { ArraySchema, array } from "./schemas/array/array.js";
|
|
export { BooleanSchema, boolean } from "./schemas/boolean/boolean.js";
|
|
export { DateSchema, date } from "./schemas/date/date.js";
|
|
export { EnumSchema, enumeration } from "./schemas/enum/enum.js";
|
|
export {
|
|
IntersectionSchema,
|
|
intersection,
|
|
} from "./schemas/intersection/intersection.js";
|
|
export { LiteralSchema, literal } from "./schemas/literal/literal.js";
|
|
export { nullable } from "./schemas/nullable/nullable.js";
|
|
export { NumberSchema, number } from "./schemas/number/number.js";
|
|
export { ObjectSchema, object } from "./schemas/object/object.js";
|
|
export { optional } from "./schemas/optional/optional.js";
|
|
export { RecordSchema, record } from "./schemas/record/record.js";
|
|
export { StringSchema, string } from "./schemas/string/string.js";
|
|
export { TupleSchema, tuple } from "./schemas/tuple/tuple.js";
|
|
export { UnionSchema, union } from "./schemas/union/union.js";
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Utils
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export type { CoercedSchema } from "./utils/coerce.js";
|
|
export {
|
|
coerce,
|
|
coerceBoolean,
|
|
coerceDate,
|
|
coerceNumber,
|
|
coerceString,
|
|
} from "./utils/coerce.js";
|
|
|
|
export { mergeResults, pipe } from "./utils/compose.js";
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// OTel
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export type { ParseObservabilityOptions } from "./otel/validation-otel.js";
|
|
export {
|
|
_resetInstruments,
|
|
recordParseFailure,
|
|
recordParseSuccess,
|
|
} from "./otel/validation-otel.js";
|