@adobe/spacecat-shared-data-access 4.16.1 → 4.18.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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [@adobe/spacecat-shared-data-access-v4.18.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v4.17.0...@adobe/spacecat-shared-data-access-v4.18.0) (2026-08-11)
2
+
3
+ ### Features
4
+
5
+ * **data-access:** add prerender validation fields to Suggestion/GeoExperiment ([#1863](https://github.com/adobe/spacecat-shared/issues/1863)) ([88b3baa](https://github.com/adobe/spacecat-shared/commit/88b3baaaedc2a9a12a48a88abb184baf85796426))
6
+
7
+ ## [@adobe/spacecat-shared-data-access-v4.17.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v4.16.1...@adobe/spacecat-shared-data-access-v4.17.0) (2026-08-07)
8
+
9
+ ### Features
10
+
11
+ * **data-access:** add SITE to Opportunity.SCOPE_TYPES (SITES-49175) ([#1866](https://github.com/adobe/spacecat-shared/issues/1866)) ([c33a236](https://github.com/adobe/spacecat-shared/commit/c33a23677101ad6b6b839c5fb12f1810d1612571))
12
+
1
13
  ## [@adobe/spacecat-shared-data-access-v4.16.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v4.16.0...@adobe/spacecat-shared-data-access-v4.16.1) (2026-08-03)
2
14
 
3
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "4.16.1",
3
+ "version": "4.18.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -61,6 +61,7 @@ class GeoExperiment extends BaseModel {
61
61
  static METADATA_KEYS = {
62
62
  SCHEDULE_CONFIG: 'scheduleConfig',
63
63
  IMPACT_MEASUREMENT_TASK_ID: 'impactMeasurementTaskId',
64
+ VALIDATION: 'validation',
64
65
  };
65
66
 
66
67
  /**
@@ -40,7 +40,11 @@ class Opportunity extends BaseModel {
40
40
  RESOLVED: 'RESOLVED',
41
41
  };
42
42
 
43
+ // SITES-49175 — `SITE` makes explicit the previously-implicit scope so V1
44
+ // and V2 writers stamp the same `scopeType='site'` value, unblocking the
45
+ // partial unique index on `(siteId, type)`.
43
46
  static SCOPE_TYPES = {
47
+ SITE: 'site',
44
48
  BRAND: 'brand',
45
49
  };
46
50
 
@@ -519,6 +519,13 @@ export const DATA_SCHEMAS = {
519
519
  },
520
520
  },
521
521
  },
522
+ // Field ownership:
523
+ // - validation — written by import-worker's validate-site.js after running the S3-vs-live
524
+ // content comparison for this suggestion's URL, only for suggestions reached via a
525
+ // geoExperimentId-triggered validation call (the bulk/automatic hourly job does not write
526
+ // per-suggestion status). status is a plain boolean; reason is only present when status is
527
+ // false. reason is a free-form string (not a fixed enum here) so import-worker can evolve
528
+ // its reason vocabulary without a schema change in this package.
522
529
  [OPPORTUNITY_TYPES.PRERENDER]: {
523
530
  schema: Joi.object({
524
531
  url: Joi.string().uri().required(),
@@ -529,6 +536,11 @@ export const DATA_SCHEMAS = {
529
536
  prerenderedHtmlKey: Joi.string().optional(),
530
537
  organicTraffic: Joi.number().optional(),
531
538
  aggregationKey: Joi.string().allow(null).optional(),
539
+ validation: Joi.object({
540
+ status: Joi.boolean().optional(),
541
+ reason: Joi.string().optional(),
542
+ validatedAt: Joi.string().isoDate().optional(),
543
+ }).optional(),
532
544
  }).unknown(true),
533
545
  projections: {
534
546
  minimal: {