fullstacked 0.12.0-1273 → 0.12.0-1291

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 (163) hide show
  1. package/fullstacked_modules/@fullstacked/ai-agent/index.ts +20 -2
  2. package/fullstacked_modules/@fullstacked/ai-agent/lock.json +469 -38
  3. package/fullstacked_modules/@fullstacked/ai-agent/package.json +11 -1
  4. package/fullstacked_modules/@fullstacked/ai-agent/src/conversation.ts +72 -14
  5. package/fullstacked_modules/@fullstacked/ai-agent/src/index.ts +1 -2
  6. package/fullstacked_modules/@fullstacked/ai-agent/src/markdown.ts +8 -4
  7. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/anthropic.ts +46 -0
  8. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/deepseek.ts +46 -0
  9. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/google.ts +40 -0
  10. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/index.ts +41 -0
  11. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/interface.ts +19 -0
  12. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/mistral.ts +47 -0
  13. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/ollama.ts +26 -9
  14. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/openai.ts +21 -9
  15. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/xai.ts +43 -0
  16. package/fullstacked_modules/@fullstacked/ai-agent/summary.txt +7 -0
  17. package/fullstacked_modules/ai/index.js +155667 -87447
  18. package/fullstacked_modules/ai/tools/fs.ts +12 -2
  19. package/fullstacked_modules/fetch/index.ts +41 -16
  20. package/fullstacked_modules/fs/fs.ts +1 -1
  21. package/fullstacked_modules/zod/README.md +3 -3
  22. package/fullstacked_modules/zod/index.d.cts +2 -2
  23. package/fullstacked_modules/zod/index.d.ts +2 -2
  24. package/fullstacked_modules/zod/package.json +10 -26
  25. package/fullstacked_modules/zod/src/index.ts +2 -2
  26. package/fullstacked_modules/zod/src/v3/tests/string.test.ts +2 -2
  27. package/fullstacked_modules/zod/src/v3/types.ts +1 -3
  28. package/fullstacked_modules/zod/src/v4/classic/checks.ts +0 -1
  29. package/fullstacked_modules/zod/src/v4/classic/compat.ts +0 -4
  30. package/fullstacked_modules/zod/src/v4/classic/errors.ts +2 -9
  31. package/fullstacked_modules/zod/src/v4/classic/schemas.ts +47 -24
  32. package/fullstacked_modules/zod/src/v4/classic/tests/catch.test.ts +5 -4
  33. package/fullstacked_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -6
  34. package/fullstacked_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -42
  35. package/fullstacked_modules/zod/src/v4/classic/tests/error-utils.test.ts +2 -70
  36. package/fullstacked_modules/zod/src/v4/classic/tests/file.test.ts +2 -5
  37. package/fullstacked_modules/zod/src/v4/classic/tests/literal.test.ts +0 -25
  38. package/fullstacked_modules/zod/src/v4/classic/tests/number.test.ts +0 -23
  39. package/fullstacked_modules/zod/src/v4/classic/tests/optional.test.ts +0 -13
  40. package/fullstacked_modules/zod/src/v4/classic/tests/partial.test.ts +0 -193
  41. package/fullstacked_modules/zod/src/v4/classic/tests/pickomit.test.ts +5 -5
  42. package/fullstacked_modules/zod/src/v4/classic/tests/preprocess.test.ts +15 -4
  43. package/fullstacked_modules/zod/src/v4/classic/tests/record.test.ts +1 -15
  44. package/fullstacked_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -121
  45. package/fullstacked_modules/zod/src/v4/classic/tests/string.test.ts +4 -119
  46. package/fullstacked_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -3
  47. package/fullstacked_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -27
  48. package/fullstacked_modules/zod/src/v4/classic/tests/transform.test.ts +0 -104
  49. package/fullstacked_modules/zod/src/v4/classic/tests/tuple.test.ts +2 -2
  50. package/fullstacked_modules/zod/src/v4/classic/tests/union.test.ts +3 -90
  51. package/fullstacked_modules/zod/src/v4/core/api.ts +96 -130
  52. package/fullstacked_modules/zod/src/v4/core/checks.ts +2 -4
  53. package/fullstacked_modules/zod/src/v4/core/doc.ts +2 -2
  54. package/fullstacked_modules/zod/src/v4/core/errors.ts +44 -43
  55. package/fullstacked_modules/zod/src/v4/core/json-schema.ts +3 -6
  56. package/fullstacked_modules/zod/src/v4/core/regexes.ts +6 -9
  57. package/fullstacked_modules/zod/src/v4/core/registries.ts +2 -3
  58. package/fullstacked_modules/zod/src/v4/core/schemas.ts +107 -165
  59. package/fullstacked_modules/zod/src/v4/core/to-json-schema.ts +11 -38
  60. package/fullstacked_modules/zod/src/v4/core/util.ts +105 -157
  61. package/fullstacked_modules/zod/src/v4/core/versions.ts +1 -1
  62. package/fullstacked_modules/zod/src/v4/locales/index.ts +0 -3
  63. package/fullstacked_modules/zod/src/v4/mini/schemas.ts +1 -14
  64. package/fullstacked_modules/zod/src/v4/mini/tests/assignability.test.ts +1 -1
  65. package/fullstacked_modules/zod/src/v4/mini/tests/computed.test.ts +1 -1
  66. package/fullstacked_modules/zod/src/v4/mini/tests/error.test.ts +1 -1
  67. package/fullstacked_modules/zod/src/v4/mini/tests/index.test.ts +1 -1
  68. package/fullstacked_modules/zod/src/v4/mini/tests/number.test.ts +1 -1
  69. package/fullstacked_modules/zod/src/v4/mini/tests/object.test.ts +1 -1
  70. package/fullstacked_modules/zod/src/v4/mini/tests/prototypes.test.ts +1 -1
  71. package/fullstacked_modules/zod/src/v4/mini/tests/recursive-types.test.ts +1 -1
  72. package/fullstacked_modules/zod/src/v4/mini/tests/string.test.ts +1 -1
  73. package/fullstacked_modules/zod/v3/ZodError.d.cts +6 -6
  74. package/fullstacked_modules/zod/v3/ZodError.d.ts +6 -6
  75. package/fullstacked_modules/zod/v3/locales/en.d.cts +1 -1
  76. package/fullstacked_modules/zod/v3/types.d.cts +1 -4
  77. package/fullstacked_modules/zod/v3/types.d.ts +1 -4
  78. package/fullstacked_modules/zod/v4/classic/checks.d.cts +1 -1
  79. package/fullstacked_modules/zod/v4/classic/checks.d.ts +1 -1
  80. package/fullstacked_modules/zod/v4/classic/compat.d.cts +0 -4
  81. package/fullstacked_modules/zod/v4/classic/compat.d.ts +0 -4
  82. package/fullstacked_modules/zod/v4/classic/schemas.d.cts +20 -9
  83. package/fullstacked_modules/zod/v4/classic/schemas.d.ts +20 -9
  84. package/fullstacked_modules/zod/v4/core/api.d.cts +72 -84
  85. package/fullstacked_modules/zod/v4/core/api.d.ts +72 -84
  86. package/fullstacked_modules/zod/v4/core/checks.d.cts +2 -2
  87. package/fullstacked_modules/zod/v4/core/checks.d.ts +2 -2
  88. package/fullstacked_modules/zod/v4/core/doc.d.cts +1 -1
  89. package/fullstacked_modules/zod/v4/core/doc.d.ts +1 -1
  90. package/fullstacked_modules/zod/v4/core/errors.d.cts +22 -24
  91. package/fullstacked_modules/zod/v4/core/errors.d.ts +22 -24
  92. package/fullstacked_modules/zod/v4/core/json-schema.d.cts +3 -3
  93. package/fullstacked_modules/zod/v4/core/json-schema.d.ts +3 -3
  94. package/fullstacked_modules/zod/v4/core/regexes.d.cts +2 -2
  95. package/fullstacked_modules/zod/v4/core/regexes.d.ts +2 -2
  96. package/fullstacked_modules/zod/v4/core/registries.d.cts +1 -1
  97. package/fullstacked_modules/zod/v4/core/registries.d.ts +1 -1
  98. package/fullstacked_modules/zod/v4/core/schemas.d.cts +6 -20
  99. package/fullstacked_modules/zod/v4/core/schemas.d.ts +6 -20
  100. package/fullstacked_modules/zod/v4/core/to-json-schema.d.cts +3 -4
  101. package/fullstacked_modules/zod/v4/core/to-json-schema.d.ts +3 -4
  102. package/fullstacked_modules/zod/v4/core/util.d.cts +0 -2
  103. package/fullstacked_modules/zod/v4/core/util.d.ts +0 -2
  104. package/fullstacked_modules/zod/v4/locales/ar.d.cts +1 -2
  105. package/fullstacked_modules/zod/v4/locales/az.d.cts +1 -2
  106. package/fullstacked_modules/zod/v4/locales/be.d.cts +1 -2
  107. package/fullstacked_modules/zod/v4/locales/ca.d.cts +1 -2
  108. package/fullstacked_modules/zod/v4/locales/cs.d.cts +1 -2
  109. package/fullstacked_modules/zod/v4/locales/de.d.cts +1 -2
  110. package/fullstacked_modules/zod/v4/locales/es.d.cts +1 -2
  111. package/fullstacked_modules/zod/v4/locales/fa.d.cts +1 -2
  112. package/fullstacked_modules/zod/v4/locales/fi.d.cts +1 -2
  113. package/fullstacked_modules/zod/v4/locales/fr-CA.d.cts +1 -2
  114. package/fullstacked_modules/zod/v4/locales/fr.d.cts +1 -2
  115. package/fullstacked_modules/zod/v4/locales/he.d.cts +1 -2
  116. package/fullstacked_modules/zod/v4/locales/hu.d.cts +1 -2
  117. package/fullstacked_modules/zod/v4/locales/id.d.cts +1 -2
  118. package/fullstacked_modules/zod/v4/locales/index.d.cts +0 -3
  119. package/fullstacked_modules/zod/v4/locales/index.d.ts +0 -3
  120. package/fullstacked_modules/zod/v4/locales/it.d.cts +1 -2
  121. package/fullstacked_modules/zod/v4/locales/ja.d.cts +1 -2
  122. package/fullstacked_modules/zod/v4/locales/kh.d.cts +1 -2
  123. package/fullstacked_modules/zod/v4/locales/ko.d.cts +1 -2
  124. package/fullstacked_modules/zod/v4/locales/mk.d.cts +1 -2
  125. package/fullstacked_modules/zod/v4/locales/ms.d.cts +1 -2
  126. package/fullstacked_modules/zod/v4/locales/nl.d.cts +1 -2
  127. package/fullstacked_modules/zod/v4/locales/no.d.cts +1 -2
  128. package/fullstacked_modules/zod/v4/locales/ota.d.cts +1 -2
  129. package/fullstacked_modules/zod/v4/locales/pl.d.cts +1 -2
  130. package/fullstacked_modules/zod/v4/locales/ps.d.cts +1 -2
  131. package/fullstacked_modules/zod/v4/locales/pt.d.cts +1 -2
  132. package/fullstacked_modules/zod/v4/locales/ru.d.cts +1 -2
  133. package/fullstacked_modules/zod/v4/locales/sl.d.cts +1 -2
  134. package/fullstacked_modules/zod/v4/locales/sv.d.cts +1 -2
  135. package/fullstacked_modules/zod/v4/locales/ta.d.cts +1 -2
  136. package/fullstacked_modules/zod/v4/locales/th.d.cts +1 -2
  137. package/fullstacked_modules/zod/v4/locales/ua.d.cts +1 -2
  138. package/fullstacked_modules/zod/v4/locales/ur.d.cts +1 -2
  139. package/fullstacked_modules/zod/v4/locales/vi.d.cts +1 -2
  140. package/fullstacked_modules/zod/v4/locales/zh-CN.d.cts +1 -2
  141. package/fullstacked_modules/zod/v4/locales/zh-TW.d.cts +1 -2
  142. package/fullstacked_modules/zod/v4/mini/schemas.d.cts +0 -2
  143. package/fullstacked_modules/zod/v4/mini/schemas.d.ts +0 -2
  144. package/package.json +1 -1
  145. package/fullstacked_modules/zod/locales/index.d.cts +0 -1
  146. package/fullstacked_modules/zod/locales/index.d.ts +0 -1
  147. package/fullstacked_modules/zod/mini/index.d.cts +0 -1
  148. package/fullstacked_modules/zod/mini/index.d.ts +0 -1
  149. package/fullstacked_modules/zod/src/locales/index.ts +0 -1
  150. package/fullstacked_modules/zod/src/mini/index.ts +0 -1
  151. package/fullstacked_modules/zod/src/v4/core/tests/extend.test.ts +0 -18
  152. package/fullstacked_modules/zod/src/v4/locales/bg.ts +0 -136
  153. package/fullstacked_modules/zod/src/v4/locales/da.ts +0 -141
  154. package/fullstacked_modules/zod/src/v4/locales/is.ts +0 -127
  155. package/fullstacked_modules/zod/src/v4/locales/yo.ts +0 -131
  156. package/fullstacked_modules/zod/v4/locales/bg.d.cts +0 -5
  157. package/fullstacked_modules/zod/v4/locales/bg.d.ts +0 -5
  158. package/fullstacked_modules/zod/v4/locales/da.d.cts +0 -5
  159. package/fullstacked_modules/zod/v4/locales/da.d.ts +0 -4
  160. package/fullstacked_modules/zod/v4/locales/is.d.cts +0 -5
  161. package/fullstacked_modules/zod/v4/locales/is.d.ts +0 -5
  162. package/fullstacked_modules/zod/v4/locales/yo.d.cts +0 -5
  163. package/fullstacked_modules/zod/v4/locales/yo.d.ts +0 -4
