full site update
This commit is contained in:
32
node_modules/zod/v4/classic/checks.cjs
generated
vendored
Normal file
32
node_modules/zod/v4/classic/checks.cjs
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.toUpperCase = exports.toLowerCase = exports.trim = exports.normalize = exports.overwrite = exports.mime = exports.property = exports.endsWith = exports.startsWith = exports.includes = exports.uppercase = exports.lowercase = exports.regex = exports.length = exports.minLength = exports.maxLength = exports.size = exports.minSize = exports.maxSize = exports.multipleOf = exports.nonnegative = exports.nonpositive = exports.negative = exports.positive = exports.gte = exports.gt = exports.lte = exports.lt = void 0;
|
||||
var index_js_1 = require("../core/index.cjs");
|
||||
Object.defineProperty(exports, "lt", { enumerable: true, get: function () { return index_js_1._lt; } });
|
||||
Object.defineProperty(exports, "lte", { enumerable: true, get: function () { return index_js_1._lte; } });
|
||||
Object.defineProperty(exports, "gt", { enumerable: true, get: function () { return index_js_1._gt; } });
|
||||
Object.defineProperty(exports, "gte", { enumerable: true, get: function () { return index_js_1._gte; } });
|
||||
Object.defineProperty(exports, "positive", { enumerable: true, get: function () { return index_js_1._positive; } });
|
||||
Object.defineProperty(exports, "negative", { enumerable: true, get: function () { return index_js_1._negative; } });
|
||||
Object.defineProperty(exports, "nonpositive", { enumerable: true, get: function () { return index_js_1._nonpositive; } });
|
||||
Object.defineProperty(exports, "nonnegative", { enumerable: true, get: function () { return index_js_1._nonnegative; } });
|
||||
Object.defineProperty(exports, "multipleOf", { enumerable: true, get: function () { return index_js_1._multipleOf; } });
|
||||
Object.defineProperty(exports, "maxSize", { enumerable: true, get: function () { return index_js_1._maxSize; } });
|
||||
Object.defineProperty(exports, "minSize", { enumerable: true, get: function () { return index_js_1._minSize; } });
|
||||
Object.defineProperty(exports, "size", { enumerable: true, get: function () { return index_js_1._size; } });
|
||||
Object.defineProperty(exports, "maxLength", { enumerable: true, get: function () { return index_js_1._maxLength; } });
|
||||
Object.defineProperty(exports, "minLength", { enumerable: true, get: function () { return index_js_1._minLength; } });
|
||||
Object.defineProperty(exports, "length", { enumerable: true, get: function () { return index_js_1._length; } });
|
||||
Object.defineProperty(exports, "regex", { enumerable: true, get: function () { return index_js_1._regex; } });
|
||||
Object.defineProperty(exports, "lowercase", { enumerable: true, get: function () { return index_js_1._lowercase; } });
|
||||
Object.defineProperty(exports, "uppercase", { enumerable: true, get: function () { return index_js_1._uppercase; } });
|
||||
Object.defineProperty(exports, "includes", { enumerable: true, get: function () { return index_js_1._includes; } });
|
||||
Object.defineProperty(exports, "startsWith", { enumerable: true, get: function () { return index_js_1._startsWith; } });
|
||||
Object.defineProperty(exports, "endsWith", { enumerable: true, get: function () { return index_js_1._endsWith; } });
|
||||
Object.defineProperty(exports, "property", { enumerable: true, get: function () { return index_js_1._property; } });
|
||||
Object.defineProperty(exports, "mime", { enumerable: true, get: function () { return index_js_1._mime; } });
|
||||
Object.defineProperty(exports, "overwrite", { enumerable: true, get: function () { return index_js_1._overwrite; } });
|
||||
Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return index_js_1._normalize; } });
|
||||
Object.defineProperty(exports, "trim", { enumerable: true, get: function () { return index_js_1._trim; } });
|
||||
Object.defineProperty(exports, "toLowerCase", { enumerable: true, get: function () { return index_js_1._toLowerCase; } });
|
||||
Object.defineProperty(exports, "toUpperCase", { enumerable: true, get: function () { return index_js_1._toUpperCase; } });
|
1
node_modules/zod/v4/classic/checks.d.cts
generated
vendored
Normal file
1
node_modules/zod/v4/classic/checks.d.cts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.cjs";
|
1
node_modules/zod/v4/classic/checks.d.ts
generated
vendored
Normal file
1
node_modules/zod/v4/classic/checks.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.js";
|
1
node_modules/zod/v4/classic/checks.js
generated
vendored
Normal file
1
node_modules/zod/v4/classic/checks.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.js";
|
47
node_modules/zod/v4/classic/coerce.cjs
generated
vendored
Normal file
47
node_modules/zod/v4/classic/coerce.cjs
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.string = string;
|
||||
exports.number = number;
|
||||
exports.boolean = boolean;
|
||||
exports.bigint = bigint;
|
||||
exports.date = date;
|
||||
const core = __importStar(require("../core/index.cjs"));
|
||||
const schemas = __importStar(require("./schemas.cjs"));
|
||||
function string(params) {
|
||||
return core._coercedString(schemas.ZodString, params);
|
||||
}
|
||||
function number(params) {
|
||||
return core._coercedNumber(schemas.ZodNumber, params);
|
||||
}
|
||||
function boolean(params) {
|
||||
return core._coercedBoolean(schemas.ZodBoolean, params);
|
||||
}
|
||||
function bigint(params) {
|
||||
return core._coercedBigint(schemas.ZodBigInt, params);
|
||||
}
|
||||
function date(params) {
|
||||
return core._coercedDate(schemas.ZodDate, params);
|
||||
}
|
17
node_modules/zod/v4/classic/coerce.d.cts
generated
vendored
Normal file
17
node_modules/zod/v4/classic/coerce.d.cts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as core from "../core/index.cjs";
|
||||
import * as schemas from "./schemas.cjs";
|
||||
export interface ZodCoercedString<T = unknown> extends schemas._ZodString<core.$ZodStringInternals<T>> {
|
||||
}
|
||||
export declare function string<T = unknown>(params?: string | core.$ZodStringParams): ZodCoercedString<T>;
|
||||
export interface ZodCoercedNumber<T = unknown> extends schemas._ZodNumber<core.$ZodNumberInternals<T>> {
|
||||
}
|
||||
export declare function number<T = unknown>(params?: string | core.$ZodNumberParams): ZodCoercedNumber<T>;
|
||||
export interface ZodCoercedBoolean<T = unknown> extends schemas._ZodBoolean<core.$ZodBooleanInternals<T>> {
|
||||
}
|
||||
export declare function boolean<T = unknown>(params?: string | core.$ZodBooleanParams): ZodCoercedBoolean<T>;
|
||||
export interface ZodCoercedBigInt<T = unknown> extends schemas._ZodBigInt<core.$ZodBigIntInternals<T>> {
|
||||
}
|
||||
export declare function bigint<T = unknown>(params?: string | core.$ZodBigIntParams): ZodCoercedBigInt<T>;
|
||||
export interface ZodCoercedDate<T = unknown> extends schemas._ZodDate<core.$ZodDateInternals<T>> {
|
||||
}
|
||||
export declare function date<T = unknown>(params?: string | core.$ZodDateParams): ZodCoercedDate<T>;
|
17
node_modules/zod/v4/classic/coerce.d.ts
generated
vendored
Normal file
17
node_modules/zod/v4/classic/coerce.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as core from "../core/index.js";
|
||||
import * as schemas from "./schemas.js";
|
||||
export interface ZodCoercedString<T = unknown> extends schemas._ZodString<core.$ZodStringInternals<T>> {
|
||||
}
|
||||
export declare function string<T = unknown>(params?: string | core.$ZodStringParams): ZodCoercedString<T>;
|
||||
export interface ZodCoercedNumber<T = unknown> extends schemas._ZodNumber<core.$ZodNumberInternals<T>> {
|
||||
}
|
||||
export declare function number<T = unknown>(params?: string | core.$ZodNumberParams): ZodCoercedNumber<T>;
|
||||
export interface ZodCoercedBoolean<T = unknown> extends schemas._ZodBoolean<core.$ZodBooleanInternals<T>> {
|
||||
}
|
||||
export declare function boolean<T = unknown>(params?: string | core.$ZodBooleanParams): ZodCoercedBoolean<T>;
|
||||
export interface ZodCoercedBigInt<T = unknown> extends schemas._ZodBigInt<core.$ZodBigIntInternals<T>> {
|
||||
}
|
||||
export declare function bigint<T = unknown>(params?: string | core.$ZodBigIntParams): ZodCoercedBigInt<T>;
|
||||
export interface ZodCoercedDate<T = unknown> extends schemas._ZodDate<core.$ZodDateInternals<T>> {
|
||||
}
|
||||
export declare function date<T = unknown>(params?: string | core.$ZodDateParams): ZodCoercedDate<T>;
|
17
node_modules/zod/v4/classic/coerce.js
generated
vendored
Normal file
17
node_modules/zod/v4/classic/coerce.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as core from "../core/index.js";
|
||||
import * as schemas from "./schemas.js";
|
||||
export function string(params) {
|
||||
return core._coercedString(schemas.ZodString, params);
|
||||
}
|
||||
export function number(params) {
|
||||
return core._coercedNumber(schemas.ZodNumber, params);
|
||||
}
|
||||
export function boolean(params) {
|
||||
return core._coercedBoolean(schemas.ZodBoolean, params);
|
||||
}
|
||||
export function bigint(params) {
|
||||
return core._coercedBigint(schemas.ZodBigInt, params);
|
||||
}
|
||||
export function date(params) {
|
||||
return core._coercedDate(schemas.ZodDate, params);
|
||||
}
|
57
node_modules/zod/v4/classic/compat.cjs
generated
vendored
Normal file
57
node_modules/zod/v4/classic/compat.cjs
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
// Zod 3 compat layer
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.config = exports.$brand = exports.ZodIssueCode = void 0;
|
||||
exports.setErrorMap = setErrorMap;
|
||||
exports.getErrorMap = getErrorMap;
|
||||
const core = __importStar(require("../core/index.cjs"));
|
||||
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
||||
exports.ZodIssueCode = {
|
||||
invalid_type: "invalid_type",
|
||||
too_big: "too_big",
|
||||
too_small: "too_small",
|
||||
invalid_format: "invalid_format",
|
||||
not_multiple_of: "not_multiple_of",
|
||||
unrecognized_keys: "unrecognized_keys",
|
||||
invalid_union: "invalid_union",
|
||||
invalid_key: "invalid_key",
|
||||
invalid_element: "invalid_element",
|
||||
invalid_value: "invalid_value",
|
||||
custom: "custom",
|
||||
};
|
||||
var index_js_1 = require("../core/index.cjs");
|
||||
Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_1.$brand; } });
|
||||
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_1.config; } });
|
||||
/** @deprecated Use `z.config(params)` instead. */
|
||||
function setErrorMap(map) {
|
||||
core.config({
|
||||
customError: map,
|
||||
});
|
||||
}
|
||||
/** @deprecated Use `z.config()` instead. */
|
||||
function getErrorMap() {
|
||||
return core.config().customError;
|
||||
}
|
46
node_modules/zod/v4/classic/compat.d.cts
generated
vendored
Normal file
46
node_modules/zod/v4/classic/compat.d.cts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import * as core from "../core/index.cjs";
|
||||
import type { ZodType } from "./schemas.cjs";
|
||||
export type {
|
||||
/** @deprecated Use `z.output<T>` instead. */
|
||||
output as TypeOf,
|
||||
/** @deprecated Use `z.output<T>` instead. */
|
||||
output as Infer,
|
||||
/** @deprecated Use `z.core.$$ZodFirstPartyTypes` instead */
|
||||
$ZodTypes as ZodFirstPartySchemaTypes, } from "../core/index.cjs";
|
||||
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
||||
export declare const ZodIssueCode: {
|
||||
readonly invalid_type: "invalid_type";
|
||||
readonly too_big: "too_big";
|
||||
readonly too_small: "too_small";
|
||||
readonly invalid_format: "invalid_format";
|
||||
readonly not_multiple_of: "not_multiple_of";
|
||||
readonly unrecognized_keys: "unrecognized_keys";
|
||||
readonly invalid_union: "invalid_union";
|
||||
readonly invalid_key: "invalid_key";
|
||||
readonly invalid_element: "invalid_element";
|
||||
readonly invalid_value: "invalid_value";
|
||||
readonly custom: "custom";
|
||||
};
|
||||
/** @deprecated Use `z.$ZodFlattenedError` */
|
||||
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
|
||||
/** @deprecated Use `z.$ZodFormattedError` */
|
||||
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
|
||||
/** Use `z.$brand` instead */
|
||||
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
|
||||
[core.$brand]: {
|
||||
[k in T]: true;
|
||||
};
|
||||
};
|
||||
export { $brand, config } from "../core/index.cjs";
|
||||
/** @deprecated Use `z.config(params)` instead. */
|
||||
export declare function setErrorMap(map: core.$ZodErrorMap): void;
|
||||
/** @deprecated Use `z.config()` instead. */
|
||||
export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
|
||||
export type {
|
||||
/** @deprecated Use z.ZodType (without generics) instead. */
|
||||
ZodType as ZodTypeAny,
|
||||
/** @deprecated Use `z.ZodType` */
|
||||
ZodType as ZodSchema,
|
||||
/** @deprecated Use `z.ZodType` */
|
||||
ZodType as Schema, };
|
||||
export type ZodRawShape = core.$ZodShape;
|
46
node_modules/zod/v4/classic/compat.d.ts
generated
vendored
Normal file
46
node_modules/zod/v4/classic/compat.d.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import * as core from "../core/index.js";
|
||||
import type { ZodType } from "./schemas.js";
|
||||
export type {
|
||||
/** @deprecated Use `z.output<T>` instead. */
|
||||
output as TypeOf,
|
||||
/** @deprecated Use `z.output<T>` instead. */
|
||||
output as Infer,
|
||||
/** @deprecated Use `z.core.$$ZodFirstPartyTypes` instead */
|
||||
$ZodTypes as ZodFirstPartySchemaTypes, } from "../core/index.js";
|
||||
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
||||
export declare const ZodIssueCode: {
|
||||
readonly invalid_type: "invalid_type";
|
||||
readonly too_big: "too_big";
|
||||
readonly too_small: "too_small";
|
||||
readonly invalid_format: "invalid_format";
|
||||
readonly not_multiple_of: "not_multiple_of";
|
||||
readonly unrecognized_keys: "unrecognized_keys";
|
||||
readonly invalid_union: "invalid_union";
|
||||
readonly invalid_key: "invalid_key";
|
||||
readonly invalid_element: "invalid_element";
|
||||
readonly invalid_value: "invalid_value";
|
||||
readonly custom: "custom";
|
||||
};
|
||||
/** @deprecated Use `z.$ZodFlattenedError` */
|
||||
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
|
||||
/** @deprecated Use `z.$ZodFormattedError` */
|
||||
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
|
||||
/** Use `z.$brand` instead */
|
||||
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
|
||||
[core.$brand]: {
|
||||
[k in T]: true;
|
||||
};
|
||||
};
|
||||
export { $brand, config } from "../core/index.js";
|
||||
/** @deprecated Use `z.config(params)` instead. */
|
||||
export declare function setErrorMap(map: core.$ZodErrorMap): void;
|
||||
/** @deprecated Use `z.config()` instead. */
|
||||
export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
|
||||
export type {
|
||||
/** @deprecated Use z.ZodType (without generics) instead. */
|
||||
ZodType as ZodTypeAny,
|
||||
/** @deprecated Use `z.ZodType` */
|
||||
ZodType as ZodSchema,
|
||||
/** @deprecated Use `z.ZodType` */
|
||||
ZodType as Schema, };
|
||||
export type ZodRawShape = core.$ZodShape;
|
27
node_modules/zod/v4/classic/compat.js
generated
vendored
Normal file
27
node_modules/zod/v4/classic/compat.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// Zod 3 compat layer
|
||||
import * as core from "../core/index.js";
|
||||
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
||||
export const ZodIssueCode = {
|
||||
invalid_type: "invalid_type",
|
||||
too_big: "too_big",
|
||||
too_small: "too_small",
|
||||
invalid_format: "invalid_format",
|
||||
not_multiple_of: "not_multiple_of",
|
||||
unrecognized_keys: "unrecognized_keys",
|
||||
invalid_union: "invalid_union",
|
||||
invalid_key: "invalid_key",
|
||||
invalid_element: "invalid_element",
|
||||
invalid_value: "invalid_value",
|
||||
custom: "custom",
|
||||
};
|
||||
export { $brand, config } from "../core/index.js";
|
||||
/** @deprecated Use `z.config(params)` instead. */
|
||||
export function setErrorMap(map) {
|
||||
core.config({
|
||||
customError: map,
|
||||
});
|
||||
}
|
||||
/** @deprecated Use `z.config()` instead. */
|
||||
export function getErrorMap() {
|
||||
return core.config().customError;
|
||||
}
|
67
node_modules/zod/v4/classic/errors.cjs
generated
vendored
Normal file
67
node_modules/zod/v4/classic/errors.cjs
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ZodRealError = exports.ZodError = void 0;
|
||||
const core = __importStar(require("../core/index.cjs"));
|
||||
const index_js_1 = require("../core/index.cjs");
|
||||
const initializer = (inst, issues) => {
|
||||
index_js_1.$ZodError.init(inst, issues);
|
||||
inst.name = "ZodError";
|
||||
Object.defineProperties(inst, {
|
||||
format: {
|
||||
value: (mapper) => core.formatError(inst, mapper),
|
||||
// enumerable: false,
|
||||
},
|
||||
flatten: {
|
||||
value: (mapper) => core.flattenError(inst, mapper),
|
||||
// enumerable: false,
|
||||
},
|
||||
addIssue: {
|
||||
value: (issue) => inst.issues.push(issue),
|
||||
// enumerable: false,
|
||||
},
|
||||
addIssues: {
|
||||
value: (issues) => inst.issues.push(...issues),
|
||||
// enumerable: false,
|
||||
},
|
||||
isEmpty: {
|
||||
get() {
|
||||
return inst.issues.length === 0;
|
||||
},
|
||||
// enumerable: false,
|
||||
},
|
||||
});
|
||||
// Object.defineProperty(inst, "isEmpty", {
|
||||
// get() {
|
||||
// return inst.issues.length === 0;
|
||||
// },
|
||||
// });
|
||||
};
|
||||
exports.ZodError = core.$constructor("ZodError", initializer);
|
||||
exports.ZodRealError = core.$constructor("ZodError", initializer, {
|
||||
Parent: Error,
|
||||
});
|
||||
// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */
|
||||
// export type ErrorMapCtx = core.$ZodErrorMapCtx;
|
30
node_modules/zod/v4/classic/errors.d.cts
generated
vendored
Normal file
30
node_modules/zod/v4/classic/errors.d.cts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import * as core from "../core/index.cjs";
|
||||
import { $ZodError } from "../core/index.cjs";
|
||||
/** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
|
||||
export type ZodIssue = core.$ZodIssue;
|
||||
/** An Error-like class used to store Zod validation issues. */
|
||||
export interface ZodError<T = unknown> extends $ZodError<T> {
|
||||
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
||||
format(): core.$ZodFormattedError<T>;
|
||||
format<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFormattedError<T, U>;
|
||||
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
||||
flatten(): core.$ZodFlattenedError<T>;
|
||||
flatten<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFlattenedError<T, U>;
|
||||
/** @deprecated Push directly to `.issues` instead. */
|
||||
addIssue(issue: core.$ZodIssue): void;
|
||||
/** @deprecated Push directly to `.issues` instead. */
|
||||
addIssues(issues: core.$ZodIssue[]): void;
|
||||
/** @deprecated Check `err.issues.length === 0` instead. */
|
||||
isEmpty: boolean;
|
||||
}
|
||||
export declare const ZodError: core.$constructor<ZodError>;
|
||||
export declare const ZodRealError: core.$constructor<ZodError>;
|
||||
export type {
|
||||
/** @deprecated Use `z.core.$ZodFlattenedError` instead. */
|
||||
$ZodFlattenedError as ZodFlattenedError,
|
||||
/** @deprecated Use `z.core.$ZodFormattedError` instead. */
|
||||
$ZodFormattedError as ZodFormattedError,
|
||||
/** @deprecated Use `z.core.$ZodErrorMap` instead. */
|
||||
$ZodErrorMap as ZodErrorMap, } from "../core/index.cjs";
|
||||
/** @deprecated Use `z.core.$ZodRawIssue` instead. */
|
||||
export type IssueData = core.$ZodRawIssue;
|
30
node_modules/zod/v4/classic/errors.d.ts
generated
vendored
Normal file
30
node_modules/zod/v4/classic/errors.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import * as core from "../core/index.js";
|
||||
import { $ZodError } from "../core/index.js";
|
||||
/** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
|
||||
export type ZodIssue = core.$ZodIssue;
|
||||
/** An Error-like class used to store Zod validation issues. */
|
||||
export interface ZodError<T = unknown> extends $ZodError<T> {
|
||||
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
||||
format(): core.$ZodFormattedError<T>;
|
||||
format<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFormattedError<T, U>;
|
||||
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
||||
flatten(): core.$ZodFlattenedError<T>;
|
||||
flatten<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFlattenedError<T, U>;
|
||||
/** @deprecated Push directly to `.issues` instead. */
|
||||
addIssue(issue: core.$ZodIssue): void;
|
||||
/** @deprecated Push directly to `.issues` instead. */
|
||||
addIssues(issues: core.$ZodIssue[]): void;
|
||||
/** @deprecated Check `err.issues.length === 0` instead. */
|
||||
isEmpty: boolean;
|
||||
}
|
||||
export declare const ZodError: core.$constructor<ZodError>;
|
||||
export declare const ZodRealError: core.$constructor<ZodError>;
|
||||
export type {
|
||||
/** @deprecated Use `z.core.$ZodFlattenedError` instead. */
|
||||
$ZodFlattenedError as ZodFlattenedError,
|
||||
/** @deprecated Use `z.core.$ZodFormattedError` instead. */
|
||||
$ZodFormattedError as ZodFormattedError,
|
||||
/** @deprecated Use `z.core.$ZodErrorMap` instead. */
|
||||
$ZodErrorMap as ZodErrorMap, } from "../core/index.js";
|
||||
/** @deprecated Use `z.core.$ZodRawIssue` instead. */
|
||||
export type IssueData = core.$ZodRawIssue;
|
41
node_modules/zod/v4/classic/errors.js
generated
vendored
Normal file
41
node_modules/zod/v4/classic/errors.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import * as core from "../core/index.js";
|
||||
import { $ZodError } from "../core/index.js";
|
||||
const initializer = (inst, issues) => {
|
||||
$ZodError.init(inst, issues);
|
||||
inst.name = "ZodError";
|
||||
Object.defineProperties(inst, {
|
||||
format: {
|
||||
value: (mapper) => core.formatError(inst, mapper),
|
||||
// enumerable: false,
|
||||
},
|
||||
flatten: {
|
||||
value: (mapper) => core.flattenError(inst, mapper),
|
||||
// enumerable: false,
|
||||
},
|
||||
addIssue: {
|
||||
value: (issue) => inst.issues.push(issue),
|
||||
// enumerable: false,
|
||||
},
|
||||
addIssues: {
|
||||
value: (issues) => inst.issues.push(...issues),
|
||||
// enumerable: false,
|
||||
},
|
||||
isEmpty: {
|
||||
get() {
|
||||
return inst.issues.length === 0;
|
||||
},
|
||||
// enumerable: false,
|
||||
},
|
||||
});
|
||||
// Object.defineProperty(inst, "isEmpty", {
|
||||
// get() {
|
||||
// return inst.issues.length === 0;
|
||||
// },
|
||||
// });
|
||||
};
|
||||
export const ZodError = core.$constructor("ZodError", initializer);
|
||||
export const ZodRealError = core.$constructor("ZodError", initializer, {
|
||||
Parent: Error,
|
||||
});
|
||||
// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */
|
||||
// export type ErrorMapCtx = core.$ZodErrorMapCtx;
|
70
node_modules/zod/v4/classic/external.cjs
generated
vendored
Normal file
70
node_modules/zod/v4/classic/external.cjs
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.coerce = exports.iso = exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = exports.locales = exports.NEVER = exports.TimePrecision = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.function = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
|
||||
exports.core = __importStar(require("../core/index.cjs"));
|
||||
__exportStar(require("./schemas.cjs"), exports);
|
||||
__exportStar(require("./checks.cjs"), exports);
|
||||
__exportStar(require("./errors.cjs"), exports);
|
||||
__exportStar(require("./parse.cjs"), exports);
|
||||
__exportStar(require("./compat.cjs"), exports);
|
||||
// zod-specified
|
||||
const index_js_1 = require("../core/index.cjs");
|
||||
const en_js_1 = __importDefault(require("../locales/en.cjs"));
|
||||
(0, index_js_1.config)((0, en_js_1.default)());
|
||||
var index_js_2 = require("../core/index.cjs");
|
||||
Object.defineProperty(exports, "globalRegistry", { enumerable: true, get: function () { return index_js_2.globalRegistry; } });
|
||||
Object.defineProperty(exports, "registry", { enumerable: true, get: function () { return index_js_2.registry; } });
|
||||
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_2.config; } });
|
||||
Object.defineProperty(exports, "function", { enumerable: true, get: function () { return index_js_2.function; } });
|
||||
Object.defineProperty(exports, "$output", { enumerable: true, get: function () { return index_js_2.$output; } });
|
||||
Object.defineProperty(exports, "$input", { enumerable: true, get: function () { return index_js_2.$input; } });
|
||||
Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_2.$brand; } });
|
||||
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return index_js_2.clone; } });
|
||||
Object.defineProperty(exports, "regexes", { enumerable: true, get: function () { return index_js_2.regexes; } });
|
||||
Object.defineProperty(exports, "treeifyError", { enumerable: true, get: function () { return index_js_2.treeifyError; } });
|
||||
Object.defineProperty(exports, "prettifyError", { enumerable: true, get: function () { return index_js_2.prettifyError; } });
|
||||
Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return index_js_2.formatError; } });
|
||||
Object.defineProperty(exports, "flattenError", { enumerable: true, get: function () { return index_js_2.flattenError; } });
|
||||
Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return index_js_2.toJSONSchema; } });
|
||||
Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return index_js_2.TimePrecision; } });
|
||||
Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return index_js_2.NEVER; } });
|
||||
exports.locales = __importStar(require("../locales/index.cjs"));
|
||||
// iso
|
||||
// must be exported from top-level
|
||||
// https://github.com/colinhacks/zod/issues/4491
|
||||
var iso_js_1 = require("./iso.cjs");
|
||||
Object.defineProperty(exports, "ZodISODateTime", { enumerable: true, get: function () { return iso_js_1.ZodISODateTime; } });
|
||||
Object.defineProperty(exports, "ZodISODate", { enumerable: true, get: function () { return iso_js_1.ZodISODate; } });
|
||||
Object.defineProperty(exports, "ZodISOTime", { enumerable: true, get: function () { return iso_js_1.ZodISOTime; } });
|
||||
Object.defineProperty(exports, "ZodISODuration", { enumerable: true, get: function () { return iso_js_1.ZodISODuration; } });
|
||||
exports.iso = __importStar(require("./iso.cjs"));
|
||||
exports.coerce = __importStar(require("./coerce.cjs"));
|
13
node_modules/zod/v4/classic/external.d.cts
generated
vendored
Normal file
13
node_modules/zod/v4/classic/external.d.cts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export * as core from "../core/index.cjs";
|
||||
export * from "./schemas.cjs";
|
||||
export * from "./checks.cjs";
|
||||
export * from "./errors.cjs";
|
||||
export * from "./parse.cjs";
|
||||
export * from "./compat.cjs";
|
||||
export type { infer, output, input } from "../core/index.cjs";
|
||||
export { globalRegistry, type GlobalMeta, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, NEVER, } from "../core/index.cjs";
|
||||
export * as locales from "../locales/index.cjs";
|
||||
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.cjs";
|
||||
export * as iso from "./iso.cjs";
|
||||
export type { ZodCoercedString, ZodCoercedNumber, ZodCoercedBigInt, ZodCoercedBoolean, ZodCoercedDate, } from "./coerce.cjs";
|
||||
export * as coerce from "./coerce.cjs";
|
13
node_modules/zod/v4/classic/external.d.ts
generated
vendored
Normal file
13
node_modules/zod/v4/classic/external.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export * as core from "../core/index.js";
|
||||
export * from "./schemas.js";
|
||||
export * from "./checks.js";
|
||||
export * from "./errors.js";
|
||||
export * from "./parse.js";
|
||||
export * from "./compat.js";
|
||||
export type { infer, output, input } from "../core/index.js";
|
||||
export { globalRegistry, type GlobalMeta, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, NEVER, } from "../core/index.js";
|
||||
export * as locales from "../locales/index.js";
|
||||
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
|
||||
export * as iso from "./iso.js";
|
||||
export type { ZodCoercedString, ZodCoercedNumber, ZodCoercedBigInt, ZodCoercedBoolean, ZodCoercedDate, } from "./coerce.js";
|
||||
export * as coerce from "./coerce.js";
|
18
node_modules/zod/v4/classic/external.js
generated
vendored
Normal file
18
node_modules/zod/v4/classic/external.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
export * as core from "../core/index.js";
|
||||
export * from "./schemas.js";
|
||||
export * from "./checks.js";
|
||||
export * from "./errors.js";
|
||||
export * from "./parse.js";
|
||||
export * from "./compat.js";
|
||||
// zod-specified
|
||||
import { config } from "../core/index.js";
|
||||
import en from "../locales/en.js";
|
||||
config(en());
|
||||
export { globalRegistry, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, NEVER, } from "../core/index.js";
|
||||
export * as locales from "../locales/index.js";
|
||||
// iso
|
||||
// must be exported from top-level
|
||||
// https://github.com/colinhacks/zod/issues/4491
|
||||
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
|
||||
export * as iso from "./iso.js";
|
||||
export * as coerce from "./coerce.js";
|
33
node_modules/zod/v4/classic/index.cjs
generated
vendored
Normal file
33
node_modules/zod/v4/classic/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.z = void 0;
|
||||
const z = __importStar(require("./external.cjs"));
|
||||
exports.z = z;
|
||||
__exportStar(require("./external.cjs"), exports);
|
||||
exports.default = z;
|
4
node_modules/zod/v4/classic/index.d.cts
generated
vendored
Normal file
4
node_modules/zod/v4/classic/index.d.cts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as z from "./external.cjs";
|
||||
export { z };
|
||||
export * from "./external.cjs";
|
||||
export default z;
|
4
node_modules/zod/v4/classic/index.d.ts
generated
vendored
Normal file
4
node_modules/zod/v4/classic/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as z from "./external.js";
|
||||
export { z };
|
||||
export * from "./external.js";
|
||||
export default z;
|
4
node_modules/zod/v4/classic/index.js
generated
vendored
Normal file
4
node_modules/zod/v4/classic/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as z from "./external.js";
|
||||
export { z };
|
||||
export * from "./external.js";
|
||||
export default z;
|
60
node_modules/zod/v4/classic/iso.cjs
generated
vendored
Normal file
60
node_modules/zod/v4/classic/iso.cjs
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = void 0;
|
||||
exports.datetime = datetime;
|
||||
exports.date = date;
|
||||
exports.time = time;
|
||||
exports.duration = duration;
|
||||
const core = __importStar(require("../core/index.cjs"));
|
||||
const schemas = __importStar(require("./schemas.cjs"));
|
||||
exports.ZodISODateTime = core.$constructor("ZodISODateTime", (inst, def) => {
|
||||
core.$ZodISODateTime.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
function datetime(params) {
|
||||
return core._isoDateTime(exports.ZodISODateTime, params);
|
||||
}
|
||||
exports.ZodISODate = core.$constructor("ZodISODate", (inst, def) => {
|
||||
core.$ZodISODate.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
function date(params) {
|
||||
return core._isoDate(exports.ZodISODate, params);
|
||||
}
|
||||
exports.ZodISOTime = core.$constructor("ZodISOTime", (inst, def) => {
|
||||
core.$ZodISOTime.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
function time(params) {
|
||||
return core._isoTime(exports.ZodISOTime, params);
|
||||
}
|
||||
exports.ZodISODuration = core.$constructor("ZodISODuration", (inst, def) => {
|
||||
core.$ZodISODuration.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
function duration(params) {
|
||||
return core._isoDuration(exports.ZodISODuration, params);
|
||||
}
|
22
node_modules/zod/v4/classic/iso.d.cts
generated
vendored
Normal file
22
node_modules/zod/v4/classic/iso.d.cts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as core from "../core/index.cjs";
|
||||
import * as schemas from "./schemas.cjs";
|
||||
export interface ZodISODateTime extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISODateTimeInternals;
|
||||
}
|
||||
export declare const ZodISODateTime: core.$constructor<ZodISODateTime>;
|
||||
export declare function datetime(params?: string | core.$ZodISODateTimeParams): ZodISODateTime;
|
||||
export interface ZodISODate extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISODateInternals;
|
||||
}
|
||||
export declare const ZodISODate: core.$constructor<ZodISODate>;
|
||||
export declare function date(params?: string | core.$ZodISODateParams): ZodISODate;
|
||||
export interface ZodISOTime extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISOTimeInternals;
|
||||
}
|
||||
export declare const ZodISOTime: core.$constructor<ZodISOTime>;
|
||||
export declare function time(params?: string | core.$ZodISOTimeParams): ZodISOTime;
|
||||
export interface ZodISODuration extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISODurationInternals;
|
||||
}
|
||||
export declare const ZodISODuration: core.$constructor<ZodISODuration>;
|
||||
export declare function duration(params?: string | core.$ZodISODurationParams): ZodISODuration;
|
22
node_modules/zod/v4/classic/iso.d.ts
generated
vendored
Normal file
22
node_modules/zod/v4/classic/iso.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as core from "../core/index.js";
|
||||
import * as schemas from "./schemas.js";
|
||||
export interface ZodISODateTime extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISODateTimeInternals;
|
||||
}
|
||||
export declare const ZodISODateTime: core.$constructor<ZodISODateTime>;
|
||||
export declare function datetime(params?: string | core.$ZodISODateTimeParams): ZodISODateTime;
|
||||
export interface ZodISODate extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISODateInternals;
|
||||
}
|
||||
export declare const ZodISODate: core.$constructor<ZodISODate>;
|
||||
export declare function date(params?: string | core.$ZodISODateParams): ZodISODate;
|
||||
export interface ZodISOTime extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISOTimeInternals;
|
||||
}
|
||||
export declare const ZodISOTime: core.$constructor<ZodISOTime>;
|
||||
export declare function time(params?: string | core.$ZodISOTimeParams): ZodISOTime;
|
||||
export interface ZodISODuration extends schemas.ZodStringFormat {
|
||||
_zod: core.$ZodISODurationInternals;
|
||||
}
|
||||
export declare const ZodISODuration: core.$constructor<ZodISODuration>;
|
||||
export declare function duration(params?: string | core.$ZodISODurationParams): ZodISODuration;
|
30
node_modules/zod/v4/classic/iso.js
generated
vendored
Normal file
30
node_modules/zod/v4/classic/iso.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import * as core from "../core/index.js";
|
||||
import * as schemas from "./schemas.js";
|
||||
export const ZodISODateTime = /*@__PURE__*/ core.$constructor("ZodISODateTime", (inst, def) => {
|
||||
core.$ZodISODateTime.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
export function datetime(params) {
|
||||
return core._isoDateTime(ZodISODateTime, params);
|
||||
}
|
||||
export const ZodISODate = /*@__PURE__*/ core.$constructor("ZodISODate", (inst, def) => {
|
||||
core.$ZodISODate.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
export function date(params) {
|
||||
return core._isoDate(ZodISODate, params);
|
||||
}
|
||||
export const ZodISOTime = /*@__PURE__*/ core.$constructor("ZodISOTime", (inst, def) => {
|
||||
core.$ZodISOTime.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
export function time(params) {
|
||||
return core._isoTime(ZodISOTime, params);
|
||||
}
|
||||
export const ZodISODuration = /*@__PURE__*/ core.$constructor("ZodISODuration", (inst, def) => {
|
||||
core.$ZodISODuration.init(inst, def);
|
||||
schemas.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
export function duration(params) {
|
||||
return core._isoDuration(ZodISODuration, params);
|
||||
}
|
32
node_modules/zod/v4/classic/parse.cjs
generated
vendored
Normal file
32
node_modules/zod/v4/classic/parse.cjs
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.safeParseAsync = exports.safeParse = exports.parseAsync = exports.parse = void 0;
|
||||
const core = __importStar(require("../core/index.cjs"));
|
||||
const errors_js_1 = require("./errors.cjs");
|
||||
exports.parse = core._parse(errors_js_1.ZodRealError);
|
||||
exports.parseAsync = core._parseAsync(errors_js_1.ZodRealError);
|
||||
exports.safeParse = core._safeParse(errors_js_1.ZodRealError);
|
||||
exports.safeParseAsync = core._safeParseAsync(errors_js_1.ZodRealError);
|
23
node_modules/zod/v4/classic/parse.d.cts
generated
vendored
Normal file
23
node_modules/zod/v4/classic/parse.d.cts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import * as core from "../core/index.cjs";
|
||||
import { type ZodError } from "./errors.cjs";
|
||||
export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
|
||||
export type ZodSafeParseSuccess<T> = {
|
||||
success: true;
|
||||
data: T;
|
||||
error?: never;
|
||||
};
|
||||
export type ZodSafeParseError<T> = {
|
||||
success: false;
|
||||
data?: never;
|
||||
error: ZodError<T>;
|
||||
};
|
||||
export declare const parse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
|
||||
callee?: core.util.AnyFunc;
|
||||
Err?: core.$ZodErrorClass;
|
||||
}) => core.output<T>;
|
||||
export declare const parseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
|
||||
callee?: core.util.AnyFunc;
|
||||
Err?: core.$ZodErrorClass;
|
||||
}) => Promise<core.output<T>>;
|
||||
export declare const safeParse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => ZodSafeParseResult<core.output<T>>;
|
||||
export declare const safeParseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.output<T>>>;
|
23
node_modules/zod/v4/classic/parse.d.ts
generated
vendored
Normal file
23
node_modules/zod/v4/classic/parse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import * as core from "../core/index.js";
|
||||
import { type ZodError } from "./errors.js";
|
||||
export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
|
||||
export type ZodSafeParseSuccess<T> = {
|
||||
success: true;
|
||||
data: T;
|
||||
error?: never;
|
||||
};
|
||||
export type ZodSafeParseError<T> = {
|
||||
success: false;
|
||||
data?: never;
|
||||
error: ZodError<T>;
|
||||
};
|
||||
export declare const parse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
|
||||
callee?: core.util.AnyFunc;
|
||||
Err?: core.$ZodErrorClass;
|
||||
}) => core.output<T>;
|
||||
export declare const parseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
|
||||
callee?: core.util.AnyFunc;
|
||||
Err?: core.$ZodErrorClass;
|
||||
}) => Promise<core.output<T>>;
|
||||
export declare const safeParse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => ZodSafeParseResult<core.output<T>>;
|
||||
export declare const safeParseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.output<T>>>;
|
6
node_modules/zod/v4/classic/parse.js
generated
vendored
Normal file
6
node_modules/zod/v4/classic/parse.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import * as core from "../core/index.js";
|
||||
import { ZodRealError } from "./errors.js";
|
||||
export const parse = /* @__PURE__ */ core._parse(ZodRealError);
|
||||
export const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);
|
||||
export const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);
|
||||
export const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);
|
1109
node_modules/zod/v4/classic/schemas.cjs
generated
vendored
Normal file
1109
node_modules/zod/v4/classic/schemas.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
630
node_modules/zod/v4/classic/schemas.d.cts
generated
vendored
Normal file
630
node_modules/zod/v4/classic/schemas.d.cts
generated
vendored
Normal file
@@ -0,0 +1,630 @@
|
||||
import * as core from "../core/index.cjs";
|
||||
import { util } from "../core/index.cjs";
|
||||
import * as parse from "./parse.cjs";
|
||||
export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
|
||||
addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
|
||||
}
|
||||
export interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
|
||||
def: Internals["def"];
|
||||
type: Internals["def"]["type"];
|
||||
/** @deprecated Use `.def` instead. */
|
||||
_def: Internals["def"];
|
||||
/** @deprecated Use `z.output<typeof schema>` instead. */
|
||||
_output: Internals["output"];
|
||||
/** @deprecated Use `z.input<typeof schema>` instead. */
|
||||
_input: Internals["input"];
|
||||
check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
|
||||
clone(def?: Internals["def"], params?: {
|
||||
parent: boolean;
|
||||
}): this;
|
||||
register<R extends core.$ZodRegistry>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [core.$replace<R["_meta"], this>?] : [core.$replace<R["_meta"], this>] : ["Incompatible schema"]): this;
|
||||
brand<T extends PropertyKey = PropertyKey>(value?: T): PropertyKey extends T ? this : core.$ZodBranded<this, T>;
|
||||
parse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
|
||||
safeParse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): parse.ZodSafeParseResult<core.output<this>>;
|
||||
parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
|
||||
safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
||||
spa: (data: unknown, params?: core.ParseContext<core.$ZodIssue>) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
||||
refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
|
||||
/** @deprecated Use `.check()` instead. */
|
||||
superRefine(refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>): this;
|
||||
overwrite(fn: (x: core.output<this>) => core.output<this>): this;
|
||||
optional(): ZodOptional<this>;
|
||||
nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
|
||||
nullable(): ZodNullable<this>;
|
||||
nullish(): ZodOptional<ZodNullable<this>>;
|
||||
default(def: core.output<this>): ZodDefault<this>;
|
||||
default(def: () => util.NoUndefined<core.output<this>>): ZodDefault<this>;
|
||||
prefault(def: () => core.input<this>): ZodPrefault<this>;
|
||||
prefault(def: core.input<this>): ZodPrefault<this>;
|
||||
array(): ZodArray<this>;
|
||||
or<T extends core.SomeType>(option: T): ZodUnion<[this, T]>;
|
||||
and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
|
||||
transform<NewOut>(transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
|
||||
catch(def: core.output<this>): ZodCatch<this>;
|
||||
catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
|
||||
pipe<T extends core.$ZodType<any, core.output<this>>>(target: T | core.$ZodType<any, core.output<this>>): ZodPipe<this, T>;
|
||||
readonly(): ZodReadonly<this>;
|
||||
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
|
||||
describe(description: string): this;
|
||||
description?: string;
|
||||
/** Returns the metadata associated with this instance in `z.globalRegistry` */
|
||||
meta(): core.$replace<core.GlobalMeta, this> | undefined;
|
||||
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
|
||||
meta(data: core.$replace<core.GlobalMeta, this>): this;
|
||||
/** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
|
||||
*
|
||||
* ```ts
|
||||
* const schema = z.string().optional();
|
||||
* const isOptional = schema.safeParse(undefined).success; // true
|
||||
* ```
|
||||
*/
|
||||
isOptional(): boolean;
|
||||
/**
|
||||
* @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
|
||||
*
|
||||
* ```ts
|
||||
* const schema = z.string().nullable();
|
||||
* const isNullable = schema.safeParse(null).success; // true
|
||||
* ```
|
||||
*/
|
||||
isNullable(): boolean;
|
||||
}
|
||||
export interface _ZodType<out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals> extends ZodType<any, any, Internals> {
|
||||
}
|
||||
export declare const ZodType: core.$constructor<ZodType>;
|
||||
export interface _ZodString<T extends core.$ZodStringInternals<unknown> = core.$ZodStringInternals<unknown>> extends _ZodType<T> {
|
||||
format: string | null;
|
||||
minLength: number | null;
|
||||
maxLength: number | null;
|
||||
regex(regex: RegExp, params?: string | core.$ZodCheckRegexParams): this;
|
||||
includes(value: string, params?: core.$ZodCheckIncludesParams): this;
|
||||
startsWith(value: string, params?: string | core.$ZodCheckStartsWithParams): this;
|
||||
endsWith(value: string, params?: string | core.$ZodCheckEndsWithParams): this;
|
||||
min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
|
||||
length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
|
||||
nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
lowercase(params?: string | core.$ZodCheckLowerCaseParams): this;
|
||||
uppercase(params?: string | core.$ZodCheckUpperCaseParams): this;
|
||||
trim(): this;
|
||||
normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
|
||||
toLowerCase(): this;
|
||||
toUpperCase(): this;
|
||||
}
|
||||
/** @internal */
|
||||
export declare const _ZodString: core.$constructor<_ZodString>;
|
||||
export interface ZodString extends _ZodString<core.$ZodStringInternals<string>> {
|
||||
/** @deprecated Use `z.email()` instead. */
|
||||
email(params?: string | core.$ZodCheckEmailParams): this;
|
||||
/** @deprecated Use `z.url()` instead. */
|
||||
url(params?: string | core.$ZodCheckURLParams): this;
|
||||
/** @deprecated Use `z.jwt()` instead. */
|
||||
jwt(params?: string | core.$ZodCheckJWTParams): this;
|
||||
/** @deprecated Use `z.emoji()` instead. */
|
||||
emoji(params?: string | core.$ZodCheckEmojiParams): this;
|
||||
/** @deprecated Use `z.guid()` instead. */
|
||||
guid(params?: string | core.$ZodCheckGUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuid(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuidv4(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuidv6(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuidv7(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.nanoid()` instead. */
|
||||
nanoid(params?: string | core.$ZodCheckNanoIDParams): this;
|
||||
/** @deprecated Use `z.guid()` instead. */
|
||||
guid(params?: string | core.$ZodCheckGUIDParams): this;
|
||||
/** @deprecated Use `z.cuid()` instead. */
|
||||
cuid(params?: string | core.$ZodCheckCUIDParams): this;
|
||||
/** @deprecated Use `z.cuid2()` instead. */
|
||||
cuid2(params?: string | core.$ZodCheckCUID2Params): this;
|
||||
/** @deprecated Use `z.ulid()` instead. */
|
||||
ulid(params?: string | core.$ZodCheckULIDParams): this;
|
||||
/** @deprecated Use `z.base64()` instead. */
|
||||
base64(params?: string | core.$ZodCheckBase64Params): this;
|
||||
/** @deprecated Use `z.base64url()` instead. */
|
||||
base64url(params?: string | core.$ZodCheckBase64URLParams): this;
|
||||
/** @deprecated Use `z.xid()` instead. */
|
||||
xid(params?: string | core.$ZodCheckXIDParams): this;
|
||||
/** @deprecated Use `z.ksuid()` instead. */
|
||||
ksuid(params?: string | core.$ZodCheckKSUIDParams): this;
|
||||
/** @deprecated Use `z.ipv4()` instead. */
|
||||
ipv4(params?: string | core.$ZodCheckIPv4Params): this;
|
||||
/** @deprecated Use `z.ipv6()` instead. */
|
||||
ipv6(params?: string | core.$ZodCheckIPv6Params): this;
|
||||
/** @deprecated Use `z.cidrv4()` instead. */
|
||||
cidrv4(params?: string | core.$ZodCheckCIDRv4Params): this;
|
||||
/** @deprecated Use `z.cidrv6()` instead. */
|
||||
cidrv6(params?: string | core.$ZodCheckCIDRv6Params): this;
|
||||
/** @deprecated Use `z.e164()` instead. */
|
||||
e164(params?: string | core.$ZodCheckE164Params): this;
|
||||
/** @deprecated Use `z.iso.datetime()` instead. */
|
||||
datetime(params?: string | core.$ZodCheckISODateTimeParams): this;
|
||||
/** @deprecated Use `z.iso.date()` instead. */
|
||||
date(params?: string | core.$ZodCheckISODateParams): this;
|
||||
/** @deprecated Use `z.iso.time()` instead. */
|
||||
time(params?: string | core.$ZodCheckISOTimeParams): this;
|
||||
/** @deprecated Use `z.iso.duration()` instead. */
|
||||
duration(params?: string | core.$ZodCheckISODurationParams): this;
|
||||
}
|
||||
export declare const ZodString: core.$constructor<ZodString>;
|
||||
export declare function string(params?: string | core.$ZodStringParams): ZodString;
|
||||
export declare function string<T extends string>(params?: string | core.$ZodStringParams): core.$ZodType<T, T>;
|
||||
export interface ZodStringFormat<Format extends string = string> extends _ZodString<core.$ZodStringFormatInternals<Format>> {
|
||||
}
|
||||
export declare const ZodStringFormat: core.$constructor<ZodStringFormat>;
|
||||
export interface ZodEmail extends ZodStringFormat<"email"> {
|
||||
_zod: core.$ZodEmailInternals;
|
||||
}
|
||||
export declare const ZodEmail: core.$constructor<ZodEmail>;
|
||||
export declare function email(params?: string | core.$ZodEmailParams): ZodEmail;
|
||||
export interface ZodGUID extends ZodStringFormat<"guid"> {
|
||||
_zod: core.$ZodGUIDInternals;
|
||||
}
|
||||
export declare const ZodGUID: core.$constructor<ZodGUID>;
|
||||
export declare function guid(params?: string | core.$ZodGUIDParams): ZodGUID;
|
||||
export interface ZodUUID extends ZodStringFormat<"uuid"> {
|
||||
_zod: core.$ZodUUIDInternals;
|
||||
}
|
||||
export declare const ZodUUID: core.$constructor<ZodUUID>;
|
||||
export declare function uuid(params?: string | core.$ZodUUIDParams): ZodUUID;
|
||||
export declare function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodUUID;
|
||||
export declare function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodUUID;
|
||||
export declare function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodUUID;
|
||||
export interface ZodURL extends ZodStringFormat<"url"> {
|
||||
_zod: core.$ZodURLInternals;
|
||||
}
|
||||
export declare const ZodURL: core.$constructor<ZodURL>;
|
||||
export declare function url(params?: string | core.$ZodURLParams): ZodURL;
|
||||
export interface ZodEmoji extends ZodStringFormat<"emoji"> {
|
||||
_zod: core.$ZodEmojiInternals;
|
||||
}
|
||||
export declare const ZodEmoji: core.$constructor<ZodEmoji>;
|
||||
export declare function emoji(params?: string | core.$ZodEmojiParams): ZodEmoji;
|
||||
export interface ZodNanoID extends ZodStringFormat<"nanoid"> {
|
||||
_zod: core.$ZodNanoIDInternals;
|
||||
}
|
||||
export declare const ZodNanoID: core.$constructor<ZodNanoID>;
|
||||
export declare function nanoid(params?: string | core.$ZodNanoIDParams): ZodNanoID;
|
||||
export interface ZodCUID extends ZodStringFormat<"cuid"> {
|
||||
_zod: core.$ZodCUIDInternals;
|
||||
}
|
||||
export declare const ZodCUID: core.$constructor<ZodCUID>;
|
||||
export declare function cuid(params?: string | core.$ZodCUIDParams): ZodCUID;
|
||||
export interface ZodCUID2 extends ZodStringFormat<"cuid2"> {
|
||||
_zod: core.$ZodCUID2Internals;
|
||||
}
|
||||
export declare const ZodCUID2: core.$constructor<ZodCUID2>;
|
||||
export declare function cuid2(params?: string | core.$ZodCUID2Params): ZodCUID2;
|
||||
export interface ZodULID extends ZodStringFormat<"ulid"> {
|
||||
_zod: core.$ZodULIDInternals;
|
||||
}
|
||||
export declare const ZodULID: core.$constructor<ZodULID>;
|
||||
export declare function ulid(params?: string | core.$ZodULIDParams): ZodULID;
|
||||
export interface ZodXID extends ZodStringFormat<"xid"> {
|
||||
_zod: core.$ZodXIDInternals;
|
||||
}
|
||||
export declare const ZodXID: core.$constructor<ZodXID>;
|
||||
export declare function xid(params?: string | core.$ZodXIDParams): ZodXID;
|
||||
export interface ZodKSUID extends ZodStringFormat<"ksuid"> {
|
||||
_zod: core.$ZodKSUIDInternals;
|
||||
}
|
||||
export declare const ZodKSUID: core.$constructor<ZodKSUID>;
|
||||
export declare function ksuid(params?: string | core.$ZodKSUIDParams): ZodKSUID;
|
||||
export interface ZodIPv4 extends ZodStringFormat<"ipv4"> {
|
||||
_zod: core.$ZodIPv4Internals;
|
||||
}
|
||||
export declare const ZodIPv4: core.$constructor<ZodIPv4>;
|
||||
export declare function ipv4(params?: string | core.$ZodIPv4Params): ZodIPv4;
|
||||
export interface ZodIPv6 extends ZodStringFormat<"ipv6"> {
|
||||
_zod: core.$ZodIPv6Internals;
|
||||
}
|
||||
export declare const ZodIPv6: core.$constructor<ZodIPv6>;
|
||||
export declare function ipv6(params?: string | core.$ZodIPv6Params): ZodIPv6;
|
||||
export interface ZodCIDRv4 extends ZodStringFormat<"cidrv4"> {
|
||||
_zod: core.$ZodCIDRv4Internals;
|
||||
}
|
||||
export declare const ZodCIDRv4: core.$constructor<ZodCIDRv4>;
|
||||
export declare function cidrv4(params?: string | core.$ZodCIDRv4Params): ZodCIDRv4;
|
||||
export interface ZodCIDRv6 extends ZodStringFormat<"cidrv6"> {
|
||||
_zod: core.$ZodCIDRv6Internals;
|
||||
}
|
||||
export declare const ZodCIDRv6: core.$constructor<ZodCIDRv6>;
|
||||
export declare function cidrv6(params?: string | core.$ZodCIDRv6Params): ZodCIDRv6;
|
||||
export interface ZodBase64 extends ZodStringFormat<"base64"> {
|
||||
_zod: core.$ZodBase64Internals;
|
||||
}
|
||||
export declare const ZodBase64: core.$constructor<ZodBase64>;
|
||||
export declare function base64(params?: string | core.$ZodBase64Params): ZodBase64;
|
||||
export interface ZodBase64URL extends ZodStringFormat<"base64url"> {
|
||||
_zod: core.$ZodBase64URLInternals;
|
||||
}
|
||||
export declare const ZodBase64URL: core.$constructor<ZodBase64URL>;
|
||||
export declare function base64url(params?: string | core.$ZodBase64URLParams): ZodBase64URL;
|
||||
export interface ZodE164 extends ZodStringFormat<"e164"> {
|
||||
_zod: core.$ZodE164Internals;
|
||||
}
|
||||
export declare const ZodE164: core.$constructor<ZodE164>;
|
||||
export declare function e164(params?: string | core.$ZodE164Params): ZodE164;
|
||||
export interface ZodJWT extends ZodStringFormat<"jwt"> {
|
||||
_zod: core.$ZodJWTInternals;
|
||||
}
|
||||
export declare const ZodJWT: core.$constructor<ZodJWT>;
|
||||
export declare function jwt(params?: string | core.$ZodJWTParams): ZodJWT;
|
||||
export interface ZodCustomStringFormat<Format extends string = string> extends ZodStringFormat<Format>, core.$ZodCustomStringFormat<Format> {
|
||||
_zod: core.$ZodCustomStringFormatInternals<Format>;
|
||||
}
|
||||
export declare const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat>;
|
||||
export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<Format>;
|
||||
export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals> extends _ZodType<Internals> {
|
||||
gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
/** Identical to .min() */
|
||||
gte(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
min(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
lt(value: number, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
/** Identical to .max() */
|
||||
lte(value: number, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
max(value: number, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
/** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
|
||||
int(params?: string | core.$ZodCheckNumberFormatParams): this;
|
||||
/** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
|
||||
safe(params?: string | core.$ZodCheckNumberFormatParams): this;
|
||||
positive(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
negative(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
multipleOf(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
|
||||
/** @deprecated Use `.multipleOf()` instead. */
|
||||
step(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
|
||||
/** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
|
||||
finite(params?: unknown): this;
|
||||
minValue: number | null;
|
||||
maxValue: number | null;
|
||||
/** @deprecated Check the `format` property instead. */
|
||||
isInt: boolean;
|
||||
/** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
|
||||
isFinite: boolean;
|
||||
format: string | null;
|
||||
}
|
||||
export interface ZodNumber extends _ZodNumber<core.$ZodNumberInternals<number>> {
|
||||
}
|
||||
export declare const ZodNumber: core.$constructor<ZodNumber>;
|
||||
export declare function number(params?: string | core.$ZodNumberParams): ZodNumber;
|
||||
export interface ZodNumberFormat extends ZodNumber {
|
||||
_zod: core.$ZodNumberFormatInternals;
|
||||
}
|
||||
export declare const ZodNumberFormat: core.$constructor<ZodNumberFormat>;
|
||||
export interface ZodInt extends ZodNumberFormat {
|
||||
}
|
||||
export declare function int(params?: string | core.$ZodCheckNumberFormatParams): ZodInt;
|
||||
export interface ZodFloat32 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat32;
|
||||
export interface ZodFloat64 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat64;
|
||||
export interface ZodInt32 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodInt32;
|
||||
export interface ZodUInt32 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodUInt32;
|
||||
export interface _ZodBoolean<T extends core.$ZodBooleanInternals = core.$ZodBooleanInternals> extends _ZodType<T> {
|
||||
}
|
||||
export interface ZodBoolean extends _ZodBoolean<core.$ZodBooleanInternals<boolean>> {
|
||||
}
|
||||
export declare const ZodBoolean: core.$constructor<ZodBoolean>;
|
||||
export declare function boolean(params?: string | core.$ZodBooleanParams): ZodBoolean;
|
||||
export interface _ZodBigInt<T extends core.$ZodBigIntInternals = core.$ZodBigIntInternals> extends _ZodType<T> {
|
||||
gte(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
/** Alias of `.gte()` */
|
||||
min(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
gt(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
/** Alias of `.lte()` */
|
||||
lte(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
max(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
lt(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
positive(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
negative(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
multipleOf(value: bigint, params?: string | core.$ZodCheckMultipleOfParams): this;
|
||||
minValue: bigint | null;
|
||||
maxValue: bigint | null;
|
||||
format: string | null;
|
||||
}
|
||||
export interface ZodBigInt extends _ZodBigInt<core.$ZodBigIntInternals<bigint>> {
|
||||
}
|
||||
export declare const ZodBigInt: core.$constructor<ZodBigInt>;
|
||||
export declare function bigint(params?: string | core.$ZodBigIntParams): ZodBigInt;
|
||||
export interface ZodBigIntFormat extends ZodBigInt {
|
||||
_zod: core.$ZodBigIntFormatInternals;
|
||||
}
|
||||
export declare const ZodBigIntFormat: core.$constructor<ZodBigIntFormat>;
|
||||
export declare function int64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat;
|
||||
export declare function uint64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat;
|
||||
export interface ZodSymbol extends _ZodType<core.$ZodSymbolInternals> {
|
||||
}
|
||||
export declare const ZodSymbol: core.$constructor<ZodSymbol>;
|
||||
export declare function symbol(params?: string | core.$ZodSymbolParams): ZodSymbol;
|
||||
export interface ZodUndefined extends _ZodType<core.$ZodUndefinedInternals> {
|
||||
}
|
||||
export declare const ZodUndefined: core.$constructor<ZodUndefined>;
|
||||
declare function _undefined(params?: string | core.$ZodUndefinedParams): ZodUndefined;
|
||||
export { _undefined as undefined };
|
||||
export interface ZodNull extends _ZodType<core.$ZodNullInternals> {
|
||||
}
|
||||
export declare const ZodNull: core.$constructor<ZodNull>;
|
||||
declare function _null(params?: string | core.$ZodNullParams): ZodNull;
|
||||
export { _null as null };
|
||||
export interface ZodAny extends _ZodType<core.$ZodAnyInternals> {
|
||||
}
|
||||
export declare const ZodAny: core.$constructor<ZodAny>;
|
||||
export declare function any(): ZodAny;
|
||||
export interface ZodUnknown extends _ZodType<core.$ZodUnknownInternals> {
|
||||
}
|
||||
export declare const ZodUnknown: core.$constructor<ZodUnknown>;
|
||||
export declare function unknown(): ZodUnknown;
|
||||
export interface ZodNever extends _ZodType<core.$ZodNeverInternals> {
|
||||
}
|
||||
export declare const ZodNever: core.$constructor<ZodNever>;
|
||||
export declare function never(params?: string | core.$ZodNeverParams): ZodNever;
|
||||
export interface ZodVoid extends _ZodType<core.$ZodVoidInternals> {
|
||||
}
|
||||
export declare const ZodVoid: core.$constructor<ZodVoid>;
|
||||
declare function _void(params?: string | core.$ZodVoidParams): ZodVoid;
|
||||
export { _void as void };
|
||||
export interface _ZodDate<T extends core.$ZodDateInternals = core.$ZodDateInternals> extends _ZodType<T> {
|
||||
min(value: number | Date, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
max(value: number | Date, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
/** @deprecated Not recommended. */
|
||||
minDate: Date | null;
|
||||
/** @deprecated Not recommended. */
|
||||
maxDate: Date | null;
|
||||
}
|
||||
export interface ZodDate extends _ZodDate<core.$ZodDateInternals<Date>> {
|
||||
}
|
||||
export declare const ZodDate: core.$constructor<ZodDate>;
|
||||
export declare function date(params?: string | core.$ZodDateParams): ZodDate;
|
||||
export interface ZodArray<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodArrayInternals<T>>, core.$ZodArray<T> {
|
||||
element: T;
|
||||
min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
|
||||
length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodArray: core.$constructor<ZodArray>;
|
||||
export declare function array<T extends core.SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T>;
|
||||
export declare function keyof<T extends ZodObject>(schema: T): ZodLiteral<Exclude<keyof T["_zod"]["output"], symbol>>;
|
||||
export interface ZodObject<
|
||||
/** @ts-ignore Cast variance */
|
||||
out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.$ZodObjectConfig = core.$strip> extends _ZodType<core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
|
||||
shape: Shape;
|
||||
keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
|
||||
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
||||
catchall<T extends core.SomeType>(schema: T): ZodObject<Shape, core.$catchall<T>>;
|
||||
/** @deprecated Use `z.looseObject()` or `.loose()` instead. */
|
||||
passthrough(): ZodObject<Shape, core.$loose>;
|
||||
/** Consider `z.looseObject(A.shape)` instead */
|
||||
loose(): ZodObject<Shape, core.$loose>;
|
||||
/** Consider `z.strictObject(A.shape)` instead */
|
||||
strict(): ZodObject<Shape, core.$strict>;
|
||||
/** This is the default behavior. This method call is likely unnecessary. */
|
||||
strip(): ZodObject<Shape, core.$strip>;
|
||||
extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
|
||||
/**
|
||||
* @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
|
||||
*
|
||||
* ```ts
|
||||
* const A = z.object({ a: z.string() });
|
||||
* const B = z.object({ b: z.number() });
|
||||
*
|
||||
* const C = z.object({
|
||||
* ...A.shape,
|
||||
* ...B.shape
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
|
||||
pick<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
||||
omit<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<util.Flatten<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
||||
partial(): ZodObject<{
|
||||
[k in keyof Shape]: ZodOptional<Shape[k]>;
|
||||
}, Config>;
|
||||
partial<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<{
|
||||
[k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k];
|
||||
}, Config>;
|
||||
required(): ZodObject<{
|
||||
[k in keyof Shape]: ZodNonOptional<Shape[k]>;
|
||||
}, Config>;
|
||||
required<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<{
|
||||
[k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k];
|
||||
}, Config>;
|
||||
}
|
||||
export declare const ZodObject: core.$constructor<ZodObject>;
|
||||
export declare function object<T extends core.$ZodLooseShape = Partial<Record<never, core.SomeType>>>(shape?: T, params?: string | core.$ZodObjectParams): ZodObject<util.Writeable<T>, core.$strip>;
|
||||
export declare function strictObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodObject<T, core.$strict>;
|
||||
export declare function looseObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodObject<T, core.$loose>;
|
||||
export interface ZodUnion<T extends readonly core.SomeType[] = readonly core.$ZodType[]> extends _ZodType<core.$ZodUnionInternals<T>>, core.$ZodUnion<T> {
|
||||
options: T;
|
||||
}
|
||||
export declare const ZodUnion: core.$constructor<ZodUnion>;
|
||||
export declare function union<const T extends readonly core.SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodUnion<T>;
|
||||
export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[]> extends ZodUnion<Options>, core.$ZodDiscriminatedUnion<Options> {
|
||||
_zod: core.$ZodDiscriminatedUnionInternals<Options>;
|
||||
}
|
||||
export declare const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion>;
|
||||
export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types>;
|
||||
export interface ZodIntersection<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodIntersectionInternals<A, B>>, core.$ZodIntersection<A, B> {
|
||||
}
|
||||
export declare const ZodIntersection: core.$constructor<ZodIntersection>;
|
||||
export declare function intersection<T extends core.SomeType, U extends core.SomeType>(left: T, right: U): ZodIntersection<T, U>;
|
||||
export interface ZodTuple<T extends util.TupleItems = readonly core.$ZodType[], Rest extends core.SomeType | null = core.$ZodType | null> extends _ZodType<core.$ZodTupleInternals<T, Rest>>, core.$ZodTuple<T, Rest> {
|
||||
rest<Rest extends core.SomeType = core.$ZodType>(rest: Rest): ZodTuple<T, Rest>;
|
||||
}
|
||||
export declare const ZodTuple: core.$constructor<ZodTuple>;
|
||||
export declare function tuple<T extends readonly [core.SomeType, ...core.SomeType[]]>(items: T, params?: string | core.$ZodTupleParams): ZodTuple<T, null>;
|
||||
export declare function tuple<T extends readonly [core.SomeType, ...core.SomeType[]], Rest extends core.SomeType>(items: T, rest: Rest, params?: string | core.$ZodTupleParams): ZodTuple<T, Rest>;
|
||||
export declare function tuple(items: [], params?: string | core.$ZodTupleParams): ZodTuple<[], null>;
|
||||
export interface ZodRecord<Key extends core.$ZodRecordKey = core.$ZodRecordKey, Value extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodRecordInternals<Key, Value>>, core.$ZodRecord<Key, Value> {
|
||||
keyType: Key;
|
||||
valueType: Value;
|
||||
}
|
||||
export declare const ZodRecord: core.$constructor<ZodRecord>;
|
||||
export declare function record<Key extends core.$ZodRecordKey, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodRecord<Key, Value>;
|
||||
export declare function partialRecord<Key extends core.$ZodRecordKey, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodRecord<Key & core.$partial, Value>;
|
||||
export interface ZodMap<Key extends core.SomeType = core.$ZodType, Value extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodMapInternals<Key, Value>>, core.$ZodMap<Key, Value> {
|
||||
keyType: Key;
|
||||
valueType: Value;
|
||||
}
|
||||
export declare const ZodMap: core.$constructor<ZodMap>;
|
||||
export declare function map<Key extends core.SomeType, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodMapParams): ZodMap<Key, Value>;
|
||||
export interface ZodSet<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodSetInternals<T>>, core.$ZodSet<T> {
|
||||
min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;
|
||||
/** */
|
||||
nonempty(params?: string | core.$ZodCheckMinSizeParams): this;
|
||||
max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;
|
||||
size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
|
||||
}
|
||||
export declare const ZodSet: core.$constructor<ZodSet>;
|
||||
export declare function set<Value extends core.SomeType>(valueType: Value, params?: string | core.$ZodSetParams): ZodSet<Value>;
|
||||
export interface ZodEnum<
|
||||
/** @ts-ignore Cast variance */
|
||||
out T extends util.EnumLike = util.EnumLike> extends _ZodType<core.$ZodEnumInternals<T>>, core.$ZodEnum<T> {
|
||||
enum: T;
|
||||
options: Array<T[keyof T]>;
|
||||
extract<const U extends readonly (keyof T)[]>(values: U, params?: string | core.$ZodEnumParams): ZodEnum<util.Flatten<Pick<T, U[number]>>>;
|
||||
exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | core.$ZodEnumParams): ZodEnum<util.Flatten<Omit<T, U[number]>>>;
|
||||
}
|
||||
export declare const ZodEnum: core.$constructor<ZodEnum>;
|
||||
declare function _enum<const T extends readonly string[]>(values: T, params?: string | core.$ZodEnumParams): ZodEnum<util.ToEnum<T[number]>>;
|
||||
declare function _enum<const T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
|
||||
export { _enum as enum };
|
||||
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
|
||||
*
|
||||
* ```ts
|
||||
* enum Colors { red, green, blue }
|
||||
* z.enum(Colors);
|
||||
* ```
|
||||
*/
|
||||
export declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
|
||||
export interface ZodLiteral<T extends util.Literal = util.Literal> extends _ZodType<core.$ZodLiteralInternals<T>>, core.$ZodLiteral<T> {
|
||||
values: Set<T>;
|
||||
/** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
|
||||
value: T;
|
||||
}
|
||||
export declare const ZodLiteral: core.$constructor<ZodLiteral>;
|
||||
export declare function literal<const T extends ReadonlyArray<util.Literal>>(value: T, params?: string | core.$ZodLiteralParams): ZodLiteral<T[number]>;
|
||||
export declare function literal<const T extends util.Literal>(value: T, params?: string | core.$ZodLiteralParams): ZodLiteral<T>;
|
||||
export interface ZodFile extends _ZodType<core.$ZodFileInternals>, core.$ZodFile {
|
||||
min(size: number, params?: string | core.$ZodCheckMinSizeParams): this;
|
||||
max(size: number, params?: string | core.$ZodCheckMaxSizeParams): this;
|
||||
mime(types: util.MimeTypes | Array<util.MimeTypes>, params?: string | core.$ZodCheckMimeTypeParams): this;
|
||||
}
|
||||
export declare const ZodFile: core.$constructor<ZodFile>;
|
||||
export declare function file(params?: string | core.$ZodFileParams): ZodFile;
|
||||
export interface ZodTransform<O = unknown, I = unknown> extends _ZodType<core.$ZodTransformInternals<O, I>>, core.$ZodTransform<O, I> {
|
||||
}
|
||||
export declare const ZodTransform: core.$constructor<ZodTransform>;
|
||||
export declare function transform<I = unknown, O = I>(fn: (input: I, ctx: core.ParsePayload) => O): ZodTransform<Awaited<O>, I>;
|
||||
export interface ZodOptional<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodOptionalInternals<T>>, core.$ZodOptional<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodOptional: core.$constructor<ZodOptional>;
|
||||
export declare function optional<T extends core.SomeType>(innerType: T): ZodOptional<T>;
|
||||
export interface ZodNullable<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodNullableInternals<T>>, core.$ZodNullable<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodNullable: core.$constructor<ZodNullable>;
|
||||
export declare function nullable<T extends core.SomeType>(innerType: T): ZodNullable<T>;
|
||||
export declare function nullish<T extends core.SomeType>(innerType: T): ZodOptional<ZodNullable<T>>;
|
||||
export interface ZodDefault<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodDefaultInternals<T>>, core.$ZodDefault<T> {
|
||||
unwrap(): T;
|
||||
/** @deprecated Use `.unwrap()` instead. */
|
||||
removeDefault(): T;
|
||||
}
|
||||
export declare const ZodDefault: core.$constructor<ZodDefault>;
|
||||
export declare function _default<T extends core.SomeType>(innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): ZodDefault<T>;
|
||||
export interface ZodPrefault<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPrefaultInternals<T>>, core.$ZodPrefault<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodPrefault: core.$constructor<ZodPrefault>;
|
||||
export declare function prefault<T extends core.SomeType>(innerType: T, defaultValue: core.input<T> | (() => core.input<T>)): ZodPrefault<T>;
|
||||
export interface ZodNonOptional<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodNonOptionalInternals<T>>, core.$ZodNonOptional<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodNonOptional: core.$constructor<ZodNonOptional>;
|
||||
export declare function nonoptional<T extends core.SomeType>(innerType: T, params?: string | core.$ZodNonOptionalParams): ZodNonOptional<T>;
|
||||
export interface ZodSuccess<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodSuccessInternals<T>>, core.$ZodSuccess<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodSuccess: core.$constructor<ZodSuccess>;
|
||||
export declare function success<T extends core.SomeType>(innerType: T): ZodSuccess<T>;
|
||||
export interface ZodCatch<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodCatchInternals<T>>, core.$ZodCatch<T> {
|
||||
unwrap(): T;
|
||||
/** @deprecated Use `.unwrap()` instead. */
|
||||
removeCatch(): T;
|
||||
}
|
||||
export declare const ZodCatch: core.$constructor<ZodCatch>;
|
||||
declare function _catch<T extends core.SomeType>(innerType: T, catchValue: core.output<T> | ((ctx: core.$ZodCatchCtx) => core.output<T>)): ZodCatch<T>;
|
||||
export { _catch as catch };
|
||||
export interface ZodNaN extends _ZodType<core.$ZodNaNInternals>, core.$ZodNaN {
|
||||
}
|
||||
export declare const ZodNaN: core.$constructor<ZodNaN>;
|
||||
export declare function nan(params?: string | core.$ZodNaNParams): ZodNaN;
|
||||
export interface ZodPipe<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPipeInternals<A, B>>, core.$ZodPipe<A, B> {
|
||||
in: A;
|
||||
out: B;
|
||||
}
|
||||
export declare const ZodPipe: core.$constructor<ZodPipe>;
|
||||
export declare function pipe<const A extends core.SomeType, B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>>(in_: A, out: B | core.$ZodType<unknown, core.output<A>>): ZodPipe<A, B>;
|
||||
export interface ZodReadonly<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodReadonlyInternals<T>>, core.$ZodReadonly<T> {
|
||||
}
|
||||
export declare const ZodReadonly: core.$constructor<ZodReadonly>;
|
||||
export declare function readonly<T extends core.SomeType>(innerType: T): ZodReadonly<T>;
|
||||
export interface ZodTemplateLiteral<Template extends string = string> extends _ZodType<core.$ZodTemplateLiteralInternals<Template>>, core.$ZodTemplateLiteral<Template> {
|
||||
}
|
||||
export declare const ZodTemplateLiteral: core.$constructor<ZodTemplateLiteral>;
|
||||
export declare function templateLiteral<const Parts extends core.$ZodTemplateLiteralPart[]>(parts: Parts, params?: string | core.$ZodTemplateLiteralParams): ZodTemplateLiteral<core.$PartsToTemplateLiteral<Parts>>;
|
||||
export interface ZodLazy<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodLazyInternals<T>>, core.$ZodLazy<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodLazy: core.$constructor<ZodLazy>;
|
||||
export declare function lazy<T extends core.SomeType>(getter: () => T): ZodLazy<T>;
|
||||
export interface ZodPromise<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPromiseInternals<T>>, core.$ZodPromise<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodPromise: core.$constructor<ZodPromise>;
|
||||
export declare function promise<T extends core.SomeType>(innerType: T): ZodPromise<T>;
|
||||
export interface ZodCustom<O = unknown, I = unknown> extends _ZodType<core.$ZodCustomInternals<O, I>>, core.$ZodCustom<O, I> {
|
||||
}
|
||||
export declare const ZodCustom: core.$constructor<ZodCustom>;
|
||||
export declare function check<O = unknown>(fn: core.CheckFn<O>): core.$ZodCheck<O>;
|
||||
export declare function custom<O>(fn?: (data: unknown) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodCustom<O, O>;
|
||||
export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
|
||||
export declare function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
|
||||
type ZodInstanceOfParams = core.Params<ZodCustom, core.$ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
|
||||
declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
|
||||
export { _instanceof as instanceof };
|
||||
export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodPipe<ZodPipe<ZodString, ZodTransform<boolean, string>>, ZodBoolean>;
|
||||
type _ZodJSONSchema = ZodUnion<[
|
||||
ZodString,
|
||||
ZodNumber,
|
||||
ZodBoolean,
|
||||
ZodNull,
|
||||
ZodArray<ZodJSONSchema>,
|
||||
ZodRecord<ZodString, ZodJSONSchema>
|
||||
]>;
|
||||
type _ZodJSONSchemaInternals = _ZodJSONSchema["_zod"];
|
||||
export interface ZodJSONSchemaInternals extends _ZodJSONSchemaInternals {
|
||||
output: util.JSONType;
|
||||
input: util.JSONType;
|
||||
}
|
||||
export interface ZodJSONSchema extends _ZodJSONSchema {
|
||||
_zod: ZodJSONSchemaInternals;
|
||||
}
|
||||
export declare function json(params?: string | core.$ZodCustomParams): ZodJSONSchema;
|
||||
export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
|
630
node_modules/zod/v4/classic/schemas.d.ts
generated
vendored
Normal file
630
node_modules/zod/v4/classic/schemas.d.ts
generated
vendored
Normal file
@@ -0,0 +1,630 @@
|
||||
import * as core from "../core/index.js";
|
||||
import { util } from "../core/index.js";
|
||||
import * as parse from "./parse.js";
|
||||
export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
|
||||
addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
|
||||
}
|
||||
export interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
|
||||
def: Internals["def"];
|
||||
type: Internals["def"]["type"];
|
||||
/** @deprecated Use `.def` instead. */
|
||||
_def: Internals["def"];
|
||||
/** @deprecated Use `z.output<typeof schema>` instead. */
|
||||
_output: Internals["output"];
|
||||
/** @deprecated Use `z.input<typeof schema>` instead. */
|
||||
_input: Internals["input"];
|
||||
check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
|
||||
clone(def?: Internals["def"], params?: {
|
||||
parent: boolean;
|
||||
}): this;
|
||||
register<R extends core.$ZodRegistry>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [core.$replace<R["_meta"], this>?] : [core.$replace<R["_meta"], this>] : ["Incompatible schema"]): this;
|
||||
brand<T extends PropertyKey = PropertyKey>(value?: T): PropertyKey extends T ? this : core.$ZodBranded<this, T>;
|
||||
parse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
|
||||
safeParse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): parse.ZodSafeParseResult<core.output<this>>;
|
||||
parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
|
||||
safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
||||
spa: (data: unknown, params?: core.ParseContext<core.$ZodIssue>) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
||||
refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
|
||||
/** @deprecated Use `.check()` instead. */
|
||||
superRefine(refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>): this;
|
||||
overwrite(fn: (x: core.output<this>) => core.output<this>): this;
|
||||
optional(): ZodOptional<this>;
|
||||
nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
|
||||
nullable(): ZodNullable<this>;
|
||||
nullish(): ZodOptional<ZodNullable<this>>;
|
||||
default(def: core.output<this>): ZodDefault<this>;
|
||||
default(def: () => util.NoUndefined<core.output<this>>): ZodDefault<this>;
|
||||
prefault(def: () => core.input<this>): ZodPrefault<this>;
|
||||
prefault(def: core.input<this>): ZodPrefault<this>;
|
||||
array(): ZodArray<this>;
|
||||
or<T extends core.SomeType>(option: T): ZodUnion<[this, T]>;
|
||||
and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
|
||||
transform<NewOut>(transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
|
||||
catch(def: core.output<this>): ZodCatch<this>;
|
||||
catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
|
||||
pipe<T extends core.$ZodType<any, core.output<this>>>(target: T | core.$ZodType<any, core.output<this>>): ZodPipe<this, T>;
|
||||
readonly(): ZodReadonly<this>;
|
||||
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
|
||||
describe(description: string): this;
|
||||
description?: string;
|
||||
/** Returns the metadata associated with this instance in `z.globalRegistry` */
|
||||
meta(): core.$replace<core.GlobalMeta, this> | undefined;
|
||||
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
|
||||
meta(data: core.$replace<core.GlobalMeta, this>): this;
|
||||
/** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
|
||||
*
|
||||
* ```ts
|
||||
* const schema = z.string().optional();
|
||||
* const isOptional = schema.safeParse(undefined).success; // true
|
||||
* ```
|
||||
*/
|
||||
isOptional(): boolean;
|
||||
/**
|
||||
* @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
|
||||
*
|
||||
* ```ts
|
||||
* const schema = z.string().nullable();
|
||||
* const isNullable = schema.safeParse(null).success; // true
|
||||
* ```
|
||||
*/
|
||||
isNullable(): boolean;
|
||||
}
|
||||
export interface _ZodType<out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals> extends ZodType<any, any, Internals> {
|
||||
}
|
||||
export declare const ZodType: core.$constructor<ZodType>;
|
||||
export interface _ZodString<T extends core.$ZodStringInternals<unknown> = core.$ZodStringInternals<unknown>> extends _ZodType<T> {
|
||||
format: string | null;
|
||||
minLength: number | null;
|
||||
maxLength: number | null;
|
||||
regex(regex: RegExp, params?: string | core.$ZodCheckRegexParams): this;
|
||||
includes(value: string, params?: core.$ZodCheckIncludesParams): this;
|
||||
startsWith(value: string, params?: string | core.$ZodCheckStartsWithParams): this;
|
||||
endsWith(value: string, params?: string | core.$ZodCheckEndsWithParams): this;
|
||||
min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
|
||||
length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
|
||||
nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
lowercase(params?: string | core.$ZodCheckLowerCaseParams): this;
|
||||
uppercase(params?: string | core.$ZodCheckUpperCaseParams): this;
|
||||
trim(): this;
|
||||
normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
|
||||
toLowerCase(): this;
|
||||
toUpperCase(): this;
|
||||
}
|
||||
/** @internal */
|
||||
export declare const _ZodString: core.$constructor<_ZodString>;
|
||||
export interface ZodString extends _ZodString<core.$ZodStringInternals<string>> {
|
||||
/** @deprecated Use `z.email()` instead. */
|
||||
email(params?: string | core.$ZodCheckEmailParams): this;
|
||||
/** @deprecated Use `z.url()` instead. */
|
||||
url(params?: string | core.$ZodCheckURLParams): this;
|
||||
/** @deprecated Use `z.jwt()` instead. */
|
||||
jwt(params?: string | core.$ZodCheckJWTParams): this;
|
||||
/** @deprecated Use `z.emoji()` instead. */
|
||||
emoji(params?: string | core.$ZodCheckEmojiParams): this;
|
||||
/** @deprecated Use `z.guid()` instead. */
|
||||
guid(params?: string | core.$ZodCheckGUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuid(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuidv4(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuidv6(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.uuid()` instead. */
|
||||
uuidv7(params?: string | core.$ZodCheckUUIDParams): this;
|
||||
/** @deprecated Use `z.nanoid()` instead. */
|
||||
nanoid(params?: string | core.$ZodCheckNanoIDParams): this;
|
||||
/** @deprecated Use `z.guid()` instead. */
|
||||
guid(params?: string | core.$ZodCheckGUIDParams): this;
|
||||
/** @deprecated Use `z.cuid()` instead. */
|
||||
cuid(params?: string | core.$ZodCheckCUIDParams): this;
|
||||
/** @deprecated Use `z.cuid2()` instead. */
|
||||
cuid2(params?: string | core.$ZodCheckCUID2Params): this;
|
||||
/** @deprecated Use `z.ulid()` instead. */
|
||||
ulid(params?: string | core.$ZodCheckULIDParams): this;
|
||||
/** @deprecated Use `z.base64()` instead. */
|
||||
base64(params?: string | core.$ZodCheckBase64Params): this;
|
||||
/** @deprecated Use `z.base64url()` instead. */
|
||||
base64url(params?: string | core.$ZodCheckBase64URLParams): this;
|
||||
/** @deprecated Use `z.xid()` instead. */
|
||||
xid(params?: string | core.$ZodCheckXIDParams): this;
|
||||
/** @deprecated Use `z.ksuid()` instead. */
|
||||
ksuid(params?: string | core.$ZodCheckKSUIDParams): this;
|
||||
/** @deprecated Use `z.ipv4()` instead. */
|
||||
ipv4(params?: string | core.$ZodCheckIPv4Params): this;
|
||||
/** @deprecated Use `z.ipv6()` instead. */
|
||||
ipv6(params?: string | core.$ZodCheckIPv6Params): this;
|
||||
/** @deprecated Use `z.cidrv4()` instead. */
|
||||
cidrv4(params?: string | core.$ZodCheckCIDRv4Params): this;
|
||||
/** @deprecated Use `z.cidrv6()` instead. */
|
||||
cidrv6(params?: string | core.$ZodCheckCIDRv6Params): this;
|
||||
/** @deprecated Use `z.e164()` instead. */
|
||||
e164(params?: string | core.$ZodCheckE164Params): this;
|
||||
/** @deprecated Use `z.iso.datetime()` instead. */
|
||||
datetime(params?: string | core.$ZodCheckISODateTimeParams): this;
|
||||
/** @deprecated Use `z.iso.date()` instead. */
|
||||
date(params?: string | core.$ZodCheckISODateParams): this;
|
||||
/** @deprecated Use `z.iso.time()` instead. */
|
||||
time(params?: string | core.$ZodCheckISOTimeParams): this;
|
||||
/** @deprecated Use `z.iso.duration()` instead. */
|
||||
duration(params?: string | core.$ZodCheckISODurationParams): this;
|
||||
}
|
||||
export declare const ZodString: core.$constructor<ZodString>;
|
||||
export declare function string(params?: string | core.$ZodStringParams): ZodString;
|
||||
export declare function string<T extends string>(params?: string | core.$ZodStringParams): core.$ZodType<T, T>;
|
||||
export interface ZodStringFormat<Format extends string = string> extends _ZodString<core.$ZodStringFormatInternals<Format>> {
|
||||
}
|
||||
export declare const ZodStringFormat: core.$constructor<ZodStringFormat>;
|
||||
export interface ZodEmail extends ZodStringFormat<"email"> {
|
||||
_zod: core.$ZodEmailInternals;
|
||||
}
|
||||
export declare const ZodEmail: core.$constructor<ZodEmail>;
|
||||
export declare function email(params?: string | core.$ZodEmailParams): ZodEmail;
|
||||
export interface ZodGUID extends ZodStringFormat<"guid"> {
|
||||
_zod: core.$ZodGUIDInternals;
|
||||
}
|
||||
export declare const ZodGUID: core.$constructor<ZodGUID>;
|
||||
export declare function guid(params?: string | core.$ZodGUIDParams): ZodGUID;
|
||||
export interface ZodUUID extends ZodStringFormat<"uuid"> {
|
||||
_zod: core.$ZodUUIDInternals;
|
||||
}
|
||||
export declare const ZodUUID: core.$constructor<ZodUUID>;
|
||||
export declare function uuid(params?: string | core.$ZodUUIDParams): ZodUUID;
|
||||
export declare function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodUUID;
|
||||
export declare function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodUUID;
|
||||
export declare function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodUUID;
|
||||
export interface ZodURL extends ZodStringFormat<"url"> {
|
||||
_zod: core.$ZodURLInternals;
|
||||
}
|
||||
export declare const ZodURL: core.$constructor<ZodURL>;
|
||||
export declare function url(params?: string | core.$ZodURLParams): ZodURL;
|
||||
export interface ZodEmoji extends ZodStringFormat<"emoji"> {
|
||||
_zod: core.$ZodEmojiInternals;
|
||||
}
|
||||
export declare const ZodEmoji: core.$constructor<ZodEmoji>;
|
||||
export declare function emoji(params?: string | core.$ZodEmojiParams): ZodEmoji;
|
||||
export interface ZodNanoID extends ZodStringFormat<"nanoid"> {
|
||||
_zod: core.$ZodNanoIDInternals;
|
||||
}
|
||||
export declare const ZodNanoID: core.$constructor<ZodNanoID>;
|
||||
export declare function nanoid(params?: string | core.$ZodNanoIDParams): ZodNanoID;
|
||||
export interface ZodCUID extends ZodStringFormat<"cuid"> {
|
||||
_zod: core.$ZodCUIDInternals;
|
||||
}
|
||||
export declare const ZodCUID: core.$constructor<ZodCUID>;
|
||||
export declare function cuid(params?: string | core.$ZodCUIDParams): ZodCUID;
|
||||
export interface ZodCUID2 extends ZodStringFormat<"cuid2"> {
|
||||
_zod: core.$ZodCUID2Internals;
|
||||
}
|
||||
export declare const ZodCUID2: core.$constructor<ZodCUID2>;
|
||||
export declare function cuid2(params?: string | core.$ZodCUID2Params): ZodCUID2;
|
||||
export interface ZodULID extends ZodStringFormat<"ulid"> {
|
||||
_zod: core.$ZodULIDInternals;
|
||||
}
|
||||
export declare const ZodULID: core.$constructor<ZodULID>;
|
||||
export declare function ulid(params?: string | core.$ZodULIDParams): ZodULID;
|
||||
export interface ZodXID extends ZodStringFormat<"xid"> {
|
||||
_zod: core.$ZodXIDInternals;
|
||||
}
|
||||
export declare const ZodXID: core.$constructor<ZodXID>;
|
||||
export declare function xid(params?: string | core.$ZodXIDParams): ZodXID;
|
||||
export interface ZodKSUID extends ZodStringFormat<"ksuid"> {
|
||||
_zod: core.$ZodKSUIDInternals;
|
||||
}
|
||||
export declare const ZodKSUID: core.$constructor<ZodKSUID>;
|
||||
export declare function ksuid(params?: string | core.$ZodKSUIDParams): ZodKSUID;
|
||||
export interface ZodIPv4 extends ZodStringFormat<"ipv4"> {
|
||||
_zod: core.$ZodIPv4Internals;
|
||||
}
|
||||
export declare const ZodIPv4: core.$constructor<ZodIPv4>;
|
||||
export declare function ipv4(params?: string | core.$ZodIPv4Params): ZodIPv4;
|
||||
export interface ZodIPv6 extends ZodStringFormat<"ipv6"> {
|
||||
_zod: core.$ZodIPv6Internals;
|
||||
}
|
||||
export declare const ZodIPv6: core.$constructor<ZodIPv6>;
|
||||
export declare function ipv6(params?: string | core.$ZodIPv6Params): ZodIPv6;
|
||||
export interface ZodCIDRv4 extends ZodStringFormat<"cidrv4"> {
|
||||
_zod: core.$ZodCIDRv4Internals;
|
||||
}
|
||||
export declare const ZodCIDRv4: core.$constructor<ZodCIDRv4>;
|
||||
export declare function cidrv4(params?: string | core.$ZodCIDRv4Params): ZodCIDRv4;
|
||||
export interface ZodCIDRv6 extends ZodStringFormat<"cidrv6"> {
|
||||
_zod: core.$ZodCIDRv6Internals;
|
||||
}
|
||||
export declare const ZodCIDRv6: core.$constructor<ZodCIDRv6>;
|
||||
export declare function cidrv6(params?: string | core.$ZodCIDRv6Params): ZodCIDRv6;
|
||||
export interface ZodBase64 extends ZodStringFormat<"base64"> {
|
||||
_zod: core.$ZodBase64Internals;
|
||||
}
|
||||
export declare const ZodBase64: core.$constructor<ZodBase64>;
|
||||
export declare function base64(params?: string | core.$ZodBase64Params): ZodBase64;
|
||||
export interface ZodBase64URL extends ZodStringFormat<"base64url"> {
|
||||
_zod: core.$ZodBase64URLInternals;
|
||||
}
|
||||
export declare const ZodBase64URL: core.$constructor<ZodBase64URL>;
|
||||
export declare function base64url(params?: string | core.$ZodBase64URLParams): ZodBase64URL;
|
||||
export interface ZodE164 extends ZodStringFormat<"e164"> {
|
||||
_zod: core.$ZodE164Internals;
|
||||
}
|
||||
export declare const ZodE164: core.$constructor<ZodE164>;
|
||||
export declare function e164(params?: string | core.$ZodE164Params): ZodE164;
|
||||
export interface ZodJWT extends ZodStringFormat<"jwt"> {
|
||||
_zod: core.$ZodJWTInternals;
|
||||
}
|
||||
export declare const ZodJWT: core.$constructor<ZodJWT>;
|
||||
export declare function jwt(params?: string | core.$ZodJWTParams): ZodJWT;
|
||||
export interface ZodCustomStringFormat<Format extends string = string> extends ZodStringFormat<Format>, core.$ZodCustomStringFormat<Format> {
|
||||
_zod: core.$ZodCustomStringFormatInternals<Format>;
|
||||
}
|
||||
export declare const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat>;
|
||||
export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<Format>;
|
||||
export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals> extends _ZodType<Internals> {
|
||||
gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
/** Identical to .min() */
|
||||
gte(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
min(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
lt(value: number, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
/** Identical to .max() */
|
||||
lte(value: number, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
max(value: number, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
/** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
|
||||
int(params?: string | core.$ZodCheckNumberFormatParams): this;
|
||||
/** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
|
||||
safe(params?: string | core.$ZodCheckNumberFormatParams): this;
|
||||
positive(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
negative(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
multipleOf(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
|
||||
/** @deprecated Use `.multipleOf()` instead. */
|
||||
step(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
|
||||
/** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
|
||||
finite(params?: unknown): this;
|
||||
minValue: number | null;
|
||||
maxValue: number | null;
|
||||
/** @deprecated Check the `format` property instead. */
|
||||
isInt: boolean;
|
||||
/** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
|
||||
isFinite: boolean;
|
||||
format: string | null;
|
||||
}
|
||||
export interface ZodNumber extends _ZodNumber<core.$ZodNumberInternals<number>> {
|
||||
}
|
||||
export declare const ZodNumber: core.$constructor<ZodNumber>;
|
||||
export declare function number(params?: string | core.$ZodNumberParams): ZodNumber;
|
||||
export interface ZodNumberFormat extends ZodNumber {
|
||||
_zod: core.$ZodNumberFormatInternals;
|
||||
}
|
||||
export declare const ZodNumberFormat: core.$constructor<ZodNumberFormat>;
|
||||
export interface ZodInt extends ZodNumberFormat {
|
||||
}
|
||||
export declare function int(params?: string | core.$ZodCheckNumberFormatParams): ZodInt;
|
||||
export interface ZodFloat32 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat32;
|
||||
export interface ZodFloat64 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat64;
|
||||
export interface ZodInt32 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodInt32;
|
||||
export interface ZodUInt32 extends ZodNumberFormat {
|
||||
}
|
||||
export declare function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodUInt32;
|
||||
export interface _ZodBoolean<T extends core.$ZodBooleanInternals = core.$ZodBooleanInternals> extends _ZodType<T> {
|
||||
}
|
||||
export interface ZodBoolean extends _ZodBoolean<core.$ZodBooleanInternals<boolean>> {
|
||||
}
|
||||
export declare const ZodBoolean: core.$constructor<ZodBoolean>;
|
||||
export declare function boolean(params?: string | core.$ZodBooleanParams): ZodBoolean;
|
||||
export interface _ZodBigInt<T extends core.$ZodBigIntInternals = core.$ZodBigIntInternals> extends _ZodType<T> {
|
||||
gte(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
/** Alias of `.gte()` */
|
||||
min(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
gt(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
/** Alias of `.lte()` */
|
||||
lte(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
max(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
lt(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
positive(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
negative(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
|
||||
nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
multipleOf(value: bigint, params?: string | core.$ZodCheckMultipleOfParams): this;
|
||||
minValue: bigint | null;
|
||||
maxValue: bigint | null;
|
||||
format: string | null;
|
||||
}
|
||||
export interface ZodBigInt extends _ZodBigInt<core.$ZodBigIntInternals<bigint>> {
|
||||
}
|
||||
export declare const ZodBigInt: core.$constructor<ZodBigInt>;
|
||||
export declare function bigint(params?: string | core.$ZodBigIntParams): ZodBigInt;
|
||||
export interface ZodBigIntFormat extends ZodBigInt {
|
||||
_zod: core.$ZodBigIntFormatInternals;
|
||||
}
|
||||
export declare const ZodBigIntFormat: core.$constructor<ZodBigIntFormat>;
|
||||
export declare function int64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat;
|
||||
export declare function uint64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat;
|
||||
export interface ZodSymbol extends _ZodType<core.$ZodSymbolInternals> {
|
||||
}
|
||||
export declare const ZodSymbol: core.$constructor<ZodSymbol>;
|
||||
export declare function symbol(params?: string | core.$ZodSymbolParams): ZodSymbol;
|
||||
export interface ZodUndefined extends _ZodType<core.$ZodUndefinedInternals> {
|
||||
}
|
||||
export declare const ZodUndefined: core.$constructor<ZodUndefined>;
|
||||
declare function _undefined(params?: string | core.$ZodUndefinedParams): ZodUndefined;
|
||||
export { _undefined as undefined };
|
||||
export interface ZodNull extends _ZodType<core.$ZodNullInternals> {
|
||||
}
|
||||
export declare const ZodNull: core.$constructor<ZodNull>;
|
||||
declare function _null(params?: string | core.$ZodNullParams): ZodNull;
|
||||
export { _null as null };
|
||||
export interface ZodAny extends _ZodType<core.$ZodAnyInternals> {
|
||||
}
|
||||
export declare const ZodAny: core.$constructor<ZodAny>;
|
||||
export declare function any(): ZodAny;
|
||||
export interface ZodUnknown extends _ZodType<core.$ZodUnknownInternals> {
|
||||
}
|
||||
export declare const ZodUnknown: core.$constructor<ZodUnknown>;
|
||||
export declare function unknown(): ZodUnknown;
|
||||
export interface ZodNever extends _ZodType<core.$ZodNeverInternals> {
|
||||
}
|
||||
export declare const ZodNever: core.$constructor<ZodNever>;
|
||||
export declare function never(params?: string | core.$ZodNeverParams): ZodNever;
|
||||
export interface ZodVoid extends _ZodType<core.$ZodVoidInternals> {
|
||||
}
|
||||
export declare const ZodVoid: core.$constructor<ZodVoid>;
|
||||
declare function _void(params?: string | core.$ZodVoidParams): ZodVoid;
|
||||
export { _void as void };
|
||||
export interface _ZodDate<T extends core.$ZodDateInternals = core.$ZodDateInternals> extends _ZodType<T> {
|
||||
min(value: number | Date, params?: string | core.$ZodCheckGreaterThanParams): this;
|
||||
max(value: number | Date, params?: string | core.$ZodCheckLessThanParams): this;
|
||||
/** @deprecated Not recommended. */
|
||||
minDate: Date | null;
|
||||
/** @deprecated Not recommended. */
|
||||
maxDate: Date | null;
|
||||
}
|
||||
export interface ZodDate extends _ZodDate<core.$ZodDateInternals<Date>> {
|
||||
}
|
||||
export declare const ZodDate: core.$constructor<ZodDate>;
|
||||
export declare function date(params?: string | core.$ZodDateParams): ZodDate;
|
||||
export interface ZodArray<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodArrayInternals<T>>, core.$ZodArray<T> {
|
||||
element: T;
|
||||
min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
|
||||
max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
|
||||
length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodArray: core.$constructor<ZodArray>;
|
||||
export declare function array<T extends core.SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T>;
|
||||
export declare function keyof<T extends ZodObject>(schema: T): ZodLiteral<Exclude<keyof T["_zod"]["output"], symbol>>;
|
||||
export interface ZodObject<
|
||||
/** @ts-ignore Cast variance */
|
||||
out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.$ZodObjectConfig = core.$strip> extends _ZodType<core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
|
||||
shape: Shape;
|
||||
keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
|
||||
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
||||
catchall<T extends core.SomeType>(schema: T): ZodObject<Shape, core.$catchall<T>>;
|
||||
/** @deprecated Use `z.looseObject()` or `.loose()` instead. */
|
||||
passthrough(): ZodObject<Shape, core.$loose>;
|
||||
/** Consider `z.looseObject(A.shape)` instead */
|
||||
loose(): ZodObject<Shape, core.$loose>;
|
||||
/** Consider `z.strictObject(A.shape)` instead */
|
||||
strict(): ZodObject<Shape, core.$strict>;
|
||||
/** This is the default behavior. This method call is likely unnecessary. */
|
||||
strip(): ZodObject<Shape, core.$strip>;
|
||||
extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
|
||||
/**
|
||||
* @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
|
||||
*
|
||||
* ```ts
|
||||
* const A = z.object({ a: z.string() });
|
||||
* const B = z.object({ b: z.number() });
|
||||
*
|
||||
* const C = z.object({
|
||||
* ...A.shape,
|
||||
* ...B.shape
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
|
||||
pick<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
||||
omit<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<util.Flatten<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
|
||||
partial(): ZodObject<{
|
||||
[k in keyof Shape]: ZodOptional<Shape[k]>;
|
||||
}, Config>;
|
||||
partial<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<{
|
||||
[k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k];
|
||||
}, Config>;
|
||||
required(): ZodObject<{
|
||||
[k in keyof Shape]: ZodNonOptional<Shape[k]>;
|
||||
}, Config>;
|
||||
required<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<{
|
||||
[k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k];
|
||||
}, Config>;
|
||||
}
|
||||
export declare const ZodObject: core.$constructor<ZodObject>;
|
||||
export declare function object<T extends core.$ZodLooseShape = Partial<Record<never, core.SomeType>>>(shape?: T, params?: string | core.$ZodObjectParams): ZodObject<util.Writeable<T>, core.$strip>;
|
||||
export declare function strictObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodObject<T, core.$strict>;
|
||||
export declare function looseObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodObject<T, core.$loose>;
|
||||
export interface ZodUnion<T extends readonly core.SomeType[] = readonly core.$ZodType[]> extends _ZodType<core.$ZodUnionInternals<T>>, core.$ZodUnion<T> {
|
||||
options: T;
|
||||
}
|
||||
export declare const ZodUnion: core.$constructor<ZodUnion>;
|
||||
export declare function union<const T extends readonly core.SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodUnion<T>;
|
||||
export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[]> extends ZodUnion<Options>, core.$ZodDiscriminatedUnion<Options> {
|
||||
_zod: core.$ZodDiscriminatedUnionInternals<Options>;
|
||||
}
|
||||
export declare const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion>;
|
||||
export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types>;
|
||||
export interface ZodIntersection<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodIntersectionInternals<A, B>>, core.$ZodIntersection<A, B> {
|
||||
}
|
||||
export declare const ZodIntersection: core.$constructor<ZodIntersection>;
|
||||
export declare function intersection<T extends core.SomeType, U extends core.SomeType>(left: T, right: U): ZodIntersection<T, U>;
|
||||
export interface ZodTuple<T extends util.TupleItems = readonly core.$ZodType[], Rest extends core.SomeType | null = core.$ZodType | null> extends _ZodType<core.$ZodTupleInternals<T, Rest>>, core.$ZodTuple<T, Rest> {
|
||||
rest<Rest extends core.SomeType = core.$ZodType>(rest: Rest): ZodTuple<T, Rest>;
|
||||
}
|
||||
export declare const ZodTuple: core.$constructor<ZodTuple>;
|
||||
export declare function tuple<T extends readonly [core.SomeType, ...core.SomeType[]]>(items: T, params?: string | core.$ZodTupleParams): ZodTuple<T, null>;
|
||||
export declare function tuple<T extends readonly [core.SomeType, ...core.SomeType[]], Rest extends core.SomeType>(items: T, rest: Rest, params?: string | core.$ZodTupleParams): ZodTuple<T, Rest>;
|
||||
export declare function tuple(items: [], params?: string | core.$ZodTupleParams): ZodTuple<[], null>;
|
||||
export interface ZodRecord<Key extends core.$ZodRecordKey = core.$ZodRecordKey, Value extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodRecordInternals<Key, Value>>, core.$ZodRecord<Key, Value> {
|
||||
keyType: Key;
|
||||
valueType: Value;
|
||||
}
|
||||
export declare const ZodRecord: core.$constructor<ZodRecord>;
|
||||
export declare function record<Key extends core.$ZodRecordKey, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodRecord<Key, Value>;
|
||||
export declare function partialRecord<Key extends core.$ZodRecordKey, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodRecord<Key & core.$partial, Value>;
|
||||
export interface ZodMap<Key extends core.SomeType = core.$ZodType, Value extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodMapInternals<Key, Value>>, core.$ZodMap<Key, Value> {
|
||||
keyType: Key;
|
||||
valueType: Value;
|
||||
}
|
||||
export declare const ZodMap: core.$constructor<ZodMap>;
|
||||
export declare function map<Key extends core.SomeType, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodMapParams): ZodMap<Key, Value>;
|
||||
export interface ZodSet<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodSetInternals<T>>, core.$ZodSet<T> {
|
||||
min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;
|
||||
/** */
|
||||
nonempty(params?: string | core.$ZodCheckMinSizeParams): this;
|
||||
max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;
|
||||
size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
|
||||
}
|
||||
export declare const ZodSet: core.$constructor<ZodSet>;
|
||||
export declare function set<Value extends core.SomeType>(valueType: Value, params?: string | core.$ZodSetParams): ZodSet<Value>;
|
||||
export interface ZodEnum<
|
||||
/** @ts-ignore Cast variance */
|
||||
out T extends util.EnumLike = util.EnumLike> extends _ZodType<core.$ZodEnumInternals<T>>, core.$ZodEnum<T> {
|
||||
enum: T;
|
||||
options: Array<T[keyof T]>;
|
||||
extract<const U extends readonly (keyof T)[]>(values: U, params?: string | core.$ZodEnumParams): ZodEnum<util.Flatten<Pick<T, U[number]>>>;
|
||||
exclude<const U extends readonly (keyof T)[]>(values: U, params?: string | core.$ZodEnumParams): ZodEnum<util.Flatten<Omit<T, U[number]>>>;
|
||||
}
|
||||
export declare const ZodEnum: core.$constructor<ZodEnum>;
|
||||
declare function _enum<const T extends readonly string[]>(values: T, params?: string | core.$ZodEnumParams): ZodEnum<util.ToEnum<T[number]>>;
|
||||
declare function _enum<const T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
|
||||
export { _enum as enum };
|
||||
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
|
||||
*
|
||||
* ```ts
|
||||
* enum Colors { red, green, blue }
|
||||
* z.enum(Colors);
|
||||
* ```
|
||||
*/
|
||||
export declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
|
||||
export interface ZodLiteral<T extends util.Literal = util.Literal> extends _ZodType<core.$ZodLiteralInternals<T>>, core.$ZodLiteral<T> {
|
||||
values: Set<T>;
|
||||
/** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
|
||||
value: T;
|
||||
}
|
||||
export declare const ZodLiteral: core.$constructor<ZodLiteral>;
|
||||
export declare function literal<const T extends ReadonlyArray<util.Literal>>(value: T, params?: string | core.$ZodLiteralParams): ZodLiteral<T[number]>;
|
||||
export declare function literal<const T extends util.Literal>(value: T, params?: string | core.$ZodLiteralParams): ZodLiteral<T>;
|
||||
export interface ZodFile extends _ZodType<core.$ZodFileInternals>, core.$ZodFile {
|
||||
min(size: number, params?: string | core.$ZodCheckMinSizeParams): this;
|
||||
max(size: number, params?: string | core.$ZodCheckMaxSizeParams): this;
|
||||
mime(types: util.MimeTypes | Array<util.MimeTypes>, params?: string | core.$ZodCheckMimeTypeParams): this;
|
||||
}
|
||||
export declare const ZodFile: core.$constructor<ZodFile>;
|
||||
export declare function file(params?: string | core.$ZodFileParams): ZodFile;
|
||||
export interface ZodTransform<O = unknown, I = unknown> extends _ZodType<core.$ZodTransformInternals<O, I>>, core.$ZodTransform<O, I> {
|
||||
}
|
||||
export declare const ZodTransform: core.$constructor<ZodTransform>;
|
||||
export declare function transform<I = unknown, O = I>(fn: (input: I, ctx: core.ParsePayload) => O): ZodTransform<Awaited<O>, I>;
|
||||
export interface ZodOptional<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodOptionalInternals<T>>, core.$ZodOptional<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodOptional: core.$constructor<ZodOptional>;
|
||||
export declare function optional<T extends core.SomeType>(innerType: T): ZodOptional<T>;
|
||||
export interface ZodNullable<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodNullableInternals<T>>, core.$ZodNullable<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodNullable: core.$constructor<ZodNullable>;
|
||||
export declare function nullable<T extends core.SomeType>(innerType: T): ZodNullable<T>;
|
||||
export declare function nullish<T extends core.SomeType>(innerType: T): ZodOptional<ZodNullable<T>>;
|
||||
export interface ZodDefault<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodDefaultInternals<T>>, core.$ZodDefault<T> {
|
||||
unwrap(): T;
|
||||
/** @deprecated Use `.unwrap()` instead. */
|
||||
removeDefault(): T;
|
||||
}
|
||||
export declare const ZodDefault: core.$constructor<ZodDefault>;
|
||||
export declare function _default<T extends core.SomeType>(innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): ZodDefault<T>;
|
||||
export interface ZodPrefault<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPrefaultInternals<T>>, core.$ZodPrefault<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodPrefault: core.$constructor<ZodPrefault>;
|
||||
export declare function prefault<T extends core.SomeType>(innerType: T, defaultValue: core.input<T> | (() => core.input<T>)): ZodPrefault<T>;
|
||||
export interface ZodNonOptional<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodNonOptionalInternals<T>>, core.$ZodNonOptional<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodNonOptional: core.$constructor<ZodNonOptional>;
|
||||
export declare function nonoptional<T extends core.SomeType>(innerType: T, params?: string | core.$ZodNonOptionalParams): ZodNonOptional<T>;
|
||||
export interface ZodSuccess<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodSuccessInternals<T>>, core.$ZodSuccess<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodSuccess: core.$constructor<ZodSuccess>;
|
||||
export declare function success<T extends core.SomeType>(innerType: T): ZodSuccess<T>;
|
||||
export interface ZodCatch<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodCatchInternals<T>>, core.$ZodCatch<T> {
|
||||
unwrap(): T;
|
||||
/** @deprecated Use `.unwrap()` instead. */
|
||||
removeCatch(): T;
|
||||
}
|
||||
export declare const ZodCatch: core.$constructor<ZodCatch>;
|
||||
declare function _catch<T extends core.SomeType>(innerType: T, catchValue: core.output<T> | ((ctx: core.$ZodCatchCtx) => core.output<T>)): ZodCatch<T>;
|
||||
export { _catch as catch };
|
||||
export interface ZodNaN extends _ZodType<core.$ZodNaNInternals>, core.$ZodNaN {
|
||||
}
|
||||
export declare const ZodNaN: core.$constructor<ZodNaN>;
|
||||
export declare function nan(params?: string | core.$ZodNaNParams): ZodNaN;
|
||||
export interface ZodPipe<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPipeInternals<A, B>>, core.$ZodPipe<A, B> {
|
||||
in: A;
|
||||
out: B;
|
||||
}
|
||||
export declare const ZodPipe: core.$constructor<ZodPipe>;
|
||||
export declare function pipe<const A extends core.SomeType, B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>>(in_: A, out: B | core.$ZodType<unknown, core.output<A>>): ZodPipe<A, B>;
|
||||
export interface ZodReadonly<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodReadonlyInternals<T>>, core.$ZodReadonly<T> {
|
||||
}
|
||||
export declare const ZodReadonly: core.$constructor<ZodReadonly>;
|
||||
export declare function readonly<T extends core.SomeType>(innerType: T): ZodReadonly<T>;
|
||||
export interface ZodTemplateLiteral<Template extends string = string> extends _ZodType<core.$ZodTemplateLiteralInternals<Template>>, core.$ZodTemplateLiteral<Template> {
|
||||
}
|
||||
export declare const ZodTemplateLiteral: core.$constructor<ZodTemplateLiteral>;
|
||||
export declare function templateLiteral<const Parts extends core.$ZodTemplateLiteralPart[]>(parts: Parts, params?: string | core.$ZodTemplateLiteralParams): ZodTemplateLiteral<core.$PartsToTemplateLiteral<Parts>>;
|
||||
export interface ZodLazy<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodLazyInternals<T>>, core.$ZodLazy<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodLazy: core.$constructor<ZodLazy>;
|
||||
export declare function lazy<T extends core.SomeType>(getter: () => T): ZodLazy<T>;
|
||||
export interface ZodPromise<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodPromiseInternals<T>>, core.$ZodPromise<T> {
|
||||
unwrap(): T;
|
||||
}
|
||||
export declare const ZodPromise: core.$constructor<ZodPromise>;
|
||||
export declare function promise<T extends core.SomeType>(innerType: T): ZodPromise<T>;
|
||||
export interface ZodCustom<O = unknown, I = unknown> extends _ZodType<core.$ZodCustomInternals<O, I>>, core.$ZodCustom<O, I> {
|
||||
}
|
||||
export declare const ZodCustom: core.$constructor<ZodCustom>;
|
||||
export declare function check<O = unknown>(fn: core.CheckFn<O>): core.$ZodCheck<O>;
|
||||
export declare function custom<O>(fn?: (data: unknown) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodCustom<O, O>;
|
||||
export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
|
||||
export declare function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
|
||||
type ZodInstanceOfParams = core.Params<ZodCustom, core.$ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
|
||||
declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
|
||||
export { _instanceof as instanceof };
|
||||
export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodPipe<ZodPipe<ZodString, ZodTransform<boolean, string>>, ZodBoolean>;
|
||||
type _ZodJSONSchema = ZodUnion<[
|
||||
ZodString,
|
||||
ZodNumber,
|
||||
ZodBoolean,
|
||||
ZodNull,
|
||||
ZodArray<ZodJSONSchema>,
|
||||
ZodRecord<ZodString, ZodJSONSchema>
|
||||
]>;
|
||||
type _ZodJSONSchemaInternals = _ZodJSONSchema["_zod"];
|
||||
export interface ZodJSONSchemaInternals extends _ZodJSONSchemaInternals {
|
||||
output: util.JSONType;
|
||||
input: util.JSONType;
|
||||
}
|
||||
export interface ZodJSONSchema extends _ZodJSONSchema {
|
||||
_zod: ZodJSONSchemaInternals;
|
||||
}
|
||||
export declare function json(params?: string | core.$ZodCustomParams): ZodJSONSchema;
|
||||
export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
|
1006
node_modules/zod/v4/classic/schemas.js
generated
vendored
Normal file
1006
node_modules/zod/v4/classic/schemas.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user