@adobe/spacecat-shared-data-access 2.10.2 → 2.12.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,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.12.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.11.0...@adobe/spacecat-shared-data-access-v2.12.0) (2025-03-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* added structured data auto suggest audit type ([#628](https://github.com/adobe/spacecat-shared/issues/628)) ([6162442](https://github.com/adobe/spacecat-shared/commit/61624423669e0d93e6f2ed3c90c1a134a2458949))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v2.11.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.10.2...@adobe/spacecat-shared-data-access-v2.11.0) (2025-03-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Brand client ([#640](https://github.com/adobe/spacecat-shared/issues/640)) ([8d82f45](https://github.com/adobe/spacecat-shared/commit/8d82f45349ea9be2b1359fe5ebebf5a350f52666))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v2.10.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.10.1...@adobe/spacecat-shared-data-access-v2.10.2) (2025-03-04)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -43,6 +43,7 @@ class Audit extends BaseModel {
|
|
|
43
43
|
META_TAGS: 'meta-tags',
|
|
44
44
|
COSTS: 'costs',
|
|
45
45
|
STRUCTURED_DATA: 'structured-data',
|
|
46
|
+
STRUCTURED_DATA_AUTO_SUGGEST: 'structured-data-auto-suggest',
|
|
46
47
|
FORMS_OPPORTUNITIES: 'forms-opportunities',
|
|
47
48
|
SITE_DETECTION: 'site-detection',
|
|
48
49
|
ALT_TEXT: 'alt-text',
|
|
@@ -32,6 +32,8 @@ const handlerSchema = Joi.object().pattern(Joi.string(), Joi.object(
|
|
|
32
32
|
orgs: Joi.array().items(Joi.string()),
|
|
33
33
|
}),
|
|
34
34
|
enabledByDefault: Joi.boolean().required(),
|
|
35
|
+
movingAvgThreshold: Joi.number().min(1).optional(),
|
|
36
|
+
percentageChangeThreshold: Joi.number().min(1).optional(),
|
|
35
37
|
dependencies: Joi.array().items(Joi.object(
|
|
36
38
|
{
|
|
37
39
|
handler: Joi.string(),
|
|
@@ -100,6 +100,9 @@ export const configSchema = Joi.object({
|
|
|
100
100
|
imports: Joi.array().items(
|
|
101
101
|
Joi.alternatives().try(...Object.values(IMPORT_TYPE_SCHEMAS)),
|
|
102
102
|
),
|
|
103
|
+
brandConfig: Joi.object({
|
|
104
|
+
brandId: Joi.string().required(),
|
|
105
|
+
}).optional(),
|
|
103
106
|
fetchConfig: Joi.object({
|
|
104
107
|
headers: Joi.object().pattern(Joi.string(), Joi.string()),
|
|
105
108
|
overrideBaseURL: Joi.string().uri().optional(),
|
|
@@ -120,6 +123,8 @@ export const configSchema = Joi.object({
|
|
|
120
123
|
name: Joi.string(),
|
|
121
124
|
pattern: Joi.string(),
|
|
122
125
|
})).optional(),
|
|
126
|
+
movingAvgThreshold: Joi.number().min(1).optional(),
|
|
127
|
+
percentageChangeThreshold: Joi.number().min(1).optional(),
|
|
123
128
|
latestMetrics: Joi.object({
|
|
124
129
|
pageViewsChange: Joi.number(),
|
|
125
130
|
ctrChange: Joi.number(),
|
|
@@ -162,6 +167,7 @@ export const Config = (data = {}) => {
|
|
|
162
167
|
self.getGroupedURLs = (type) => state?.handlers?.[type]?.groupedURLs;
|
|
163
168
|
self.getLatestMetrics = (type) => state?.handlers?.[type]?.latestMetrics;
|
|
164
169
|
self.getFetchConfig = () => state?.fetchConfig;
|
|
170
|
+
self.getBrandConfig = () => state?.brandConfig;
|
|
165
171
|
|
|
166
172
|
self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
|
|
167
173
|
state.slack = {
|
|
@@ -218,6 +224,10 @@ export const Config = (data = {}) => {
|
|
|
218
224
|
state.fetchConfig = fetchConfig;
|
|
219
225
|
};
|
|
220
226
|
|
|
227
|
+
self.updateBrandConfig = (brandConfig) => {
|
|
228
|
+
state.brandConfig = brandConfig;
|
|
229
|
+
};
|
|
230
|
+
|
|
221
231
|
self.enableImport = (type, config = {}) => {
|
|
222
232
|
if (!IMPORT_TYPE_SCHEMAS[type]) {
|
|
223
233
|
throw new Error(`Unknown import type: ${type}`);
|
|
@@ -269,4 +279,5 @@ Config.toDynamoItem = (config) => ({
|
|
|
269
279
|
handlers: config.getHandlers(),
|
|
270
280
|
imports: config.getImports(),
|
|
271
281
|
fetchConfig: config.getFetchConfig(),
|
|
282
|
+
brandConfig: config.getBrandConfig(),
|
|
272
283
|
});
|