@adobe/spacecat-shared-data-access 2.15.2 → 2.16.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,17 @@
1
+ # [@adobe/spacecat-shared-data-access-v2.16.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.16.0...@adobe/spacecat-shared-data-access-v2.16.1) (2025-04-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update external fixes ([#708](https://github.com/adobe/spacecat-shared/issues/708)) ([57535ac](https://github.com/adobe/spacecat-shared/commit/57535ac8c636de229cec7c5cee83dead07ac09fb))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v2.16.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.15.2...@adobe/spacecat-shared-data-access-v2.16.0) (2025-04-24)
9
+
10
+
11
+ ### Features
12
+
13
+ * Added cwv-daily and cwv-weekly import types ([#693](https://github.com/adobe/spacecat-shared/issues/693)) ([659826b](https://github.com/adobe/spacecat-shared/commit/659826b37cea03aa08f2db36a0ff7a43437c03a7))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v2.15.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.15.1...@adobe/spacecat-shared-data-access-v2.15.2) (2025-04-17)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "2.15.2",
3
+ "version": "2.16.1",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -35,8 +35,8 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@adobe/spacecat-shared-utils": "1.33.1",
38
- "@aws-sdk/client-dynamodb": "3.788.0",
39
- "@aws-sdk/lib-dynamodb": "3.789.0",
38
+ "@aws-sdk/client-dynamodb": "3.797.0",
39
+ "@aws-sdk/lib-dynamodb": "3.797.0",
40
40
  "@types/joi": "17.2.3",
41
41
  "aws-xray-sdk": "3.10.3",
42
42
  "electrodb": "3.4.1",
@@ -48,7 +48,7 @@
48
48
  "chai": "5.2.0",
49
49
  "chai-as-promised": "8.0.1",
50
50
  "dynamo-db-local": "9.5.0",
51
- "nock": "14.0.3",
51
+ "nock": "14.0.4",
52
52
  "sinon": "20.0.0",
53
53
  "sinon-chai": "4.0.0"
54
54
  }
@@ -17,6 +17,8 @@ export const IMPORT_TYPES = {
17
17
  ORGANIC_TRAFFIC: 'organic-traffic',
18
18
  TOP_PAGES: 'top-pages',
19
19
  ALL_TRAFFIC: 'all-traffic',
20
+ CWV_DAILY: 'cwv-daily',
21
+ CWV_WEEKLY: 'cwv-weekly',
20
22
  };
21
23
 
22
24
  export const IMPORT_DESTINATIONS = {
@@ -61,6 +63,14 @@ export const IMPORT_TYPE_SCHEMAS = {
61
63
  limit: Joi.number().integer().min(1).max(2000)
62
64
  .optional(),
63
65
  }),
66
+ [IMPORT_TYPES.CWV_DAILY]: Joi.object({
67
+ type: Joi.string().valid(IMPORT_TYPES.CWV_DAILY).required(),
68
+ ...IMPORT_BASE_KEYS,
69
+ }),
70
+ [IMPORT_TYPES.CWV_WEEKLY]: Joi.object({
71
+ type: Joi.string().valid(IMPORT_TYPES.CWV_WEEKLY).required(),
72
+ ...IMPORT_BASE_KEYS,
73
+ }),
64
74
  };
65
75
 
66
76
  export const DEFAULT_IMPORT_CONFIGS = {
@@ -89,6 +99,18 @@ export const DEFAULT_IMPORT_CONFIGS = {
89
99
  enabled: true,
90
100
  geo: 'global',
91
101
  },
102
+ 'cwv-daily': {
103
+ type: 'cwv-daily',
104
+ destinations: ['default'],
105
+ sources: ['rum'],
106
+ enabled: true,
107
+ },
108
+ 'cwv-weekly': {
109
+ type: 'cwv-weekly',
110
+ destinations: ['default'],
111
+ sources: ['rum'],
112
+ enabled: true,
113
+ },
92
114
  };
93
115
 
94
116
  export const configSchema = Joi.object({
@@ -23,6 +23,15 @@ import type {
23
23
  SiteTopPage,
24
24
  } from '../index';
25
25
 
26
+ export interface HlxConfig {
27
+ hlxVersion: number; // helix (AEM Edge Delivery) major version
28
+ rso: { // remote source origin configuration
29
+ ref: string; // vcs (ie github) branch name
30
+ site: string; // vcs (ie github) repo name
31
+ owner: string; // vcs (ie github) owner (organization)
32
+ };
33
+ }
34
+
26
35
  export type IMPORT_TYPES = {
27
36
  readonly ORGANIC_KEYWORDS: 'organic-keywords';
28
37
  readonly ORGANIC_TRAFFIC: 'organic-traffic';
@@ -124,7 +133,7 @@ export interface Site extends BaseModel {
124
133
  expId: string, url: string, updatedAt: string
125
134
  ): Promise<Experiment[]>;
126
135
  getGitHubURL(): string;
127
- getHlxConfig(): object;
136
+ getHlxConfig(): HlxConfig;
128
137
  getDeliveryConfig(): object;
129
138
  getIsLive(): boolean;
130
139
  getIsLiveToggledAt(): string;
@@ -150,7 +159,7 @@ export interface Site extends BaseModel {
150
159
  setConfig(config: object): Site;
151
160
  setDeliveryType(deliveryType: string): Site;
152
161
  setGitHubURL(gitHubURL: string): Site;
153
- setHlxConfig(hlxConfig: object): Site;
162
+ setHlxConfig(hlxConfig: HlxConfig): Site;
154
163
  setDeliveryConfig(deliveryConfig: object): Site;
155
164
  setIsLive(isLive: boolean): Site;
156
165
  setIsLiveToggledAt(isLiveToggledAt: string): Site;