@adobe/spacecat-shared-data-access 1.52.0 → 1.53.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 +7 -0
- package/package.json +1 -1
- package/src/models/site/config.js +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.53.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.52.0...@adobe/spacecat-shared-data-access-v1.53.0) (2024-11-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Introduce configurable grouping patterns ([#439](https://github.com/adobe/spacecat-shared/issues/439)) ([bd2ad3b](https://github.com/adobe/spacecat-shared/commit/bd2ad3b39379f66ccdb8e20bfd4ef013c6230f79))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-data-access-v1.52.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.51.0...@adobe/spacecat-shared-data-access-v1.52.0) (2024-11-13)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -31,6 +31,10 @@ export const configSchema = Joi.object({
|
|
|
31
31
|
targetURL: Joi.string().optional(),
|
|
32
32
|
})).optional(),
|
|
33
33
|
includedURLs: Joi.array().items(Joi.string()),
|
|
34
|
+
groupedURLs: Joi.array().items(Joi.object({
|
|
35
|
+
name: Joi.string(),
|
|
36
|
+
pattern: Joi.string(),
|
|
37
|
+
})).optional(),
|
|
34
38
|
}).unknown(true)).unknown(true),
|
|
35
39
|
}).unknown(true);
|
|
36
40
|
|
|
@@ -66,6 +70,7 @@ export const Config = (data = {}) => {
|
|
|
66
70
|
self.getManualOverwrites = (type) => state?.handlers?.[type]?.manualOverwrites;
|
|
67
71
|
self.getFixedURLs = (type) => state?.handlers?.[type]?.fixedURLs;
|
|
68
72
|
self.getIncludedURLs = (type) => state?.handlers?.[type]?.includedURLs;
|
|
73
|
+
self.getGroupedURLs = (type) => state?.handlers?.[type]?.groupedURLs;
|
|
69
74
|
|
|
70
75
|
self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
|
|
71
76
|
state.slack = {
|
|
@@ -104,6 +109,14 @@ export const Config = (data = {}) => {
|
|
|
104
109
|
state.handlers[type].fixedURLs = fixedURLs;
|
|
105
110
|
};
|
|
106
111
|
|
|
112
|
+
self.updateGroupedURLs = (type, groupedURLs) => {
|
|
113
|
+
state.handlers = state.handlers || {};
|
|
114
|
+
state.handlers[type] = state.handlers[type] || {};
|
|
115
|
+
state.handlers[type].groupedURLs = groupedURLs;
|
|
116
|
+
|
|
117
|
+
validateConfiguration(state);
|
|
118
|
+
};
|
|
119
|
+
|
|
107
120
|
return Object.freeze(self);
|
|
108
121
|
};
|
|
109
122
|
|