@@ -10,21 +10,21 @@ export type typeToFlattenedError<T, U = string> = {
10
10
  };
11
11
  };
12
12
  export declare const ZodIssueCode: {
13
- custom: "custom";
14
13
  invalid_type: "invalid_type";
15
- unrecognized_keys: "unrecognized_keys";
16
- too_big: "too_big";
17
- too_small: "too_small";
18
- not_multiple_of: "not_multiple_of";
19
- invalid_union: "invalid_union";
20
14
  invalid_literal: "invalid_literal";
15
+ custom: "custom";
16
+ invalid_union: "invalid_union";
21
17
  invalid_union_discriminator: "invalid_union_discriminator";
22
18
  invalid_enum_value: "invalid_enum_value";
19
+ unrecognized_keys: "unrecognized_keys";
23
20
  invalid_arguments: "invalid_arguments";
24
21
  invalid_return_type: "invalid_return_type";
25
22
  invalid_date: "invalid_date";
26
23
  invalid_string: "invalid_string";
24
+ too_small: "too_small";
25
+ too_big: "too_big";
27
26
  invalid_intersection_types: "invalid_intersection_types";
27
+ not_multiple_of: "not_multiple_of";
28
28
  not_finite: "not_finite";
29
29
  };
30
30
  export type ZodIssueCode = keyof typeof ZodIssueCode;
