@wildo-ai/zod-decorators 1.0.0 → 1.1.0

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 (98) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/__mocks__/mime.d.ts.map +1 -1
  4. package/dist/esm/__mocks__/mime.js +1 -1
  5. package/dist/esm/__mocks__/mime.js.map +1 -1
  6. package/dist/esm/commons.d.ts.map +1 -1
  7. package/dist/esm/commons.js +1 -1
  8. package/dist/esm/commons.js.map +1 -1
  9. package/dist/esm/companion-exports.d.ts +8 -0
  10. package/dist/esm/companion-exports.d.ts.map +1 -0
  11. package/dist/esm/companion-exports.js +8 -0
  12. package/dist/esm/companion-exports.js.map +1 -0
  13. package/dist/esm/currencies.shared.schemas.d.ts.map +1 -1
  14. package/dist/esm/currencies.shared.schemas.js +1 -1
  15. package/dist/esm/currencies.shared.schemas.js.map +1 -1
  16. package/dist/esm/files/agent-file-formats.d.ts.map +1 -1
  17. package/dist/esm/files/agent-file-formats.js +1 -1
  18. package/dist/esm/files/agent-file-formats.js.map +1 -1
  19. package/dist/esm/files/extension-nature-map.d.ts +1 -1
  20. package/dist/esm/files/extension-nature-map.d.ts.map +1 -1
  21. package/dist/esm/files/extension-nature-map.js +1 -1
  22. package/dist/esm/files/extension-nature-map.js.map +1 -1
  23. package/dist/esm/files/file-extensions.enum.d.ts.map +1 -1
  24. package/dist/esm/files/file-extensions.enum.js +1 -1
  25. package/dist/esm/files/file-extensions.enum.js.map +1 -1
  26. package/dist/esm/files/mime-registry.d.ts +1 -1
  27. package/dist/esm/files/mime-registry.d.ts.map +1 -1
  28. package/dist/esm/files/mime-registry.js +1 -1
  29. package/dist/esm/files/mime-registry.js.map +1 -1
  30. package/dist/esm/files/unified-registry.d.ts +1 -1
  31. package/dist/esm/files/unified-registry.d.ts.map +1 -1
  32. package/dist/esm/files/unified-registry.js +1 -1
  33. package/dist/esm/files/unified-registry.js.map +1 -1
  34. package/dist/esm/index.d.ts +20 -19
  35. package/dist/esm/index.d.ts.map +1 -1
  36. package/dist/esm/index.js +10 -1
  37. package/dist/esm/index.js.map +1 -1
  38. package/dist/esm/install-bigint-json-encoding.d.ts +80 -0
  39. package/dist/esm/install-bigint-json-encoding.d.ts.map +1 -0
  40. package/dist/esm/install-bigint-json-encoding.js +85 -0
  41. package/dist/esm/install-bigint-json-encoding.js.map +1 -0
  42. package/dist/esm/testing/decorated-test-schemas.d.ts +8 -8
  43. package/dist/esm/testing/decorated-test-schemas.d.ts.map +1 -1
  44. package/dist/esm/testing/decorated-test-schemas.js +1 -1
  45. package/dist/esm/testing/decorated-test-schemas.js.map +1 -1
  46. package/dist/esm/testing.d.ts +1 -1
  47. package/dist/esm/testing.d.ts.map +1 -1
  48. package/dist/esm/testing.js +1 -1
  49. package/dist/esm/testing.js.map +1 -1
  50. package/dist/esm/zod-bigdecimal.d.ts +5 -1
  51. package/dist/esm/zod-bigdecimal.d.ts.map +1 -1
  52. package/dist/esm/zod-bigdecimal.js +4 -1
  53. package/dist/esm/zod-bigdecimal.js.map +1 -1
  54. package/dist/esm/zod-code.d.ts +4 -1
  55. package/dist/esm/zod-code.d.ts.map +1 -1
  56. package/dist/esm/zod-code.js +4 -1
  57. package/dist/esm/zod-code.js.map +1 -1
  58. package/dist/esm/zod-color.d.ts.map +1 -1
  59. package/dist/esm/zod-color.js +1 -1
  60. package/dist/esm/zod-color.js.map +1 -1
  61. package/dist/esm/zod-decorators.types.d.ts +1410 -56
  62. package/dist/esm/zod-decorators.types.d.ts.map +1 -1
  63. package/dist/esm/zod-decorators.types.js +662 -16
  64. package/dist/esm/zod-decorators.types.js.map +1 -1
  65. package/dist/esm/zod-duration.d.ts +8 -4
  66. package/dist/esm/zod-duration.d.ts.map +1 -1
  67. package/dist/esm/zod-duration.js +2 -1
  68. package/dist/esm/zod-duration.js.map +1 -1
  69. package/dist/esm/zod-file.d.ts +75 -14
  70. package/dist/esm/zod-file.d.ts.map +1 -1
  71. package/dist/esm/zod-file.js +151 -8
  72. package/dist/esm/zod-file.js.map +1 -1
  73. package/dist/esm/zod-money.d.ts +18 -3
  74. package/dist/esm/zod-money.d.ts.map +1 -1
  75. package/dist/esm/zod-money.js +4 -1
  76. package/dist/esm/zod-money.js.map +1 -1
  77. package/dist/esm/zod-phone.d.ts +37 -1
  78. package/dist/esm/zod-phone.d.ts.map +1 -1
  79. package/dist/esm/zod-phone.js +66 -5
  80. package/dist/esm/zod-phone.js.map +1 -1
  81. package/dist/esm/zod-range.d.ts +4 -1
  82. package/dist/esm/zod-range.d.ts.map +1 -1
  83. package/dist/esm/zod-range.js +4 -1
  84. package/dist/esm/zod-range.js.map +1 -1
  85. package/dist/esm/zod-utils.shared.d.ts +411 -6
  86. package/dist/esm/zod-utils.shared.d.ts.map +1 -1
  87. package/dist/esm/zod-utils.shared.js +624 -9
  88. package/dist/esm/zod-utils.shared.js.map +1 -1
  89. package/dist/esm/zod-versioned.d.ts +1 -1
  90. package/dist/esm/zod-versioned.d.ts.map +1 -1
  91. package/dist/esm/zod-versioned.js +1 -1
  92. package/dist/esm/zod-versioned.js.map +1 -1
  93. package/dist/esm/zod.module-override.d.ts +458 -68
  94. package/dist/esm/zod.module-override.d.ts.map +1 -1
  95. package/dist/esm/zod.module-override.js +1214 -195
  96. package/dist/esm/zod.module-override.js.map +1 -1
  97. package/dist/tsconfig.build.tsbuildinfo +1 -1
  98. package/package.json +30 -21
@@ -1,6 +1,6 @@
1
1
  import { z, core } from 'zod';
