@adobe/spacecat-shared-data-access 3.0.0 → 3.0.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.0.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.0.0...@adobe/spacecat-shared-data-access-v3.0.1) (2026-02-17)
2
+
3
+ ### Bug Fixes
4
+
5
+ * add consent-banner to DATA_SCHEMAS for minimal view projection ([#1361](https://github.com/adobe/spacecat-shared/issues/1361)) ([bc1379c](https://github.com/adobe/spacecat-shared/commit/bc1379c6e7eba64c2d7f2b17e1462db0ca798711))
6
+
1
7
  ## [@adobe/spacecat-shared-data-access-v3.0.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.109.0...@adobe/spacecat-shared-data-access-v3.0.0) (2026-02-16)
2
8
 
3
9
  ### ⚠ BREAKING CHANGES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -526,6 +526,33 @@ export const DATA_SCHEMAS = {
526
526
  },
527
527
  },
528
528
 
529
+ // consent-banner opportunity type.
530
+ // Note: The DB stores opportunity type as 'consent-banner', NOT the OPPORTUNITY_TYPES
531
+ // constant PAID_COOKIE_CONSENT ('paid-cookie-consent'). Using string literal to match DB.
532
+ 'consent-banner': {
533
+ schema: Joi.object({
534
+ mobile: Joi.string().allow(null).optional(),
535
+ desktop: Joi.string().allow(null).optional(),
536
+ recommendations: Joi.array().items(
537
+ Joi.object({
538
+ pageUrl: Joi.string().uri().optional(),
539
+ id: Joi.string().optional(),
540
+ }).unknown(true),
541
+ ).optional(),
542
+ impact: Joi.object({
543
+ business: Joi.string().allow(null).optional(),
544
+ user: Joi.string().allow(null).optional(),
545
+ }).unknown(true).optional(),
546
+ aggregationKey: Joi.string().allow(null).optional(),
547
+ }).unknown(true),
548
+ projections: {
549
+ minimal: {
550
+ fields: ['mobile', 'desktop', 'recommendations', 'impact'],
551
+ transformers: {},
552
+ },
553
+ },
554
+ },
555
+
529
556
  // ========== SCHEMAS TO BE ADDED ==========
530
557
  // TODO: The following opportunity types need schemas to be added.
531
558
  // Research actual suggestion data for these types and add schemas following the pattern:
@@ -552,6 +579,5 @@ export const DATA_SCHEMAS = {
552
579
  // - SECURITY_PERMISSIONS_REDUNDANT (may use SECURITY_PERMISSIONS schema
553
580
  // or need separate schema)
554
581
  // - GENERIC_OPPORTUNITY
555
- // - PAID_COOKIE_CONSENT
556
582
  // - WIKIPEDIA_ANALYSIS
557
583
  };