@contentful/experiences-components-react 1.42.0-prerelease-20250626T1154-6ca57b0.0 → 1.42.0-prerelease-20250630T1135-a8b68d4.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
@@ -1371,14 +1371,18 @@ const VariableMappingSchema = z.object({
1371
1371
  // TODO: finalize schema structure before release
1372
1372
  // https://contentful.atlassian.net/browse/LUMOS-523
1373
1373
  const ParameterDefinitionSchema = z.object({
1374
- defaultValue: z
1375
- .record(z.string(), z.object({
1376
- sys: z.object({
1377
- type: z.literal('Link'),
1378
- id: z.string(),
1379
- linkType: z.enum(['Entry']),
1374
+ defaultSource: z
1375
+ .strictObject({
1376
+ type: z.enum(['Entry']),
1377
+ contentTypeId: z.string(),
1378
+ link: z.strictObject({
1379
+ sys: z.strictObject({
1380
+ type: z.literal('Link'),
1381
+ id: z.string(),
1382
+ linkType: z.enum(['Entry']),
1383
+ }),
1380
1384
  }),
1381
- }))
1385
+ })
1382
1386
  .optional(),
1383
1387
  contentTypes: z.record(z.string(), z.object({
1384
1388
  sys: z.object({
@@ -1392,13 +1396,29 @@ const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefiniti
1392
1396
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
1393
1397
  const ComponentVariablesSchema = z.record(z.string().regex(/^[a-zA-Z0-9-_]{1,54}$/), // Here the key is <variableName>_<nanoidId> so we need to allow for a longer length
1394
1398
  ComponentVariableSchema);
1395
- const ComponentSettingsSchema = z.object({
1399
+ const PassToNodeSchema = z
1400
+ .object({
1401
+ nodeId: propertyKeySchema,
1402
+ parameterId: propertyKeySchema,
1403
+ prebindingId: propertyKeySchema,
1404
+ })
1405
+ .strict();
1406
+ const PrebindingDefinitionSchema = z
1407
+ .object({
1408
+ id: propertyKeySchema,
1409
+ variableMappings: VariableMappingsSchema.optional(),
1410
+ parameterDefinitions: ParameterDefinitionsSchema,
1411
+ passToNodes: z.array(PassToNodeSchema).optional(),
1412
+ })
1413
+ .strict();
1414
+ const ComponentSettingsSchema = z
1415
+ .object({
1396
1416
  variableDefinitions: ComponentVariablesSchema,
1397
1417
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
1398
1418
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
1399
- variableMappings: VariableMappingsSchema.optional(),
1400
- parameterDefinitions: ParameterDefinitionsSchema.optional(),
1401
- });
1419
+ prebindingDefinitions: z.array(PrebindingDefinitionSchema).optional(),
1420
+ })
1421
+ .strict();
1402
1422
  z.object({
1403
1423
  componentTree: localeWrapper(ComponentTreeSchema),
1404
1424
  dataSource: localeWrapper(DataSourceSchema),