@riverbankcms/sdk 0.60.6 → 0.60.9

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 (103) hide show
  1. package/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
  2. package/dist/_dts/api/src/bookingConfig.d.ts +6 -0
  3. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +45 -3
  4. package/dist/_dts/api/src/bookingOperations.d.ts +40 -3
  5. package/dist/_dts/api/src/courses.d.ts +1 -5
  6. package/dist/_dts/api/src/endpoints.d.ts +80 -1
  7. package/dist/_dts/api/src/index.d.ts +3 -2
  8. package/dist/_dts/api/src/navigation/contracts.d.ts +9 -9
  9. package/dist/_dts/api/src/navigation/linkValue.d.ts +1 -1
  10. package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
  11. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +15 -1
  12. package/dist/_dts/api/src/resources.d.ts +1 -1
  13. package/dist/_dts/api/src/siteBanner.d.ts +8 -8
  14. package/dist/_dts/api/src/siteOnboarding.d.ts +1 -0
  15. package/dist/_dts/api/src/teamMembers.d.ts +27 -0
  16. package/dist/_dts/blocks/src/index.d.ts +2 -1
  17. package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +35 -29
  18. package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -5
  19. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +40 -34
  20. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -5
  21. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +1 -1
  22. package/dist/_dts/blocks/src/system/blocks/products/shared.d.ts +2 -2
  23. package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +9 -9
  24. package/dist/_dts/blocks/src/system/blocks/shared/teamMembers.d.ts +24 -0
  25. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +18 -8
  26. package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
  27. package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
  28. package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
  29. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +185 -0
  30. package/dist/_dts/blocks/src/system/manifest/index.d.ts +1 -0
  31. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +201 -201
  32. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -84
  33. package/dist/_dts/blocks/src/system/node/schema.d.ts +5 -5
  34. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
  35. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +4 -4
  36. package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
  37. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +3 -3
  38. package/dist/_dts/blocks/src/system/types/link.d.ts +93 -1
  39. package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
  40. package/dist/_dts/content-model/src/metadataConfig.d.ts +1 -0
  41. package/dist/_dts/core/src/branded.d.ts +2 -0
  42. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +124 -8
  43. package/dist/_dts/db/src/schemas/forms.d.ts +85 -64
  44. package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +1 -1
  45. package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +1 -1
  46. package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +1 -1
  47. package/dist/_dts/sdk/src/client/types.d.ts +9 -2
  48. package/dist/_dts/sdk/src/config/typed-entries.d.ts +36 -1
  49. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  50. package/dist/_dts/sdk/src/config/validation.d.ts +40 -37
  51. package/dist/_dts/sdk/src/contracts/content.d.ts +6 -1
  52. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  53. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +18 -8
  54. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +1 -1
  55. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +19 -19
  56. package/dist/_dts/sdk/src/public-api/contracts.d.ts +87 -69
  57. package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
  58. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -5
  59. package/dist/_dts/sdk/src/version.d.ts +1 -1
  60. package/dist/_dts/theme-core/src/accordions/types.d.ts +11 -11
  61. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +10 -10
  62. package/dist/_dts/theme-core/src/buttons/types.d.ts +27 -27
  63. package/dist/_dts/theme-core/src/cards/types.d.ts +17 -17
  64. package/dist/_dts/theme-core/src/inputs/types.d.ts +14 -14
  65. package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +2 -2
  66. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +438 -438
  67. package/dist/_dts/theme-core/src/navigation/types.d.ts +16 -16
  68. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +15 -15
  69. package/dist/_dts/theme-core/src/schema.d.ts +662 -662
  70. package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +4 -4
  71. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +15 -15
  72. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +7 -7
  73. package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
  74. package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +5 -5
  75. package/dist/_dts/ui/src/badge.d.ts +1 -1
  76. package/dist/_dts/ui/src/button-group.d.ts +1 -1
  77. package/dist/_dts/ui/src/button.d.ts +2 -2
  78. package/dist/_dts/ui/src/callout.d.ts +1 -1
  79. package/dist/_dts/ui/src/card.d.ts +1 -1
  80. package/dist/_dts/ui/src/surface.d.ts +2 -2
  81. package/dist/_dts/ui/src/toggle.d.ts +4 -4
  82. package/dist/cli/index.mjs +951 -451
  83. package/dist/client/client.mjs +39490 -38952
  84. package/dist/client/hooks.mjs +1992 -1741
  85. package/dist/client/rendering/client.mjs +179 -130
  86. package/dist/client/rendering/islands.mjs +68 -43
  87. package/dist/client/rendering.mjs +1812 -1292
  88. package/dist/preview-next/before-render.mjs +147 -1
  89. package/dist/preview-next/client/runtime.mjs +1377 -829
  90. package/dist/preview-next/middleware.mjs +147 -1
  91. package/dist/server/components.mjs +3246 -2751
  92. package/dist/server/config-validation.mjs +2198 -1962
  93. package/dist/server/config.mjs +2198 -1962
  94. package/dist/server/data.mjs +1992 -1741
  95. package/dist/server/index.mjs +168 -2
  96. package/dist/server/next.mjs +3230 -2701
  97. package/dist/server/page-converter.mjs +345 -259
  98. package/dist/server/prebuild.mjs +1 -1
  99. package/dist/server/rendering/server.mjs +3274 -2763
  100. package/dist/server/rendering.mjs +3274 -2763
  101. package/dist/server/routing.mjs +530 -309
  102. package/dist/server/server.mjs +2011 -1742
  103. package/package.json +1 -1
