@contentful/experiences-core 1.30.2 → 1.30.3-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
@@ -1150,14 +1150,18 @@ const ComponentValueSchema = z
1150
1150
  key: z.string(),
1151
1151
  })
1152
1152
  .strict();
1153
+ // TODO: finalize schema structure before release
1154
+ // https://contentful.atlassian.net/browse/LUMOS-523
1155
+ const EmptyObjectSchema = z.object({ type: z.undefined() });
1153
1156
  const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
1154
1157
  DesignValueSchema,
1155
1158
  BoundValueSchema,
1156
1159
  UnboundValueSchema,
1157
1160
  HyperlinkValueSchema,
1158
1161
  ComponentValueSchema,
1162
+ EmptyObjectSchema,
1159
1163
  ]);
1160
- // TODO: finalized schema structure before release
1164
+ // TODO: finalize schema structure before release
1161
1165
  // https://contentful.atlassian.net/browse/LUMOS-523
1162
1166
  const VariableMappingSchema = z.object({
1163
1167
  patternPropertyDefinitionId: propertyKeySchema,
@@ -1165,17 +1169,20 @@ const VariableMappingSchema = z.object({
1165
1169
  pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
1166
1170
  });
1167
1171
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
1168
- // TODO: finalized schema structure before release
1172
+ // TODO: finalize schema structure before release
1169
1173
  // https://contentful.atlassian.net/browse/LUMOS-523
1170
1174
  const PatternPropertyDefinitionSchema = z.object({
1171
- defaultValue: z.object({
1172
- path: z.string(),
1173
- type: z.literal('BoundValue'),
1174
- }),
1175
+ defaultValue: z.union([
1176
+ z.object({
1177
+ path: z.string(),
1178
+ type: z.literal('BoundValue'),
1179
+ }),
1180
+ z.null(),
1181
+ ]),
1175
1182
  contentTypes: z.record(z.string(), z.any()),
1176
1183
  });
1177
1184
  const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
1178
- // TODO: finalized schema structure before release
1185
+ // TODO: finalize schema structure before release
1179
1186
  // https://contentful.atlassian.net/browse/LUMOS-523
1180
1187
  const PatternPropertySchema = z.object({
1181
1188
  type: z.literal('BoundValue'),