zod 3.25.12-alpha.0 → 3.25.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/package.json +16 -17
  2. package/dist/types/index.d.ts +0 -3
  3. package/dist/types/index.js +0 -3
  4. package/dist/types/v3/ZodError.d.ts +0 -164
  5. package/dist/types/v3/ZodError.js +0 -132
  6. package/dist/types/v3/benchmarks/datetime.d.ts +0 -5
  7. package/dist/types/v3/benchmarks/datetime.js +0 -49
  8. package/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
  9. package/dist/types/v3/benchmarks/discriminatedUnion.js +0 -74
  10. package/dist/types/v3/benchmarks/index.d.ts +0 -1
  11. package/dist/types/v3/benchmarks/index.js +0 -54
  12. package/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
  13. package/dist/types/v3/benchmarks/ipv4.js +0 -49
  14. package/dist/types/v3/benchmarks/object.d.ts +0 -5
  15. package/dist/types/v3/benchmarks/object.js +0 -65
  16. package/dist/types/v3/benchmarks/primitives.d.ts +0 -5
  17. package/dist/types/v3/benchmarks/primitives.js +0 -154
  18. package/dist/types/v3/benchmarks/realworld.d.ts +0 -5
  19. package/dist/types/v3/benchmarks/realworld.js +0 -51
  20. package/dist/types/v3/benchmarks/string.d.ts +0 -5
  21. package/dist/types/v3/benchmarks/string.js +0 -50
  22. package/dist/types/v3/benchmarks/union.d.ts +0 -5
  23. package/dist/types/v3/benchmarks/union.js +0 -74
  24. package/dist/types/v3/errors.d.ts +0 -5
  25. package/dist/types/v3/errors.js +0 -9
  26. package/dist/types/v3/external.d.ts +0 -6
  27. package/dist/types/v3/external.js +0 -6
  28. package/dist/types/v3/helpers/enumUtil.d.ts +0 -8
  29. package/dist/types/v3/helpers/enumUtil.js +0 -1
  30. package/dist/types/v3/helpers/errorUtil.d.ts +0 -9
  31. package/dist/types/v3/helpers/errorUtil.js +0 -6
  32. package/dist/types/v3/helpers/parseUtil.d.ts +0 -78
  33. package/dist/types/v3/helpers/parseUtil.js +0 -109
  34. package/dist/types/v3/helpers/partialUtil.d.ts +0 -8
  35. package/dist/types/v3/helpers/partialUtil.js +0 -1
  36. package/dist/types/v3/helpers/typeAliases.d.ts +0 -2
  37. package/dist/types/v3/helpers/typeAliases.js +0 -1
  38. package/dist/types/v3/helpers/util.d.ts +0 -85
  39. package/dist/types/v3/helpers/util.js +0 -133
  40. package/dist/types/v3/index.d.ts +0 -4
  41. package/dist/types/v3/index.js +0 -4
  42. package/dist/types/v3/locales/en.d.ts +0 -3
  43. package/dist/types/v3/locales/en.js +0 -107
  44. package/dist/types/v3/standard-schema.d.ts +0 -102
  45. package/dist/types/v3/standard-schema.js +0 -1
  46. package/dist/types/v3/tests/Mocker.d.ts +0 -17
  47. package/dist/types/v3/tests/Mocker.js +0 -53
  48. package/dist/types/v3/tests/language-server.source.d.ts +0 -70
  49. package/dist/types/v3/tests/language-server.source.js +0 -45
  50. package/dist/types/v3/types.d.ts +0 -1031
  51. package/dist/types/v3/types.js +0 -3713
  52. package/dist/types/v4/classic/checks.d.ts +0 -1
  53. package/dist/types/v4/classic/checks.js +0 -1
  54. package/dist/types/v4/classic/coerce.d.ts +0 -17
  55. package/dist/types/v4/classic/coerce.js +0 -17
  56. package/dist/types/v4/classic/compat.d.ts +0 -48
  57. package/dist/types/v4/classic/compat.js +0 -33
  58. package/dist/types/v4/classic/errors.d.ts +0 -30
  59. package/dist/types/v4/classic/errors.js +0 -41
  60. package/dist/types/v4/classic/external.d.ts +0 -8
  61. package/dist/types/v4/classic/external.js +0 -11
  62. package/dist/types/v4/classic/index.d.ts +0 -4
  63. package/dist/types/v4/classic/index.js +0 -4
  64. package/dist/types/v4/classic/iso.d.ts +0 -22
  65. package/dist/types/v4/classic/iso.js +0 -30
  66. package/dist/types/v4/classic/parse.d.ts +0 -23
  67. package/dist/types/v4/classic/parse.js +0 -6
  68. package/dist/types/v4/classic/schemas.d.ts +0 -653
  69. package/dist/types/v4/classic/schemas.js +0 -1012
  70. package/dist/types/v4/core/api.d.ts +0 -273
  71. package/dist/types/v4/core/api.js +0 -867
  72. package/dist/types/v4/core/checks.d.ts +0 -277
  73. package/dist/types/v4/core/checks.js +0 -535
  74. package/dist/types/v4/core/config.d.ts +0 -9
  75. package/dist/types/v4/core/config.js +0 -6
  76. package/dist/types/v4/core/core.d.ts +0 -43
  77. package/dist/types/v4/core/core.js +0 -53
  78. package/dist/types/v4/core/doc.d.ts +0 -14
  79. package/dist/types/v4/core/doc.js +0 -36
  80. package/dist/types/v4/core/errors.d.ts +0 -204
  81. package/dist/types/v4/core/errors.js +0 -206
  82. package/dist/types/v4/core/function.d.ts +0 -35
  83. package/dist/types/v4/core/function.js +0 -70
  84. package/dist/types/v4/core/index.d.ts +0 -15
  85. package/dist/types/v4/core/index.js +0 -15
  86. package/dist/types/v4/core/json-schema.d.ts +0 -100
  87. package/dist/types/v4/core/json-schema.js +0 -1
  88. package/dist/types/v4/core/parse.d.ts +0 -25
  89. package/dist/types/v4/core/parse.js +0 -57
  90. package/dist/types/v4/core/regexes.d.ts +0 -62
  91. package/dist/types/v4/core/regexes.js +0 -93
  92. package/dist/types/v4/core/registries.d.ts +0 -32
  93. package/dist/types/v4/core/registries.js +0 -42
  94. package/dist/types/v4/core/schemas.d.ts +0 -975
  95. package/dist/types/v4/core/schemas.js +0 -1740
  96. package/dist/types/v4/core/standard-schema.d.ts +0 -55
  97. package/dist/types/v4/core/standard-schema.js +0 -1
  98. package/dist/types/v4/core/to-json-schema.d.ts +0 -84
  99. package/dist/types/v4/core/to-json-schema.js +0 -665
  100. package/dist/types/v4/core/util.d.ts +0 -186
  101. package/dist/types/v4/core/util.js +0 -469
  102. package/dist/types/v4/core/versions.d.ts +0 -5
  103. package/dist/types/v4/core/versions.js +0 -5
  104. package/dist/types/v4/core/zsf.d.ts +0 -91
  105. package/dist/types/v4/core/zsf.js +0 -171
  106. package/dist/types/v4/index.d.ts +0 -3
  107. package/dist/types/v4/index.js +0 -3
  108. package/dist/types/v4/locales/ar.d.ts +0 -7
  109. package/dist/types/v4/locales/ar.js +0 -115
  110. package/dist/types/v4/locales/az.d.ts +0 -7
  111. package/dist/types/v4/locales/az.js +0 -114
  112. package/dist/types/v4/locales/be.d.ts +0 -7
  113. package/dist/types/v4/locales/be.js +0 -163
  114. package/dist/types/v4/locales/ca.d.ts +0 -7
  115. package/dist/types/v4/locales/ca.js +0 -117
  116. package/dist/types/v4/locales/cs.d.ts +0 -7
  117. package/dist/types/v4/locales/cs.js +0 -134
  118. package/dist/types/v4/locales/de.d.ts +0 -7
  119. package/dist/types/v4/locales/de.js +0 -115
  120. package/dist/types/v4/locales/en.d.ts +0 -7
  121. package/dist/types/v4/locales/en.js +0 -117
  122. package/dist/types/v4/locales/es.d.ts +0 -7
  123. package/dist/types/v4/locales/es.js +0 -116
  124. package/dist/types/v4/locales/fa.d.ts +0 -7
  125. package/dist/types/v4/locales/fa.js +0 -121
  126. package/dist/types/v4/locales/fi.d.ts +0 -7
  127. package/dist/types/v4/locales/fi.js +0 -121
  128. package/dist/types/v4/locales/fr.d.ts +0 -7
  129. package/dist/types/v4/locales/fr.js +0 -115
  130. package/dist/types/v4/locales/frCA.d.ts +0 -7
  131. package/dist/types/v4/locales/frCA.js +0 -116
  132. package/dist/types/v4/locales/he.d.ts +0 -7
  133. package/dist/types/v4/locales/he.js +0 -116
  134. package/dist/types/v4/locales/hu.d.ts +0 -7
  135. package/dist/types/v4/locales/hu.js +0 -116
  136. package/dist/types/v4/locales/id.d.ts +0 -7
  137. package/dist/types/v4/locales/id.js +0 -115
  138. package/dist/types/v4/locales/index.d.ts +0 -34
  139. package/dist/types/v4/locales/index.js +0 -34
  140. package/dist/types/v4/locales/it.d.ts +0 -7
  141. package/dist/types/v4/locales/it.js +0 -116
  142. package/dist/types/v4/locales/ja.d.ts +0 -7
  143. package/dist/types/v4/locales/ja.js +0 -114
  144. package/dist/types/v4/locales/ko.d.ts +0 -7
  145. package/dist/types/v4/locales/ko.js +0 -120
  146. package/dist/types/v4/locales/mk.d.ts +0 -7
  147. package/dist/types/v4/locales/mk.js +0 -117
  148. package/dist/types/v4/locales/ms.d.ts +0 -7
  149. package/dist/types/v4/locales/ms.js +0 -115
  150. package/dist/types/v4/locales/no.d.ts +0 -7
  151. package/dist/types/v4/locales/no.js +0 -115
  152. package/dist/types/v4/locales/ota.d.ts +0 -7
  153. package/dist/types/v4/locales/ota.js +0 -116
  154. package/dist/types/v4/locales/pl.d.ts +0 -7
  155. package/dist/types/v4/locales/pl.js +0 -116
  156. package/dist/types/v4/locales/pt.d.ts +0 -7
  157. package/dist/types/v4/locales/pt.js +0 -115
  158. package/dist/types/v4/locales/ru.d.ts +0 -7
  159. package/dist/types/v4/locales/ru.js +0 -163
  160. package/dist/types/v4/locales/sl.d.ts +0 -7
  161. package/dist/types/v4/locales/sl.js +0 -116
  162. package/dist/types/v4/locales/ta.d.ts +0 -7
  163. package/dist/types/v4/locales/ta.js +0 -116
  164. package/dist/types/v4/locales/th.d.ts +0 -7
  165. package/dist/types/v4/locales/th.js +0 -116
  166. package/dist/types/v4/locales/tr.d.ts +0 -7
  167. package/dist/types/v4/locales/tr.js +0 -114
  168. package/dist/types/v4/locales/ua.d.ts +0 -7
  169. package/dist/types/v4/locales/ua.js +0 -116
  170. package/dist/types/v4/locales/ur.d.ts +0 -7
  171. package/dist/types/v4/locales/ur.js +0 -116
  172. package/dist/types/v4/locales/vi.d.ts +0 -7
  173. package/dist/types/v4/locales/vi.js +0 -115
  174. package/dist/types/v4/locales/zh-CN.d.ts +0 -7
  175. package/dist/types/v4/locales/zh-CN.js +0 -115
  176. package/dist/types/v4/locales/zh-tw.d.ts +0 -7
  177. package/dist/types/v4/locales/zh-tw.js +0 -116
  178. package/dist/types/v4/mini/checks.d.ts +0 -1
  179. package/dist/types/v4/mini/checks.js +0 -1
  180. package/dist/types/v4/mini/coerce.d.ts +0 -7
  181. package/dist/types/v4/mini/coerce.js +0 -17
  182. package/dist/types/v4/mini/external.d.ts +0 -7
  183. package/dist/types/v4/mini/external.js +0 -7
  184. package/dist/types/v4/mini/index.d.ts +0 -3
  185. package/dist/types/v4/mini/index.js +0 -3
  186. package/dist/types/v4/mini/iso.d.ts +0 -22
  187. package/dist/types/v4/mini/iso.js +0 -30
  188. package/dist/types/v4/mini/parse.d.ts +0 -1
  189. package/dist/types/v4/mini/parse.js +0 -1
  190. package/dist/types/v4/mini/schemas.d.ts +0 -405
  191. package/dist/types/v4/mini/schemas.js +0 -738
