@contentful/experiences-core 3.7.0 → 3.7.1-dev-20250922T0805-b99a8e0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1037,6 +1037,19 @@ const ComponentVariableSchema = z.object({
1037
1037
  });
1038
1038
  const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
1039
1039
  children: z.lazy(() => ComponentTreeNodeSchema.array()),
1040
+ }).superRefine(({ id, prebindingId, parameters }, ctx) => {
1041
+ if (prebindingId && !parameters) {
1042
+ ctx.addIssue({
1043
+ code: z.ZodIssueCode.custom,
1044
+ message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
1045
+ });
1046
+ }
1047
+ if (parameters && !prebindingId) {
1048
+ ctx.addIssue({
1049
+ code: z.ZodIssueCode.custom,
1050
+ message: `Found "parameters" but no "prebindingId" for node with id: "${id}"`,
1051
+ });
1052
+ }
1040
1053
  });
1041
1054
  const ComponentTreeSchema = z
1042
1055
  .object({