@wildo-ai/zod-decorators 1.1.4 → 1.1.5

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 (66) hide show
  1. package/dist/esm/currencies.shared.schemas.d.ts.map +1 -1
  2. package/dist/esm/currencies.shared.schemas.js.map +1 -1
  3. package/dist/esm/files/agent-file-formats.d.ts +51 -37
  4. package/dist/esm/files/agent-file-formats.d.ts.map +1 -1
  5. package/dist/esm/files/agent-file-formats.js +54 -47
  6. package/dist/esm/files/agent-file-formats.js.map +1 -1
  7. package/dist/esm/files/extension-nature-map.d.ts.map +1 -1
  8. package/dist/esm/files/mime-registry.d.ts.map +1 -1
  9. package/dist/esm/files/unified-registry.d.ts +2 -2
  10. package/dist/esm/files/unified-registry.d.ts.map +1 -1
  11. package/dist/esm/files/unified-registry.js +1 -1
  12. package/dist/esm/files/unified-registry.js.map +1 -1
  13. package/dist/esm/index.d.ts +1 -0
  14. package/dist/esm/index.d.ts.map +1 -1
  15. package/dist/esm/index.js +1 -0
  16. package/dist/esm/index.js.map +1 -1
  17. package/dist/esm/testing/decorated-test-schemas.d.ts.map +1 -1
  18. package/dist/esm/testing.d.ts +11 -0
  19. package/dist/esm/testing.d.ts.map +1 -1
  20. package/dist/esm/testing.js +11 -0
  21. package/dist/esm/testing.js.map +1 -1
  22. package/dist/esm/zod-address.d.ts +146 -0
  23. package/dist/esm/zod-address.d.ts.map +1 -0
  24. package/dist/esm/zod-address.js +176 -0
  25. package/dist/esm/zod-address.js.map +1 -0
  26. package/dist/esm/zod-bigdecimal.d.ts.map +1 -1
  27. package/dist/esm/zod-code.d.ts +2 -0
  28. package/dist/esm/zod-code.d.ts.map +1 -1
  29. package/dist/esm/zod-code.js.map +1 -1
  30. package/dist/esm/zod-color.d.ts.map +1 -1
  31. package/dist/esm/zod-decorators.types.d.ts +265 -19
  32. package/dist/esm/zod-decorators.types.d.ts.map +1 -1
  33. package/dist/esm/zod-decorators.types.js +142 -0
  34. package/dist/esm/zod-decorators.types.js.map +1 -1
  35. package/dist/esm/zod-duration.d.ts +2 -0
  36. package/dist/esm/zod-duration.d.ts.map +1 -1
  37. package/dist/esm/zod-duration.js.map +1 -1
  38. package/dist/esm/zod-file.d.ts +70 -4
  39. package/dist/esm/zod-file.d.ts.map +1 -1
  40. package/dist/esm/zod-file.js +76 -61
  41. package/dist/esm/zod-file.js.map +1 -1
  42. package/dist/esm/zod-money.d.ts +2 -0
  43. package/dist/esm/zod-money.d.ts.map +1 -1
  44. package/dist/esm/zod-money.js.map +1 -1
  45. package/dist/esm/zod-phone.d.ts +8 -0
  46. package/dist/esm/zod-phone.d.ts.map +1 -1
  47. package/dist/esm/zod-phone.js +6 -1
  48. package/dist/esm/zod-phone.js.map +1 -1
  49. package/dist/esm/zod-range.d.ts.map +1 -1
  50. package/dist/esm/zod-utils.shared.d.ts +311 -9
  51. package/dist/esm/zod-utils.shared.d.ts.map +1 -1
  52. package/dist/esm/zod-utils.shared.js +898 -86
  53. package/dist/esm/zod-utils.shared.js.map +1 -1
  54. package/dist/esm/zod-versioned.d.ts.map +1 -1
  55. package/dist/esm/zod-versioned.js.map +1 -1
  56. package/dist/esm/zod.module-override.d.ts +27 -1
  57. package/dist/esm/zod.module-override.d.ts.map +1 -1
  58. package/dist/esm/zod.module-override.js +52 -7
  59. package/dist/esm/zod.module-override.js.map +1 -1
  60. package/dist/tsconfig.build.tsbuildinfo +1 -1
  61. package/package.json +2 -7
  62. package/dist/esm/.native.tsbuildinfo +0 -1
  63. package/dist/esm/companion-exports.d.ts +0 -8
  64. package/dist/esm/companion-exports.d.ts.map +0 -1
  65. package/dist/esm/companion-exports.js +0 -8
  66. package/dist/esm/companion-exports.js.map +0 -1