@@ -4,6 +4,7 @@
4
4
  import type { LocationCoordinates } from '@riverbankcms/core';
5
5
  import type { Media } from '../../../../lib/media';
6
6
  import type { BlockBookingPaymentTerms } from '../../shared/bookingPaymentTerms';
7
+ import type { PublicTeamMemberSummary } from '../../shared/teamMembers';
7
8
  import type { CoursePricing } from '../../courses/shared/types';
8
9
  import type { EventBlockKind, EventScheduleScope, EventSurfacePreset, EventSurfaceScope } from './filtering';
9
10
  /**
@@ -61,11 +62,6 @@ export type PublicEventTicketType = {
61
62
  createdAt: string;
62
63
  updatedAt: string;
63
64
  };
64
- export type PublicTeamMemberSummary = {
65
- id: string;
66
- name: string;
67
- summary: string | null;
68
- };
69
65
  export type PublicEventAttendanceMode = "in_person" | "online";
70
66
  export type PublicEventAttendanceModeAvailability = {
71
67
  mode: PublicEventAttendanceMode;
@@ -25,8 +25,8 @@ export declare const productListDataSchema: z.ZodObject<{
25
25
  slug: z.ZodString;
26
26
  path: z.ZodNullable<z.ZodString>;
27
27
  status: z.ZodEnum<{
28
- active: "active";
29
28
  draft: "draft";
29
+ active: "active";
30
30
  }>;
31
31
  priceCents: z.ZodNumber;
32
32
  currency: z.ZodString;
@@ -14,8 +14,8 @@ export declare const publicProductSchema: z.ZodObject<{
14
14
  slug: z.ZodString;
15
15
  path: z.ZodNullable<z.ZodString>;
16
16
  status: z.ZodEnum<{
17
- active: "active";
18
17
  draft: "draft";
18
+ active: "active";
19
19
  }>;
20
20
  priceCents: z.ZodNumber;
21
21
  currency: z.ZodString;
@@ -59,8 +59,8 @@ export declare const publicProductsResponseSchema: z.ZodObject<{
59
59
  slug: z.ZodString;
60
60
  path: z.ZodNullable<z.ZodString>;
61
61
  status: z.ZodEnum<{
62
- active: "active";
63
62
  draft: "draft";
63
+ active: "active";
64
64
  }>;
65
65
  priceCents: z.ZodNumber;
66
66
  currency: z.ZodString;
@@ -32,9 +32,9 @@ export declare const bookingInstalmentPlanSchema: z.ZodUnion<readonly [z.ZodObje
32
32
  }>;
33
33
  remainderDueCount: z.ZodNumber;
34
34
  intervalUnit: z.ZodEnum<{
35
+ month: "month";
35
36
  day: "day";
36
37
  week: "week";
37
- month: "month";
38
38
  }>;
39
39
  }, z.core.$strip>, z.ZodObject<{
40
40
  kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
@@ -46,18 +46,18 @@ export declare const bookingInstalmentPlanSchema: z.ZodUnion<readonly [z.ZodObje
46
46
  instalmentCount: z.ZodNumber;
47
47
  intervalCount: z.ZodNumber;
48
48
  intervalUnit: z.ZodEnum<{
49
+ month: "month";
49
50
  day: "day";
50
51
  week: "week";
51
- month: "month";
52
52
  }>;
53
53
  }, z.core.$strip>, z.ZodObject<{
54
54
  kind: z.ZodLiteral<"equal_scheduled_instalments">;
55
55
  instalmentCount: z.ZodNumber;
56
56
  intervalCount: z.ZodNumber;
57
57
  intervalUnit: z.ZodEnum<{
58
+ month: "month";
58
59
  day: "day";
59
60
  week: "week";
60
- month: "month";
61
61
  }>;
62
62
  }, z.core.$strip>]>;
63
63
  export declare const bookingFlexibleBalanceDueDateRuleSchema: z.ZodUnion<readonly [z.ZodObject<{
@@ -96,9 +96,9 @@ export declare const blockBookingPaymentCollectionOptionSchema: z.ZodUnion<reado
96
96
  }>;
97
97
  remainderDueCount: z.ZodNumber;
98
98
  intervalUnit: z.ZodEnum<{
99
+ month: "month";
99
100
  day: "day";
100
101
  week: "week";
101
- month: "month";
102
102
  }>;
103
103
  }, z.core.$strip>, z.ZodObject<{
104
104
  kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
@@ -110,18 +110,18 @@ export declare const blockBookingPaymentCollectionOptionSchema: z.ZodUnion<reado
110
110
  instalmentCount: z.ZodNumber;
111
111
  intervalCount: z.ZodNumber;
112
112
  intervalUnit: z.ZodEnum<{
113
+ month: "month";
113
114
  day: "day";
114
115
  week: "week";
115
- month: "month";
116
116
  }>;
117
117
  }, z.core.$strip>, z.ZodObject<{
118
118
  kind: z.ZodLiteral<"equal_scheduled_instalments">;
119
119
  instalmentCount: z.ZodNumber;
120
120
  intervalCount: z.ZodNumber;
121
121
  intervalUnit: z.ZodEnum<{
122
+ month: "month";
122
123
  day: "day";
123
124
  week: "week";
124
- month: "month";
125
125
  }>;
126
126
  }, z.core.$strip>]>;
127
127
  }, z.core.$strip>, z.ZodObject<{
@@ -157,9 +157,9 @@ export declare const blockBookingPaymentTermsSchema: z.ZodObject<{
157
157
  }>;
158
158
  remainderDueCount: z.ZodNumber;
159
159
  intervalUnit: z.ZodEnum<{
160
+ month: "month";
160
161
  day: "day";
161
162
  week: "week";
162
- month: "month";
163
163
  }>;
164
164
  }, z.core.$strip>, z.ZodObject<{
165
165
  kind: z.ZodLiteral<"deposit_plus_scheduled_instalments">;
@@ -171,18 +171,18 @@ export declare const blockBookingPaymentTermsSchema: z.ZodObject<{
171
171
  instalmentCount: z.ZodNumber;
172
172
  intervalCount: z.ZodNumber;
173
173
  intervalUnit: z.ZodEnum<{
174
+ month: "month";
174
175
  day: "day";
175
176
  week: "week";
176
- month: "month";
177
177
  }>;
178
178
  }, z.core.$strip>, z.ZodObject<{
179
179
  kind: z.ZodLiteral<"equal_scheduled_instalments">;
180
180
  instalmentCount: z.ZodNumber;
181
181
  intervalCount: z.ZodNumber;
182
182
  intervalUnit: z.ZodEnum<{
183
+ month: "month";
183
184
  day: "day";
184
185
  week: "week";
185
- month: "month";
186
186
  }>;
187
187
  }, z.core.$strip>]>;
188
188
  }, z.core.$strip>, z.ZodObject<{
@@ -0,0 +1,24 @@
1
+ import type { ImageMedia } from "../../../lib/media";
2
+ /**
3
+ * Team member block contracts
4
+ *
5
+ * These local block-side types mirror the public API team-member summary
6
+ * contract without making `@riverbankcms/blocks` depend on `@riverbankcms/api`.
7
+ *
8
+ * Keep structural-equivalence guardrails in `@riverbankcms/api` in sync with
9
+ * this file when changing public team-member payload fields.
10
+ */
11
+ export type PublicTeamMemberSummary = {
12
+ id: string;
13
+ name: string;
14
+ roleLabel: string | null;
15
+ summary: string | null;
16
+ profilePath: string | null;
17
+ };
18
+ export type PublicTeamMemberPhoto = ImageMedia | null;
19
+ export type PublicTeamMemberBlockItem = PublicTeamMemberSummary & {
20
+ _type: "teamMember";
21
+ role: string | null;
22
+ bio: string | null;
23
+ photo: PublicTeamMemberPhoto;
24
+ };
@@ -2,6 +2,7 @@ import { type BlockManifest } from "../manifest/schema";
2
2
  import type { SystemBlockDefinition } from "../registry";
