@adobe/spacecat-shared-data-access 3.39.0 → 3.41.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-v3.41.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.40.0...@adobe/spacecat-shared-data-access-v3.41.0) (2026-04-01)
2
+
3
+ ### Features
4
+
5
+ * add lastAuditedAt attribute to Opportunity schema ([#1479](https://github.com/adobe/spacecat-shared/issues/1479)) ([ee92ba9](https://github.com/adobe/spacecat-shared/commit/ee92ba9218016b8f7918358aa67db219287704dd))
6
+
7
+ ## [@adobe/spacecat-shared-data-access-v3.40.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.39.0...@adobe/spacecat-shared-data-access-v3.40.0) (2026-04-01)
8
+
9
+ ### Features
10
+
11
+ * add auto-fix audit type for commerce product catalog enrichement ([#1495](https://github.com/adobe/spacecat-shared/issues/1495)) ([088759d](https://github.com/adobe/spacecat-shared/commit/088759d037309d39a9483ccb80479bca2fe6e9a9))
12
+
1
13
  ## [@adobe/spacecat-shared-data-access-v3.39.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.38.0...@adobe/spacecat-shared-data-access-v3.39.0) (2026-04-01)
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": "3.39.0",
3
+ "version": "3.41.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -92,6 +92,7 @@ class Audit extends BaseModel {
92
92
  COMMERCE_PRODUCT_PAGE_ENRICHMENT: 'commerce-product-page-enrichment',
93
93
  COMMERCE_PRODUCT_CATALOG_ENRICHMENT: 'commerce-product-catalog-enrichment',
94
94
  COMMERCE_PRODUCT_ENRICHMENTS_AUTO_FIX: 'commerce-product-enrichments-auto-fix',
95
+ COMMERCE_PRODUCT_CATALOG_ENRICHMENT_AUTO_FIX: 'commerce-product-catalog-enrichment-auto-fix',
95
96
  CWV_TRENDS_AUDIT: 'cwv-trends-audit',
96
97
  OFFSITE_BRAND_PRESENCE: 'offsite-brand-presence',
97
98
  };
@@ -31,12 +31,14 @@ export interface Opportunity extends BaseModel {
31
31
  getSuggestions(): Promise<Suggestion[]>;
32
32
  getSuggestionsByStatus(status: string): Promise<Suggestion[]>;
33
33
  getSuggestionsByStatusAndRank(status: string, rank: string): Promise<Suggestion[]>;
34
+ getLastAuditedAt(): string;
34
35
  getTags(): string[];
35
36
  getTitle(): string;
36
37
  getType(): string;
37
38
  setAuditId(auditId: string): Opportunity;
38
39
  setData(data: object): Opportunity;
39
40
  setDescription(description: string): Opportunity;
41
+ setLastAuditedAt(lastAuditedAt: string): Opportunity;
40
42
  setGuidance(guidance: string): Opportunity;
41
43
  setOrigin(origin: string): Opportunity;
42
44
  setRunbook(runbook: string): Opportunity;
@@ -12,7 +12,7 @@
12
12
 
13
13
  /* c8 ignore start */
14
14
 
15
- import { isNonEmptyObject, isValidUrl } from '@adobe/spacecat-shared-utils';
15
+ import { isIsoDate, isNonEmptyObject, isValidUrl } from '@adobe/spacecat-shared-utils';
16
16
 
17
17
  import SchemaBuilder from '../base/schema.builder.js';
18
18
  import Opportunity from './opportunity.model.js';
@@ -66,6 +66,10 @@ const schema = new SchemaBuilder(Opportunity, OpportunityCollection)
66
66
  .addAttribute('tags', {
67
67
  type: 'set',
68
68
  items: 'string',
69
+ })
70
+ .addAttribute('lastAuditedAt', {
71
+ type: 'string',
72
+ validate: (value) => !value || isIsoDate(value),
69
73
  });
70
74
 
71
75
  export default schema.build();