@@ -1,405 +0,0 @@
1
- import * as core from "zod/v4/core";
2
- import { util } from "zod/v4/core";
3
- export * as coerce from "./coerce.js";
4
- export * as iso from "./iso.js";
5
- type SomeType = core.$ZodType;
6
- export interface ZodMiniType<out Output = unknown, out Input = unknown> extends core.$ZodType<Output, Input> {
7
- check(...checks: (core.CheckFn<this["_zod"]["output"]> | core.$ZodCheck<this["_zod"]["output"]>)[]): this;
8
- clone(def?: this["_zod"]["def"], params?: {
9
- parent: boolean;
10
- }): this;
11
- register<R extends core.$ZodRegistry>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [core.$ZodRegistry<R["_meta"], this>["_meta"]?] : [core.$ZodRegistry<R["_meta"], this>["_meta"]] : ["Incompatible schema"]): this;
12
- brand<T extends PropertyKey = PropertyKey>(value?: T): PropertyKey extends T ? this : this & Record<"_zod", Record<"~output", core.output<this> & core.$brand<T>>>;
13
- def: this["_zod"]["def"];
14
- parse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
15
- safeParse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): util.SafeParseResult<core.output<this>>;
16
- parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
17
- safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<util.SafeParseResult<core.output<this>>>;
18
- }
19
- export declare const ZodMiniType: core.$constructor<ZodMiniType>;
20
- export interface ZodMiniString<Input = unknown> extends ZodMiniType {
21
- _zod: core.$ZodStringInternals<Input>;
22
- }
23
- export declare const ZodMiniString: core.$constructor<ZodMiniString>;
24
- export declare function string(params?: string | core.$ZodStringParams): ZodMiniString<string>;
25
- export interface ZodMiniStringFormat<Format extends core.$ZodStringFormats = core.$ZodStringFormats> extends ZodMiniString {
26
- _zod: core.$ZodStringFormatInternals<Format>;
27
- }
28
- export declare const ZodMiniStringFormat: core.$constructor<ZodMiniStringFormat>;
29
- export interface ZodMiniEmail extends ZodMiniStringFormat<"email"> {
30
- _zod: core.$ZodEmailInternals;
31
- }
32
- export declare const ZodMiniEmail: core.$constructor<ZodMiniEmail>;
33
- export declare function email(params?: string | core.$ZodEmailParams): ZodMiniEmail;
34
- export interface ZodMiniGUID extends ZodMiniStringFormat<"guid"> {
35
- _zod: core.$ZodGUIDInternals;
36
- }
37
- export declare const ZodMiniGUID: core.$constructor<ZodMiniGUID>;
38
- export declare function guid(params?: string | core.$ZodGUIDParams): ZodMiniGUID;
39
- export interface ZodMiniUUID extends ZodMiniStringFormat<"uuid"> {
40
- _zod: core.$ZodUUIDInternals;
41
- }
42
- export declare const ZodMiniUUID: core.$constructor<ZodMiniUUID>;
43
- export declare function uuid(params?: string | core.$ZodUUIDParams): ZodMiniUUID;
44
- export declare function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodMiniUUID;
45
- export declare function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodMiniUUID;
46
- export declare function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodMiniUUID;
47
- export interface ZodMiniURL extends ZodMiniStringFormat<"url"> {
48
- _zod: core.$ZodURLInternals;
49
- }
50
- export declare const ZodMiniURL: core.$constructor<ZodMiniURL>;
51
- export declare function url(params?: string | core.$ZodURLParams): ZodMiniURL;
52
- export interface ZodMiniEmoji extends ZodMiniStringFormat<"emoji"> {
53
- _zod: core.$ZodEmojiInternals;
54
- }
55
- export declare const ZodMiniEmoji: core.$constructor<ZodMiniEmoji>;
56
- export declare function emoji(params?: string | core.$ZodEmojiParams): ZodMiniEmoji;
57
- export interface ZodMiniNanoID extends ZodMiniStringFormat<"nanoid"> {
58
- _zod: core.$ZodNanoIDInternals;
59
- }
60
- export declare const ZodMiniNanoID: core.$constructor<ZodMiniNanoID>;
61
- export declare function nanoid(params?: string | core.$ZodNanoIDParams): ZodMiniNanoID;
62
- export interface ZodMiniCUID extends ZodMiniStringFormat<"cuid"> {
63
- _zod: core.$ZodCUIDInternals;
64
- }
65
- export declare const ZodMiniCUID: core.$constructor<ZodMiniCUID>;
66
- export declare function cuid(params?: string | core.$ZodCUIDParams): ZodMiniCUID;
67
- export interface ZodMiniCUID2 extends ZodMiniStringFormat<"cuid2"> {
68
- _zod: core.$ZodCUID2Internals;
69
- }
70
- export declare const ZodMiniCUID2: core.$constructor<ZodMiniCUID2>;
71
- export declare function cuid2(params?: string | core.$ZodCUID2Params): ZodMiniCUID2;
72
- export interface ZodMiniULID extends ZodMiniStringFormat<"ulid"> {
73
- _zod: core.$ZodULIDInternals;
74
- }
75
- export declare const ZodMiniULID: core.$constructor<ZodMiniULID>;
76
- export declare function ulid(params?: string | core.$ZodULIDParams): ZodMiniULID;
77
- export interface ZodMiniXID extends ZodMiniStringFormat<"xid"> {
78
- _zod: core.$ZodXIDInternals;
79
- }
80
- export declare const ZodMiniXID: core.$constructor<ZodMiniXID>;
81
- export declare function xid(params?: string | core.$ZodXIDParams): ZodMiniXID;
82
- export interface ZodMiniKSUID extends ZodMiniStringFormat<"ksuid"> {
83
- _zod: core.$ZodKSUIDInternals;
84
- }
85
- export declare const ZodMiniKSUID: core.$constructor<ZodMiniKSUID>;
86
- export declare function ksuid(params?: string | core.$ZodKSUIDParams): ZodMiniKSUID;
87
- export interface ZodMiniIPv4 extends ZodMiniStringFormat<"ipv4"> {
88
- _zod: core.$ZodIPv4Internals;
89
- }
90
- export declare const ZodMiniIPv4: core.$constructor<ZodMiniIPv4>;
91
- export declare function ipv4(params?: string | core.$ZodIPv4Params): ZodMiniIPv4;
92
- export interface ZodMiniIPv6 extends ZodMiniStringFormat<"ipv6"> {
93
- _zod: core.$ZodIPv6Internals;
94
- }
95
- export declare const ZodMiniIPv6: core.$constructor<ZodMiniIPv6>;
96
- export declare function ipv6(params?: string | core.$ZodIPv6Params): ZodMiniIPv6;
97
- export interface ZodMiniCIDRv4 extends ZodMiniStringFormat<"cidrv4"> {
98
- _zod: core.$ZodCIDRv4Internals;
99
- }
100
- export declare const ZodMiniCIDRv4: core.$constructor<ZodMiniCIDRv4>;
101
- export declare function cidrv4(params?: string | core.$ZodCIDRv4Params): ZodMiniCIDRv4;
102
- export interface ZodMiniCIDRv6 extends ZodMiniStringFormat<"cidrv6"> {
103
- _zod: core.$ZodCIDRv6Internals;
104
- }
105
- export declare const ZodMiniCIDRv6: core.$constructor<ZodMiniCIDRv6>;
106
- export declare function cidrv6(params?: string | core.$ZodCIDRv6Params): ZodMiniCIDRv6;
107
- export interface ZodMiniBase64 extends ZodMiniStringFormat<"base64"> {
108
- _zod: core.$ZodBase64Internals;
109
- }
110
- export declare const ZodMiniBase64: core.$constructor<ZodMiniBase64>;
111
- export declare function base64(params?: string | core.$ZodBase64Params): ZodMiniBase64;
112
- export interface ZodMiniBase64URL extends ZodMiniStringFormat<"base64url"> {
113
- _zod: core.$ZodBase64URLInternals;
114
- }
115
- export declare const ZodMiniBase64URL: core.$constructor<ZodMiniBase64URL>;
116
- export declare function base64url(params?: string | core.$ZodBase64URLParams): ZodMiniBase64URL;
117
- export interface ZodMiniE164 extends ZodMiniStringFormat<"e164"> {
118
- _zod: core.$ZodE164Internals;
119
- }
120
- export declare const ZodMiniE164: core.$constructor<ZodMiniE164>;
121
- export declare function e164(params?: string | core.$ZodE164Params): ZodMiniE164;
122
- export interface ZodMiniJWT extends ZodMiniStringFormat<"jwt"> {
123
- _zod: core.$ZodJWTInternals;
124
- }
125
- export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
126
- export declare function jwt(params?: string | core.$ZodJWTParams): ZodMiniJWT;
127
- export interface ZodMiniNumber<Input = unknown> extends ZodMiniType {
128
- _zod: core.$ZodNumberInternals<Input>;
129
- }
130
- export declare const ZodMiniNumber: core.$constructor<ZodMiniNumber>;
131
- export declare function number(params?: string | core.$ZodNumberParams): ZodMiniNumber<number>;
132
- export interface ZodMiniNumberFormat extends ZodMiniNumber {
133
- _zod: core.$ZodNumberFormatInternals;
134
- }
135
- export declare const ZodMiniNumberFormat: core.$constructor<ZodMiniNumberFormat>;
136
- export declare function int(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
137
- export declare function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
138
- export declare function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
139
- export declare function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
140
- export declare function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
141
- export interface ZodMiniBoolean<T = unknown> extends ZodMiniType {
142
- _zod: core.$ZodBooleanInternals<T>;
143
- }
144
- export declare const ZodMiniBoolean: core.$constructor<ZodMiniBoolean>;
145
- export declare function boolean(params?: string | core.$ZodBooleanParams): ZodMiniBoolean<boolean>;
146
- export interface ZodMiniBigInt<T = unknown> extends ZodMiniType {
147
- _zod: core.$ZodBigIntInternals<T>;
148
- }
149
- export declare const ZodMiniBigInt: core.$constructor<ZodMiniBigInt>;
150
- export declare function bigint(params?: string | core.$ZodBigIntParams): ZodMiniBigInt<bigint>;
151
- export interface ZodMiniBigIntFormat extends ZodMiniType {
152
- _zod: core.$ZodBigIntFormatInternals;
153
- }
154
- export declare const ZodMiniBigIntFormat: core.$constructor<ZodMiniBigIntFormat>;
155
- export declare function int64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat;
156
- export declare function uint64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat;
157
- export interface ZodMiniSymbol extends ZodMiniType {
158
- _zod: core.$ZodSymbolInternals;
159
- }
160
- export declare const ZodMiniSymbol: core.$constructor<ZodMiniSymbol>;
161
- export declare function symbol(params?: string | core.$ZodSymbolParams): ZodMiniSymbol;
162
- export interface ZodMiniUndefined extends ZodMiniType {
163
- _zod: core.$ZodUndefinedInternals;
164
- }
165
- export declare const ZodMiniUndefined: core.$constructor<ZodMiniUndefined>;
166
- declare function _undefined(params?: string | core.$ZodUndefinedParams): ZodMiniUndefined;
167
- export { _undefined as undefined };
168
- export interface ZodMiniNull extends ZodMiniType {
169
- _zod: core.$ZodNullInternals;
170
- }
171
- export declare const ZodMiniNull: core.$constructor<ZodMiniNull>;
172
- declare function _null(params?: string | core.$ZodNullParams): ZodMiniNull;
173
- export { _null as null };
174
- export interface ZodMiniAny extends ZodMiniType {
175
- _zod: core.$ZodAnyInternals;
176
- }
177
- export declare const ZodMiniAny: core.$constructor<ZodMiniAny>;
178
- export declare function any(): ZodMiniAny;
179
- export interface ZodMiniUnknown extends ZodMiniType {
180
- _zod: core.$ZodUnknownInternals;
181
- }
182
- export declare const ZodMiniUnknown: core.$constructor<ZodMiniUnknown>;
183
- export declare function unknown(): ZodMiniUnknown;
184
- export interface ZodMiniNever extends ZodMiniType {
185
- _zod: core.$ZodNeverInternals;
186
- }
187
- export declare const ZodMiniNever: core.$constructor<ZodMiniNever>;
188
- export declare function never(params?: string | core.$ZodNeverParams): ZodMiniNever;
189
- export interface ZodMiniVoid extends ZodMiniType {
190
- _zod: core.$ZodVoidInternals;
191
- }
192
- export declare const ZodMiniVoid: core.$constructor<ZodMiniVoid>;
193
- declare function _void(params?: string | core.$ZodVoidParams): ZodMiniVoid;
194
- export { _void as void };
195
- export interface ZodMiniDate<T = unknown> extends ZodMiniType {
196
- _zod: core.$ZodDateInternals<T>;
197
- }
198
- export declare const ZodMiniDate: core.$constructor<ZodMiniDate>;
199
- export declare function date(params?: string | core.$ZodDateParams): ZodMiniDate<Date>;
200
- export interface ZodMiniArray<T extends SomeType = SomeType> extends ZodMiniType {
201
- _zod: core.$ZodArrayInternals<T>;
202
- }
203
- export declare const ZodMiniArray: core.$constructor<ZodMiniArray>;
204
- export declare function array<T extends SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodMiniArray<T>;
205
- export declare function keyof<T extends ZodMiniObject>(schema: T): ZodMiniLiteral<keyof T["shape"]>;
206
- export interface ZodMiniObject<out Shape extends core.$ZodShape = core.$ZodShape, out Config extends core.$ZodObjectConfig = core.$ZodObjectConfig> extends ZodMiniType {
207
- _zod: core.$ZodObjectInternals<Shape, Config>;
208
- shape: Shape;
209
- }
210
- export declare const ZodMiniObject: core.$constructor<ZodMiniObject>;
211
- export declare function object<T extends core.$ZodLooseShape = Record<never, SomeType>>(shape?: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$strip>;
212
- export declare function strictObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$strict>;
213
- export declare function looseObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$loose>;
214
- export declare function extend<T extends ZodMiniObject, U extends core.$ZodLooseShape>(schema: T, shape: U): ZodMiniObject<util.Extend<T["shape"], U>, T["_zod"]["config"]>;
215
- /** @deprecated Identical to `z.extend(A, B)` */
216
- export declare function merge<T extends ZodMiniObject, U extends ZodMiniObject>(a: T, b: U): ZodMiniObject<util.Extend<T["shape"], U["shape"]>, T["_zod"]["config"]>;
217
- export declare function pick<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Flatten<Pick<T["shape"], keyof T["shape"] & keyof M>>, T["_zod"]["config"]>;
218
- export declare function omit<T extends ZodMiniObject, const M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Flatten<Omit<T["shape"], keyof M>>, T["_zod"]["config"]>;
219
- export declare function partial<T extends ZodMiniObject>(schema: T): ZodMiniObject<{
220
- [k in keyof T["shape"]]: ZodMiniOptional<T["shape"][k]>;
221
- }, T["_zod"]["config"]>;
222
- export declare function partial<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<{
223
- [k in keyof T["shape"]]: k extends keyof M ? ZodMiniOptional<T["shape"][k]> : T["shape"][k];
224
- }, T["_zod"]["config"]>;
225
- export type RequiredInterfaceShape<Shape extends core.$ZodLooseShape, Keys extends PropertyKey = keyof Shape> = util.Identity<{
226
- [k in keyof Shape as k extends Keys ? k : never]: ZodMiniNonOptional<Shape[k]>;
227
- } & {
228
- [k in keyof Shape as k extends Keys ? never : k]: Shape[k];
229
- }>;
230
- export declare function required<T extends ZodMiniObject>(schema: T): ZodMiniObject<{
231
- [k in keyof T["shape"]]: ZodMiniNonOptional<T["shape"][k]>;
232
- }, T["_zod"]["config"]>;
233
- export declare function required<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Extend<T["shape"], {
234
- [k in keyof M & keyof T["shape"]]: ZodMiniNonOptional<T["shape"][k]>;
235
- }>, T["_zod"]["config"]>;
236
- export interface ZodMiniUnion<T extends readonly SomeType[] = readonly SomeType[]> extends ZodMiniType {
237
- _zod: core.$ZodUnionInternals<T>;
238
- }
239
- export declare const ZodMiniUnion: core.$constructor<ZodMiniUnion>;
240
- export declare function union<const T extends readonly SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodMiniUnion<T>;
241
- export interface ZodMiniDiscriminatedUnion<Options extends readonly SomeType[] = readonly SomeType[]> extends ZodMiniUnion<Options> {
242
- _zod: core.$ZodDiscriminatedUnionInternals<Options>;
243
- }
244
- export declare const ZodMiniDiscriminatedUnion: core.$constructor<ZodMiniDiscriminatedUnion>;
245
- export interface $ZodTypeDiscriminableInternals extends core.$ZodTypeInternals {
246
- disc: util.DiscriminatorMap;
247
- }
248
- export interface $ZodTypeDiscriminable extends ZodMiniType {
249
- _zod: $ZodTypeDiscriminableInternals;
250
- }
251
- export declare function discriminatedUnion<Types extends readonly [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodMiniDiscriminatedUnion<Types>;
252
- export interface ZodMiniIntersection<A extends SomeType = SomeType, B extends SomeType = SomeType> extends ZodMiniType {
253
- _zod: core.$ZodIntersectionInternals<A, B>;
254
- }
255
- export declare const ZodMiniIntersection: core.$constructor<ZodMiniIntersection>;
256
- export declare function intersection<T extends SomeType, U extends SomeType>(left: T, right: U): ZodMiniIntersection<T, U>;
257
- export interface ZodMiniTuple<T extends util.TupleItems = util.TupleItems, Rest extends SomeType | null = SomeType | null> extends ZodMiniType {
258
- _zod: core.$ZodTupleInternals<T, Rest>;
259
- }
260
- export declare const ZodMiniTuple: core.$constructor<ZodMiniTuple>;
261
- export declare function tuple<T extends readonly [SomeType, ...SomeType[]]>(items: T, params?: string | core.$ZodTupleParams): ZodMiniTuple<T, null>;
262
- export declare function tuple<T extends readonly [SomeType, ...SomeType[]], Rest extends SomeType>(items: T, rest: Rest, params?: string | core.$ZodTupleParams): ZodMiniTuple<T, Rest>;
263
- export declare function tuple(items: [], params?: string | core.$ZodTupleParams): ZodMiniTuple<[], null>;
264
- export interface ZodMiniRecord<Key extends core.$ZodRecordKey = core.$ZodRecordKey, Value extends SomeType = SomeType> extends ZodMiniType {
265
- _zod: core.$ZodRecordInternals<Key, Value>;
266
- }
267
- export declare const ZodMiniRecord: core.$constructor<ZodMiniRecord>;
268
- export declare function record<Key extends core.$ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodMiniRecord<Key, Value>;
269
- export declare function partialRecord<Key extends core.$ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodMiniRecord<ZodMiniUnion<[Key, ZodMiniNever]>, Value>;
270
- export interface ZodMiniMap<Key extends SomeType = SomeType, Value extends SomeType = SomeType> extends ZodMiniType {
271
- _zod: core.$ZodMapInternals<Key, Value>;
272
- }
273
- export declare const ZodMiniMap: core.$constructor<ZodMiniMap>;
274
- export declare function map<Key extends SomeType, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodMapParams): ZodMiniMap<Key, Value>;
275
- export interface ZodMiniSet<T extends SomeType = SomeType> extends ZodMiniType {
276
- _zod: core.$ZodSetInternals<T>;
277
- }
278
- export declare const ZodMiniSet: core.$constructor<ZodMiniSet>;
279
- export declare function set<Value extends SomeType>(valueType: Value, params?: string | core.$ZodSetParams): ZodMiniSet<Value>;
280
- export interface ZodMiniEnum<T extends util.EnumLike = util.EnumLike> extends ZodMiniType {
281
- _zod: core.$ZodEnumInternals<T>;
282
- }
283
- export declare const ZodMiniEnum: core.$constructor<ZodMiniEnum>;
284
- declare function _enum<const T extends readonly string[]>(values: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<util.ToEnum<T[number]>>;
285
- declare function _enum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<T>;
286
- export { _enum as enum };
287
- /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
288
- *
289
- * ```ts
290
- * enum Colors { red, green, blue }
291
- * z.enum(Colors);
292
- * ```
293
- */
294
- export declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<T>;
295
- export interface ZodMiniLiteral<T extends util.Primitive = util.Primitive> extends ZodMiniType {
296
- _zod: core.$ZodLiteralInternals<T>;
297
- }
298
- export declare const ZodMiniLiteral: core.$constructor<ZodMiniLiteral>;
299
- export declare function literal<const T extends Array<util.Literal>>(value: T, params?: string | core.$ZodLiteralParams): ZodMiniLiteral<T[number]>;
300
- export declare function literal<const T extends util.Literal>(value: T, params?: string | core.$ZodLiteralParams): ZodMiniLiteral<T>;
301
- export interface ZodMiniFile extends ZodMiniType {
302
- _zod: core.$ZodFileInternals;
303
- }
304
- export declare const ZodMiniFile: core.$constructor<ZodMiniFile>;
305
- export declare function file(params?: string | core.$ZodFileParams): ZodMiniFile;
306
- export interface ZodMiniTransform<O = unknown, I = unknown> extends ZodMiniType {
307
- _zod: core.$ZodTransformInternals<O, I>;
308
- }
309
- export declare const ZodMiniTransform: core.$constructor<ZodMiniTransform>;
310
- export declare function transform<I = unknown, O = I>(fn: (input: I, ctx: core.ParsePayload) => O): ZodMiniTransform<Awaited<O>, I>;
311
- export interface ZodMiniOptional<T extends SomeType = SomeType> extends ZodMiniType {
312
- _zod: core.$ZodOptionalInternals<T>;
313
- }
314
- export declare const ZodMiniOptional: core.$constructor<ZodMiniOptional>;
315
- export declare function optional<T extends SomeType>(innerType: T): ZodMiniOptional<T>;
316
- export interface ZodMiniNullable<T extends SomeType = SomeType> extends ZodMiniType {
317
- _zod: core.$ZodNullableInternals<T>;
318
- }
319
- export declare const ZodMiniNullable: core.$constructor<ZodMiniNullable>;
320
- export declare function nullable<T extends SomeType>(innerType: T): ZodMiniNullable<T>;
321
- export declare function nullish<T extends SomeType>(innerType: T): ZodMiniOptional<ZodMiniNullable<T>>;
322
- export interface ZodMiniDefault<T extends SomeType = SomeType> extends ZodMiniType {
323
- _zod: core.$ZodDefaultInternals<T>;
324
- }
325
- export declare const ZodMiniDefault: core.$constructor<ZodMiniDefault>;
326
- export declare function _default<T extends SomeType>(innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): ZodMiniDefault<T>;
327
- export interface ZodMiniPrefault<T extends SomeType = SomeType> extends ZodMiniType {
328
- _zod: core.$ZodPrefaultInternals<T>;
329
- }
330
- export declare const ZodMiniPrefault: core.$constructor<ZodMiniPrefault>;
331
- export declare function prefault<T extends SomeType>(innerType: T, defaultValue: util.NoUndefined<core.input<T>> | (() => util.NoUndefined<core.input<T>>)): ZodMiniPrefault<T>;
332
- export interface ZodMiniNonOptional<T extends SomeType = SomeType> extends ZodMiniType {
333
- _zod: core.$ZodNonOptionalInternals<T>;
334
- }
335
- export declare const ZodMiniNonOptional: core.$constructor<ZodMiniNonOptional>;
336
- export declare function nonoptional<T extends SomeType>(innerType: T, params?: string | core.$ZodNonOptionalParams): ZodMiniNonOptional<T>;
337
- export interface ZodMiniSuccess<T extends SomeType = SomeType> extends ZodMiniType {
338
- _zod: core.$ZodSuccessInternals<T>;
339
- }
340
- export declare const ZodMiniSuccess: core.$constructor<ZodMiniSuccess>;
341
- export declare function success<T extends SomeType>(innerType: T): ZodMiniSuccess<T>;
342
- export interface ZodMiniCatch<T extends SomeType = SomeType> extends ZodMiniType {
343
- _zod: core.$ZodCatchInternals<T>;
344
- }
345
- export declare const ZodMiniCatch: core.$constructor<ZodMiniCatch>;
346
- declare function _catch<T extends SomeType>(innerType: T, catchValue: core.output<T> | ((ctx: core.$ZodCatchCtx) => core.output<T>)): ZodMiniCatch<T>;
347
- export { _catch as catch };
348
- export interface ZodMiniNaN extends ZodMiniType {
349
- _zod: core.$ZodNaNInternals;
350
- }
351
- export declare const ZodMiniNaN: core.$constructor<ZodMiniNaN>;
352
- export declare function nan(params?: string | core.$ZodNaNParams): ZodMiniNaN;
353
- export interface ZodMiniPipe<A extends SomeType = SomeType, B extends SomeType = SomeType> extends ZodMiniType {
354
- _zod: core.$ZodPipeInternals<A, B>;
355
- }
356
- export declare const ZodMiniPipe: core.$constructor<ZodMiniPipe>;
357
- export declare function pipe<const A extends core.$ZodType, B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>>(in_: A, out: B | core.$ZodType<unknown, core.output<A>>, params?: string | core.$ZodPipeParams): ZodMiniPipe<A, B>;
358
- export interface ZodMiniReadonly<T extends SomeType = SomeType> extends ZodMiniType {
359
- _zod: core.$ZodReadonlyInternals<T>;
360
- }
361
- export declare const ZodMiniReadonly: core.$constructor<ZodMiniReadonly>;
362
- export declare function readonly<T extends SomeType>(innerType: T): ZodMiniReadonly<T>;
363
- export interface ZodMiniTemplateLiteral<Template extends string = string> extends ZodMiniType {
364
- _zod: core.$ZodTemplateLiteralInternals<Template>;
365
- }
366
- export declare const ZodMiniTemplateLiteral: core.$constructor<ZodMiniTemplateLiteral>;
367
- export declare function templateLiteral<const Parts extends core.$ZodTemplateLiteralPart[]>(parts: Parts, params?: string | core.$ZodTemplateLiteralParams): ZodMiniTemplateLiteral<core.$PartsToTemplateLiteral<Parts>>;
368
- export interface ZodMiniLazy<T extends SomeType = SomeType> extends ZodMiniType {
369
- _zod: core.$ZodLazyInternals<T>;
370
- }
371
- export declare const ZodMiniLazy: core.$constructor<ZodMiniLazy>;
372
- declare function _lazy<T extends SomeType>(getter: () => T): ZodMiniLazy<T>;
373
- export { _lazy as lazy };
374
- export interface ZodMiniPromise<T extends SomeType = SomeType> extends ZodMiniType {
375
- _zod: core.$ZodPromiseInternals<T>;
376
- }
377
- export declare const ZodMiniPromise: core.$constructor<ZodMiniPromise>;
378
- export declare function promise<T extends SomeType>(innerType: T): ZodMiniPromise<T>;
379
- export interface ZodMiniCustom<O = unknown, I = unknown> extends ZodMiniType {
380
- _zod: core.$ZodCustomInternals<O, I>;
381
- }
382
- export declare const ZodMiniCustom: core.$constructor<ZodMiniCustom>;
383
- export declare function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O>;
384
- export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
385
- export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodMiniCustom<O, I>;
386
- declare abstract class Class {
387
- constructor(..._args: any[]);
388
- }
389
- declare function _instanceof<T extends typeof Class>(cls: T, params?: core.$ZodCustomParams): ZodMiniCustom<InstanceType<T>>;
390
- export { _instanceof as instanceof };
391
- export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodMiniPipe<ZodMiniUnknown, ZodMiniBoolean<boolean>>;
392
- export type ZodMiniJSONSchema = ZodMiniLazy<ZodMiniUnion<[
393
- ZodMiniString<string>,
394
- ZodMiniNumber<number>,
395
- ZodMiniBoolean<boolean>,
396
- ZodMiniNull,
397
- ZodMiniArray<ZodMiniJSONSchema>,
398
- ZodMiniRecord<ZodMiniString<string>, ZodMiniJSONSchema>
399
- ]>> & {
400
- _zod: {
401
- input: util.JSONType;
402
- output: util.JSONType;
403
- };
404
- };
405
- export declare function json(): ZodMiniJSONSchema;