@adobe/spacecat-shared-data-access 3.73.0 → 3.73.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [@adobe/spacecat-shared-data-access-v3.73.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.73.0...@adobe/spacecat-shared-data-access-v3.73.1) (2026-05-28)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **data-access:** declare Preflight createdBy/error as 'any' so Service construction succeeds ([#1636](https://github.com/adobe/spacecat-shared/issues/1636)) ([4097963](https://github.com/adobe/spacecat-shared/commit/40979638bc65c6e29a1b9cd7b25608ad376161ed)), closes [adobe/spacecat-shared#1601](https://github.com/adobe/spacecat-shared/issues/1601)
6
+
1
7
  ## [@adobe/spacecat-shared-data-access-v3.73.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.72.1...@adobe/spacecat-shared-data-access-v3.73.0) (2026-05-28)
2
8
 
3
9
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "3.73.0",
3
+ "version": "3.73.1",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -30,8 +30,16 @@ const schema = new SchemaBuilder(Preflight, PreflightCollection)
30
30
  required: true,
31
31
  default: Preflight.Status.IN_PROGRESS,
32
32
  })
33
+ // `createdBy` and `error` use type 'any' (matching neighbor `result`) because
34
+ // ElectroDB's `map` type requires a `properties` schema for every sub-key,
35
+ // and the validate function below already enforces the precise shape — a
36
+ // duplicate `properties` declaration adds nothing. Declaring `type: 'map'`
37
+ // here without `properties` was the original definition and throws
38
+ // `InvalidAttributeDefinition` at Service construction, blocking any
39
+ // downstream consumer that builds a v1 `new Service(EntityRegistry.getEntities())`
40
+ // (e.g. spacecat-api-service `fixes.test.js`).
33
41
  .addAttribute('createdBy', {
34
- type: 'map',
42
+ type: 'any',
35
43
  required: true,
36
44
  validate: (value) => isObject(value) && typeof value.email === 'string' && value.email.length > 0,
37
45
  })
@@ -48,7 +56,7 @@ const schema = new SchemaBuilder(Preflight, PreflightCollection)
48
56
  validate: (value) => !value || isObject(value),
49
57
  })
50
58
  .addAttribute('error', {
51
- type: 'map',
59
+ type: 'any',
52
60
  validate: (value) => !value || (isObject(value) && typeof value.code === 'string' && value.code.length > 0 && typeof value.message === 'string' && value.message.length > 0),
53
61
  });
54
62