@@ -44,6 +44,7 @@ export declare enum FieldSchemaType {
44
44
  FILE = "file",// File schemas created by z_file() - detected by SCHEMA_METADATA.fileConfig
45
45
  DURATION = "duration",// Duration schemas created by z_duration() - detected by SCHEMA_METADATA.durationConfig
46
46
  PHONE = "phone",// Phone schemas created by z_phone() - detected by SCHEMA_METADATA.phoneConfig
47
+ ADDRESS = "address",// Address schemas created by z_address() - detected by SCHEMA_METADATA.addressConfig
47
48
  VERSIONED_FOREIGN_KEY = "versioned_foreign_key",// Versioned foreign key schemas created by z_foreignKeyVersioned() - detected by SCHEMA_METADATA.versionedForeignKeyConfig
48
49
  VERSIONED_OBJECT = "versioned_object",// Versioned object schemas created by versioned() - detected by SCHEMA_METADATA.versionedConfig
49
50
  UNKNOWN = "unknown"
@@ -67,7 +68,8 @@ export declare enum FormFieldComponent {
67
68
  BIGDECIMAL_RANGE = "bigdecimal-range",// BigDecimal range input (from/to bigdecimal)
68
69
  MONEY_RANGE = "money-range",// Money range input (from/to money)
69
70
  DURATION = "duration",// Duration input (value + unit selector)
70
- PHONE = "phone"
71
+ PHONE = "phone",// Phone input (country + number, E.164 output)
72
+ ADDRESS = "address"
71
73
  }
72
74
  /**
73
75
  * Official HTML autocomplete field identifiers.
@@ -197,11 +199,11 @@ export type ResponsiveChromeMode = EditChromeMode | Partial<Record<ViewportBreak
197
199
  */
198
200
  export type ResponsiveAware<T> = T | Partial<Record<ViewportBreakpoint, T>>;
199
201
  export type FormFieldSchemaTypeComponents = {
200
- [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? FormFieldComponent.INPUT | FormFieldComponent.TEXTAREA | FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP | FormFieldComponent.DATE | FormFieldComponent.TIME | FormFieldComponent.DATETIME : K extends FieldSchemaType.NUMBER ? FormFieldComponent.INPUT | FormFieldComponent.SLIDER | FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP : K extends FieldSchemaType.BIGINT ? FormFieldComponent.INPUT : K extends FieldSchemaType.BOOLEAN ? FormFieldComponent.SWITCH | FormFieldComponent.CHECKBOX | FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP : K extends FieldSchemaType.ENUM ? FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP : K extends FieldSchemaType.DATE ? FormFieldComponent.DATE | FormFieldComponent.DATETIME | FormFieldComponent.INPUT : K extends FieldSchemaType.TIME ? FormFieldComponent.TIME | FormFieldComponent.INPUT : K extends FieldSchemaType.DATETIME ? FormFieldComponent.DATETIME | FormFieldComponent.INPUT : K extends FieldSchemaType.RANGE_NUMBER ? FormFieldComponent.RANGE_SLIDER : K extends FieldSchemaType.RANGE_DATE ? FormFieldComponent.DATE_RANGE : K extends FieldSchemaType.RANGE_DATETIME ? FormFieldComponent.DATETIME_RANGE : K extends FieldSchemaType.RANGE_TIME ? FormFieldComponent.TIME_RANGE : K extends FieldSchemaType.RANGE_BIGDECIMAL ? FormFieldComponent.BIGDECIMAL_RANGE : K extends FieldSchemaType.RANGE_MONEY ? FormFieldComponent.MONEY_RANGE : K extends FieldSchemaType.MONEY ? FormFieldComponent.INPUT : K extends FieldSchemaType.DURATION ? FormFieldComponent.DURATION : K extends FieldSchemaType.PHONE ? FormFieldComponent.PHONE : K extends FieldSchemaType.BIGDECIMAL ? FormFieldComponent.INPUT : K extends FieldSchemaType.CODE ? FormFieldComponent.TEXTAREA : K extends FieldSchemaType.FILE ? FormFieldComponent.INPUT : K extends FieldSchemaType.ARRAY ? FormFieldComponent.CHECKBOX_GROUP | FormFieldComponent.SELECT : K extends FieldSchemaType.SET ? FormFieldComponent.INPUT | FormFieldComponent.CHECKBOX_GROUP | FormFieldComponent.SELECT : K extends FieldSchemaType.TUPLE ? FormFieldComponent.INPUT : K extends FieldSchemaType.UNKNOWN ? FormFieldComponent.INPUT : never;
202
+ [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? FormFieldComponent.INPUT | FormFieldComponent.TEXTAREA | FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP | FormFieldComponent.DATE | FormFieldComponent.TIME | FormFieldComponent.DATETIME : K extends FieldSchemaType.NUMBER ? FormFieldComponent.INPUT | FormFieldComponent.SLIDER | FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP : K extends FieldSchemaType.BIGINT ? FormFieldComponent.INPUT : K extends FieldSchemaType.BOOLEAN ? FormFieldComponent.SWITCH | FormFieldComponent.CHECKBOX | FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP : K extends FieldSchemaType.ENUM ? FormFieldComponent.SELECT | FormFieldComponent.RADIO_GROUP : K extends FieldSchemaType.DATE ? FormFieldComponent.DATE | FormFieldComponent.DATETIME | FormFieldComponent.INPUT : K extends FieldSchemaType.TIME ? FormFieldComponent.TIME | FormFieldComponent.INPUT : K extends FieldSchemaType.DATETIME ? FormFieldComponent.DATETIME | FormFieldComponent.INPUT : K extends FieldSchemaType.RANGE_NUMBER ? FormFieldComponent.RANGE_SLIDER : K extends FieldSchemaType.RANGE_DATE ? FormFieldComponent.DATE_RANGE : K extends FieldSchemaType.RANGE_DATETIME ? FormFieldComponent.DATETIME_RANGE : K extends FieldSchemaType.RANGE_TIME ? FormFieldComponent.TIME_RANGE : K extends FieldSchemaType.RANGE_BIGDECIMAL ? FormFieldComponent.BIGDECIMAL_RANGE : K extends FieldSchemaType.RANGE_MONEY ? FormFieldComponent.MONEY_RANGE : K extends FieldSchemaType.MONEY ? FormFieldComponent.INPUT : K extends FieldSchemaType.DURATION ? FormFieldComponent.DURATION : K extends FieldSchemaType.PHONE ? FormFieldComponent.PHONE : K extends FieldSchemaType.ADDRESS ? FormFieldComponent.ADDRESS : K extends FieldSchemaType.BIGDECIMAL ? FormFieldComponent.INPUT : K extends FieldSchemaType.CODE ? FormFieldComponent.TEXTAREA : K extends FieldSchemaType.FILE ? FormFieldComponent.INPUT : K extends FieldSchemaType.ARRAY ? FormFieldComponent.CHECKBOX_GROUP | FormFieldComponent.SELECT : K extends FieldSchemaType.SET ? FormFieldComponent.INPUT | FormFieldComponent.CHECKBOX_GROUP | FormFieldComponent.SELECT : K extends FieldSchemaType.TUPLE ? FormFieldComponent.INPUT : K extends FieldSchemaType.UNKNOWN ? FormFieldComponent.INPUT : never;
201
203
  };
202
204
  export type FormComponentForSchemaType<T extends FieldSchemaType> = FormFieldSchemaTypeComponents[T];
203
205
  export type FormFieldSchemaTypeDefaultComponent = {
204
- [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? FormFieldComponent.INPUT : K extends FieldSchemaType.NUMBER ? FormFieldComponent.INPUT : K extends FieldSchemaType.BIGINT ? FormFieldComponent.INPUT : K extends FieldSchemaType.BOOLEAN ? FormFieldComponent.SWITCH : K extends FieldSchemaType.ENUM ? FormFieldComponent.SELECT : K extends FieldSchemaType.DATE ? FormFieldComponent.DATE : K extends FieldSchemaType.TIME ? FormFieldComponent.TIME : K extends FieldSchemaType.DATETIME ? FormFieldComponent.DATETIME : K extends FieldSchemaType.RANGE_NUMBER ? FormFieldComponent.RANGE_SLIDER : K extends FieldSchemaType.RANGE_DATE ? FormFieldComponent.DATE_RANGE : K extends FieldSchemaType.RANGE_DATETIME ? FormFieldComponent.DATETIME_RANGE : K extends FieldSchemaType.RANGE_TIME ? FormFieldComponent.TIME_RANGE : K extends FieldSchemaType.RANGE_BIGDECIMAL ? FormFieldComponent.BIGDECIMAL_RANGE : K extends FieldSchemaType.RANGE_MONEY ? FormFieldComponent.MONEY_RANGE : K extends FieldSchemaType.MONEY ? FormFieldComponent.INPUT : K extends FieldSchemaType.DURATION ? FormFieldComponent.DURATION : K extends FieldSchemaType.PHONE ? FormFieldComponent.PHONE : K extends FieldSchemaType.BIGDECIMAL ? FormFieldComponent.INPUT : K extends FieldSchemaType.CODE ? FormFieldComponent.TEXTAREA : K extends FieldSchemaType.FILE ? FormFieldComponent.INPUT : FormFieldComponent.INPUT;
206
+ [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? FormFieldComponent.INPUT : K extends FieldSchemaType.NUMBER ? FormFieldComponent.INPUT : K extends FieldSchemaType.BIGINT ? FormFieldComponent.INPUT : K extends FieldSchemaType.BOOLEAN ? FormFieldComponent.SWITCH : K extends FieldSchemaType.ENUM ? FormFieldComponent.SELECT : K extends FieldSchemaType.DATE ? FormFieldComponent.DATE : K extends FieldSchemaType.TIME ? FormFieldComponent.TIME : K extends FieldSchemaType.DATETIME ? FormFieldComponent.DATETIME : K extends FieldSchemaType.RANGE_NUMBER ? FormFieldComponent.RANGE_SLIDER : K extends FieldSchemaType.RANGE_DATE ? FormFieldComponent.DATE_RANGE : K extends FieldSchemaType.RANGE_DATETIME ? FormFieldComponent.DATETIME_RANGE : K extends FieldSchemaType.RANGE_TIME ? FormFieldComponent.TIME_RANGE : K extends FieldSchemaType.RANGE_BIGDECIMAL ? FormFieldComponent.BIGDECIMAL_RANGE : K extends FieldSchemaType.RANGE_MONEY ? FormFieldComponent.MONEY_RANGE : K extends FieldSchemaType.MONEY ? FormFieldComponent.INPUT : K extends FieldSchemaType.DURATION ? FormFieldComponent.DURATION : K extends FieldSchemaType.PHONE ? FormFieldComponent.PHONE : K extends FieldSchemaType.ADDRESS ? FormFieldComponent.ADDRESS : K extends FieldSchemaType.BIGDECIMAL ? FormFieldComponent.INPUT : K extends FieldSchemaType.CODE ? FormFieldComponent.TEXTAREA : K extends FieldSchemaType.FILE ? FormFieldComponent.INPUT : FormFieldComponent.INPUT;
205
207
  };
206
208
  export type DefaultFormComponentForSchemaType<T extends FieldSchemaType> = FormFieldSchemaTypeDefaultComponent[T];
207
209
  export type DecoratorConfig<T extends ZodDecorator> = {
@@ -224,6 +226,7 @@ export declare enum DisplayFieldComponent {
224
226
  BIGDECIMAL = "bigdecimal",
225
227
  DURATION = "duration",
226
228
  PHONE = "phone",
229
+ ADDRESS = "address",
227
230
  RANGE_NUMBER = "range-number",
228
231
  RANGE_DATE = "range-date",
229
232
  RANGE_TIME = "range-time",
@@ -232,11 +235,11 @@ export declare enum DisplayFieldComponent {
232
235
  RANGE_MONEY = "range-money"
233
236
  }
234
237
  export type DisplayFieldSchemaTypeComponents = {
235
- [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? DisplayFieldComponent.STRING | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.NUMBER ? DisplayFieldComponent.NUMBER | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.BIGINT ? DisplayFieldComponent.NUMBER | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.BOOLEAN ? DisplayFieldComponent.BOOLEAN | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.ENUM ? DisplayFieldComponent.ENUM | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.DATE ? DisplayFieldComponent.DATE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.TIME ? DisplayFieldComponent.TIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.DATETIME ? DisplayFieldComponent.DATETIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.ARRAY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RECORD ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.MAP ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_NUMBER ? DisplayFieldComponent.RANGE_NUMBER | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_DATE ? DisplayFieldComponent.RANGE_DATE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_TIME ? DisplayFieldComponent.RANGE_TIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_DATETIME ? DisplayFieldComponent.RANGE_DATETIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_BIGDECIMAL ? DisplayFieldComponent.RANGE_BIGDECIMAL | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_MONEY ? DisplayFieldComponent.RANGE_MONEY | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.MONEY ? DisplayFieldComponent.MONEY | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.DURATION ? DisplayFieldComponent.DURATION | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.PHONE ? DisplayFieldComponent.PHONE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.BIGDECIMAL ? DisplayFieldComponent.BIGDECIMAL | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.CODE ? DisplayFieldComponent.CODE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.FILE ? DisplayFieldComponent.FILE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.SET ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.TUPLE ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_FOREIGN_KEY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.UNKNOWN ? DisplayFieldComponent.SIMPLE_TEXT : never;
238
+ [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? DisplayFieldComponent.STRING | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.NUMBER ? DisplayFieldComponent.NUMBER | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.BIGINT ? DisplayFieldComponent.NUMBER | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.BOOLEAN ? DisplayFieldComponent.BOOLEAN | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.ENUM ? DisplayFieldComponent.ENUM | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.DATE ? DisplayFieldComponent.DATE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.TIME ? DisplayFieldComponent.TIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.DATETIME ? DisplayFieldComponent.DATETIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.ARRAY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RECORD ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.MAP ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_NUMBER ? DisplayFieldComponent.RANGE_NUMBER | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_DATE ? DisplayFieldComponent.RANGE_DATE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_TIME ? DisplayFieldComponent.RANGE_TIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_DATETIME ? DisplayFieldComponent.RANGE_DATETIME | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_BIGDECIMAL ? DisplayFieldComponent.RANGE_BIGDECIMAL | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_MONEY ? DisplayFieldComponent.RANGE_MONEY | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.MONEY ? DisplayFieldComponent.MONEY | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.DURATION ? DisplayFieldComponent.DURATION | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.PHONE ? DisplayFieldComponent.PHONE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.ADDRESS ? DisplayFieldComponent.ADDRESS | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.BIGDECIMAL ? DisplayFieldComponent.BIGDECIMAL | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.CODE ? DisplayFieldComponent.CODE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.FILE ? DisplayFieldComponent.FILE | DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.SET ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.TUPLE ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_FOREIGN_KEY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.UNKNOWN ? DisplayFieldComponent.SIMPLE_TEXT : never;
236
239
  };
237
240
  export type DisplayComponentForSchemaType<T extends FieldSchemaType> = DisplayFieldSchemaTypeComponents[T];
238
241
  export type DisplayFieldSchemaTypeDefaultComponent = {
239
- [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? DisplayFieldComponent.STRING : K extends FieldSchemaType.NUMBER ? DisplayFieldComponent.NUMBER : K extends FieldSchemaType.BIGINT ? DisplayFieldComponent.NUMBER : K extends FieldSchemaType.BOOLEAN ? DisplayFieldComponent.BOOLEAN : K extends FieldSchemaType.ENUM ? DisplayFieldComponent.ENUM : K extends FieldSchemaType.DATE ? DisplayFieldComponent.DATE : K extends FieldSchemaType.TIME ? DisplayFieldComponent.TIME : K extends FieldSchemaType.DATETIME ? DisplayFieldComponent.DATETIME : K extends FieldSchemaType.OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.ARRAY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RECORD ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.MAP ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_NUMBER ? DisplayFieldComponent.RANGE_NUMBER : K extends FieldSchemaType.RANGE_DATE ? DisplayFieldComponent.RANGE_DATE : K extends FieldSchemaType.RANGE_TIME ? DisplayFieldComponent.RANGE_TIME : K extends FieldSchemaType.RANGE_DATETIME ? DisplayFieldComponent.RANGE_DATETIME : K extends FieldSchemaType.RANGE_BIGDECIMAL ? DisplayFieldComponent.RANGE_BIGDECIMAL : K extends FieldSchemaType.RANGE_MONEY ? DisplayFieldComponent.RANGE_MONEY : K extends FieldSchemaType.MONEY ? DisplayFieldComponent.MONEY : K extends FieldSchemaType.DURATION ? DisplayFieldComponent.DURATION : K extends FieldSchemaType.PHONE ? DisplayFieldComponent.PHONE : K extends FieldSchemaType.BIGDECIMAL ? DisplayFieldComponent.BIGDECIMAL : K extends FieldSchemaType.CODE ? DisplayFieldComponent.CODE : K extends FieldSchemaType.FILE ? DisplayFieldComponent.FILE : K extends FieldSchemaType.SET ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.TUPLE ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_FOREIGN_KEY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : DisplayFieldComponent.SIMPLE_TEXT;
242
+ [K in FieldSchemaType]: K extends FieldSchemaType.STRING ? DisplayFieldComponent.STRING : K extends FieldSchemaType.NUMBER ? DisplayFieldComponent.NUMBER : K extends FieldSchemaType.BIGINT ? DisplayFieldComponent.NUMBER : K extends FieldSchemaType.BOOLEAN ? DisplayFieldComponent.BOOLEAN : K extends FieldSchemaType.ENUM ? DisplayFieldComponent.ENUM : K extends FieldSchemaType.DATE ? DisplayFieldComponent.DATE : K extends FieldSchemaType.TIME ? DisplayFieldComponent.TIME : K extends FieldSchemaType.DATETIME ? DisplayFieldComponent.DATETIME : K extends FieldSchemaType.OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.ARRAY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RECORD ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.MAP ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.RANGE_NUMBER ? DisplayFieldComponent.RANGE_NUMBER : K extends FieldSchemaType.RANGE_DATE ? DisplayFieldComponent.RANGE_DATE : K extends FieldSchemaType.RANGE_TIME ? DisplayFieldComponent.RANGE_TIME : K extends FieldSchemaType.RANGE_DATETIME ? DisplayFieldComponent.RANGE_DATETIME : K extends FieldSchemaType.RANGE_BIGDECIMAL ? DisplayFieldComponent.RANGE_BIGDECIMAL : K extends FieldSchemaType.RANGE_MONEY ? DisplayFieldComponent.RANGE_MONEY : K extends FieldSchemaType.MONEY ? DisplayFieldComponent.MONEY : K extends FieldSchemaType.DURATION ? DisplayFieldComponent.DURATION : K extends FieldSchemaType.PHONE ? DisplayFieldComponent.PHONE : K extends FieldSchemaType.ADDRESS ? DisplayFieldComponent.ADDRESS : K extends FieldSchemaType.BIGDECIMAL ? DisplayFieldComponent.BIGDECIMAL : K extends FieldSchemaType.CODE ? DisplayFieldComponent.CODE : K extends FieldSchemaType.FILE ? DisplayFieldComponent.FILE : K extends FieldSchemaType.SET ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.TUPLE ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_FOREIGN_KEY ? DisplayFieldComponent.SIMPLE_TEXT : K extends FieldSchemaType.VERSIONED_OBJECT ? DisplayFieldComponent.SIMPLE_TEXT : DisplayFieldComponent.SIMPLE_TEXT;
240
243
  };
241
244
  export type DefaultDisplayComponentForSchemaType<T extends FieldSchemaType> = DisplayFieldSchemaTypeDefaultComponent[T];
242
245
  /**
@@ -366,6 +369,50 @@ export declare const BooleanLabellingValue: {
366
369
  readonly ACTIVE_INACTIVE: "active/inactive";
367
370
  };
368
371
  export type BooleanLabellingValue = typeof BooleanLabellingValue[keyof typeof BooleanLabellingValue];
372
+ /**
373
+ * WHY a field has nothing to show — the semantic half of an empty rendering.
374
+ *
375
+ * ## The problem this names
376
+ *
377
+ * Every empty value rendered as one em dash, and an em dash says four different things at once.
378
+ * Administration → Entitlements showed five rows of "—" for a ledger whose emptiness is the CORRECT
379
+ * and reassuring state ("nothing is overridden"); an SSO pane showed "—" for `verifiedDomains`,
380
+ * which an operator can fill, beside "—" for `domainVerificationStatus`, which is computed and which
381
+ * they cannot. A reader cannot tell a working empty ledger from a failed read, nor a field awaiting
382
+ * their input from one awaiting the system's.
383
+ *
384
+ * ## Derived, never authored
385
+ *
386
+ * No new decoration: the reason is computed from what the field already declares and from the shape
387
+ * of the emptiness at the render site. A field added tomorrow is classified without anybody
388
+ * remembering to mark it — a derivation that is TOTAL over the vocabulary, which a hand-kept list of
389
+ * marked fields can never be.
390
+ *
391
+ * This is the REASON. How it renders — an em dash, the word, nothing at all, a skeleton — stays
392
+ * `AutoEmptyValue`, a surface policy. Keeping them apart is what lets one surface show "No domains
393
+ * yet" while a dense table keeps its dash, without either deciding what the emptiness MEANS.
394
+ */
395
+ export declare const DisplayEmptyReason: {
396
+ /**
397
+ * Writable and unset. The operator can fill it, and the word should invite that.
398
+ * `verifiedDomains` before a domain is claimed.
399
+ */
400
+ readonly NOT_SET: "not-set";
401
+ /**
402
+ * A COLLECTION with no members — an empty array, object or record. Distinct from `NOT_SET`
403
+ * because "none yet" is a statement about a list that exists, not about a field nobody has
404
+ * touched, and because an empty ledger is frequently the correct state rather than a gap.
405
+ */
406
+ readonly NONE: "none";
407
+ /**
408
+ * Nothing has produced a value, and the operator cannot produce one either — the field is
409
+ * `.excludeFromUpdate()`, so it is computed, derived or system-owned. `domainVerificationStatus`
410
+ * with no domain to verify. Rendering this identically to `NOT_SET` is what sends an operator
411
+ * hunting for a control that does not exist.
412
+ */
413
+ readonly NOT_PROVIDED: "not-provided";
414
+ };
415
+ export type DisplayEmptyReason = typeof DisplayEmptyReason[keyof typeof DisplayEmptyReason];
369
416
  /**
370
417
  * Display mode for boolean fields
371
418
  */
@@ -511,6 +558,40 @@ export declare const EnumEditMode: {
511
558
  readonly COMBOBOX: "combobox";
512
559
  };
513
560
  export type EnumEditMode = typeof EnumEditMode[keyof typeof EnumEditMode];
561
+ /**
562
+ * How an ARRAY OF ENUM VALUES is chosen — the MULTIPLE-selection sibling of {@link EnumEditMode},
563
+ * and a category of its own rather than a flag on that one.
564
+ *
565
+ * Picking several of a closed set is a different act from picking one, and the controls are
566
+ * different controls: a checkbox group, a multi-select trigger showing chips, a segmented group
567
+ * where any number of segments can be on. Before this vocabulary existed an array of enums
568
+ * declared its shape with the SINGLE-select one — `z.array(z.enum(X).enumUI({ edit: { editMode:
569
+ * EnumEditMode.COMBOBOX } }))` — so one member meant two different controls depending on whether
570
+ * the field happened to be an array, and the other seven meant nothing at all there. Two meanings
571
+ * on one enum member is exactly the merge a framework must not make.
572
+ *
573
+ * **There is no RADIO twin, and that absence is the point.** A radio group is single-choice by
574
+ * definition; its multiple form IS the checkbox group, which is why `CHECKBOX` sits where `RADIO`
575
+ * and `RADIO_ICON_ONLY` sit in the single vocabulary. Every other member is the same control
576
+ * admitting more than one answer.
577
+ */
578
+ export declare const EnumMultipleEditMode: {
579
+ /** A checkbox per option. The default: it shows the whole vocabulary and says "any number" without being told. */
580
+ readonly CHECKBOX: "checkbox";
581
+ /** A dropdown whose trigger carries the chosen values as chips. For a vocabulary too long to list inline. */
582
+ readonly SELECT: "select";
583
+ /** A segmented group where any number of segments can be on at once. */
584
+ readonly TOGGLE: "toggle";
585
+ /** The same group, each segment reduced to its value's glyph. */
586
+ readonly TOGGLE_ICON_ONLY: "toggle_icon_only";
587
+ /** One card per option, each independently on or off. */
588
+ readonly CARD: "card";
589
+ /** The same grid, each card reduced to its value's glyph. */
590
+ readonly CARD_ICON_ONLY: "card_icon_only";
591
+ /** A searchable popover with chips. For a long vocabulary someone types their way through. */
592
+ readonly COMBOBOX: "combobox";
593
+ };
594
+ export type EnumMultipleEditMode = typeof EnumMultipleEditMode[keyof typeof EnumMultipleEditMode];
514
595
  /**
515
596
  * Layout direction for form layouts
516
597
  */
@@ -947,6 +1028,34 @@ export interface PhoneSchemaOptions {
947
1028
  /** Default country when parsing numbers without country code */
948
1029
  defaultCountry?: PhoneCountryCode;
949
1030
  }
1031
+ /**
1032
+ * Metadata stored on address schemas for detection and configuration (#561).
1033
+ *
1034
+ * Country codes are ISO 3166-1 alpha-2 STRINGS rather than the `AvailableCountry` enum on purpose:
1035
+ * that enum lives in `@wildo-ai/presets-components-models`, which depends on this package, so importing
1036
+ * it here would be a cycle — the same reason `PhoneUIParams.displayCountry` is a string.
1037
+ */
1038
+ export interface AddressSchemaMetadata {
1039
+ /** Marker for detecting address schemas */
1040
+ isAddress: true;
1041
+ /** Whether the form offers the optional `coordinates` pair for editing. The value may carry one either way. */
1042
+ withCoordinates: boolean;
1043
+ /** Countries a value may name (uppercase ISO 3166-1 alpha-2). Absent means any country. */
1044
+ countriesAllowed?: readonly string[];
1045
+ /** Country pre-selected for a new value (uppercase ISO 3166-1 alpha-2). */
1046
+ defaultCountry?: string;
1047
+ }
1048
+ /**
1049
+ * Options for creating an address schema via z_address().
1050
+ */
1051
+ export interface AddressSchemaOptions {
1052
+ /** Offer the optional `{ latitude, longitude }` pair in the form. Default `false`. */
1053
+ withCoordinates?: boolean;
1054
+ /** Restrict the countries a value may name (ISO 3166-1 alpha-2, any case). */
1055
+ countriesAllowed?: readonly string[];
1056
+ /** Country pre-selected for a new value (ISO 3166-1 alpha-2, any case). Must be allowed when `countriesAllowed` is set. */
1057
+ defaultCountry?: string;
1058
+ }
950
1059
  /**
951
1060
  * Supported code/programming languages for code schemas.
952
1061
  */
@@ -1369,11 +1478,16 @@ export type AudioFormat = typeof AudioFormat[keyof typeof AudioFormat];
1369
1478
  * field's `nature`. `imageConstraints`, `videoConstraints`, `audioConstraints` and
1370
1479
  * `documentConstraints` on the `z_file()` options each take the matching interface below.
1371
1480
  *
1372
- * ⚠️ **A constraint describes what the FIELD ACCEPTS, not what the bytes ARE.** The media type comes
1373
- * from the upload's declared content type; nothing here decodes the file to confirm that something
1374
- * claiming to be an image is one. Treat these as an authoring contract and a form control's
1375
- * behaviour, not as a security boundary — the defence against a mislabelled file is on the SERVING
1376
- * side, where every response carries a no-sniff header and a restrictive content policy.
1481
+ * Image geometry declared with `nature: FileNature.IMAGE` is enforced on multipart uploads by the
1482
+ * default backend image analyzer. Bounds are inclusive positive integer pixels; aspect ratio
1483
+ * permits a 1% relative difference. Measurements use EXIF-oriented, per-frame dimensions from
1484
+ * image headers. Invalid declarations or unavailable/failed analysis refuse the upload.
1485
+ * Metadata-only remote links cannot establish geometry and are refused for these fields; upload
1486
+ * the image bytes instead. Browser cropping prepares an image but cannot authorize its admission.
1487
+ *
1488
+ * Type/extension checks still use the upload's declared MIME type and filename. Header geometry
1489
+ * does not prove complete pixel integrity, content-type authenticity or malware safety. Other
1490
+ * media analyzers retain their optional policies; serving headers and scanning remain separate.
1377
1491
  *
1378
1492
  * ⚠️ **`generateThumbnails` (image, PLURAL) and `generateThumbnail` (video, SINGULAR) are different
1379
1493
  * options on different bags.** The names differ by one letter and do not behave alike; read each
@@ -1533,11 +1647,33 @@ export interface FileGenerationConfig {
1533
1647
  templateId: string;
1534
1648
  }
1535
1649
  /** @wildo_source:part:end zod.decorators.file-generation */
1650
+ /**
1651
+ * @wildo_source:part:start zod.decorators.file-readiness-metadata
1652
+ *
1653
+ * Import FileReadiness and FileMetadata from @wildo-ai/zod-decorators.
1654
+ * Standard file fields wait for READY before publishing new references to forms/autosave.
1655
+ * Custom upload clients must inspect the returned metadata, refresh PROCESSING through
1656
+ * the authorized metadata endpoint, and refuse unknown or UNAVAILABLE results.
1657
+ * An HTTP upload success is not evidence that asynchronous scanning finished.
1658
+ *
1659
+ * Attachment readiness, distinct from storage lifecycle and download authorization.
1660
+ * READY may be attached; ATTACHED may be retained by its current parent, not reused elsewhere.
1661
+ * PROCESSING must be refreshed; UNAVAILABLE cannot be newly attached. A downloadable orphan
1662
+ * can still be UNAVAILABLE here. Server authorization remains authoritative for every operation.
1663
+ */
1664
+ export declare enum FileReadiness {
1665
+ READY = "ready",
1666
+ PROCESSING = "processing",
1667
+ ATTACHED = "attached",
1668
+ UNAVAILABLE = "unavailable"
1669
+ }
1536
1670
  /**
1537
1671
  * File metadata returned by the getMetadata endpoint.
1538
1672
  * This describes the uploaded file's properties.
1539
1673
  */
1540
1674
  export type FileMetadata = {
1675
+ /** Server-derived attachment readiness; never infer this from an upload HTTP success. */
1676
+ readiness: FileReadiness;
1541
1677
  /** Unique file identifier */
1542
1678
  fileId: string;
1543
1679
  /** Original filename */
@@ -1567,6 +1703,7 @@ export type FileMetadata = {
1567
1703
  /** Upload timestamp */
1568
1704
  uploadedAt: Date;
1569
1705
  } & FileUploaderOwnership;
1706
+ /** @wildo_source:part:end zod.decorators.file-readiness-metadata */
1570
1707
  /**
1571
1708
  * @wildo_source:part:start zod.decorators.file-vocabularies
1572
1709
  *
@@ -2109,12 +2246,6 @@ export interface UniqueFieldParams {
2109
2246
  * @default true
2110
2247
  */
2111
2248
  sparse?: boolean;
2112
- /**
2113
- * Custom error message to show when uniqueness is violated.
2114
- * Supports placeholder {fieldName} which is replaced with the actual field name.
2115
- * @example "This {fieldName} is already taken"
2116
- */
2117
- errorMessage?: string;
2118
2249
  /**
2119
2250
  * The custom message reference the API returns when THIS field's unique index is violated.
2120
2251
  *
@@ -2625,7 +2756,16 @@ export interface BooleanUIParams {
2625
2756
  export interface StringUIDisplayParams extends PrimitiveUIBaseDisplayParams {
2626
2757
  /** Display renderer. TEXT | TRUNCATE | MULTILINE | MARKDOWN | COLOR | LINK | EMAIL | BADGE | COPY | SECRET. */
2627
2758
  displayMode?: StringDisplayMode;
2628
- /** Max characters before truncation (TRUNCATE displayMode only). */
2759
+ /**
2760
+ * Max characters of the value to show (TRUNCATE displayMode only). Beyond it the value is cut
2761
+ * and an ellipsis marks that more exists; the full value stays reachable as the element's
2762
+ * `title`.
2763
+ *
2764
+ * This is a CHARACTER cap and it composes with — rather than replaces — the width cap TRUNCATE
2765
+ * already applies through CSS. A value is clipped by whichever of the two is shorter, so the
2766
+ * cap holds on a wide screen where the container would have had room, which is the point of
2767
+ * declaring it. Leave it unset to keep width as the only axis.
2768
+ */
2629
2769
  truncateLength?: number;
2630
2770
  /**
2631
2771
  * SECRET displayMode only: render the value revealed (not masked) on first
@@ -2677,6 +2817,17 @@ export interface EnumUIDisplayParams extends PrimitiveUIBaseDisplayParams {
2677
2817
  export interface EnumUIEditParams extends PrimitiveUIBaseEditParams {
2678
2818
  /** Edit control. SELECT | RADIO | RADIO_ICON_ONLY | TOGGLE | TOGGLE_ICON_ONLY | CARD | CARD_ICON_ONLY | COMBOBOX. */
2679
2819
  editMode?: EnumEditMode;
2820
+ /**
2821
+ * How this enum is chosen when the FIELD IS AN ARRAY of it (`z.array(z.enum(X))`).
2822
+ *
2823
+ * A separate key from `editMode`, not a reinterpretation of it: the two vocabularies answer
2824
+ * different questions and share no member meaning. Declared on the ELEMENT rather than on the
2825
+ * array because every other per-value presentation decision — `values`, `defaultIcon`,
2826
+ * `defaultColor` — is declared here too, and splitting them would put half an enum's appearance
2827
+ * in `arrayUI()`, which is otherwise about arrayness (sorting, add mode, item framing) and is
2828
+ * shared with arrays of things that are not enums at all.
2829
+ */
2830
+ multipleEditMode?: EnumMultipleEditMode;
2680
2831
  /** Direction of radio/toggle/checkbox group. Renamed from `layout`. */
2681
2832
  editDirection?: LayoutDirection;
2682
2833
  /** Number of grid columns for radio/toggle/card groups. Renamed from `columns`. */
@@ -2693,20 +2844,62 @@ export interface EnumUIParams {
2693
2844
  summaryOverride?: EnumUIDisplayParams;
2694
2845
  edit?: EnumUIEditParams;
2695
2846
  }
2696
- export type DateUIDisplayParams = PrimitiveUIBaseDisplayParams;
2847
+ /**
2848
+ * How a date or datetime value is PHRASED. The sibling of `StringDisplayMode` and
2849
+ * `NumberDisplayMode` for the temporal primitives.
2850
+ *
2851
+ * Without it every date in every Wildo application reads identically: a `createdAt` on an audit
2852
+ * row and a `dueDate` on a work item are the same pixels, because the only available rendering
2853
+ * was the regional absolute format. The distinction is not cosmetic — a deadline is understood
2854
+ * against NOW, and a record of when something happened is understood against the calendar.
2855
+ *
2856
+ * `AUTO` is the one to reach for on a field that is both at different times: a due date is a
2857
+ * deadline this week and a historical fact next quarter.
2858
+ */
2859
+ export declare const DateDisplayMode: {
2860
+ /** The regional absolute format — what every date rendered as before this vocabulary existed. */
2861
+ readonly ABSOLUTE: "absolute";
2862
+ /** Phrased against now: "tomorrow", "in 3 days", "2 months ago". Always relative, at any distance. */
2863
+ readonly RELATIVE: "relative";
2864
+ /** Relative while the value is near now, absolute once it is not. The near window is a week. */
2865
+ readonly AUTO: "auto";
2866
+ };
2867
+ export type DateDisplayMode = typeof DateDisplayMode[keyof typeof DateDisplayMode];
2868
+ export interface DateUIDisplayParams extends PrimitiveUIBaseDisplayParams {
2869
+ /** How the value is phrased. ABSOLUTE (default) | RELATIVE | AUTO. */
2870
+ displayMode?: DateDisplayMode;
2871
+ }
2697
2872
  export type DateUIEditParams = PrimitiveUIBaseEditParams;
2698
2873
  export interface DateUIParams {
2699
2874
  display?: DateUIDisplayParams;
2700
2875
  summaryOverride?: DateUIDisplayParams;
2701
2876
  edit?: DateUIEditParams;
2702
2877
  }
2703
- export type DateTimeUIDisplayParams = PrimitiveUIBaseDisplayParams;
2878
+ export interface DateTimeUIDisplayParams extends PrimitiveUIBaseDisplayParams {
2879
+ /**
2880
+ * How the value is phrased. ABSOLUTE (default) | RELATIVE | AUTO.
2881
+ *
2882
+ * A datetime's relative phrasing resolves finer than a date's — "in 20 minutes", "3 hours ago"
2883
+ * — because the value carries a time of day to be precise about. Beyond a day it falls back to
2884
+ * the same calendar units a date uses.
2885
+ */
2886
+ displayMode?: DateDisplayMode;
2887
+ }
2704
2888
  export type DateTimeUIEditParams = PrimitiveUIBaseEditParams;
2705
2889
  export interface DateTimeUIParams {
2706
2890
  display?: DateTimeUIDisplayParams;
2707
2891
  summaryOverride?: DateTimeUIDisplayParams;
2708
2892
  edit?: DateTimeUIEditParams;
2709
2893
  }
2894
+ /**
2895
+ * DELIBERATELY has no `displayMode`, and this is a statement rather than an omission.
2896
+ *
2897
+ * A time-of-day carries no date, so "relative to now" has no answer: is `09:30` this morning,
2898
+ * tomorrow morning, or the opening hour of a shop that never happens on any particular day? Any
2899
+ * relative phrasing would have to ASSUME a date the value does not hold, and would be confidently
2900
+ * wrong on exactly the fields — opening hours, schedules, recurring slots — that `z.time()` exists
2901
+ * for. A field that wants a relative phrasing is carrying a datetime and should say so.
2902
+ */
2710
2903
  export type TimeUIDisplayParams = PrimitiveUIBaseDisplayParams;
2711
2904
  export type TimeUIEditParams = PrimitiveUIBaseEditParams;
2712
2905
  export interface TimeUIParams {
@@ -2824,6 +3017,36 @@ export interface ForeignKeyUIDisplayParams extends PrimitiveUIBaseDisplayParams
2824
3017
  linkable?: boolean;
2825
3018
  /** Override the preset used to display the referenced resource summary. */
2826
3019
  displayPresetOverride?: string;
3020
+ /**
3021
+ * A SIBLING field on the SAME record holding a readable copy of the referenced row's label —
3022
+ * used when the reference itself cannot be resolved, INSTEAD of printing the raw id.
3023
+ *
3024
+ * ## Why a raw id is not an acceptable fallback
3025
+ *
3026
+ * `ForeignKeyDisplayMode.LABEL` is the default and resolves the referenced row's label. When that
3027
+ * resolution yields nothing the renderer had one option left: print the foreign key. Measured
3028
+ * 2026-09-19 on the Settings hub's member directory — three of four rows showed
3029
+ * `6aaba6b3a2d3b6b0ad61f33e` in the USER column, because those people are invited and have no
3030
+ * `USER_PROFILE` for a label to come from. The fourth, a real user, resolved.
3031
+ *
3032
+ * The readable value was on the row the whole time. `organizationMembers.userEmail` is a
3033
+ * denormalized immutable copy of the linked user's email whose own docstring says it exists so "a
3034
+ * membership row can be read without resolving the user" — exactly this case — and it is
3035
+ * `.isHidden({ display: true })` precisely BECAUSE "the user-facing email is surfaced by resolving
3036
+ * the `userId` reference". When that resolution fails, the design's own premise fails with it and
3037
+ * nothing picks the copy up.
3038
+ *
3039
+ * ## Why this is declared rather than derived
3040
+ *
3041
+ * Nothing in the schema says "this field is a readable copy of that reference". A convention
3042
+ * guessed from the name (`userId` → `userEmail`) would be wrong the first time a resource spells
3043
+ * it differently, and silently. So the relationship is NAMED by the one author who knows it, and
3044
+ * omitting it keeps today's behaviour exactly.
3045
+ *
3046
+ * Read from the record being displayed; a missing or empty sibling falls through to the id as
3047
+ * before, so this can never render less than it does now.
3048
+ */
3049
+ labelFallbackField?: string;
2827
3050
  }
2828
3051
  export interface ForeignKeyUIEditParams extends PrimitiveUIBaseEditParams {
2829
3052
  /**
@@ -3126,6 +3349,7 @@ export declare enum CodePrimitiveKind {
3126
3349
  FILE = "file",
3127
3350
  DURATION = "duration",
3128
3351
  PHONE = "phone",
3352
+ ADDRESS = "address",
3129
3353
  BIGDECIMAL = "bigdecimal",
3130
3354
  UNKNOWN = "unknown"
3131
3355
  }
@@ -3684,15 +3908,37 @@ export interface CustomFieldMetadata {
3684
3908
  durationConfig?: DurationSchemaMetadata;
3685
3909
  /** Phone schema configuration (only present for phone schemas) */
3686
3910
  phoneConfig?: PhoneSchemaMetadata;
3911
+ /** Address schema configuration (only present for address schemas) */
3912
+ addressConfig?: AddressSchemaMetadata;
3687
3913
  /** Code schema configuration (only present for code schemas) */
3688
3914
  codeConfig?: CodeSchemaMetadata;
3689
3915
  /** File schema configuration (only present for file schemas) */
3690
3916
  fileConfig?: FileSchemaMetadata;
3917
+ /**
3918
+ * Set on an UPDATE request DTO object whose keys follow the PATCH write rule — see
3919
+ * `RequestDtoWriteSemantics` and `markPatchRequestDtoObject`. Absent on every other object.
3920
+ */
3921
+ requestDtoWriteSemantics?: RequestDtoWriteSemantics;
3691
3922
  /** Versioned schema configuration (only present for versioned schemas) */
3692
3923
  versionedConfig?: VersionedSchemaMetadata;
3693
3924
  /** Versioned foreign key configuration (only present for versioned foreign key schemas) */
3694
3925
  versionedForeignKeyConfig?: VersionedForeignKeySchemaMetadata;
3695
3926
  }
3927
+ /**
3928
+ * How the keys of a request DTO OBJECT are written — the fact a form needs to decide how a field inside it
3929
+ * is cleared (#989).
3930
+ *
3931
+ * Only one member exists because only one rule needs naming. A request DTO's UPDATE root is written PATCH
3932
+ * style: an ABSENT key leaves the stored value untouched, so clearing needs an explicit `null`, and
3933
+ * `toPatchOptionalField` admits that null. An object VALUE nested inside a field (`reminder`, an address)
3934
+ * is written WHOLE instead: the persistence layer clears only top-level fields, a stored nested `null`
3935
+ * would fail the main schema's `.optional()` on the next read, and absence is therefore the only clear.
3936
+ * An object carrying no member is written whole.
3937
+ */
3938
+ export declare enum RequestDtoWriteSemantics {
3939
+ /** Absent key = untouched, `null` = clear. The UPDATE request DTO root, and a nested child's update branch. */
3940
+ PATCH = "patch"
3941
+ }
3696
3942
  /** @wildo_source:part:end zod.decorators.schema-metadata */
3697
3943
  type ZodenumInstance = ReturnType<typeof z.enum>;
3698
3944
  export type PrimitiveZodType = z.ZodString | z.ZodNumber | z.ZodBoolean | z.ZodDate | z.ZodEnum<any> | ZodenumInstance | ZodBrandedColorInstance | DecoratedPrimitiveZodType<z.ZodString> | DecoratedPrimitiveZodType<z.ZodNumber> | DecoratedPrimitiveZodType<z.ZodBoolean> | DecoratedPrimitiveZodType<z.ZodDate> | DecoratedPrimitiveZodType<z.ZodEnum<any>> | DecoratedPrimitiveZodType<ZodenumInstance>;