@adobe/spacecat-shared-data-access 2.67.0 → 2.68.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 +14 -0
- package/package.json +1 -1
- package/src/models/site/config.js +11 -0
- package/src/models/site/site.schema.js +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.68.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.68.0...@adobe/spacecat-shared-data-access-v2.68.1) (2025-10-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* site indexes order ([#1008](https://github.com/adobe/spacecat-shared/issues/1008)) ([215a961](https://github.com/adobe/spacecat-shared/commit/215a961a681873f4cb1882e2c8a53f8db13e32ea))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v2.68.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.67.0...@adobe/spacecat-shared-data-access-v2.68.0) (2025-10-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add query for fetching RUM engagement metrics ([#985](https://github.com/adobe/spacecat-shared/issues/985)) ([0eb8881](https://github.com/adobe/spacecat-shared/commit/0eb88818af000076ea663b2e08ab1fb2b1957510))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v2.67.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.66.0...@adobe/spacecat-shared-data-access-v2.67.0) (2025-10-07)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@ export const IMPORT_TYPES = {
|
|
|
27
27
|
CWV_WEEKLY: 'cwv-weekly',
|
|
28
28
|
TRAFFIC_ANALYSIS: 'traffic-analysis',
|
|
29
29
|
TOP_FORMS: 'top-forms',
|
|
30
|
+
USER_ENGAGEMENT: 'user-engagement',
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
export const IMPORT_DESTINATIONS = {
|
|
@@ -152,6 +153,10 @@ export const IMPORT_TYPE_SCHEMAS = {
|
|
|
152
153
|
limit: Joi.number().integer().min(1).max(2000)
|
|
153
154
|
.optional(),
|
|
154
155
|
}),
|
|
156
|
+
[IMPORT_TYPES.USER_ENGAGEMENT]: Joi.object({
|
|
157
|
+
type: Joi.string().valid(IMPORT_TYPES.USER_ENGAGEMENT).required(),
|
|
158
|
+
...IMPORT_BASE_KEYS,
|
|
159
|
+
}),
|
|
155
160
|
};
|
|
156
161
|
|
|
157
162
|
export const DEFAULT_IMPORT_CONFIGS = {
|
|
@@ -228,6 +233,12 @@ export const DEFAULT_IMPORT_CONFIGS = {
|
|
|
228
233
|
sources: ['rum'],
|
|
229
234
|
enabled: true,
|
|
230
235
|
},
|
|
236
|
+
'user-engagement': {
|
|
237
|
+
type: 'user-engagement',
|
|
238
|
+
destinations: ['default'],
|
|
239
|
+
sources: ['rum'],
|
|
240
|
+
enabled: true,
|
|
241
|
+
},
|
|
231
242
|
};
|
|
232
243
|
|
|
233
244
|
export const configSchema = Joi.object({
|
|
@@ -34,8 +34,6 @@ Indexes Doc: https://electrodb.dev/en/modeling/indexes/
|
|
|
34
34
|
const schema = new SchemaBuilder(Site, SiteCollection)
|
|
35
35
|
// this will add an attribute 'organizationId' as well as an index 'byOrganizationId'
|
|
36
36
|
.addReference('belongs_to', 'Organization')
|
|
37
|
-
// this will add an attribute 'projectId' as well as an index 'byProjectId'
|
|
38
|
-
.addReference('belongs_to', 'Project', ['updatedAt'], { required: false })
|
|
39
37
|
// has_many references do not add attributes or indexes
|
|
40
38
|
.addReference('has_many', 'Audits')
|
|
41
39
|
.addReference('has_many', 'Experiments')
|
|
@@ -159,6 +157,15 @@ const schema = new SchemaBuilder(Site, SiteCollection)
|
|
|
159
157
|
.addIndex(
|
|
160
158
|
{ composite: ['externalOwnerId'] },
|
|
161
159
|
{ composite: ['externalSiteId'] },
|
|
160
|
+
)
|
|
161
|
+
// Using regular index instead of belongs_to reference to control position
|
|
162
|
+
.addAttribute('projectId', {
|
|
163
|
+
type: 'string',
|
|
164
|
+
required: false,
|
|
165
|
+
})
|
|
166
|
+
.addIndex(
|
|
167
|
+
{ composite: ['projectId'] },
|
|
168
|
+
{ composite: ['updatedAt'] },
|
|
162
169
|
);
|
|
163
170
|
|
|
164
171
|
export default schema.build();
|