@@ -1,3 +1,3 @@
1
1
  import { type ZodErrorMap } from "../ZodError.cjs";
2
2
  declare const errorMap: ZodErrorMap;
3
- export = errorMap;
3
+ export default errorMap;
@@ -527,10 +527,7 @@ export type noUnrecognized<Obj extends object, Shape extends object> = {
527
527
  [k in keyof Obj]: k extends keyof Shape ? Obj[k] : never;
528
528
  };
529
529
  export declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall, UnknownKeys>, Input = objectInputType<T, Catchall, UnknownKeys>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
530
- _cached: {
531
- shape: T;
532
- keys: string[];
533
- } | null;
530
+ private _cached;
534
531
  _getCached(): {
535
532
  shape: T;
536
533
  keys: string[];
@@ -527,10 +527,7 @@ export type noUnrecognized<Obj extends object, Shape extends object> = {
527
527
  [k in keyof Obj]: k extends keyof Shape ? Obj[k] : never;
528
528
  };
529
529
  export declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall, UnknownKeys>, Input = objectInputType<T, Catchall, UnknownKeys>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
530
- _cached: {
531
- shape: T;
532
- keys: string[];
533
- } | null;
530
+ private _cached;
534
531
  _getCached(): {
535
532
  shape: T;
536
533
  keys: string[];
@@ -1 +1 @@
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, type $RefinementCtx as RefinementCtx, } from "../core/index.cjs";
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 +1 @@
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, type $RefinementCtx as RefinementCtx, } from "../core/index.js";
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";
@@ -43,8 +43,4 @@ ZodType as ZodTypeAny,
43
43
  ZodType as ZodSchema,
