@contentful/experiences-core 3.8.0-beta.0 → 3.8.0-beta.1

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.cjs CHANGED
@@ -990,6 +990,16 @@ const ComponentVariableSchema = zod.z.object({
990
990
  });
991
991
  const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
992
992
  children: zod.z.lazy(() => ComponentTreeNodeSchema.array()),
993
+ }).superRefine(({ id, prebindingId, parameters }, ctx) => {
994
+ // We don't fail if parameters are present but prebindingId is not because
995
+ // older experiences (updated before 21-09-2025) always included parameters
996
+ // and they will start failing if we do.
997
+ if (prebindingId && !parameters) {
998
+ ctx.addIssue({
999
+ code: zod.z.ZodIssueCode.custom,
1000
+ message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
1001
+ });
1002
+ }
993
1003
  });
994
1004
  const ComponentTreeSchema = zod.z
995
1005
  .object({