@contentful/experiences-components-react 3.7.0 → 3.7.1-beta.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
@@ -1376,6 +1376,19 @@ const ComponentVariableSchema = z.object({
1376
1376
  });
1377
1377
  const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
1378
1378
  children: z.lazy(() => ComponentTreeNodeSchema.array()),
1379
+ }).superRefine(({ id, prebindingId, parameters }, ctx) => {
1380
+ if (prebindingId && !parameters) {
1381
+ ctx.addIssue({
1382
+ code: z.ZodIssueCode.custom,
1383
+ message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
1384
+ });
1385
+ }
1386
+ if (parameters && !prebindingId) {
1387
+ ctx.addIssue({
1388
+ code: z.ZodIssueCode.custom,
1389
+ message: `Found "parameters" but no "prebindingId" for node with id: "${id}"`,
1390
+ });
1391
+ }
1379
1392
  });
1380
1393
  const ComponentTreeSchema = z
1381
1394
  .object({