@adobe/spacecat-shared-data-access 4.16.0 → 4.17.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.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)
2
+
3
+ ### Features
4
+
5
+ * **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))
6
+
7
+ ## [@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)
8
+
9
+ ### Bug Fixes
10
+
11
+ * **data-access:** reconcile status-transition tables from SITES-47286 warn findings ([#1860](https://github.com/adobe/spacecat-shared/issues/1860)) ([237c081](https://github.com/adobe/spacecat-shared/commit/237c081feaec5368e4b08422d83087762a672fe5)), closes [#5](https://github.com/adobe/spacecat-shared/issues/5)
12
+
1
13
  ## [@adobe/spacecat-shared-data-access-v4.16.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v4.15.3...@adobe/spacecat-shared-data-access-v4.16.0) (2026-07-31)
2
14
 
3
15
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "4.16.0",
3
+ "version": "4.17.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -45,7 +45,9 @@ export const FIX_ENTITY_TRANSITIONS = {
45
45
  [STATUSES.PENDING]: [STATUSES.DEPLOYED, STATUSES.FAILED],
46
46
  [STATUSES.DEPLOYED]: [STATUSES.PUBLISHED, STATUSES.ROLLED_BACK],
47
47
  // bounded retry; the attempts cap (SITES-46548) is not enforced here.
48
- [STATUSES.FAILED]: [STATUSES.PENDING],
48
+ // ROLLED_BACK reconciles the ADR table to api-service's existing revert rule
49
+ // ("ROLLED_BACK requires FAILED", fixes.js) — SITES-47286 warn finding (~6x/25d).
50
+ [STATUSES.FAILED]: [STATUSES.PENDING, STATUSES.ROLLED_BACK],
49
51
  [STATUSES.PUBLISHED]: [STATUSES.ROLLED_BACK],
50
52
  [STATUSES.ROLLED_BACK]: [], // terminal
51
53
  };
@@ -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
 
@@ -64,8 +64,10 @@ export const SUGGESTION_TRANSITIONS = {
64
64
  [S.SKIPPED]: [S.NEW, S.OUTDATED],
65
65
  // re-detection reopens an outdated suggestion.
66
66
  [S.OUTDATED]: [S.NEW],
67
- // near-terminal: allow reopen to NEW to correct an incorrect classification (sandsinh review).
68
- [S.REJECTED]: [S.NEW],
67
+ // near-terminal: reopen to NEW to correct a misclassification (sandsinh review), or a
68
+ // re-audit outdates a rejected suggestion once its issue is no longer detected
69
+ // (SITES-47286 warn finding: REJECTED -> OUTDATED, ~247x/25d, legitimate re-audit flow).
70
+ [S.REJECTED]: [S.NEW, S.OUTDATED],
69
71
  };
70
72
 
71
73
  /**