2
- import type { ArrayUIEditParams } from './zod-decorators.types.js';
3
- import { BackendOnlyFieldParams, CustomFieldMetadata, DecoratorInput, DiscriminatorFieldParams, HiddenFieldParams, NotEditableFieldParams, SummaryFieldParams, TtlFieldParams, VirtualFieldParams, ZodDecorator, ZodDecorator_ParamsType, UniqueFieldParams } from './zod-decorators.types.js';
2
+ import type { ArrayUIEditParams } from './zod-decorators.types';
3
+ import { BackendOnlyFieldParams, BusinessKeySetParams, WriteOnlySecretFieldParams, CustomFieldMetadata, DecoratorInput, DiscriminatorFieldParams, HiddenFieldParams, ImpersonalizeFieldParams, NotEditableFieldParams, RagSourceConfiguration, SummaryFieldParams, TtlFieldParams, VirtualFieldParams, ZodDecorator, ZodDecorator_ParamsType, UniqueFieldParams } from './zod-decorators.types';
4
4
  export type EnumLike = Record<string, string | number>;
5
5
  export type EnumLikeType = Record<string, string>;
6
6
  export type EnumValues<T extends EnumLikeType> = T[keyof T];
@@ -9,19 +9,69 @@ export declare const ZodDecorator_ApplyableType: Record<ZodDecorator, string[]>;
9
9
  type DecoratorFn = (this: z.ZodTypeAny, ...args: any[]) => DecoratedPrimitiveZodType<z.ZodTypeAny>;
10
10
  export declare const ZodDecorator_FunctionType: Record<string, DecoratorFn>;
11
11
  export type DecoratedPrimitiveZodType<T extends z.ZodTypeAny = z.ZodTypeAny> = T & {
12
+ /** @wildo_source:part:start zod.decorators.shared-structural-methods facet:layer:shared facet:family:decorator facet:family:method-surface */
12
13
  [ZodDecorator.IS_DB_INDEXED](): DecoratedPrimitiveZodType<T>;
13
14
  [ZodDecorator.IS_FOREIGN_KEY](params?: ZodDecorator_ParamsType[ZodDecorator.IS_FOREIGN_KEY]): DecoratedPrimitiveZodType<T>;
14
- [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<T>;
15
- [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<T>;
16
15
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<T>;
17
16
  [ZodDecorator.IS_BACKEND_ONLY](params?: ZodDecorator_ParamsType[ZodDecorator.IS_BACKEND_ONLY]): DecoratedPrimitiveZodType<T>;
18
- [ZodDecorator.IS_VIRTUAL](params: ZodDecorator_ParamsType[ZodDecorator.IS_VIRTUAL]): DecoratedPrimitiveZodType<T>;
17
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: ZodDecorator_ParamsType[ZodDecorator.IS_WRITE_ONLY_SECRET]): DecoratedPrimitiveZodType<T>;
19
18
  [ZodDecorator.IS_DISCRIMINATOR](params?: ZodDecorator_ParamsType[ZodDecorator.IS_DISCRIMINATOR]): DecoratedPrimitiveZodType<T>;
20
19
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<T>;
21
20
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<T>;
22
21
  [ZodDecorator.IS_UNIQUE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_UNIQUE]): DecoratedPrimitiveZodType<T>;
23
22
  [ZodDecorator.IS_PRIMARY_KEY](): DecoratedPrimitiveZodType<T>;
23
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<T>;
24
+ [ZodDecorator.OBJECT_BUSINESS_KEY_SET](fields: string[], params?: Omit<BusinessKeySetParams, 'fields'>): DecoratedPrimitiveZodType<T>;
24
25
  [ZodDecorator.TTL](params: ZodDecorator_ParamsType[ZodDecorator.TTL]): DecoratedPrimitiveZodType<T>;
26
+ /** @wildo_source:part:end zod.decorators.shared-structural-methods */
27
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<T>;
28
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<T>;
29
+ /**
30
+ * @wildo_source:part:start zod.decorators.data-categories facet:layer:shared facet:family:decorator facet:kind:api facet:audience:app-developer facet:family:method-surface
31
+ *
32
+ * Declare WHICH KINDS of personal data this field holds — the vocabulary a privacy notice
33
+ * enumerates. Import `PersonalDataCategory` from `@wildo-ai/saas-models`.
34
+ *
35
+ * Accepts a single category (the common case) or an array when a field genuinely spans two. At
36
+ * least one is required: a field that holds NO personal data carries no declaration at all, and
37
+ * that absence is exactly what the compliance gap report reads.
38
+ *
39
+ * Declare it on the field that holds the value. Never on a field merely because its NAME suggests
40
+ * a category — `credentials` is the one category the framework derives for you, and it derives it
41
+ * from `.isPassword()` / `.isOtp()` / `.isWriteOnlySecret()`, never from an identifier.
42
+ *
43
+ * @example
44
+ * fullName: z.string().dataCategories(PersonalDataCategory.IDENTITY)
45
+ * @example
46
+ * email: z.email().nullish().dataCategories(PersonalDataCategory.CONTACT_DETAILS)
47
+ * @example
48
+ * // A field that genuinely spans two — an array never forces you to pick a lie.
49
+ * dietaryNotes: z.string().dataCategories([PersonalDataCategory.USER_CONTENT, PersonalDataCategory.SPECIAL_CATEGORY_HEALTH])
50
+ */
51
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<T>;
52
+ /** @wildo_source:part:end zod.decorators.data-categories */
53
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<T>;
54
+ /**
55
+ * @wildo_source:part:start zod.decorators.rag-source facet:layer:shared facet:family:decorator facet:family:method-surface facet:kind:api facet:audience:app-developer
56
+ *
57
+ * `.ragSource(config?)` — declare this field's text a source of the application's retrieval
58
+ * corpus. Live on every string-backed schema (`z.string()` and every string FORMAT such as
59
+ * `z.email()` / `z.url()`) and carried across the `.optional()` / `.nullable()` / `.default()`
60
+ * wrappers, so it composes anywhere in a decorator chain.
61
+ *
62
+ * The config is OPTIONAL and there is no `enabled` flag: a bare `.ragSource()` is a complete
63
+ * declaration that accepts the framework chunking defaults. Presence IS enablement.
64
+ *
65
+ * @example
66
+ * z.string().ragSource()
67
+ * @example
68
+ * z.string().ragSource({ chunkingStrategy: RAGChunkingStrategy.MARKDOWN, chunkSize: 1200, chunkOverlap: 150 }).optional()
69
+ */
70
+ [ZodDecorator.RAG_SOURCE](config?: RagSourceConfiguration): DecoratedPrimitiveZodType<T>;
71
+ /** @wildo_source:part:end zod.decorators.rag-source */
72
+ [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<T>;
73
+ [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<T>;
74
+ [ZodDecorator.IS_VIRTUAL](params: ZodDecorator_ParamsType[ZodDecorator.IS_VIRTUAL]): DecoratedPrimitiveZodType<T>;
25
75
  [ZodDecorator.IS_PASSWORD](): DecoratedPrimitiveZodType<T>;
26
76
  [ZodDecorator.IS_OTP](params?: ZodDecorator_ParamsType[ZodDecorator.IS_OTP]): DecoratedPrimitiveZodType<T>;
27
77
  [ZodDecorator.IS_COLOR](): DecoratedPrimitiveZodType<T>;
@@ -46,6 +96,22 @@ export type DecoratedPrimitiveZodType<T extends z.ZodTypeAny = z.ZodTypeAny> = T
46
96
  [ZodDecorator.FOREIGN_KEY_UI](params?: ZodDecorator_ParamsType[ZodDecorator.FOREIGN_KEY_UI]): DecoratedPrimitiveZodType<T>;
47
97
  [ZodDecorator.ARRAY_UI](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_UI]): DecoratedPrimitiveZodType<T>;
48
98
  [ZodDecorator.OBJECT_UI](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_UI]): DecoratedPrimitiveZodType<T>;
99
+ [ZodDecorator.STRING_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_SPEC]): DecoratedPrimitiveZodType<T>;
100
+ [ZodDecorator.NUMBER_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.NUMBER_SPEC]): DecoratedPrimitiveZodType<T>;
101
+ [ZodDecorator.BOOLEAN_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BOOLEAN_SPEC]): DecoratedPrimitiveZodType<T>;
102
+ [ZodDecorator.ENUM_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ENUM_SPEC]): DecoratedPrimitiveZodType<T>;
103
+ [ZodDecorator.DATE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_SPEC]): DecoratedPrimitiveZodType<T>;
104
+ [ZodDecorator.DATETIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATETIME_SPEC]): DecoratedPrimitiveZodType<T>;
105
+ [ZodDecorator.TIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.TIME_SPEC]): DecoratedPrimitiveZodType<T>;
106
+ [ZodDecorator.MONEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.MONEY_SPEC]): DecoratedPrimitiveZodType<T>;
107
+ [ZodDecorator.CODE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.CODE_SPEC]): DecoratedPrimitiveZodType<T>;
108
+ [ZodDecorator.FILE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FILE_SPEC]): DecoratedPrimitiveZodType<T>;
109
+ [ZodDecorator.DURATION_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DURATION_SPEC]): DecoratedPrimitiveZodType<T>;
110
+ [ZodDecorator.PHONE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.PHONE_SPEC]): DecoratedPrimitiveZodType<T>;
111
+ [ZodDecorator.BIGDECIMAL_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BIGDECIMAL_SPEC]): DecoratedPrimitiveZodType<T>;
112
+ [ZodDecorator.FOREIGN_KEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FOREIGN_KEY_SPEC]): DecoratedPrimitiveZodType<T>;
113
+ [ZodDecorator.ARRAY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_SPEC]): DecoratedPrimitiveZodType<T>;
114
+ [ZodDecorator.OBJECT_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_SPEC]): DecoratedPrimitiveZodType<T>;
49
115
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<T>;
50
116
  };
