@standards/schema 1.0.0-alpha.412 → 1.0.0-alpha.415

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 (140) hide show
  1. package/dist/all-Bldqj4jl.d.ts +4360 -0
  2. package/dist/all-BxsoHW0V.js +4 -0
  3. package/dist/all-C27HT84u.mjs +4 -0
  4. package/dist/all-CmG4j3B_.d.mts +4360 -0
  5. package/dist/api/index.d.mts +386 -764
  6. package/dist/api/index.d.ts +386 -764
  7. package/dist/api/index.js +1 -1
  8. package/dist/api/index.mjs +1 -1
  9. package/dist/{exceptions-C420ndUi.d.ts → exceptions-BIqEbF4H.d.mts} +0 -2
  10. package/dist/{exceptions-C420ndUi.d.mts → exceptions-BIqEbF4H.d.ts} +0 -2
  11. package/dist/exceptions.d.mts +1 -1
  12. package/dist/exceptions.d.ts +1 -1
  13. package/dist/exceptions.js +1 -1
  14. package/dist/exceptions.mjs +1 -1
  15. package/dist/{index-BcSCcPYP.d.mts → index-BGdQIO0V.d.mts} +5902 -5866
  16. package/dist/{index-DML62rLJ.d.ts → index-DIo9VcVh.d.ts} +5902 -5866
  17. package/dist/index.d.mts +5 -10
  18. package/dist/index.d.ts +5 -10
  19. package/dist/index.js +1653 -1
  20. package/dist/index.mjs +1653 -1
  21. package/dist/local-path-CDRPquGU.js +2 -0
  22. package/dist/local-path-PA4ZoNKq.mjs +2 -0
  23. package/dist/primitives-DpBFjzxV.mjs +11 -0
  24. package/dist/primitives-s7GS1T3w.js +11 -0
  25. package/dist/record-operation-C-qr4zs3.js +2 -0
  26. package/dist/record-operation-DM8ZJvmH.mjs +2 -0
  27. package/dist/{utils-Damrow3z.d.ts → utils-CIVBFpC3.d.mts} +11 -1
  28. package/dist/{utils-BwO5qkWb.d.mts → utils-iNW5feob.d.ts} +11 -1
  29. package/dist/utils.d.mts +2 -2
  30. package/dist/utils.d.ts +2 -2
  31. package/dist/utils.js +1 -1
  32. package/dist/utils.mjs +1 -1
  33. package/dist/validation/all.d.mts +1 -4
  34. package/dist/validation/all.d.ts +1 -4
  35. package/dist/validation/all.js +1 -1
  36. package/dist/validation/all.mjs +1 -1
  37. package/package.json +2 -172
  38. package/dist/all-B1wPXYWF.d.mts +0 -2967
  39. package/dist/all-BPIA8DP2.mjs +0 -2
  40. package/dist/all-C46IPclG.js +0 -2
  41. package/dist/all-LNCDQFk5.d.ts +0 -2967
  42. package/dist/attributes-HkhFubZE.d.ts +0 -561
  43. package/dist/attributes-oDsTQ689.d.mts +0 -561
  44. package/dist/checkbox-BN3EcJMd.d.ts +0 -10
  45. package/dist/checkbox-Dd8-zfTD.d.mts +0 -10
  46. package/dist/config-YSw2jzWj.js +0 -2
  47. package/dist/config-iUwnquKr.mjs +0 -2
  48. package/dist/core-DAxRlJ5i.js +0 -2
  49. package/dist/core-rKI7Q9_U.mjs +0 -2
  50. package/dist/date-CEi4zU-G.d.ts +0 -23
  51. package/dist/date-CTR5SI6F.d.mts +0 -23
  52. package/dist/index-BEKmQS4Q.d.mts +0 -269
  53. package/dist/index-BW5-F7CG.d.mts +0 -52
  54. package/dist/index-CtcIhiFv.d.ts +0 -269
  55. package/dist/index-Cxr1ytkx.d.ts +0 -52
  56. package/dist/index-Dl5E_5ex.d.mts +0 -100
  57. package/dist/index-DungcUbX.d.ts +0 -100
  58. package/dist/number-BeaqB8WD.d.ts +0 -10
  59. package/dist/number-CwD0yOIv.d.mts +0 -10
  60. package/dist/object-5-wnsH0o.js +0 -4
  61. package/dist/object-BF5y6bgs.mjs +0 -4
  62. package/dist/objects-CkhVZFNC.d.mts +0 -478
  63. package/dist/objects-DDtMv0oN.d.ts +0 -478
  64. package/dist/phone-BGJea5sr.mjs +0 -2
  65. package/dist/phone-DHXyNkVY.js +0 -2
  66. package/dist/primitives-BCJLtpaI.mjs +0 -11
  67. package/dist/primitives-CVbrjJ24.js +0 -11
  68. package/dist/record-aggregates-BrLE4IsX.mjs +0 -2
  69. package/dist/record-aggregates-BuOfVWPJ.js +0 -2
  70. package/dist/record-operation-B1J86dGW.js +0 -2
  71. package/dist/record-operation-BTmK3mBi.mjs +0 -2
  72. package/dist/rolldown-runtime-DETHMehu.js +0 -2
  73. package/dist/text-BaxaZ5Vv.mjs +0 -2
  74. package/dist/text-Bf12HDTw.d.mts +0 -10
  75. package/dist/text-DVrTGjjX.js +0 -2
  76. package/dist/text-Dim46h6u.d.ts +0 -10
  77. package/dist/validation/complex/currency.d.mts +0 -13
  78. package/dist/validation/complex/currency.d.ts +0 -13
  79. package/dist/validation/complex/currency.js +0 -2
  80. package/dist/validation/complex/currency.mjs +0 -2
  81. package/dist/validation/complex/location.d.mts +0 -20
  82. package/dist/validation/complex/location.d.ts +0 -20
  83. package/dist/validation/complex/location.js +0 -2
  84. package/dist/validation/complex/location.mjs +0 -2
  85. package/dist/validation/complex/phone.d.mts +0 -20
  86. package/dist/validation/complex/phone.d.ts +0 -20
  87. package/dist/validation/complex/phone.js +0 -2
  88. package/dist/validation/complex/phone.mjs +0 -2
  89. package/dist/validation/complex/relation.d.mts +0 -23
  90. package/dist/validation/complex/relation.d.ts +0 -23
  91. package/dist/validation/complex/relation.js +0 -2
  92. package/dist/validation/complex/relation.mjs +0 -2
  93. package/dist/validation/complex/richtext.d.mts +0 -11
  94. package/dist/validation/complex/richtext.d.ts +0 -11
  95. package/dist/validation/complex/richtext.js +0 -2
  96. package/dist/validation/complex/richtext.mjs +0 -2
  97. package/dist/validation/complex/select.d.mts +0 -18
  98. package/dist/validation/complex/select.d.ts +0 -18
  99. package/dist/validation/complex/select.js +0 -2
  100. package/dist/validation/complex/select.mjs +0 -2
  101. package/dist/validation/complex/user.d.mts +0 -11
  102. package/dist/validation/complex/user.d.ts +0 -11
  103. package/dist/validation/complex/user.js +0 -2
  104. package/dist/validation/complex/user.mjs +0 -2
  105. package/dist/validation/computed/formula.d.mts +0 -12
  106. package/dist/validation/computed/formula.d.ts +0 -12
  107. package/dist/validation/computed/formula.js +0 -2
  108. package/dist/validation/computed/formula.mjs +0 -2
  109. package/dist/validation/computed/rollup.d.mts +0 -12
  110. package/dist/validation/computed/rollup.d.ts +0 -12
  111. package/dist/validation/computed/rollup.js +0 -2
  112. package/dist/validation/computed/rollup.mjs +0 -2
  113. package/dist/validation/config/index.d.mts +0 -3
  114. package/dist/validation/config/index.d.ts +0 -3
  115. package/dist/validation/config/index.js +0 -2
  116. package/dist/validation/config/index.mjs +0 -2
  117. package/dist/validation/core/index.d.mts +0 -3
  118. package/dist/validation/core/index.d.ts +0 -3
  119. package/dist/validation/core/index.js +0 -2
  120. package/dist/validation/core/index.mjs +0 -2
  121. package/dist/validation/object/index.d.mts +0 -3
  122. package/dist/validation/object/index.d.ts +0 -3
  123. package/dist/validation/object/index.js +0 -2
  124. package/dist/validation/object/index.mjs +0 -2
  125. package/dist/validation/primitives/checkbox.d.mts +0 -3
  126. package/dist/validation/primitives/checkbox.d.ts +0 -3
  127. package/dist/validation/primitives/checkbox.js +0 -2
  128. package/dist/validation/primitives/checkbox.mjs +0 -2
  129. package/dist/validation/primitives/date.d.mts +0 -3
  130. package/dist/validation/primitives/date.d.ts +0 -3
  131. package/dist/validation/primitives/date.js +0 -2
  132. package/dist/validation/primitives/date.mjs +0 -2
  133. package/dist/validation/primitives/number.d.mts +0 -3
  134. package/dist/validation/primitives/number.d.ts +0 -3
  135. package/dist/validation/primitives/number.js +0 -2
  136. package/dist/validation/primitives/number.mjs +0 -2
  137. package/dist/validation/primitives/text.d.mts +0 -3
  138. package/dist/validation/primitives/text.d.ts +0 -3
  139. package/dist/validation/primitives/text.js +0 -2
  140. package/dist/validation/primitives/text.mjs +0 -2