3
3
  import type { SemanticSpacing } from "../spacing";
4
4
  import { type ImageColSize } from "../fields/imageLayout";
5
+ import type { PublicTeamMemberPhoto } from "./shared/teamMembers";
5
6
  type ThumbnailShape = "round" | "rounded" | "square";
6
7
  type LayoutAlign = "center" | "left";
7
8
  type LayoutWidth = "full" | "lg-3-4-left";
@@ -9,7 +10,16 @@ type ThumbnailPadding = "none" | "sm" | "md" | "lg";
9
10
  type StackImagePosition = "left" | "right" | "alternate";
10
11
  type StackContentAlignment = "top" | "center";
11
12
  export declare const teamMembersManifest: BlockManifest;
12
- export type TeamMembersContent = {
13
+ type ManualTeamMemberItem = {
14
+ _type: "teamMember";
15
+ name: string;
16
+ role?: string | null;
17
+ bio?: unknown;
18
+ photo?: PublicTeamMemberPhoto;
19
+ profilePath?: string | null;
20
+ };
21
+ type TeamMembersCommonContent = {
22
+ variant?: "grid" | "stack" | null;
13
23
  heading?: string | null;
14
24
  layoutAlign?: LayoutAlign | null;
15
25
  layoutWidth?: LayoutWidth | null;
@@ -20,13 +30,13 @@ export type TeamMembersContent = {
20
30
  stackContentAlignment?: StackContentAlignment | null;
21
31
  columns?: string | number | null;
22
32
  gap?: SemanticSpacing;
23
- members: Array<{
24
- _type: "teamMember";
25
- name: string;
26
- role?: string | null;
27
- bio?: unknown;
28
- photo?: unknown;
29
- }>;
30
33
  };
34
+ export type TeamMembersContent = (TeamMembersCommonContent & {
35
+ source?: "manual" | null;
36
+ members: ManualTeamMemberItem[];
37
+ }) | (TeamMembersCommonContent & {
38
+ source: "site_staff";
39
+ members?: ManualTeamMemberItem[];
40
+ });
31
41
  export declare const teamMembersBlockDefinition: SystemBlockDefinition<TeamMembersContent>;
32
42
  export {};
@@ -54,7 +54,7 @@ export declare const BACKGROUND_POSITION_PRESETS: readonly [{
54
54
  readonly value: "right bottom";
55
55
  readonly label: "Right Bottom";
56
56
  }];
57
- export declare const BACKGROUND_POSITION_PRESET_VALUES: ("center" | "left" | "right" | "top" | "bottom" | "right center" | "top left" | "top right" | "bottom left" | "bottom right" | "top center" | "bottom center" | "left center" | "left top" | "right top" | "left bottom" | "right bottom")[];
57
+ export declare const BACKGROUND_POSITION_PRESET_VALUES: ("bottom" | "top" | "center" | "left" | "right" | "right center" | "top left" | "top right" | "bottom left" | "bottom right" | "top center" | "bottom center" | "left center" | "left top" | "right top" | "left bottom" | "right bottom")[];
58
58
  /**
59
59
  * Maps position keywords to rb-* anchor positioning classes.
60
60
  * Used for positioning scaled/overflow images within their containers.
@@ -1,3 +1,3 @@
1
- export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "getPublicEventDetails", "listPublicCourses", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "getPublicFormById", "getPublicBookingServices"];
1
+ export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "getPublicEventDetails", "listPublicCourses", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "getPublicFormById", "getPublicBookingServices"];
2
2
  export type SupportedLoaderEndpoint = typeof SUPPORTED_LOADER_ENDPOINTS[number];
3
3
  export declare function isSupportedLoaderEndpoint(endpoint: string): endpoint is SupportedLoaderEndpoint;
@@ -30,7 +30,7 @@ export declare function normalizeParams(input: unknown): Record<string, string>;
30
30
  export declare function coerceToString(value: unknown): string;
31
31
  /**
32
32
  * Extract data from API response.
33
- * Unwraps common response wrappers: { data }, { form }, { entries }, { services }
33
+ * Unwraps common response wrappers: { data }, { form }, { entries }, { services }, { teamMembers }
34
34
  *
35
35
  * Note: We check that properties are NOT functions to avoid returning
36
36
  * built-in methods like Array.prototype.entries
@@ -0,0 +1,185 @@
1
+ import { z } from "zod";
2
+ import { linkSchema, customLinkSchema, entryLinkSchema, externalLinkSchema, internalLinkSchema, internalResolvedLinkSchema, internalRouteOnlyLinkSchema, pageLinkSchema } from "../../types/link";
3
+ import { type FieldDefinition } from "../schema";
4
+ export { linkSchema, customLinkSchema, entryLinkSchema, externalLinkSchema, internalLinkSchema, internalResolvedLinkSchema, internalRouteOnlyLinkSchema, pageLinkSchema, };
5
+ export type FieldPath = readonly (string | number)[];
6
+ export type FieldValidationMode = "strict" | "draft";
7
+ export type FieldValidationOptions = Readonly<{
8
+ allowNull?: boolean;
9
+ allowIncomplete?: boolean;
10
+ mode?: FieldValidationMode;
11
+ }>;
12
+ export type NativeInputValidationProps = Readonly<{
13
+ required?: boolean;
14
+ maxLength?: number;
15
+ min?: number;
16
+ max?: number;
17
+ step?: number;
18
+ type?: "text" | "email" | "tel" | "url" | "number";
19
+ inputMode?: "text" | "email" | "tel" | "url" | "numeric" | "decimal";
20
+ pattern?: string;
21
+ }>;
22
+ type RequiredConstraint = Readonly<{
23
+ kind: "required";
24
+ }>;
25
+ type TextTypeConstraint = Readonly<{
26
+ kind: "textType";
27
+ }>;
28
+ type MaxLengthConstraint = Readonly<{
29
+ kind: "maxLength";
30
+ maximum: number;
31
+ }>;
32
+ type EmailFormatConstraint = Readonly<{
33
+ kind: "emailFormat";
34
+ }>;
35
+ type PhoneFormatConstraint = Readonly<{
36
+ kind: "phoneFormat";
37
+ }>;
38
+ type PatternFormatConstraint = Readonly<{
39
+ kind: "patternFormat";
40
+ pattern: string;
41
+ }>;
42
+ type UrlFormatConstraint = Readonly<{
43
+ kind: "urlFormat";
44
+ allowRelative: boolean;
45
+ }>;
46
+ type NumberTypeConstraint = Readonly<{
47
+ kind: "numberType";
48
+ }>;
49
+ type NumberMinConstraint = Readonly<{
50
+ kind: "numberMin";
51
+ minimum: number;
52
+ }>;
53
+ type NumberMaxConstraint = Readonly<{
54
+ kind: "numberMax";
55
+ maximum: number;
56
+ }>;
57
+ type SlugFormatConstraint = Readonly<{
58
+ kind: "slugFormat";
59
+ }>;
60
+ type SelectOptionConstraint = Readonly<{
61
+ kind: "selectOption";
62
+ source: SelectConstraintSource;
63
+ multiple: boolean;
64
+ }>;
65
+ type ArrayTypeConstraint = Readonly<{
66
+ kind: "arrayType";
67
+ }>;
68
+ type MinItemsConstraint = Readonly<{
69
+ kind: "minItems";
70
+ minimum: number;
71
+ }>;
72
+ type MaxItemsConstraint = Readonly<{
73
+ kind: "maxItems";
74
+ maximum: number;
75
+ }>;
76
+ type RichTextDocConstraint = Readonly<{
77
+ kind: "richTextDoc";
78
+ }>;
79
+ type MediaObjectConstraint = Readonly<{
80
+ kind: "mediaObject";
81
+ }>;
82
+ type LinkObjectConstraint = Readonly<{
83
+ kind: "linkObject";
84
+ }>;
85
+ type ReferenceTextConstraint = Readonly<{
86
+ kind: "referenceText";
87
+ }>;
88
+ type StringConstraint = RequiredConstraint | TextTypeConstraint | MaxLengthConstraint | EmailFormatConstraint | PhoneFormatConstraint | PatternFormatConstraint | UrlFormatConstraint | SlugFormatConstraint | ReferenceTextConstraint;
89
+ type NumberConstraint = RequiredConstraint | NumberTypeConstraint | NumberMinConstraint | NumberMaxConstraint;
90
+ type SelectConstraint = RequiredConstraint | SelectOptionConstraint;
91
+ type ArrayConstraint = RequiredConstraint | ArrayTypeConstraint | MinItemsConstraint | MaxItemsConstraint;
92
+ type ObjectConstraint = RequiredConstraint | RichTextDocConstraint | MediaObjectConstraint | LinkObjectConstraint;
93
+ type BooleanConstraint = RequiredConstraint;
94
+ export type FieldConstraint = StringConstraint | NumberConstraint | SelectConstraint | ArrayConstraint | ObjectConstraint | BooleanConstraint;
95
+ export type SelectConstraintSource = Readonly<{
96
+ kind: "static";
97
+ values: readonly string[];
98
+ }> | Readonly<{
99
+ kind: "runtime";
100
+ source: "site" | "sdk";
101
+ }>;
102
+ export type FieldValidationIssue = BaseIssue<"required", {
103
+ emptyOrigin?: "string" | "array";
104
+ }> | BaseIssue<"wrongType", {
105
+ expected: string;
106
+ }> | BaseIssue<"tooLong", {
107
+ maximum: number;
108
+ }> | BaseIssue<"invalidEmail"> | BaseIssue<"invalidPhone"> | BaseIssue<"invalidPattern"> | BaseIssue<"invalidUrl"> | BaseIssue<"invalidNumber"> | BaseIssue<"tooSmall", {
109
+ minimum: number;
110
+ }> | BaseIssue<"tooLarge", {
111
+ maximum: number;
112
+ }> | BaseIssue<"invalidSlug"> | BaseIssue<"invalidOption"> | BaseIssue<"tooFewItems", {
113
+ minimum: number;
114
+ itemLabel: string;
115
+ }> | BaseIssue<"tooManyItems", {
116
+ maximum: number;
117
+ itemLabel: string;
118
+ }> | BaseIssue<"invalidRichText"> | BaseIssue<"invalidMedia"> | BaseIssue<"invalidLink"> | BaseIssue<"invalidReference">;
119
+ type BaseIssue<K extends string, Extra extends object = Record<never, never>> = Readonly<{
120
+ kind: K;
121
+ path: FieldPath;
122
+ fieldId: string;
123
+ label: string;
124
+ }> & Readonly<Extra>;
125
+ type PlanBase<K extends string, ValueKind extends string, Constraints extends FieldConstraint> = Readonly<{
126
+ kind: K;
127
+ valueKind: ValueKind;
128
+ fieldId: string;
129
+ label: string;
130
+ fieldType: FieldDefinition["type"];
131
+ path: FieldPath;
132
+ required: boolean;
133
+ constraints: readonly Constraints[];
134
+ }>;
135
+ export type StringFieldValidationPlan = PlanBase<"string", "string", StringConstraint> & Readonly<{
136
+ fieldType: "text" | "slug" | "url" | "reference" | "date" | "time" | "datetime";
137
+ }>;
138
+ export type NumberFieldValidationPlan = PlanBase<"number", "number", NumberConstraint> & Readonly<{
139
+ fieldType: "number" | "text";
140
+ }>;
141
+ export type BooleanFieldValidationPlan = PlanBase<"boolean", "boolean", BooleanConstraint> & Readonly<{
142
+ fieldType: "boolean";
143
+ }>;
144
+ export type RichTextFieldValidationPlan = PlanBase<"richText", "object", ObjectConstraint> & Readonly<{
145
+ fieldType: "richText";
146
+ }>;
147
+ export type MediaFieldValidationPlan = PlanBase<"media", "object", ObjectConstraint> & Readonly<{
148
+ fieldType: "media";
149
+ }>;
150
+ export type LinkFieldValidationPlan = PlanBase<"link", "object", ObjectConstraint> & Readonly<{
151
+ fieldType: "link";
152
+ }>;
153
+ export type SelectFieldValidationPlan = PlanBase<"select", "select", SelectConstraint> & Readonly<{
154
+ fieldType: "select";
155
+ }>;
156
+ export type RepeaterFieldValidationPlan = PlanBase<"repeater", "array", ArrayConstraint> & Readonly<{
157
+ fieldType: "repeater";
158
+ repeatedItemPlan?: readonly FieldValidationPlan[];
159
+ repeatedItemVariants?: readonly RepeatedItemValidationPlan[];
160
+ }>;
161
+ export type GroupFieldValidationPlan = PlanBase<"group", "object", ObjectConstraint> & Readonly<{
162
+ fieldType: "group" | "modal" | "tabGroup";
163
+ children: readonly FieldValidationPlan[];
164
+ allowNullChildren?: boolean;
165
+ }>;
166
+ export type PassthroughFieldValidationPlan = PlanBase<"passthrough", "unknown", RequiredConstraint> & Readonly<{
167
+ fieldType: "presetOrCustom" | "contentTypeSelect" | "entryPicker";
168
+ }>;
169
+ export type FieldValidationPlan = StringFieldValidationPlan | NumberFieldValidationPlan | BooleanFieldValidationPlan | RichTextFieldValidationPlan | MediaFieldValidationPlan | LinkFieldValidationPlan | SelectFieldValidationPlan | RepeaterFieldValidationPlan | GroupFieldValidationPlan | PassthroughFieldValidationPlan;
170
+ export type RepeatedItemValidationPlan = Readonly<{
171
+ typeId: string;
172
+ fields: readonly FieldValidationPlan[];
173
+ }>;
174
+ export declare function formatFieldPath(path: FieldPath): string;
175
+ export declare function toZodIssuePath(path: FieldPath): (string | number)[];
176
+ export declare function parseFieldPathKey(key: string): FieldPath;
177
+ export declare function fieldIssueToMessage(issue: FieldValidationIssue): string;
178
+ export declare function deriveFieldValidationPlan(field: FieldDefinition, path?: FieldPath): FieldValidationPlan;
179
+ export declare function fieldPlanToNativeInputProps(plan: FieldValidationPlan): NativeInputValidationProps;
180
+ export declare function normalizeFieldInput(plan: FieldValidationPlan, value: unknown, options?: FieldValidationOptions): unknown;
181
+ export declare function validateFieldValue(plan: FieldValidationPlan, value: unknown, options?: FieldValidationOptions): FieldValidationIssue[];
182
+ export declare function fieldPlanToZod(plan: FieldValidationPlan, options?: FieldValidationOptions): z.ZodTypeAny;
183
+ export declare function validateManifestValues(fields: readonly FieldDefinition[], values: Record<string, unknown>, options?: FieldValidationOptions): FieldValidationIssue[];
184
+ export declare function isEmptyValue(value: unknown): boolean;
185
+ export declare function isEmptyRichTextDoc(value: unknown): boolean;
@@ -1,5 +1,6 @@
1
1
  export * from "./augmentManifest";
2
2
  export * from "./fieldPath";
3
+ export * from "./fieldValidation";
3
4
  export * from "./registry";
4
5
  export * from "./schema";
5
6
  export * from "./validation";