51
117
  export declare function ZodDecorator_FunctionAddDecorators(this: z.ZodTypeAny, decorators: DecoratorInput[]): DecoratedPrimitiveZodType<z.ZodTypeAny>;
@@ -67,11 +133,34 @@ export declare function addDecorators<T extends z.ZodTypeAny>(schema: T, decorat
67
133
  * **Use case:** reusable leaf schemas (enums, strings, numbers) with shared visual
68
134
  * config but independent field-level decorators per resource.
69
135
  *
70
- * **Scope limitations:** designed for leaf schemas, NOT for compound types:
71
- * - **`z.object()`:** field schemas inside the shape remain shared references —
72
- * mutating a field's decorators on the clone affects the original.
73
- * - **Wrapper types** (`.optional()`, `.nullable()`, `.array()`, `.pipe()`):
74
- * the inner schema remains shared. Clone the unwrapped schema first, then wrap.
136
+ * **Not required to avoid wrapper leakage.** Decorating a wrapper of a shared leaf
137
+ * (`SharedLeaf.optional().isDBIndexed()`) is safe on its own: the decorator runtime
138
+ * copy-on-writes the wrapper's inner schema before mirroring metadata onto it, so
139
+ * the shared leaf is never written to. Reach for `z_clone` when you want a leaf with
140
+ * DIFFERENT baseline decorators, not as leak protection.
141
+ *
142
+ * **Implementation note:** clones through Zod's own `.clone(def)` with a spread
143
+ * definition. A structural copy (`Object.assign({}, schema)`) cannot work here —
144
+ * `_zod` is a non-enumerable own property, so the copy would omit Zod's internals
145
+ * entirely and every method on it would still act on the ORIGINAL instance
146
+ * (`z_clone(leaf).optional()` would wrap `leaf`, not the clone).
147
+ *
148
+ * **Scope limitation:** the definition is spread SHALLOWLY, so composite members
149
+ * stay shared by reference — `z.object()` shape fields, and a wrapper's own
150
+ * `innerType`. Decorating those members directly still reaches the original; the
151
+ * clone isolates THIS schema's decorators, not its children's.
152
+ *
153
+ * **Related minimal helper:** for the polymorphism engine's specific need —
154
+ * cloning a base-shape field once per variant inside
155
+ * `applyBusinessKeyMarkers` to apply a single decorator without mutating
156
+ * the shared source — see `cloneFieldForBusinessKeyDecoration` in
157
+ * `engine/saas-models/src/resources/utils/resource-polymorphism.schemas.ts`.
158
+ * That helper is a deliberately stripped-down version: it inherits Zod
159
+ * internals via prototype lookup and only shallow-copies `SCHEMA_METADATA`,
160
+ * which is sufficient for the single-decorator mutation pattern used in
161
+ * the polymorphism engine. `z_clone` is the right choice for general-
162
+ * purpose leaf reuse across resources; the polymorphism helper is the
163
+ * right choice when you need MINIMAL isolation in a hot per-variant loop.
75
164
  *
76
165
  * @example
77
166
  * ```ts
@@ -92,6 +181,7 @@ export declare function addDecorators<T extends z.ZodTypeAny>(schema: T, decorat
92
181
  */
93
182
  export declare function z_clone<T extends z.ZodTypeAny>(schema: T): DecoratedPrimitiveZodType<T>;
94
183
  export declare function addChainableMethods<T extends z.ZodTypeAny>(schema: T): T;
184
+ /** @wildo_source:part:end zod.decorators.chainable-runtime */
95
185
  export declare function addDBIndexed<T extends z.ZodTypeAny>(schema: T): T;
96
186
  export declare function addForeignKey<T extends z.ZodTypeAny>(schema: T): T;
97
187
  export declare function addHidden<T extends z.ZodTypeAny>(schema: T, params?: HiddenFieldParams): T;
@@ -99,6 +189,132 @@ export declare function addNotEditable<T extends z.ZodTypeAny>(schema: T, params
99
189
  export declare function addSortable<T extends z.ZodTypeAny>(schema: T, params?: Pick<ArrayUIEditParams, 'dnd' | 'upDownIcons'>): T;
100
190
  export declare function addSummaryField<T extends z.ZodTypeAny>(schema: T, params?: SummaryFieldParams): T;
101
191
  export declare function addBackendOnly<T extends z.ZodTypeAny>(schema: T, params?: BackendOnlyFieldParams): T;
192
+ export declare function addWriteOnlySecret<T extends z.ZodTypeAny>(schema: T, params?: WriteOnlySecretFieldParams): T;
193
+ /**
194
+ * Standalone form of `.impersonalizeWith(treatment)` — declare a field's impersonalization
195
+ * scrub treatment (a `RedactionType` value).
196
+ *
197
+ * The fluent `.impersonalizeWith(treatment)` method is the idiomatic authoring form and is live on
198
+ * every schema type + wrapper. This helper stays as the programmatic escape hatch for the cases the
199
+ * fluent form cannot express: decorating a schema held in a variable of an erased/generic type, or
200
+ * applying a treatment inside a generic transform where `this` is `z.ZodTypeAny`.
201
+ *
202
+ * Both doors funnel through `applySingleDecorator`, so both reject a missing/blank treatment
203
+ * identically. Read the result back with `getImpersonalizeTreatment(schema)`.
204
+ *
205
+ * `options.maskValue` overrides the framework mask constant for a `MASK` treatment — required when
206
+ * the field is a CONSTRAINED string (`z.email()`, `z.uuid()`, `.min(n)`) the default constant cannot
207
+ * satisfy. See {@link ImpersonalizeFieldParams} for the full contract; read it back with
208
+ * `getImpersonalizeMaskValue(schema)`.
209
+ *
210
+ * @example
211
+ * // Unconstrained string — the framework mask constant applies.
212
+ * addImpersonalizeWith(z.string(), RedactionType.MASK)
213
+ * @example
214
+ * // Constrained string — the default constant would fail the boot guard, so give it a value the
215
+ * // field's own schema accepts. `.invalid` is RFC 2606 reserved: never resolvable, never delivered.
216
+ * addImpersonalizeWith(z.email(), RedactionType.MASK, { maskValue: 'erased@erased.invalid' })
217
+ */
218
+ export declare function addImpersonalizeWith<T extends z.ZodTypeAny>(schema: T, treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): T;
219
+ /**
220
+ * @wildo_source:part:start zod.decorators.rag-source facet:layer:shared facet:family:decorator facet:kind:api facet:audience:app-developer
221
+ *
222
+ * Standalone form of `.ragSource(config?)` — declare a field's text a RAG retrieval-corpus source.
223
+ *
224
+ * Import from `@wildo-ai/zod-decorators`.
225
+ *
226
+ * The fluent `.ragSource()` method is the idiomatic authoring form and is live on every
227
+ * string-backed type plus the Optional / Nullable / Default wrappers. This helper is the
228
+ * programmatic escape hatch for schemas held as an erased/generic type, and it is the door
229
+ * `z_file({ ragSource })` uses to register the SAME decorator on a file schema (a `ZodObject`,
230
+ * which deliberately carries no fluent `.ragSource()` — see the applicable-types entry).
231
+ *
232
+ * Both doors funnel through `applySingleDecorator`, so both validate the config identically and
233
+ * both enforce the refused companions (`isPassword` / `isOtp` / `isWriteOnlySecret` /
234
+ * `isEphemeral` / `ttl`) in both application orders. Read the stored config back with
235
+ * `getRagSourceConfig(schema)`.
236
+ *
237
+ * @example
238
+ * // A complete declaration — framework chunking defaults apply.
239
+ * addRagSource(z.string())
240
+ * @example
241
+ * // Authored chunking for a markdown knowledge field.
242
+ * addRagSource(z.string(), { chunkingStrategy: RAGChunkingStrategy.MARKDOWN, chunkSize: 1200, chunkOverlap: 150 })
243
+ */
244
+ export declare function addRagSource<T extends z.ZodTypeAny>(schema: T, config?: RagSourceConfiguration): T;
245
+ /** @wildo_source:part:end zod.decorators.rag-source */
246
+ /**
247
+ * Standalone form of `.portabilityProvenance(provenance)` — declare where a field's value came
248
+ * from, for GDPR Art. 20 scoping.
249
+ *
250
+ * The fluent method is the idiomatic authoring form and is live on every decorator-reachable Zod
251
+ * type. This helper exists for the types that carry NO prototype-installed decorators at all
252
+ * (`z.pipe(...)`, which is what `z_phone()` returns, plus Literal / Tuple / Set / …) and for
253
+ * applying a provenance inside a generic transform where `this` is `z.ZodTypeAny`.
254
+ *
255
+ * Both doors funnel through `applySingleDecorator`, so both reject a missing/blank value
256
+ * identically. Read the result back with `getPortabilityProvenance(schema)`.
257
+ *
258
+ * Omitting the declaration entirely is legitimate and common: the field then inherits its
259
+ * resource's `portabilityPolicy.defaultProvenance`. Only fields that DIFFER from that default need
260
+ * a declaration — which is what keeps annotating a resource a one-line cost rather than a per-field
261
+ * chore.
262
+ *
263
+ * @example
264
+ * // A value the subject typed — in scope for both Art. 15 and Art. 20.
265
+ * addPortabilityProvenance(z.string(), DataPortabilityProvenance.SUBJECT_PROVIDED)
266
+ * @example
267
+ * // A value the controller computed ABOUT the subject — disclosed under Art. 15, excluded from an
268
+ * // Art. 20 portability bundle.
269
+ * addPortabilityProvenance(z.number(), DataPortabilityProvenance.DERIVED)
270
+ */
271
+ export declare function addPortabilityProvenance<T extends z.ZodTypeAny>(schema: T, provenance: string): T;
272
+ /**
273
+ * Standalone form of `.dataCategories(categories)` — declare WHICH KINDS of personal data a field
274
+ * holds, for the privacy-notice inventory.
275
+ *
276
+ * The fluent method is the idiomatic authoring form and is live on every decorator-reachable Zod
277
+ * type. This helper exists for the types that carry NO prototype-installed decorators at all
278
+ * (`z.pipe(...)`, which is what `z_phone()` returns, plus Literal / Tuple / Set / …) and for
279
+ * declaring categories inside a generic transform where `this` is `z.ZodTypeAny`.
280
+ *
281
+ * ⚠️ `z_phone()` is the case that makes this helper load-bearing rather than a curiosity: a phone
282
+ * number is contact detail personal data by definition, and the fluent method cannot reach it.
283
+ *
284
+ * Both doors funnel through `applySingleDecorator`, so both reject an empty declaration
285
+ * identically. Read the result back with `getDataCategories(schema)`.
286
+ *
287
+ * @example
288
+ * // A phone number — the pipe `z_phone()` returns has no fluent surface.
289
+ * addDataCategories(z_phone(), PersonalDataCategory.CONTACT_DETAILS)
290
+ * @example
291
+ * // A field that genuinely spans two categories.
292
+ * addDataCategories(z.string(), [PersonalDataCategory.USER_CONTENT, PersonalDataCategory.SPECIAL_CATEGORY_HEALTH])
293
+ *
294
+ * @wildo_source:part:start zod.decorators.data-categories facet:layer:shared facet:family:decorator facet:kind:api facet:audience:app-developer
295
+ */
296
+ export declare function addDataCategories<T extends z.ZodTypeAny>(schema: T, categories: string | readonly string[]): T;
297
+ /** @wildo_source:part:end zod.decorators.data-categories */
298
+ /**
299
+ * Standalone form of `.isAuditEvidence()` — mark a field whose before/after values are recorded on
300
+ * the `resource_operation_performed` audit event when an operation changes it.
301
+ *
302
+ * The fluent method is the idiomatic authoring form and is live on every decorator-reachable Zod
303
+ * type. This helper exists for the types that carry NO prototype-installed decorators at all
304
+ * (`z.pipe(...)`, which is what `z_phone()` returns, plus Literal / Tuple / Set / …) and for
305
+ * marking a field inside a generic transform where `this` is `z.ZodTypeAny`.
306
+ *
307
+ * Read the result back with `isAuditEvidenceField(schema)`.
308
+ *
309
+ * ⚠️ `z_phone()` is the cautionary case for this decorator specifically: a phone number is personal
310
+ * data, so reaching for this helper on one is almost always the wrong call. The unreachable-fluent
311
+ * types are listed here for completeness of the API surface, not as a suggestion.
312
+ *
313
+ * @example
314
+ * // Authority — the values ARE the evidence; a role change without them proves nothing.
315
+ * addAuditEvidence(z.array(z.string()))
316
+ */
317
+ export declare function addAuditEvidence<T extends z.ZodTypeAny>(schema: T): T;
102
318
  export declare function addVirtual<T extends z.ZodTypeAny>(schema: T, params: VirtualFieldParams): T;
103
319
  export declare function addDiscriminator<T extends z.ZodTypeAny>(schema: T, params?: DiscriminatorFieldParams): T;
104
320
  export declare function addExcludeFromCreate<T extends z.ZodTypeAny>(schema: T): T;
@@ -138,15 +354,56 @@ declare module 'zod' {
138
354
  [ZodDecorator.IS_COLOR](): DecoratedPrimitiveZodType<this>;
139
355
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
140
356
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
357
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
358
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
359
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
360
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
361
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
362
+ [ZodDecorator.RAG_SOURCE](config?: RagSourceConfiguration): DecoratedPrimitiveZodType<this>;
141
363
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
142
364
  [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
143
365
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
144
366
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
145
367
  [ZodDecorator.IS_UNIQUE](params?: UniqueFieldParams): DecoratedPrimitiveZodType<this>;
146
368
  [ZodDecorator.IS_PRIMARY_KEY](): DecoratedPrimitiveZodType<this>;
369
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
147
370
  [ZodDecorator.IS_EPHEMERAL](): DecoratedPrimitiveZodType<this>;
148
371
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
149
372
  [ZodDecorator.STRING_UI](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_UI]): DecoratedPrimitiveZodType<this>;
373
+ [ZodDecorator.STRING_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_SPEC]): DecoratedPrimitiveZodType<this>;
374
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
375
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
376
+ addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
377
+ }
378
+ interface ZodStringFormat<Format extends string = string> {
379
+ [ZodDecorator.IS_DB_INDEXED](): DecoratedPrimitiveZodType<this>;
380
+ [ZodDecorator.IS_FOREIGN_KEY](params?: ZodDecorator_ParamsType[ZodDecorator.IS_FOREIGN_KEY]): DecoratedPrimitiveZodType<this>;
381
+ [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
382
+ [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
383
+ [ZodDecorator.IS_PASSWORD](): DecoratedPrimitiveZodType<this>;
384
+ [ZodDecorator.IS_OTP](params?: ZodDecorator_ParamsType[ZodDecorator.IS_OTP]): DecoratedPrimitiveZodType<this>;
385
+ [ZodDecorator.IS_COLOR](): DecoratedPrimitiveZodType<this>;
386
+ [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
387
+ [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
388
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
389
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
390
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
391
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
392
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
393
+ [ZodDecorator.RAG_SOURCE](config?: RagSourceConfiguration): DecoratedPrimitiveZodType<this>;
394
+ [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
395
+ [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
396
+ [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
397
+ [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
398
+ [ZodDecorator.IS_UNIQUE](params?: UniqueFieldParams): DecoratedPrimitiveZodType<this>;
399
+ [ZodDecorator.IS_PRIMARY_KEY](): DecoratedPrimitiveZodType<this>;
400
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
401
+ [ZodDecorator.IS_EPHEMERAL](): DecoratedPrimitiveZodType<this>;
402
+ [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
403
+ [ZodDecorator.STRING_UI](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_UI]): DecoratedPrimitiveZodType<this>;
404
+ [ZodDecorator.STRING_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_SPEC]): DecoratedPrimitiveZodType<this>;
405
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
406
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
150
407
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
151
408
  }
152
409
  interface ZodNumber {
@@ -156,13 +413,42 @@ declare module 'zod' {
156
413
  [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
157
414
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
158
415
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
416
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
417
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
418
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
419
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
420
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
159
421
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
160
422
  [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
161
423
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
162
424
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
163
425
  [ZodDecorator.IS_UNIQUE](params?: UniqueFieldParams): DecoratedPrimitiveZodType<this>;
426
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
164
427
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
165
428
  [ZodDecorator.NUMBER_UI](params?: ZodDecorator_ParamsType[ZodDecorator.NUMBER_UI]): DecoratedPrimitiveZodType<this>;
429
+ [ZodDecorator.NUMBER_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.NUMBER_SPEC]): DecoratedPrimitiveZodType<this>;
430
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
431
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
432
+ addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
433
+ }
434
+ interface ZodBigInt {
435
+ [ZodDecorator.IS_DB_INDEXED](): DecoratedPrimitiveZodType<this>;
436
+ [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
437
+ [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
438
+ [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
439
+ [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
440
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
441
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
442
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
443
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
444
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
445
+ [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
446
+ [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
447
+ [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
448
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
449
+ [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
450
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
451
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
166
452
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
167
453
  }
168
454
  interface ZodBoolean {
@@ -172,11 +458,20 @@ declare module 'zod' {
172
458
  [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
173
459
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
174
460
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
461
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
462
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
463
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
464
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
465
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
175
466
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
176
467
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
177
468
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
178
469
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
179
470
  [ZodDecorator.BOOLEAN_UI](params?: ZodDecorator_ParamsType[ZodDecorator.BOOLEAN_UI]): DecoratedPrimitiveZodType<this>;
471
+ [ZodDecorator.BOOLEAN_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BOOLEAN_SPEC]): DecoratedPrimitiveZodType<this>;
472
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
473
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
474
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
180
475
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
181
476
  }
182
477
  interface ZodDate {
@@ -186,78 +481,46 @@ declare module 'zod' {
186
481
  [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
187
482
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
188
483
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
484
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
485
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
486
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
487
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
488
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
189
489
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
190
490
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
191
491
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
192
492
  [ZodDecorator.TTL](params: TtlFieldParams): DecoratedPrimitiveZodType<this>;
193
493
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
194
494
  [ZodDecorator.DATE_UI](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_UI]): DecoratedPrimitiveZodType<this>;
495
+ [ZodDecorator.DATE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_SPEC]): DecoratedPrimitiveZodType<this>;
496
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
497
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
498
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
195
499
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
196
500
  }
197
- interface ZodEmail extends ZodString {
198
- }
199
- interface ZodUUID extends ZodString {
200
- }
201
- interface ZodURL extends ZodString {
202
- }
203
- interface ZodHttpUrl extends ZodString {
204
- }
205
- interface ZodHostname extends ZodString {
206
- }
207
- interface ZodEmoji extends ZodString {
208
- }
209
- interface ZodBase64 extends ZodString {
210
- }
211
- interface ZodBase64Url extends ZodString {
212
- }
213
- interface ZodHex extends ZodString {
214
- }
215
- interface ZodJWT extends ZodString {
216
- }
217
- interface ZodNanoId extends ZodString {
218
- }
219
- interface ZodCuid extends ZodString {
220
- }
221
- interface ZodCuid2 extends ZodString {
222
- }
223
- interface ZodULID extends ZodString {
224
- }
225
- interface ZodIPv4 extends ZodString {
226
- }
227
- interface ZodIPv6 extends ZodString {
228
- }
229
- interface ZodMac extends ZodString {
230
- }
231
- interface ZodCidrV4 extends ZodString {
232
- }
233
- interface ZodCidrV6 extends ZodString {
234
- }
235
- interface ZodHash extends ZodString {
236
- }
237
- interface ZodISODate extends ZodString {
238
- }
239
- interface ZodISOTime extends ZodString {
240
- }
241
- interface ZodISODatetime extends ZodString {
242
- }
243
- interface ZodISODateTime extends ZodString {
244
- }
245
- interface ZodISODuration extends ZodString {
246
- }
247
- interface ZodEnum<T extends z.util.EnumLike> {
501
+ interface ZodEnum<out T extends z.util.EnumLike = z.util.EnumLike> {
248
502
  [ZodDecorator.IS_DB_INDEXED](): DecoratedPrimitiveZodType<this>;
249
503
  [ZodDecorator.IS_FOREIGN_KEY](): DecoratedPrimitiveZodType<this>;
250
504
  [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
251
505
  [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
252
506
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
253
507
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
508
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
509
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
510
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
511
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
512
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
254
513
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
255
514
  [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
256
515
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
257
516
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
258
517
  [ZodDecorator.SYSTEM_ENUM](name: string): DecoratedPrimitiveZodType<this>;
518
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
259
519
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
260
520
  [ZodDecorator.ENUM_UI](params?: ZodDecorator_ParamsType[ZodDecorator.ENUM_UI]): DecoratedPrimitiveZodType<this>;
521
+ [ZodDecorator.ENUM_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ENUM_SPEC]): DecoratedPrimitiveZodType<this>;
522
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
523
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
261
524
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
262
525
  }
263
526
  interface ZodArray<T extends z.ZodTypeAny> {
@@ -267,24 +530,40 @@ declare module 'zod' {
267
530
  isSortable(params?: Pick<ArrayUIEditParams, 'dnd' | 'upDownIcons'>): DecoratedPrimitiveZodType<this>;
268
531
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
269
532
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
533
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
534
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
535
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
536
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
537
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
270
538
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
271
539
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
272
540
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
273
541
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
542
+ [ZodDecorator.ARRAY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_SPEC]): DecoratedPrimitiveZodType<this>;
543
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
544
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
274
545
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
275
546
  }
276
547
  interface ZodDefault<T extends core.SomeType = core.$ZodType> {
548
+ /** @wildo_source:part:start zod.decorators.shared-structural-methods facet:layer:shared facet:family:decorator facet:family:method-surface */
277
549
  [ZodDecorator.IS_DB_INDEXED](): DecoratedPrimitiveZodType<this>;
278
550
  [ZodDecorator.IS_FOREIGN_KEY](params?: ZodDecorator_ParamsType[ZodDecorator.IS_FOREIGN_KEY]): DecoratedPrimitiveZodType<this>;
279
- [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
280
- [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
281
551
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
282
552
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
283
- [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
553
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
284
554
  [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
285
555
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
286
556
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
287
557
  [ZodDecorator.IS_UNIQUE](params?: UniqueFieldParams): DecoratedPrimitiveZodType<this>;
558
+ /** @wildo_source:part:end zod.decorators.shared-structural-methods */
559
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
560
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
561
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
562
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
563
+ [ZodDecorator.RAG_SOURCE](config?: RagSourceConfiguration): DecoratedPrimitiveZodType<this>;
564
+ [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
565
+ [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
566
+ [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
288
567
  [ZodDecorator.SYSTEM_ENUM](name: string): DecoratedPrimitiveZodType<this>;
289
568
  [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
290
569
  [ZodDecorator.IS_EPHEMERAL](): DecoratedPrimitiveZodType<this>;
@@ -296,22 +575,49 @@ declare module 'zod' {
296
575
  [ZodDecorator.DATE_UI](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_UI]): DecoratedPrimitiveZodType<this>;
297
576
  [ZodDecorator.ARRAY_UI](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_UI]): DecoratedPrimitiveZodType<this>;
298
577
  [ZodDecorator.OBJECT_UI](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_UI]): DecoratedPrimitiveZodType<this>;
578
+ [ZodDecorator.STRING_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_SPEC]): DecoratedPrimitiveZodType<this>;
579
+ [ZodDecorator.NUMBER_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.NUMBER_SPEC]): DecoratedPrimitiveZodType<this>;
580
+ [ZodDecorator.BOOLEAN_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BOOLEAN_SPEC]): DecoratedPrimitiveZodType<this>;
581
+ [ZodDecorator.ENUM_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ENUM_SPEC]): DecoratedPrimitiveZodType<this>;
582
+ [ZodDecorator.DATE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_SPEC]): DecoratedPrimitiveZodType<this>;
583
+ [ZodDecorator.DATETIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATETIME_SPEC]): DecoratedPrimitiveZodType<this>;
584
+ [ZodDecorator.TIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.TIME_SPEC]): DecoratedPrimitiveZodType<this>;
585
+ [ZodDecorator.MONEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.MONEY_SPEC]): DecoratedPrimitiveZodType<this>;
586
+ [ZodDecorator.CODE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.CODE_SPEC]): DecoratedPrimitiveZodType<this>;
587
+ [ZodDecorator.FILE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FILE_SPEC]): DecoratedPrimitiveZodType<this>;
588
+ [ZodDecorator.DURATION_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DURATION_SPEC]): DecoratedPrimitiveZodType<this>;
589
+ [ZodDecorator.PHONE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.PHONE_SPEC]): DecoratedPrimitiveZodType<this>;
590
+ [ZodDecorator.BIGDECIMAL_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BIGDECIMAL_SPEC]): DecoratedPrimitiveZodType<this>;
591
+ [ZodDecorator.FOREIGN_KEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FOREIGN_KEY_SPEC]): DecoratedPrimitiveZodType<this>;
592
+ [ZodDecorator.ARRAY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_SPEC]): DecoratedPrimitiveZodType<this>;
593
+ [ZodDecorator.OBJECT_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_SPEC]): DecoratedPrimitiveZodType<this>;
594
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
595
+ [ZodDecorator.OBJECT_BUSINESS_KEY_SET](fields: string[], params?: Omit<BusinessKeySetParams, 'fields'>): DecoratedPrimitiveZodType<this>;
299
596
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
300
597
  }
301
598
  interface ZodOptional<T extends core.SomeType = core.$ZodType> {
599
+ /** @wildo_source:part:start zod.decorators.shared-structural-methods facet:layer:shared facet:family:decorator facet:family:method-surface */
302
600
  [ZodDecorator.IS_DB_INDEXED](): DecoratedPrimitiveZodType<this>;
303
601
  [ZodDecorator.IS_FOREIGN_KEY](params?: ZodDecorator_ParamsType[ZodDecorator.IS_FOREIGN_KEY]): DecoratedPrimitiveZodType<this>;
304
- [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
305
- [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
306
602
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
307
603
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
308
- [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
604
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
309
605
  [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
310
606
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
311
607
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
312
608
  [ZodDecorator.IS_UNIQUE](params?: UniqueFieldParams): DecoratedPrimitiveZodType<this>;
609
+ /** @wildo_source:part:end zod.decorators.shared-structural-methods */
610
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
611
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
612
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
613
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
614
+ [ZodDecorator.RAG_SOURCE](config?: RagSourceConfiguration): DecoratedPrimitiveZodType<this>;
615
+ [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
616
+ [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
617
+ [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
313
618
  [ZodDecorator.SYSTEM_ENUM](name: string): DecoratedPrimitiveZodType<this>;
314
619
  [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
620
+ [ZodDecorator.IS_BUSINESS_KEY](): DecoratedPrimitiveZodType<this>;
315
621
  [ZodDecorator.IS_EPHEMERAL](): DecoratedPrimitiveZodType<this>;
316
622
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
317
623
  [ZodDecorator.BOOLEAN_UI](params?: ZodDecorator_ParamsType[ZodDecorator.BOOLEAN_UI]): DecoratedPrimitiveZodType<this>;
@@ -319,8 +625,39 @@ declare module 'zod' {
319
625
  [ZodDecorator.NUMBER_UI](params?: ZodDecorator_ParamsType[ZodDecorator.NUMBER_UI]): DecoratedPrimitiveZodType<this>;
320
626
  [ZodDecorator.ENUM_UI](params?: ZodDecorator_ParamsType[ZodDecorator.ENUM_UI]): DecoratedPrimitiveZodType<this>;
321
627
  [ZodDecorator.DATE_UI](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_UI]): DecoratedPrimitiveZodType<this>;
628
+ [ZodDecorator.DATETIME_UI](params?: ZodDecorator_ParamsType[ZodDecorator.DATETIME_UI]): DecoratedPrimitiveZodType<this>;
629
+ [ZodDecorator.TIME_UI](params?: ZodDecorator_ParamsType[ZodDecorator.TIME_UI]): DecoratedPrimitiveZodType<this>;
630
+ [ZodDecorator.MONEY_UI](params?: ZodDecorator_ParamsType[ZodDecorator.MONEY_UI]): DecoratedPrimitiveZodType<this>;
631
+ [ZodDecorator.CODE_UI](params?: ZodDecorator_ParamsType[ZodDecorator.CODE_UI]): DecoratedPrimitiveZodType<this>;
632
+ [ZodDecorator.FILE_UI](params?: ZodDecorator_ParamsType[ZodDecorator.FILE_UI]): DecoratedPrimitiveZodType<this>;
633
+ [ZodDecorator.DURATION_UI](params?: ZodDecorator_ParamsType[ZodDecorator.DURATION_UI]): DecoratedPrimitiveZodType<this>;
634
+ [ZodDecorator.PHONE_UI](params?: ZodDecorator_ParamsType[ZodDecorator.PHONE_UI]): DecoratedPrimitiveZodType<this>;
635
+ [ZodDecorator.BIGDECIMAL_UI](params?: ZodDecorator_ParamsType[ZodDecorator.BIGDECIMAL_UI]): DecoratedPrimitiveZodType<this>;
636
+ [ZodDecorator.FOREIGN_KEY_UI](params?: ZodDecorator_ParamsType[ZodDecorator.FOREIGN_KEY_UI]): DecoratedPrimitiveZodType<this>;
322
637
  [ZodDecorator.ARRAY_UI](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_UI]): DecoratedPrimitiveZodType<this>;
323
638
  [ZodDecorator.OBJECT_UI](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_UI]): DecoratedPrimitiveZodType<this>;
639
+ [ZodDecorator.STRING_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_SPEC]): DecoratedPrimitiveZodType<this>;
640
+ [ZodDecorator.NUMBER_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.NUMBER_SPEC]): DecoratedPrimitiveZodType<this>;
641
+ [ZodDecorator.BOOLEAN_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BOOLEAN_SPEC]): DecoratedPrimitiveZodType<this>;
642
+ [ZodDecorator.ENUM_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ENUM_SPEC]): DecoratedPrimitiveZodType<this>;
643
+ [ZodDecorator.DATE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_SPEC]): DecoratedPrimitiveZodType<this>;
644
+ [ZodDecorator.DATETIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATETIME_SPEC]): DecoratedPrimitiveZodType<this>;
645
+ [ZodDecorator.TIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.TIME_SPEC]): DecoratedPrimitiveZodType<this>;
646
+ [ZodDecorator.MONEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.MONEY_SPEC]): DecoratedPrimitiveZodType<this>;
647
+ [ZodDecorator.CODE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.CODE_SPEC]): DecoratedPrimitiveZodType<this>;
648
+ [ZodDecorator.FILE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FILE_SPEC]): DecoratedPrimitiveZodType<this>;
649
+ [ZodDecorator.DURATION_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DURATION_SPEC]): DecoratedPrimitiveZodType<this>;
650
+ [ZodDecorator.PHONE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.PHONE_SPEC]): DecoratedPrimitiveZodType<this>;
651
+ [ZodDecorator.BIGDECIMAL_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BIGDECIMAL_SPEC]): DecoratedPrimitiveZodType<this>;
652
+ [ZodDecorator.FOREIGN_KEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FOREIGN_KEY_SPEC]): DecoratedPrimitiveZodType<this>;
653
+ [ZodDecorator.ARRAY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_SPEC]): DecoratedPrimitiveZodType<this>;
654
+ [ZodDecorator.OBJECT_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_SPEC]): DecoratedPrimitiveZodType<this>;
655
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
656
+ [ZodDecorator.TTL](params?: TtlFieldParams): DecoratedPrimitiveZodType<this>;
657
+ [ZodDecorator.IS_PASSWORD](): DecoratedPrimitiveZodType<this>;
658
+ [ZodDecorator.IS_OTP](params?: ZodDecorator_ParamsType[ZodDecorator.IS_OTP]): DecoratedPrimitiveZodType<this>;
659
+ [ZodDecorator.IS_COLOR](): DecoratedPrimitiveZodType<this>;
660
+ [ZodDecorator.OBJECT_BUSINESS_KEY_SET](fields: string[], params?: Omit<BusinessKeySetParams, 'fields'>): DecoratedPrimitiveZodType<this>;
324
661
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
325
662
  }
326
663
  interface ZodNullable<T extends core.SomeType = core.$ZodType> {
@@ -330,6 +667,12 @@ declare module 'zod' {
330
667
  [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
331
668
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
332
669
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
670
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
671
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
672
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
673
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
674
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
675
+ [ZodDecorator.RAG_SOURCE](config?: RagSourceConfiguration): DecoratedPrimitiveZodType<this>;
333
676
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
334
677
  [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
335
678
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
@@ -346,6 +689,24 @@ declare module 'zod' {
346
689
  [ZodDecorator.DATE_UI](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_UI]): DecoratedPrimitiveZodType<this>;
347
690
  [ZodDecorator.ARRAY_UI](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_UI]): DecoratedPrimitiveZodType<this>;
348
691
  [ZodDecorator.OBJECT_UI](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_UI]): DecoratedPrimitiveZodType<this>;
692
+ [ZodDecorator.STRING_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.STRING_SPEC]): DecoratedPrimitiveZodType<this>;
693
+ [ZodDecorator.NUMBER_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.NUMBER_SPEC]): DecoratedPrimitiveZodType<this>;
694
+ [ZodDecorator.BOOLEAN_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BOOLEAN_SPEC]): DecoratedPrimitiveZodType<this>;
695
+ [ZodDecorator.ENUM_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ENUM_SPEC]): DecoratedPrimitiveZodType<this>;
696
+ [ZodDecorator.DATE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATE_SPEC]): DecoratedPrimitiveZodType<this>;
697
+ [ZodDecorator.DATETIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DATETIME_SPEC]): DecoratedPrimitiveZodType<this>;
698
+ [ZodDecorator.TIME_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.TIME_SPEC]): DecoratedPrimitiveZodType<this>;
699
+ [ZodDecorator.MONEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.MONEY_SPEC]): DecoratedPrimitiveZodType<this>;
700
+ [ZodDecorator.CODE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.CODE_SPEC]): DecoratedPrimitiveZodType<this>;
701
+ [ZodDecorator.FILE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FILE_SPEC]): DecoratedPrimitiveZodType<this>;
702
+ [ZodDecorator.DURATION_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.DURATION_SPEC]): DecoratedPrimitiveZodType<this>;
703
+ [ZodDecorator.PHONE_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.PHONE_SPEC]): DecoratedPrimitiveZodType<this>;
704
+ [ZodDecorator.BIGDECIMAL_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.BIGDECIMAL_SPEC]): DecoratedPrimitiveZodType<this>;
705
+ [ZodDecorator.FOREIGN_KEY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.FOREIGN_KEY_SPEC]): DecoratedPrimitiveZodType<this>;
706
+ [ZodDecorator.ARRAY_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.ARRAY_SPEC]): DecoratedPrimitiveZodType<this>;
707
+ [ZodDecorator.OBJECT_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_SPEC]): DecoratedPrimitiveZodType<this>;
708
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
709
+ [ZodDecorator.OBJECT_BUSINESS_KEY_SET](fields: string[], params?: Omit<BusinessKeySetParams, 'fields'>): DecoratedPrimitiveZodType<this>;
349
710
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
350
711
  }
351
712
  interface ZodUnion<T extends readonly core.SomeType[] = readonly core.$ZodType[]> {
@@ -355,6 +716,11 @@ declare module 'zod' {
355
716
  [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
356
717
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
357
718
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
719
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
720
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
721
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
722
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
723
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
358
724
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
359
725
  [ZodDecorator.IS_DISCRIMINATOR](params?: DiscriminatorFieldParams): DecoratedPrimitiveZodType<this>;
360
726
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
@@ -362,20 +728,38 @@ declare module 'zod' {
362
728
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
363
729
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
364
730
  }
365
- interface ZodObject<Shape extends core.$ZodShape = core.$ZodShape, Extra extends core.$ZodObjectExtra = core.$ZodObjectExtra> {
731
+ interface ZodObject<out Shape extends z.core.$ZodShape = z.core.$ZodLooseShape, out Config extends z.core.$ZodObjectConfig = z.core.$strip> {
366
732
  [ZodDecorator.OBJECT_UI](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_UI]): DecoratedPrimitiveZodType<this>;
733
+ [ZodDecorator.OBJECT_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_SPEC]): DecoratedPrimitiveZodType<this>;
367
734
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
368
735
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
736
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
737
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
738
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
739
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
740
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
369
741
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
370
742
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
371
743
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
372
744
  [ZodDecorator.IS_CRDT](): DecoratedPrimitiveZodType<this>;
745
+ [ZodDecorator.OBJECT_BUSINESS_KEY_SET](fields: string[], params?: Omit<BusinessKeySetParams, 'fields'>): DecoratedPrimitiveZodType<this>;
746
+ [ZodDecorator.SHOW_WHEN](params: ZodDecorator_ParamsType[ZodDecorator.SHOW_WHEN]): DecoratedPrimitiveZodType<this>;
747
+ [ZodDecorator.IS_DRAFT_RELAXED](): DecoratedPrimitiveZodType<this>;
748
+ [ZodDecorator.IS_DB_INDEXED](): DecoratedPrimitiveZodType<this>;
749
+ [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
750
+ [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
373
751
  addDecorators(decorators: DecoratorInput[]): DecoratedPrimitiveZodType<this>;
374
752
  }
375
753
  interface ZodRecord<Key extends core.$ZodRecordKey = core.$ZodRecordKey, Value extends core.SomeType = core.$ZodType> {
376
754
  [ZodDecorator.OBJECT_UI](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_UI]): DecoratedPrimitiveZodType<this>;
755
+ [ZodDecorator.OBJECT_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_SPEC]): DecoratedPrimitiveZodType<this>;
377
756
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
378
757
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
758
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
759
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
760
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
761
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
762
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
379
763
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
380
764
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
381
765
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;
@@ -388,8 +772,14 @@ declare module 'zod' {
388
772
  [ZodDecorator.IS_HIDDEN](params?: ZodDecorator_ParamsType[ZodDecorator.IS_HIDDEN]): DecoratedPrimitiveZodType<this>;
389
773
  [ZodDecorator.IS_NOT_EDITABLE](params?: ZodDecorator_ParamsType[ZodDecorator.IS_NOT_EDITABLE]): DecoratedPrimitiveZodType<this>;
390
774
  [ZodDecorator.OBJECT_UI](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_UI]): DecoratedPrimitiveZodType<this>;
775
+ [ZodDecorator.OBJECT_SPEC](params?: ZodDecorator_ParamsType[ZodDecorator.OBJECT_SPEC]): DecoratedPrimitiveZodType<this>;
391
776
  [ZodDecorator.IS_SUMMARY_FIELD](params?: ZodDecorator_ParamsType[ZodDecorator.IS_SUMMARY_FIELD]): DecoratedPrimitiveZodType<this>;
392
777
  [ZodDecorator.IS_BACKEND_ONLY](params?: BackendOnlyFieldParams): DecoratedPrimitiveZodType<this>;
778
+ [ZodDecorator.IS_WRITE_ONLY_SECRET](params?: WriteOnlySecretFieldParams): DecoratedPrimitiveZodType<this>;
779
+ [ZodDecorator.IMPERSONALIZE_WITH](treatment: string, options?: Omit<ImpersonalizeFieldParams, 'treatment'>): DecoratedPrimitiveZodType<this>;
780
+ [ZodDecorator.PORTABILITY_PROVENANCE](provenance: string): DecoratedPrimitiveZodType<this>;
781
+ [ZodDecorator.DATA_CATEGORIES](categories: string | readonly string[]): DecoratedPrimitiveZodType<this>;
782
+ [ZodDecorator.IS_AUDIT_EVIDENCE](): DecoratedPrimitiveZodType<this>;
393
783
  [ZodDecorator.IS_VIRTUAL](params: VirtualFieldParams): DecoratedPrimitiveZodType<this>;
394
784
  [ZodDecorator.EXCLUDE_FROM_CREATE](): DecoratedPrimitiveZodType<this>;
395
785
  [ZodDecorator.EXCLUDE_FROM_UPDATE](): DecoratedPrimitiveZodType<this>;