@@ -1,23 +0,0 @@
1
-
2
- import { DateAttribute } from "./attributes-HkhFubZE.js";
3
- import { ValidationMessages } from "./index-Cxr1ytkx.js";
4
- import * as z$2 from "zod";
5
- //#region src/validation/primitives/date.d.ts
6
- /**
7
- * Create a Zod schema for a date attribute.
8
- *
9
- * Non-range attributes validate a single coercible date bounded by
10
- * `minDate`/`maxDate`. Range attributes (`.endDate()`) validate a
11
- * `{ start, end }` object — `end` may be null, and when present must be
12
- * on or after `start`. Plain strings normalize to `{ start, end: null }`
13
- * (mirroring `normalizeDateValue`) so legacy values written before
14
- * `endDate` was enabled keep validating.
15
- *
16
- * Coercion to `Date` only backs correctness/bounds checks against a
17
- * throwaway copy — the schema never mutates the value itself, so
18
- * `result.data` is always the original input (ISO string, or `{ start, end }`
19
- * of ISO strings), never a coerced `Date`. This keeps the stored shape intact
20
- * for callers that persist `validator.safeParse(value).data`.
21
- */
22
- export declare function createDateValidator(attr: DateAttribute, messages?: ValidationMessages): z$2.ZodTypeAny;
23
- //#endregion
@@ -1,23 +0,0 @@
1
-
2
- import { DateAttribute } from "./attributes-oDsTQ689.mjs";
3
- import { ValidationMessages } from "./index-BW5-F7CG.mjs";
4
- import * as z$2 from "zod";
5
- //#region src/validation/primitives/date.d.ts
6
- /**
7
- * Create a Zod schema for a date attribute.
8
- *
9
- * Non-range attributes validate a single coercible date bounded by
10
- * `minDate`/`maxDate`. Range attributes (`.endDate()`) validate a
11
- * `{ start, end }` object — `end` may be null, and when present must be
12
- * on or after `start`. Plain strings normalize to `{ start, end: null }`
13
- * (mirroring `normalizeDateValue`) so legacy values written before
14
- * `endDate` was enabled keep validating.
15
- *
16
- * Coercion to `Date` only backs correctness/bounds checks against a
17
- * throwaway copy — the schema never mutates the value itself, so
18
- * `result.data` is always the original input (ISO string, or `{ start, end }`
19
- * of ISO strings), never a coerced `Date`. This keeps the stored shape intact
20
- * for callers that persist `validator.safeParse(value).data`.
21
- */
22
- export declare function createDateValidator(attr: DateAttribute, messages?: ValidationMessages): z$2.ZodTypeAny;
23
- //#endregion
@@ -1,269 +0,0 @@
1
-
2
- import { ObjectImage, RecordAppearance } from "./objects-CkhVZFNC.mjs";
3
- import { Attribute, AttributeType } from "./attributes-oDsTQ689.mjs";
4
- import * as z$2 from "zod";
5
- import { ColorId, IconName } from "@standards/constants";
6
- //#region src/types/mutations.d.ts
7
- export interface AddAttributeInput {
8
- name: string;
9
- label: string;
10
- type: AttributeType;
11
- required?: boolean;
12
- unique?: boolean;
13
- description?: string;
14
- placeholder?: string;
15
- icon?: IconName;
16
- defaultValue?: unknown;
17
- metadata?: Record<string, unknown>;
18
- [key: string]: unknown;
19
- }
20
- export interface CreateCustomObjectInput {
21
- name: string;
22
- label: string;
23
- pluralLabel?: string;
24
- labelExpression: string;
25
- embeddingExpression?: string;
26
- description?: string;
27
- icon?: IconName;
28
- color?: ColorId;
29
- image?: ObjectImage;
30
- attributes?: (Attribute | {
31
- build: () => Attribute;
32
- })[];
33
- metadata?: Record<string, unknown>;
34
- }
35
- export interface UpdateObjectInput {
36
- label?: string;
37
- pluralLabel?: string;
38
- description?: string;
39
- icon?: IconName;
40
- /** `null` clears it: the colour then derives from the object name. */
41
- color?: ColorId | null;
42
- /** `null` clears it: record images then crop to a square, and are found nowhere. */
43
- image?: ObjectImage | null;
44
- labelExpression?: string;
45
- embeddingExpression?: string;
46
- hierarchical?: boolean;
47
- metadata?: Record<string, unknown>;
48
- }
49
- export interface RelationOption {
50
- id: string;
51
- objectId: string;
52
- objectName: string;
53
- objectLabel: string;
54
- objectIcon?: string;
55
- objectColor?: ColorId;
56
- /** How the target object crops its records' images: all an option needs of its image settings. */
57
- objectImage?: Pick<ObjectImage, "shape">;
58
- /** The target record's own icon / image; absent when it has neither. */
59
- appearance?: RecordAppearance;
60
- label: string;
61
- }
62
- export interface RelationOptionsResponse {
63
- options: RelationOption[];
64
- hasMore: boolean;
65
- total: number;
66
- nextOffset?: number;
67
- }
68
- //#endregion
69
- //#region src/validation/config/schemas.d.ts
70
- /**
71
- * `baseConfigSchema`'s keys — the model never sets these directly, and the
72
- * prompt (`attribute-reference.ts`'s `BASE_CONFIG_KEYS`) already hides them
73
- * from every `<attribute_types>` line. `ADD_ATTRIBUTE_WIRE` omits them from
74
- * each per-type wire config for the same reason, so the wire never offers a
75
- * key the model was never told about — and never exposes `metadata`, the one
76
- * genuine open record among them, on the wire. Single source: the runtime
77
- * prompt imports this instead of keeping its own copy. `icon` is offered back
78
- * on every attribute type (`WIRE_OFFERED_BASE_CONFIG`) and stays omitted from
79
- * qualified edge properties.
80
- */
81
- export declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description", "defaultValue", "icon", "order", "hidden", "archived", "deprecated", "metadata"];
82
- /**
83
- * The omitted base keys every attribute type's wire offers back, each with the
84
- * wire schema it is validated by. Karl's ruling on #5886 (2026-10-22, « Tous
85
- * les types d'attributs », reversing the relations-only ruling of #4537): every
86
- * attribute takes its own icon, a catalogue name the agent finds with
87
- * `search_icons`, exactly as an object icon. Qualified edge properties keep it
88
- * omitted. Single source for the wire (`ADD_ATTRIBUTE_WIRE`) and the prompt
89
- * (`attribute-reference.ts`), so the key the model is told about is the key
90
- * the wire accepts.
91
- */
92
- export declare const WIRE_OFFERED_BASE_CONFIG: {
93
- readonly icon: z$2.ZodOptional<z$2.ZodPipe<z$2.ZodString, z$2.ZodTransform<"location" | "user" | "delete" | "check" | "message" | "target" | "record" | "file" | "union" | "map" | "a-arrow-down" | "a-arrow-up" | "academic-hat" | "accessibility" | "activity-square" | "activity" | "add-queue" | "aeroplane" | "air-conditioner" | "airplay" | "airpods" | "alarm-check" | "alarm-minus" | "alarm-plus" | "alarm-smoke" | "alarm-snooze" | "alarm-x" | "alarm" | "album" | "align-bottom" | "align-horizontal" | "align-left" | "align-right" | "align-top" | "align-vertical" | "alt" | "ambulance" | "ampersand-square" | "ampersand" | "ampersands" | "anchor" | "angry-circle" | "angry-ghost" | "angry-square" | "annoyed-circle" | "annoyed-ghost" | "annoyed-square" | "aperture" | "api" | "ar" | "archive" | "arrow-diagonal-one" | "arrow-diagonal-two" | "arrow-down-circle" | "arrow-down-left-circle" | "arrow-down-left-square" | "arrow-down-left-waves" | "arrow-down-left" | "arrow-down-right-circle" | "arrow-down-right-square" | "arrow-down-right-waves" | "arrow-down-right" | "arrow-down-square" | "arrow-down-waves" | "arrow-down" | "arrow-left-circle" | "arrow-left-right" | "arrow-left-square" | "arrow-left-waves" | "arrow-left" | "arrow-long-down-left" | "arrow-long-down-right" | "arrow-long-down" | "arrow-long-left" | "arrow-long-right" | "arrow-long-up-left" | "arrow-long-up-right" | "arrow-long-up" | "arrow-right-circle" | "arrow-right-square" | "arrow-right-waves" | "arrow-right" | "arrow-up-circle" | "arrow-up-down" | "arrow-up-left-circle" | "arrow-up-left-square" | "arrow-up-left-waves" | "arrow-up-left" | "arrow-up-right-circle" | "arrow-up-right-square" | "arrow-up-right-waves" | "arrow-up-right" | "arrow-up-square" | "arrow-up-waves" | "arrow-up" | "asterisk-circle" | "asterisk-diamond" | "asterisk-hexagon" | "asterisk-octagon" | "asterisk-square" | "asterisk-waves" | "at" | "atom" | "baby" | "backpack" | "badge" | "baggage-claim" | "ban" | "bank" | "baseball" | "bath" | "battery-charging-four" | "battery-charging-one" | "battery-charging-three" | "battery-charging-two" | "battery-charging" | "battery-check" | "battery-empty" | "battery-full" | "battery-minus" | "battery-plus" | "battery-x" | "bell-check" | "bell-home" | "bell-minus" | "bell-on" | "bell-plus" | "bell-slash" | "bell-snooze" | "bell-user" | "bell-x" | "bell" | "binoculars" | "bitcoin-circle" | "bitcoin-diamond" | "bitcoin-hexagon" | "bitcoin-octagon" | "bitcoin-square" | "bitcoin-waves" | "bitcoin" | "bluetooth" | "boat" | "book-check" | "book-dot" | "book-home" | "book-image" | "book-minus" | "book-open" | "book-plus" | "book-slash" | "book-snooze" | "book-user" | "book-x" | "book" | "bookmark-check" | "bookmark-dot" | "bookmark-home" | "bookmark-minus" | "bookmark-plus" | "bookmark-slash" | "bookmark-snooze" | "bookmark-user" | "bookmark-x" | "bookmark" | "bounding-box" | "bowl" | "box" | "brand-chrome" | "brand-codepen" | "brand-codesandbox" | "brand-dribbble" | "brand-facebook" | "brand-figma" | "brand-framer" | "brand-github" | "brand-gitlab" | "brand-google" | "brand-instagram" | "brand-linkedin" | "brand-pinterest" | "brand-pocket" | "brand-slack" | "brand-spotify" | "brand-telegram" | "brand-threads" | "brand-trello" | "brand-twitch" | "brand-twitter" | "brand-x" | "brand-youtube" | "briefcase-conveyor-belt" | "briefcase" | "brightness-high" | "brightness-low" | "bubbles" | "building-one" | "building" | "cable-car" | "cake" | "calendar-check" | "calendar-down" | "calendar-minus" | "calendar-plus" | "calendar-slash" | "calendar-up" | "calendar-x" | "calendar" | "camera-slash" | "camera" | "campfire" | "cannabis" | "caravan" | "cart-check" | "cart-minus" | "cart-plus" | "cart-x" | "cart" | "cast-screen" | "center-focus" | "chart-area" | "chart-bar-big" | "chart-bar-decreasing" | "chart-bar-increasing" | "chart-bar-one" | "chart-bar-stacked" | "chart-bar" | "chart-bubble" | "chart-candlestick" | "chart-column-big" | "chart-column-decreasing" | "chart-column-increasing" | "chart-column-stacked" | "chart-column" | "chart-gantt" | "chart-graph" | "chart-line" | "chart-network" | "chart-no-axes-column-decreasing" | "chart-no-axes-column-increasing" | "chart-no-axes-column" | "chart-no-axes-combined" | "chart-no-axes-gantt" | "chart-pie-one" | "chart-pie-two" | "chart-pie" | "chart-scatter" | "chart-spline" | "chat-check" | "chat-dots" | "chat-messages" | "chat-minus" | "chat-plus" | "chat-x" | "chat" | "check-circle-one" | "check-circle" | "check-diamond" | "check-hexagon" | "check-octagon" | "check-square-one" | "check-square" | "check-waves" | "chevron-double-down-left" | "chevron-double-down-right" | "chevron-double-down" | "chevron-double-left" | "chevron-double-right" | "chevron-double-up-left" | "chevron-double-up-right" | "chevron-double-up" | "chevron-down-circle" | "chevron-down-left-circle" | "chevron-down-left-square" | "chevron-down-left-waves" | "chevron-down-left" | "chevron-down-right-circle" | "chevron-down-right-square" | "chevron-down-right-waves" | "chevron-down-right" | "chevron-down-square" | "chevron-down-waves" | "chevron-down" | "chevron-left-circle" | "chevron-left-square" | "chevron-left-waves" | "chevron-left" | "chevron-right-circle" | "chevron-right-square" | "chevron-right-waves" | "chevron-right" | "chevron-up-circle" | "chevron-up-down" | "chevron-up-left-circle" | "chevron-up-left-square" | "chevron-up-left-waves" | "chevron-up-left" | "chevron-up-right-circle" | "chevron-up-right-square" | "chevron-up-right-waves" | "chevron-up-right" | "chevron-up-square" | "chevron-up-waves" | "chevron-up" | "chip" | "cigarette-off" | "cigarette" | "circle-dashed" | "circle-half-circle" | "circle-half" | "circle-notch" | "circle" | "click" | "clipboard" | "clock-circle" | "clock-diamond" | "clock-eight" | "clock-eleven" | "clock-five" | "clock-four" | "clock-hand" | "clock-hexagon" | "clock-nine" | "clock-octagon" | "clock-one" | "clock-seven" | "clock-six" | "clock-square" | "clock-ten" | "clock-three" | "clock-twelve" | "clock-two" | "clock-waves" | "cloud-download" | "cloud-drizzle" | "cloud-fog" | "cloud-hail" | "cloud-lightning" | "cloud-moon-rain" | "cloud-moon" | "cloud-off" | "cloud-rain-wind" | "cloud-rain" | "cloud-snow" | "cloud-sun-rain" | "cloud-sun" | "cloud-upload" | "cloud" | "cloudy" | "cocktail" | "code-circle" | "code-diamond" | "code-hexagon" | "code-octagon" | "code-square" | "code-waves" | "code" | "coffee" | "cog-four" | "cog-one" | "cog-three" | "cog-two" | "cog" | "columns" | "command" | "compass" | "components" | "confetti" | "config-vertical" | "config" | "contactless-circle" | "contactless" | "controller" | "cookie" | "copy" | "copyleft" | "copyright-slash" | "copyright" | "corner-down-left" | "corner-down-right" | "corner-left-down" | "corner-left-up" | "corner-right-down" | "corner-right-up" | "corner-up-left" | "corner-up-right" | "credit-card-check" | "credit-card-minus" | "credit-card-plus" | "credit-card-x" | "credit-card" | "croissant" | "crop" | "crosshair" | "cupcake" | "danger-circle" | "danger-diamond" | "danger-hexagon" | "danger-octagon" | "danger-square" | "danger-triangle" | "danger-waves" | "danger" | "database" | "daze-circle" | "daze-ghost" | "daze-square" | "desktop" | "diamond" | "dice-five" | "dice-four" | "dice-one" | "dice-six" | "dice-three" | "dice-two" | "dislike" | "divide" | "dollar-circle" | "dollar-diamond" | "dollar-hexagon" | "dollar-octagon" | "dollar-square" | "dollar-waves" | "dollar" | "door-closed-locked" | "door-closed" | "door-open" | "dots-circle" | "dots-diamond" | "dots-hexagon" | "dots-octagon" | "dots-square" | "dots-vertical-circle" | "dots-vertical-diamond" | "dots-vertical-hexagon" | "dots-vertical-octagon" | "dots-vertical-square" | "dots-vertical-waves" | "dots-vertical" | "dots-waves" | "dots" | "download" | "drop" | "droplet-off" | "droplet" | "droplets" | "ear-slash" | "ear" | "earth" | "eclipse" | "edit-one" | "edit" | "egg" | "eight-circle" | "eight-diamond" | "eight-hexagon" | "eight-octagon" | "eight-square" | "eight-waves" | "eight" | "elevator" | "envelope-open" | "envelope" | "euro-circle" | "euro-diamond" | "euro-hexagon" | "euro-octagon" | "euro-square" | "euro-waves" | "euro" | "exclude" | "external-link" | "eye-slash" | "eye" | "face-id" | "fat-arrow-down-left" | "fat-arrow-down-right" | "fat-arrow-down" | "fat-arrow-left" | "fat-arrow-right" | "fat-arrow-up-left" | "fat-arrow-up-right" | "fat-arrow-up" | "fat-corner-down-left" | "fat-corner-down-right" | "fat-corner-left-down" | "fat-corner-left-up" | "fat-corner-right-down" | "fat-corner-right-up" | "fat-corner-up-left" | "fat-corner-up-right" | "female" | "file-check" | "file-minus" | "file-plus" | "file-text" | "file-x" | "film" | "filter-one" | "filter" | "fine-tune" | "fire" | "five-circle" | "five-diamond" | "five-hexagon" | "five-octagon" | "five-square" | "five-waves" | "five" | "flag-one" | "flag" | "flame-kindling" | "flame" | "flask" | "flower-2" | "flower" | "folder-check" | "folder-heart" | "folder-kanban" | "folder-minus" | "folder-one" | "folder-plus" | "folder-slash" | "folder-two" | "folder-x" | "folder" | "forward-circle" | "forward-diamond" | "forward-hexagon" | "forward-octagon" | "forward-square" | "forward-waves" | "forward" | "four-circle" | "four-diamond" | "four-hexagon" | "four-octagon" | "four-square" | "four-waves" | "four" | "frame" | "funny-circle" | "funny-ghost" | "funny-square" | "gift" | "git-branch" | "git-circle" | "git-commit" | "git-diamond" | "git-diff" | "git-hexagon" | "git-merge" | "git-octagon" | "git-pull-request" | "git-square" | "git-waves" | "glasses" | "globe" | "grid-one" | "grid" | "hand" | "hard-drive" | "hash-circle" | "hash-diamond" | "hash-hexagon" | "hash-octagon" | "hash-square" | "hash-waves" | "hash" | "haze" | "heading-five" | "heading-four" | "heading-one" | "heading-six" | "heading-three" | "heading-two" | "heading" | "headphones" | "heart-broken" | "heart-check" | "heart-circle" | "heart-diamond" | "heart-dot" | "heart-hexagon" | "heart-home" | "heart-minus" | "heart-octagon" | "heart-plus" | "heart-slash" | "heart-snooze" | "heart-square" | "heart-user" | "heart-waves" | "heart-x" | "heart" | "hexagon" | "home-check" | "home-minus" | "home-plus" | "home-smile" | "home-x" | "home" | "image-circle" | "image-rectangle" | "image" | "inbox-archive" | "inbox-check" | "inbox-down" | "inbox-minus" | "inbox-plus" | "inbox-up" | "inbox-x" | "inbox" | "incognito" | "indifferent-circle" | "indifferent-ghost" | "indifferent-square" | "infinity" | "info-circle" | "info-diamond" | "info-hexagon" | "info-octagon" | "info-square" | "info-triangle" | "info-waves" | "info" | "intersect" | "kanban" | "key" | "keyboard-brightness-high" | "keyboard-brightness-low" | "keyboard" | "label" | "lamp" | "layers-one" | "layers-three" | "layers-two" | "layout" | "leaf" | "leaves" | "letter-a-circle" | "letter-a-diamond" | "letter-a-hexagon" | "letter-a-octagon" | "letter-a-square" | "letter-a-waves" | "letter-a" | "letter-b-circle" | "letter-b-diamond" | "letter-b-hexagon" | "letter-b-octagon" | "letter-b-square" | "letter-b-waves" | "letter-b" | "letter-c-circle" | "letter-c-diamond" | "letter-c-hexagon" | "letter-c-octagon" | "letter-c-square" | "letter-c-waves" | "letter-c" | "letter-d-circle" | "letter-d-diamond" | "letter-d-hexagon" | "letter-d-octagon" | "letter-d-square" | "letter-d-waves" | "letter-d" | "letter-e-circle" | "letter-e-diamond" | "letter-e-hexagon" | "letter-e-octagon" | "letter-e-square" | "letter-e-waves" | "letter-e" | "letter-f-circle" | "letter-f-diamond" | "letter-f-hexagon" | "letter-f-octagon" | "letter-f-square" | "letter-f-waves" | "letter-f" | "letter-g-circle" | "letter-g-diamond" | "letter-g-hexagon" | "letter-g-octagon" | "letter-g-square" | "letter-g-waves" | "letter-g" | "letter-h-circle" | "letter-h-diamond" | "letter-h-hexagon" | "letter-h-octagon" | "letter-h-square" | "letter-h-waves" | "letter-h" | "letter-i-circle" | "letter-i-diamond" | "letter-i-hexagon" | "letter-i-octagon" | "letter-i-square" | "letter-i-waves" | "letter-i" | "letter-j-circle" | "letter-j-diamond" | "letter-j-hexagon" | "letter-j-octagon" | "letter-j-square" | "letter-j-waves" | "letter-j" | "letter-k-circle" | "letter-k-diamond" | "letter-k-hexagon" | "letter-k-octagon" | "letter-k-square" | "letter-k-waves" | "letter-k" | "letter-l-circle" | "letter-l-diamond" | "letter-l-hexagon" | "letter-l-octagon" | "letter-l-square" | "letter-l-waves" | "letter-l" | "letter-m-circle" | "letter-m-diamond" | "letter-m-hexagon" | "letter-m-octagon" | "letter-m-square" | "letter-m-waves" | "letter-m" | "letter-n-circle" | "letter-n-diamond" | "letter-n-hexagon" | "letter-n-octagon" | "letter-n-square" | "letter-n-waves" | "letter-n" | "letter-o-circle" | "letter-o-diamond" | "letter-o-hexagon" | "letter-o-octagon" | "letter-o-square" | "letter-o-waves" | "letter-o" | "letter-p-circle" | "letter-p-diamond" | "letter-p-hexagon" | "letter-p-octagon" | "letter-p-square" | "letter-p-waves" | "letter-p" | "letter-q-circle" | "letter-q-diamond" | "letter-q-hexagon" | "letter-q-octagon" | "letter-q-square" | "letter-q-waves" | "letter-q" | "letter-r-circle" | "letter-r-diamond" | "letter-r-hexagon" | "letter-r-octagon" | "letter-r-square" | "letter-r-waves" | "letter-r" | "letter-s-circle" | "letter-s-diamond" | "letter-s-hexagon" | "letter-s-octagon" | "letter-s-square" | "letter-s-waves" | "letter-s" | "letter-t-circle" | "letter-t-diamond" | "letter-t-hexagon" | "letter-t-octagon" | "letter-t-square" | "letter-t-waves" | "letter-t" | "letter-u-circle" | "letter-u-diamond" | "letter-u-hexagon" | "letter-u-octagon" | "letter-u-square" | "letter-u-waves" | "letter-u" | "letter-v-circle" | "letter-v-diamond" | "letter-v-hexagon" | "letter-v-octagon" | "letter-v-square" | "letter-v-waves" | "letter-v" | "letter-w-circle" | "letter-w-diamond" | "letter-w-hexagon" | "letter-w-octagon" | "letter-w-square" | "letter-w-waves" | "letter-w" | "letter-x-circle" | "letter-x-diamond" | "letter-x-hexagon" | "letter-x-octagon" | "letter-x-square" | "letter-x-waves" | "letter-x" | "letter-y-circle" | "letter-y-diamond" | "letter-y-hexagon" | "letter-y-octagon" | "letter-y-square" | "letter-y-waves" | "letter-y" | "letter-z-circle" | "letter-z-diamond" | "letter-z-hexagon" | "letter-z-octagon" | "letter-z-square" | "letter-z-waves" | "letter-z" | "lightning-off" | "lightning" | "like" | "line-chart-circle" | "line-chart-diamond" | "line-chart-hexagon" | "line-chart-octagon" | "line-chart-square" | "line-chart-waves" | "link-one" | "link-two" | "link" | "list-check" | "list-number" | "list" | "location-check" | "location-home" | "location-minus" | "location-plus" | "location-selected" | "location-slash" | "location-snooze" | "location-user" | "location-x" | "lock-circle" | "lock-diamond" | "lock-hexagon" | "lock-keyhole" | "lock-octagon" | "lock-open-keyhole" | "lock-open-password" | "lock-open" | "lock-password" | "lock-square" | "lock-waves" | "lock" | "login" | "logout" | "magnet" | "male" | "mask" | "math-square" | "math" | "maximize-one" | "maximize" | "menu" | "message-check" | "message-dots" | "message-minus" | "message-plus" | "message-reply" | "message-x" | "microphone-slash" | "microphone" | "minimize-one" | "minimize" | "minus-circle" | "minus-diamond" | "minus-hexagon" | "minus-octagon" | "minus-square" | "minus-waves" | "minus" | "mobile-signal-five" | "mobile-signal-four" | "mobile-signal-one" | "mobile-signal-three" | "mobile-signal-two" | "mobile" | "moon-star" | "moon" | "mountain-snow" | "mountain" | "mouse-pointer" | "move-diagonal-one" | "move-diagonal" | "move-horizontal" | "move-vertical" | "move" | "music-circle" | "music-diamond" | "music-hexagon" | "music-octagon" | "music-square" | "music-waves" | "music" | "myna" | "navigation-one" | "navigation" | "nine-circle" | "nine-diamond" | "nine-hexagon" | "nine-octagon" | "nine-square" | "nine-waves" | "nine" | "notification" | "octagon" | "one-circle" | "one-diamond" | "one-hexagon" | "one-octagon" | "one-square" | "one-waves" | "one" | "option" | "package" | "paint" | "panel-bottom-close" | "panel-bottom-inactive" | "panel-bottom-open" | "panel-bottom" | "panel-left-close" | "panel-left-inactive" | "panel-left-open" | "panel-left" | "panel-right-close" | "panel-right-inactive" | "panel-right-open" | "panel-right" | "panel-top-close" | "panel-top-inactive" | "panel-top-open" | "panel-top" | "paperclip" | "parking" | "password" | "path" | "pause-circle" | "pause-diamond" | "pause-hexagon" | "pause-octagon" | "pause-square" | "pause-waves" | "pause" | "pen" | "pencil" | "percentage-circle" | "percentage-diamond" | "percentage-hexagon" | "percentage-octagon" | "percentage-square" | "percentage-waves" | "percentage" | "pin" | "pizza" | "planet" | "play-circle" | "play-diamond" | "play-hexagon" | "play-octagon" | "play-square" | "play-waves" | "play" | "plus-circle" | "plus-diamond" | "plus-hexagon" | "plus-octagon" | "plus-square" | "plus-waves" | "plus" | "pokeball" | "power" | "presentation" | "printer" | "puzzle" | "question-circle" | "question-diamond" | "question-hexagon" | "question-octagon" | "question-square" | "question-waves" | "question" | "radio" | "rainbow" | "reception-bell" | "rectangle-vertical" | "rectangle" | "redo" | "refresh-alt" | "refresh" | "repeat" | "rewind-circle" | "rewind-diamond" | "rewind-hexagon" | "rewind-octagon" | "rewind-square" | "rewind-waves" | "rewind" | "rhombus" | "ribbon" | "rocket" | "room-service" | "rows" | "rss" | "ruler" | "rupee-circle" | "rupee-diamond" | "rupee-hexagon" | "rupee-octagon" | "rupee-square" | "rupee-waves" | "rupee" | "sad-circle" | "sad-ghost" | "sad-square" | "save" | "scan" | "scissors" | "sea-waves" | "search-check" | "search-circle" | "search-diamond" | "search-dot" | "search-hexagon" | "search-home" | "search-minus" | "search-octagon" | "search-plus" | "search-slash" | "search-snooze" | "search-square" | "search-user" | "search-waves" | "search-x" | "search" | "select-multiple" | "send" | "servers" | "seven-circle" | "seven-diamond" | "seven-hexagon" | "seven-octagon" | "seven-square" | "seven-waves" | "seven" | "share" | "shell" | "shield-check" | "shield-crossed" | "shield-minus" | "shield-one" | "shield-plus" | "shield-slash" | "shield-two" | "shield-x" | "shield" | "shooting-star" | "shopping-bag" | "shovel" | "shrub" | "shuffle-alt" | "shuffle" | "sidebar-alt" | "sidebar" | "signal-circle" | "signal-diamond" | "signal-hexagon" | "signal-octagon" | "signal-square" | "signal-waves" | "signal" | "six-circle" | "six-diamond" | "six-hexagon" | "six-octagon" | "six-square" | "six-waves" | "six" | "skip-back" | "skip-forward" | "slash-circle" | "slash-diamond" | "slash-hexagon" | "slash-octagon" | "slash-square" | "slash-waves" | "smile-circle" | "smile-ghost" | "smile-square" | "snow" | "snowflake" | "sofa" | "sort" | "sparkles" | "speaker" | "spinner-one" | "spinner" | "sprout" | "square-chart-gantt" | "square-dashed-kanban" | "square-dashed" | "square-half" | "square-kanban" | "square" | "star" | "stop-circle" | "stop-diamond" | "stop-hexagon" | "stop-octagon" | "stop-square" | "stop-waves" | "stop" | "store" | "subtract" | "sun-dim" | "sun-medium" | "sun-snow" | "sun" | "sunrise" | "sunset" | "support" | "swatches" | "table" | "tablet" | "tag-plus" | "tag" | "tally-five" | "tally-four" | "tally-one" | "tally-three" | "tally-two" | "telephone-call" | "telephone-forward" | "telephone-in" | "telephone-missed" | "telephone-out" | "telephone-slash" | "telephone" | "tent-tree" | "tent" | "terminal" | "text-align-center" | "text-align-left" | "text-align-right" | "text-justify" | "thermometer-snowflake" | "thermometer-sun" | "thermometer" | "three-circle" | "three-diamond" | "three-hexagon" | "three-octagon" | "three-square" | "three-waves" | "three" | "ticket-slash" | "ticket" | "toggle-left" | "toggle-right" | "tool" | "tornado" | "train" | "trash-one" | "trash-two" | "trash" | "tree-deciduous" | "tree-palm" | "tree-pine" | "tree" | "trees" | "trending-down" | "trending-up-down" | "trending-up" | "triangle" | "truck" | "tv" | "two-circle" | "two-diamond" | "two-hexagon" | "two-octagon" | "two-square" | "two-waves" | "two" | "type-bold" | "type-italic" | "type-text" | "type-underline" | "umbrella-off" | "umbrella" | "undo" | "unlink" | "upload" | "user-check" | "user-circle" | "user-diamond" | "user-hexagon" | "user-minus" | "user-octagon" | "user-plus" | "user-settings" | "user-square" | "user-waves" | "user-x" | "users-group" | "users" | "video-slash" | "video" | "volume-check" | "volume-high" | "volume-low" | "volume-minus" | "volume-none" | "volume-plus" | "volume-slash" | "volume-x" | "watch" | "waves" | "webcam" | "wheel" | "wheelchair" | "wifi-check" | "wifi-low" | "wifi-medium" | "wifi-minus" | "wifi-plus" | "wifi-slash" | "wifi-x" | "wifi" | "wind-arrow-down" | "wind" | "winds" | "wine" | "wink-circle" | "wink-ghost" | "wink-square" | "wrench" | "x-circle" | "x-diamond" | "x-hexagon" | "x-octagon" | "x-square" | "x-triangle" | "x-waves" | "x" | "yen-circle" | "yen-diamond" | "yen-hexagon" | "yen-octagon" | "yen-square" | "yen-waves" | "yen" | "zap-off" | "zap" | "zero-circle" | "zero-diamond" | "zero-hexagon" | "zero-octagon" | "zero-square" | "zero-waves" | "zero", string>>>;
94
- };
95
- /**
96
- * The keys left off `attributeType`'s prompt line: every omitted base key and
97
- * the type's hidden keys. The wire omits the same set, then adds back
98
- * `WIRE_OFFERED_BASE_CONFIG`, which the prompt states once under the block
99
- * rather than on every line.
100
- */
101
- export declare function wireOmittedConfigKeysFor(attributeType: AttributeType): readonly string[];
102
- /** `omit()` mask of the type keys hidden from `attributeType`'s wire. */
103
- export declare function wireHiddenTypeConfigMask(attributeType: AttributeType): Record<string, true>;
104
- /**
105
- * Builds the `superRefine` that refuses a key belonging to a DIFFERENT type
106
- * than the one sent.
107
- *
108
- * Two wire shapes merge several types into one member for size — the nine
109
- * simple attribute types of `ADD_ATTRIBUTE_WIRE`, and the seven simple
110
- * qualified-property types below — so a merged member structurally accepts
111
- * every merged type's keys. Without this, a `text`-only `format` sent on a
112
- * `number` parses and is then silently `.strip()`-ped at store: a key lost
113
- * with no feedback. Checked against the SENT type, and the message names the
114
- * keys that type does accept so the next call is right. One factory rather
115
- * than two near-identical loops — the second one drifted first.
116
- */
117
- export declare function refuseForeignKeys<T extends string>(keysByType: Readonly<Record<T, ReadonlySet<string>>>, noun: string, alwaysAllowed?: readonly string[]): (type: T, subject: Record<string, unknown> | undefined, ctx: z$2.RefinementCtx, path?: readonly string[]) => void;
118
- export declare const statusGroupSchema: z$2.ZodEnum<{
119
- idle: "idle";
120
- in_progress: "in_progress";
121
- finished: "finished";
122
- }>;
123
- export declare const selectOptionWriteSchema: z$2.ZodObject<{
124
- value: z$2.ZodString;
125
- label: z$2.ZodString;
126
- description: z$2.ZodOptional<z$2.ZodString>;
127
- inverse: z$2.ZodOptional<z$2.ZodString>;
128
- archived: z$2.ZodOptional<z$2.ZodBoolean>;
129
- color: z$2.ZodEnum<{
130
- stone: "stone";
131
- clay: "clay";
132
- brick: "brick";
133
- terra: "terra";
134
- ochre: "ochre";
135
- moss: "moss";
136
- sage: "sage";
137
- lagoon: "lagoon";
138
- ink: "ink";
139
- iris: "iris";
140
- peony: "peony";
141
- }>;
142
- }, z$2.core.$strict>;
143
- export declare const statusOptionWriteSchema: z$2.ZodObject<{
144
- value: z$2.ZodString;
145
- label: z$2.ZodString;
146
- description: z$2.ZodOptional<z$2.ZodString>;
147
- inverse: z$2.ZodOptional<z$2.ZodString>;
148
- archived: z$2.ZodOptional<z$2.ZodBoolean>;
149
- color: z$2.ZodEnum<{
150
- stone: "stone";
151
- clay: "clay";
152
- brick: "brick";
153
- terra: "terra";
154
- ochre: "ochre";
155
- moss: "moss";
156
- sage: "sage";
157
- lagoon: "lagoon";
158
- ink: "ink";
159
- iris: "iris";
160
- peony: "peony";
161
- }>;
162
- group: z$2.ZodEnum<{
163
- idle: "idle";
164
- in_progress: "in_progress";
165
- finished: "finished";
166
- }>;
167
- }, z$2.core.$strict>;
168
- /**
169
- * Drops, from every option of an attribute config or body, the keys
170
- * `optionSchema` does not know — typically an `id` the code builder accepted
171
- * without complaint (#4356). Sync stores options through it, and the schema
172
- * state reads them through it, so one stale key no longer 400s the whole state.
173
- * The options of a `relation()`/`document()`'s `.qualifyWith()` properties are
174
- * validated by the same schema, so each property definition goes through it too.
175
- *
176
- * Order is kept, and a config with nothing to drop is returned as is. A list
177
- * or option that is not the expected shape is left for strict validation to
178
- * refuse.
179
- */
180
- export declare function withoutUnknownOptionKeys<T extends object>(config: T): T;
181
- /**
182
- * Property types whose config differs from `baseConfigSchema` only by
183
- * independent optional scalars — no options array, no relation targets. Same
184
- * shape as `SIMPLE_ATTRIBUTE_TYPES` in `architect/operations/schema.ts` minus
185
- * `richtext`/`user` (not valid property types) — none of these seven types'
186
- * keys collide, proven by `tests/validation/config/property-config.test.ts`.
187
- * Merged into one wire member for the same reason `ADD_ATTRIBUTE_WIRE` merges
188
- * its nine: the model reads one shape instead of seven near-identical ones,
189
- * and this is also what keeps a qualified relation/document's `add_attribute`
190
- * leaf under its wire-size cap (`tests/architect/wire-schema-size.test.ts`) —
191
- * ten separate members, each paying its own JSON Schema object/`$defs`
192
- * boilerplate, blew the budget even after the base config keys were omitted.
193
- */
194
- export declare const SIMPLE_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "location"];
195
- export declare const propertyAttributeSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
196
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
197
- }>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
198
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
199
- }>, z$2.core.$strip>[]], "type">;
200
- export declare const propertySchemaSchema: z$2.ZodObject<{
201
- definitions: z$2.ZodArray<z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
202
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
203
- }>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
204
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
205
- }>, z$2.core.$strip>[]], "type">>;
206
- }, z$2.core.$strip>;
207
- /**
208
- * The wire-facing property union, derived from the stored one: the same seven
209
- * simple types merged into one member, the option-carrying types alongside,
210
- * everything the model never sets omitted, and `.strict()` so an invented key
211
- * is refused by name instead of silently stripped at store.
212
- */
213
- export declare const propertyAttributeWireSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
214
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
215
- }>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
216
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
217
- }>, z$2.core.$strip>[]], "type">;
218
- export declare const propertySchemaWireSchema: z$2.ZodObject<{
219
- definitions: z$2.ZodArray<z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
220
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
221
- }>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
222
- [k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
223
- }>, z$2.core.$strip>[]], "type">>;
224
- }, z$2.core.$strict>;
225
- /**
226
- * A month or a year has no time of day and no range end to pair with in this
227
- * slice (#5325): `precision` narrower than a day is refused beside
228
- * `includeTime` or `endDate`, on the attribute and on each date property it
229
- * qualifies an edge with.
230
- */
231
- export declare function datePrecisionIssues(type: string, config: Record<string, unknown>, path?: PropertyKey[]): {
232
- path: PropertyKey[];
233
- message: string;
234
- }[];
235
- /**
236
- * Map of attribute type to config schema
237
- */
238
- export declare const attributeConfigSchemas: Record<AttributeType, z$2.ZodObject<z$2.ZodRawShape>>;
239
- /**
240
- * Get the config schema for a specific attribute type
241
- */
242
- export declare function getAttributeConfigSchema(type: AttributeType): z$2.ZodObject<z$2.ZodRawShape>;
243
- /**
244
- * Validate and strip unknown properties from attribute config
245
- * This ensures only allowed properties are stored in the database
246
- */
247
- export declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
248
- /**
249
- * The config contract as a WRITE applies it: the stored schema plus the
250
- * stricter option and icon rules newly written values must satisfy.
251
- */
252
- export declare function getAttributeConfigWriteSchema(type: AttributeType): z$2.ZodObject<z$2.ZodRawShape>;
253
- /**
254
- * Strict parser for newly created attribute definitions.
255
- *
256
- * Top-level config remains strip-compatible with the historical config
257
- * contract, while newly written icons and select-like option objects are
258
- * validated strictly.
259
- */
260
- export declare function parseAttributeConfigForCreate(type: AttributeType, input: unknown): Record<string, unknown>;
261
- /**
262
- * Patch-aware parser for persisted attributes.
263
- *
264
- * An explicit options patch owns and strictly validates the complete new
265
- * list. Omission means the stored legacy list is preserved without
266
- * reconstruction, including options that predate required colours/groups.
267
- */
268
- export declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
269
- //#endregion
@@ -1,52 +0,0 @@
1
-
2
- import { Attribute } from "./attributes-oDsTQ689.mjs";
3
- import { z as z$1 } from "zod";
4
- //#region src/validation/core/types.d.ts
5
- /**
6
- * Validation messages for Zod validators.
7
- * All functions receive the full Attribute to access label, type, etc.
8
- * Can be customized for i18n support.
9
- */
10
- export interface ValidationMessages {
11
- required: (attr: Attribute) => string;
12
- invalidType: (attr: Attribute, expected: string) => string;
13
- minLength: (attr: Attribute, min: number) => string;
14
- maxLength: (attr: Attribute, max: number) => string;
15
- invalidPattern: (attr: Attribute) => string;
16
- minValue: (attr: Attribute, min: number) => string;
17
- maxValue: (attr: Attribute, max: number) => string;
18
- mustBeInteger: (attr: Attribute) => string;
19
- invalidDate: (attr: Attribute) => string;
20
- invalidOption: (attr: Attribute, options: string[]) => string;
21
- invalidId: (attr: Attribute) => string;
22
- maxItems: (attr: Attribute, max: number) => string;
23
- invalidRichtext: (attr: Attribute) => string;
24
- invalidPhone: (attr: Attribute) => string;
25
- invalidCurrency: (attr: Attribute) => string;
26
- invalidLocation: (attr: Attribute) => string;
27
- }
28
- /**
29
- * Validation result
30
- */
31
- export interface ValidationResult {
32
- success: boolean;
33
- data?: Record<string, unknown>;
34
- errors?: Array<{
35
- path: string[];
36
- message: string;
37
- }>;
38
- }
39
- //#endregion
40
- //#region src/validation/core/messages.d.ts
41
- export declare const DEFAULT_VALIDATION_MESSAGES: ValidationMessages;
42
- //#endregion
43
- //#region src/validation/core/errors.d.ts
44
- /**
45
- * Format Zod validation errors into a consistent structure.
46
- * This eliminates code duplication across multiple validation functions.
47
- */
48
- export declare function formatZodErrors(error: z$1.ZodError): Array<{
49
- path: string[];
50
- message: string;
51
- }>;
52
- //#endregion