44
44
  /** @deprecated Use `z.ZodType` */
45
45
  ZodType as Schema, };
46
- /** Included for Zod 3 compatibility */
47
46
  export type ZodRawShape = core.$ZodShape;
48
- /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
49
- export declare enum ZodFirstPartyTypeKind {
50
- }
@@ -43,8 +43,4 @@ ZodType as ZodTypeAny,
43
43
  ZodType as ZodSchema,
44
44
  /** @deprecated Use `z.ZodType` */
45
45
  ZodType as Schema, };
46
- /** Included for Zod 3 compatibility */
47
46
  export type ZodRawShape = core.$ZodShape;
48
- /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
49
- export declare enum ZodFirstPartyTypeKind {
50
- }
@@ -1,6 +1,9 @@
1
1
  import * as core from "../core/index.cjs";
2
2
  import { util } from "../core/index.cjs";
3
3
  import * as parse from "./parse.cjs";
4
+ export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
5
+ addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
6
+ }
4
7
  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> {
5
8
  def: Internals["def"];
6
9
  type: Internals["def"]["type"];
@@ -22,7 +25,8 @@ export interface ZodType<out Output = unknown, out Input = unknown, out Internal
22
25
  safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
23
26
  spa: (data: unknown, params?: core.ParseContext<core.$ZodIssue>) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
24
27
  refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
25
- superRefine(refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>): this;
28
+ /** @deprecated Use `.check()` instead. */
29
+ superRefine(refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>): this;
26
30
  overwrite(fn: (x: core.output<this>) => core.output<this>): this;
27
31
  optional(): ZodOptional<this>;
28
32
  nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
@@ -35,7 +39,7 @@ export interface ZodType<out Output = unknown, out Input = unknown, out Internal
35
39
  array(): ZodArray<this>;
36
40
  or<T extends core.SomeType>(option: T): ZodUnion<[this, T]>;
37
41
  and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
38
- transform<NewOut>(transform: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
42
+ transform<NewOut>(transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
39
43
  catch(def: core.output<this>): ZodCatch<this>;
40
44
  catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
41
45
  pipe<T extends core.$ZodType<any, core.output<this>>>(target: T | core.$ZodType<any, core.output<this>>): ZodPipe<this, T>;
@@ -254,7 +258,6 @@ export interface ZodCustomStringFormat<Format extends string = string> extends Z
254
258
  }
255
259
  export declare const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat>;
256
260
  export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<Format>;
257
- export declare function hostname(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hostname">;
258
261
  export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals> extends _ZodType<Internals> {
259
262
  gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
260
263
  /** Identical to .min() */
@@ -411,9 +414,19 @@ out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.
411
414
  strict(): ZodObject<Shape, core.$strict>;
412
415
  /** This is the default behavior. This method call is likely unnecessary. */
413
416
  strip(): ZodObject<Shape, core.$strip>;
414
- extend<U extends core.$ZodLooseShape>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
417
+ extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
415
418
  /**
416
- * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
419
+ * @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
420
+ *
421
+ * ```ts
422
+ * const A = z.object({ a: z.string() });
423
+ * const B = z.object({ b: z.number() });
424
+ *
425
+ * const C = z.object({
426
+ * ...A.shape,
427
+ * ...B.shape
428
+ * });
429
+ * ```
417
430
  */
418
431
  merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
419
432
  pick<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
@@ -442,7 +455,6 @@ export declare const ZodUnion: core.$constructor<ZodUnion>;
442
455
  export declare function union<const T extends readonly core.SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodUnion<T>;
443
456
  export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[]> extends ZodUnion<Options>, core.$ZodDiscriminatedUnion<Options> {
444
457
  _zod: core.$ZodDiscriminatedUnionInternals<Options>;
445
- def: core.$ZodDiscriminatedUnionDef<Options>;
446
458
  }
447
459
  export declare const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion>;
448
460
  export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types>;
@@ -570,7 +582,6 @@ export interface ZodPipe<A extends core.SomeType = core.$ZodType, B extends core
570
582
  export declare const ZodPipe: core.$constructor<ZodPipe>;
571
583
  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>;
572
584
  export interface ZodReadonly<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodReadonlyInternals<T>>, core.$ZodReadonly<T> {
573
- unwrap(): T;
574
585
  }
575
586
  export declare const ZodReadonly: core.$constructor<ZodReadonly>;
576
587
  export declare function readonly<T extends core.SomeType>(innerType: T): ZodReadonly<T>;
@@ -594,7 +605,7 @@ export declare const ZodCustom: core.$constructor<ZodCustom>;
594
605
  export declare function check<O = unknown>(fn: core.CheckFn<O>): core.$ZodCheck<O>;
595
606
  export declare function custom<O>(fn?: (data: unknown) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodCustom<O, O>;
596
607
  export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
597
- export declare function superRefine<T>(fn: (arg: T, payload: core.$RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
608
+ export declare function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
598
609
  type ZodInstanceOfParams = core.Params<ZodCustom, core.$ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
599
610
  declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
600
611
  export { _instanceof as instanceof };
@@ -616,4 +627,4 @@ export interface ZodJSONSchema extends _ZodJSONSchema {
616
627
  _zod: ZodJSONSchemaInternals;
617
628
  }
618
629
  export declare function json(params?: string | core.$ZodCustomParams): ZodJSONSchema;
619
- export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: core.$RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
630
+ export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
@@ -1,6 +1,9 @@
1
1
  import * as core from "../core/index.js";
2
2
  import { util } from "../core/index.js";
3
3
  import * as parse from "./parse.js";
4
+ export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
5
+ addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
6
+ }
4
7
  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> {
5
8
  def: Internals["def"];
6
9
  type: Internals["def"]["type"];
@@ -22,7 +25,8 @@ export interface ZodType<out Output = unknown, out Input = unknown, out Internal
22
25
  safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
23
26
  spa: (data: unknown, params?: core.ParseContext<core.$ZodIssue>) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
24
27
  refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
25
- superRefine(refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>): this;
28
+ /** @deprecated Use `.check()` instead. */
29
+ superRefine(refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>): this;
26
30
  overwrite(fn: (x: core.output<this>) => core.output<this>): this;
27
31
  optional(): ZodOptional<this>;
28
32
  nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
@@ -35,7 +39,7 @@ export interface ZodType<out Output = unknown, out Input = unknown, out Internal
35
39
  array(): ZodArray<this>;
36
40
  or<T extends core.SomeType>(option: T): ZodUnion<[this, T]>;
37
41
  and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
38
- transform<NewOut>(transform: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
42
+ transform<NewOut>(transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
39
43
  catch(def: core.output<this>): ZodCatch<this>;
40
44
  catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
41
45
  pipe<T extends core.$ZodType<any, core.output<this>>>(target: T | core.$ZodType<any, core.output<this>>): ZodPipe<this, T>;
@@ -254,7 +258,6 @@ export interface ZodCustomStringFormat<Format extends string = string> extends Z
254
258
  }
255
259
  export declare const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat>;
256
260
  export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<Format>;
257
- export declare function hostname(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hostname">;
258
261
  export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals> extends _ZodType<Internals> {
259
262
  gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
260
263
  /** Identical to .min() */
@@ -411,9 +414,19 @@ out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.
411
414
  strict(): ZodObject<Shape, core.$strict>;
412
415
  /** This is the default behavior. This method call is likely unnecessary. */
413
416
  strip(): ZodObject<Shape, core.$strip>;
414
- extend<U extends core.$ZodLooseShape>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
417
+ extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
415
418
  /**
416
- * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
419
+ * @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
420
+ *
421
+ * ```ts
422
+ * const A = z.object({ a: z.string() });
423
+ * const B = z.object({ b: z.number() });
424
+ *
425
+ * const C = z.object({
426
+ * ...A.shape,
427
+ * ...B.shape
428
+ * });
429
+ * ```
417
430
  */
418
431
  merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
419
432
  pick<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
@@ -442,7 +455,6 @@ export declare const ZodUnion: core.$constructor<ZodUnion>;
442
455
  export declare function union<const T extends readonly core.SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodUnion<T>;
443
456
  export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[]> extends ZodUnion<Options>, core.$ZodDiscriminatedUnion<Options> {
444
457
  _zod: core.$ZodDiscriminatedUnionInternals<Options>;
445
- def: core.$ZodDiscriminatedUnionDef<Options>;
446
458
  }
447
459
  export declare const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion>;
448
460
  export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types>;
@@ -570,7 +582,6 @@ export interface ZodPipe<A extends core.SomeType = core.$ZodType, B extends core
570
582
  export declare const ZodPipe: core.$constructor<ZodPipe>;
571
583
  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>;
572
584
  export interface ZodReadonly<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodReadonlyInternals<T>>, core.$ZodReadonly<T> {
573
- unwrap(): T;
574
585
  }
575
586
  export declare const ZodReadonly: core.$constructor<ZodReadonly>;
576
587
  export declare function readonly<T extends core.SomeType>(innerType: T): ZodReadonly<T>;
@@ -594,7 +605,7 @@ export declare const ZodCustom: core.$constructor<ZodCustom>;
594
605
  export declare function check<O = unknown>(fn: core.CheckFn<O>): core.$ZodCheck<O>;
595
606
  export declare function custom<O>(fn?: (data: unknown) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodCustom<O, O>;
596
607
  export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
597
- export declare function superRefine<T>(fn: (arg: T, payload: core.$RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
608
+ export declare function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
598
609
  type ZodInstanceOfParams = core.Params<ZodCustom, core.$ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
599
610
  declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
600
611
  export { _instanceof as instanceof };
@@ -616,4 +627,4 @@ export interface ZodJSONSchema extends _ZodJSONSchema {
616
627
  _zod: ZodJSONSchemaInternals;
617
628
  }
618
629
  export declare function json(params?: string | core.$ZodCustomParams): ZodJSONSchema;
619
- export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: core.$RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
630
+ export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
@@ -19,73 +19,73 @@ export type CheckTypeParams<T extends schemas.$ZodType & checks.$ZodCheck = sche
19
19
  export type $ZodStringParams = TypeParams<schemas.$ZodString<string>, "coerce">;
20
20
  export declare function _string<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
21
21
  export declare function _coercedString<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
22
- export type $ZodStringFormatParams = CheckTypeParams<schemas.$ZodStringFormat, "format" | "coerce" | "when" | "pattern">;
22
+ export type $ZodStringFormatParams = CheckTypeParams<schemas.$ZodStringFormat, "format" | "coerce">;
23
23
  export type $ZodCheckStringFormatParams = CheckParams<checks.$ZodCheckStringFormat, "format">;
24
- export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail, "when">;
25
- export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail, "when">;
24
+ export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail>;
25
+ export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail>;
26
26
  export declare function _email<T extends schemas.$ZodEmail>(Class: util.SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;
27
- export type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
28
- export type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
27
+ export type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, "pattern">;
28
+ export type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, "pattern">;
29
29
  export declare function _guid<T extends schemas.$ZodGUID>(Class: util.SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;
30
- export type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
31
- export type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
30
+ export type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, "pattern">;
31
+ export type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
32
32
  export declare function _uuid<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;
33
- export type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
34
- export type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
33
+ export type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, "pattern">;
34
+ export type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
35
35
  export declare function _uuidv4<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;
36
- export type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
37
- export type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
36
+ export type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, "pattern">;
37
+ export type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
38
38
  export declare function _uuidv6<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;
39
- export type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
40
- export type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
39
+ export type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, "pattern">;
40
+ export type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
41
41
  export declare function _uuidv7<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;
42
- export type $ZodURLParams = StringFormatParams<schemas.$ZodURL, "when">;
43
- export type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL, "when">;
42
+ export type $ZodURLParams = StringFormatParams<schemas.$ZodURL>;
43
+ export type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL>;
44
44
  export declare function _url<T extends schemas.$ZodURL>(Class: util.SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;
45
- export type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji, "when">;
46
- export type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji, "when">;
45
+ export type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji>;
46
+ export type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji>;
47
47
  export declare function _emoji<T extends schemas.$ZodEmoji>(Class: util.SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;
48
- export type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID, "when">;
49
- export type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID, "when">;
48
+ export type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID>;
49
+ export type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID>;
50
50
  export declare function _nanoid<T extends schemas.$ZodNanoID>(Class: util.SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;
51
- export type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID, "when">;
52
- export type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID, "when">;
51
+ export type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID>;
52
+ export type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID>;
53
53
  export declare function _cuid<T extends schemas.$ZodCUID>(Class: util.SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;
54
- export type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2, "when">;
55
- export type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2, "when">;
54
+ export type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2>;
55
+ export type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2>;
56
56
  export declare function _cuid2<T extends schemas.$ZodCUID2>(Class: util.SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;
57
- export type $ZodULIDParams = StringFormatParams<schemas.$ZodULID, "when">;
58
- export type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID, "when">;
57
+ export type $ZodULIDParams = StringFormatParams<schemas.$ZodULID>;
58
+ export type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID>;
59
59
  export declare function _ulid<T extends schemas.$ZodULID>(Class: util.SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;
60
- export type $ZodXIDParams = StringFormatParams<schemas.$ZodXID, "when">;
61
- export type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID, "when">;
60
+ export type $ZodXIDParams = StringFormatParams<schemas.$ZodXID>;
61
+ export type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID>;
62
62
  export declare function _xid<T extends schemas.$ZodXID>(Class: util.SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;
63
- export type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID, "when">;
64
- export type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID, "when">;
63
+ export type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID>;
64
+ export type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID>;
65
65
  export declare function _ksuid<T extends schemas.$ZodKSUID>(Class: util.SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;
66
- export type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, "pattern" | "when">;
67
- export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern" | "when">;
66
+ export type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, "pattern">;
67
+ export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern">;
68
68
  export declare function _ipv4<T extends schemas.$ZodIPv4>(Class: util.SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;
69
- export type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, "pattern" | "when">;
70
- export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern" | "when">;
69
+ export type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, "pattern">;
70
+ export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern">;
71
71
  export declare function _ipv6<T extends schemas.$ZodIPv6>(Class: util.SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;
72
- export type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
73
- export type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
72
+ export type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, "pattern">;
73
+ export type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, "pattern">;
74
74
  export declare function _cidrv4<T extends schemas.$ZodCIDRv4>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;
75
- export type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
76
- export type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
75
+ export type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, "pattern">;
76
+ export type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, "pattern">;
77
77
  export declare function _cidrv6<T extends schemas.$ZodCIDRv6>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;
78
- export type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
79
- export type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
78
+ export type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, "pattern">;
79
+ export type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, "pattern">;
80
80
  export declare function _base64<T extends schemas.$ZodBase64>(Class: util.SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;
81
- export type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
82
- export type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
81
+ export type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, "pattern">;
82
+ export type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, "pattern">;
83
83
  export declare function _base64url<T extends schemas.$ZodBase64URL>(Class: util.SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;
84
- export type $ZodE164Params = StringFormatParams<schemas.$ZodE164, "when">;
85
- export type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164, "when">;
84
+ export type $ZodE164Params = StringFormatParams<schemas.$ZodE164>;
85
+ export type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164>;
86
86
  export declare function _e164<T extends schemas.$ZodE164>(Class: util.SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;
87
- export type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
88
- export type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
87
+ export type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, "pattern">;
88
+ export type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, "pattern">;
89
89
  export declare function _jwt<T extends schemas.$ZodJWT>(Class: util.SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;
90
90
  export declare const TimePrecision: {
91
91
  readonly Any: null;
@@ -94,21 +94,21 @@ export declare const TimePrecision: {
94
94
  readonly Millisecond: 3;
95
95
  readonly Microsecond: 6;
96
96
  };
97
- export type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
98
- export type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
97
+ export type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, "pattern">;
98
+ export type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, "pattern">;
99
99
  export declare function _isoDateTime<T extends schemas.$ZodISODateTime>(Class: util.SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;
100
- export type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
101
- export type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
100
+ export type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, "pattern">;
101
+ export type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, "pattern">;
102
102
  export declare function _isoDate<T extends schemas.$ZodISODate>(Class: util.SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;
103
- export type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
104
- export type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
103
+ export type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, "pattern">;
104
+ export type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, "pattern">;
105
105
  export declare function _isoTime<T extends schemas.$ZodISOTime>(Class: util.SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;
106
- export type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration, "when">;
107
- export type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration, "when">;
106
+ export type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration>;
107
+ export type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration>;
108
108
  export declare function _isoDuration<T extends schemas.$ZodISODuration>(Class: util.SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;
109
109
  export type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, "coerce">;
110
110
  export type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, "format" | "coerce">;
111
- export type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, "format" | "when">;
111
+ export type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, "format">;
112
112
  export declare function _number<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
113
113
  export declare function _coercedNumber<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
114
114
  export declare function _int<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
@@ -121,7 +121,7 @@ export declare function _boolean<T extends schemas.$ZodBoolean>(Class: util.Sche
121
121
  export declare function _coercedBoolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;
122
122
  export type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;
123
123
  export type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, "format" | "coerce">;
124
- export type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, "format" | "when">;
124
+ export type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, "format">;
125
125
  export declare function _bigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
126
126
  export declare function _coercedBigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
127
127
  export declare function _int64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
@@ -145,13 +145,13 @@ export declare function _date<T extends schemas.$ZodDate>(Class: util.SchemaClas
145
145
  export declare function _coercedDate<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;
146
146
  export type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;
147
147
  export declare function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T;
148
- export type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, "inclusive" | "value" | "when">;
148
+ export type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, "inclusive" | "value">;
149
149
  export declare function _lt(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;
150
150
  export declare function _lte(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;
151
151
  export {
152
152
  /** @deprecated Use `z.lte()` instead. */
153
153
  _lte as _max, };
154
- export type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
154
+ export type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, "inclusive" | "value">;
155
155
  export declare function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
156
156
  export declare function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
157
157
  export {
@@ -161,37 +161,37 @@ export declare function _positive(params?: string | $ZodCheckGreaterThanParams):
161
161
  export declare function _negative(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;
162
162
  export declare function _nonpositive(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;
163
163
  export declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
164
- export type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, "value" | "when">;
164
+ export type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, "value">;
165
165
  export declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): checks.$ZodCheckMultipleOf;
166
- export type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, "maximum" | "when">;
166
+ export type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, "maximum">;
167
167
  export declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): checks.$ZodCheckMaxSize<util.HasSize>;
168
- export type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, "minimum" | "when">;
168
+ export type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, "minimum">;
169
169
  export declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): checks.$ZodCheckMinSize<util.HasSize>;
170
- export type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, "size" | "when">;
170
+ export type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, "size">;
171
171
  export declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): checks.$ZodCheckSizeEquals<util.HasSize>;
172
- export type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, "maximum" | "when">;
172
+ export type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, "maximum">;
173
173
  export declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): checks.$ZodCheckMaxLength<util.HasLength>;
174
- export type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, "minimum" | "when">;
174
+ export type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, "minimum">;
175
175
  export declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): checks.$ZodCheckMinLength<util.HasLength>;
176
- export type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, "length" | "when">;
176
+ export type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, "length">;
177
177
  export declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): checks.$ZodCheckLengthEquals<util.HasLength>;
178
- export type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, "format" | "pattern" | "when">;
178
+ export type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, "format" | "pattern">;
179
179
  export declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): checks.$ZodCheckRegex;
180
- export type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, "format" | "when">;
180
+ export type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, "format">;
181
181
  export declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): checks.$ZodCheckLowerCase;
182
- export type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, "format" | "when">;
182
+ export type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, "format">;
183
183
  export declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): checks.$ZodCheckUpperCase;
184
- export type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
184
+ export type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, "includes" | "format" | "pattern">;
185
185
  export declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): checks.$ZodCheckIncludes;
186
- export type $ZodCheckStartsWithParams = CheckParams<checks.$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
186
+ export type $ZodCheckStartsWithParams = CheckParams<checks.$ZodCheckStartsWith, "prefix" | "format" | "pattern">;
187
187
  export declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): checks.$ZodCheckStartsWith;
188
- export type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
188
+ export type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, "suffix" | "format" | "pattern">;
189
189
  export declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): checks.$ZodCheckEndsWith;
190
- export type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, "property" | "schema" | "when">;
190
+ export type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, "property" | "schema">;
191
191
  export declare function _property<K extends string, T extends schemas.$ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): checks.$ZodCheckProperty<{
192
192
  [k in K]: core.output<T>;
193
193
  }>;
194
- export type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, "mime" | "when">;
194
+ export type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, "mime">;
195
195
  export declare function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): checks.$ZodCheckMimeType;
196
196
  export declare function _overwrite<T>(tx: (input: T) => T): checks.$ZodCheckOverwrite<T>;
197
197
  export declare function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): checks.$ZodCheckOverwrite<string>;
@@ -265,18 +265,6 @@ export declare function _promise<T extends schemas.$ZodObject>(Class: util.Schem
265
265
  export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">;
266
266
  export declare function _custom<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
267
267
  export declare function _refine<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
268
- export type $ZodSuperRefineIssue<T extends errors.$ZodIssueBase = errors.$ZodIssue> = T extends any ? RawIssue<T> : never;
269
- type RawIssue<T extends errors.$ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, "message" | "path"> & {
270
- /** The schema or check that originated this issue. */
271
- readonly inst?: schemas.$ZodType | checks.$ZodCheck;
272
- /** If `true`, Zod will continue executing checks/refinements after this issue. */
273
- readonly continue?: boolean | undefined;
274
- } & Record<string, unknown>> : never;
275
- export interface $RefinementCtx<T = unknown> extends schemas.ParsePayload<T> {
276
- addIssue(arg: string | $ZodSuperRefineIssue): void;
277
- }
278
- export declare function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>): checks.$ZodCheck<T>;
279
- export declare function _check<O = unknown>(fn: schemas.CheckFn<O>, params?: string | $ZodCustomParams): checks.$ZodCheck<O>;
280
268
  export interface $ZodStringBoolParams extends TypeParams {
281
269
  truthy?: string[];
282
270
  falsy?: string[];