@adobe/spacecat-shared-data-access 1.15.2-test → 1.15.3

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,10 @@
1
+ # [@adobe/spacecat-shared-data-access-v1.15.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.15.2...@adobe/spacecat-shared-data-access-v1.15.3) (2024-02-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * site-candidate should not have id ([#144](https://github.com/adobe/spacecat-shared/issues/144)) ([9d0ebe8](https://github.com/adobe/spacecat-shared/commit/9d0ebe85c993ea428a845ce417b1e9c727b13b52))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v1.15.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.15.1...@adobe/spacecat-shared-data-access-v1.15.2) (2024-02-07)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "1.15.2-test",
3
+ "version": "1.15.3",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -43,9 +43,18 @@ function validateConfiguration(config) {
43
43
 
44
44
  export const Config = (data = {}) => {
45
45
  const validConfig = validateConfiguration(data);
46
- const state = { ...validConfig };
46
+ const state = {
47
+ slack: {
48
+ ...(validConfig?.slack?.channel ? { channel: validConfig?.slack?.channel } : {}),
49
+ ...(validConfig?.slack?.workspace ? { workspace: validConfig?.slack?.workspace } : {}),
50
+ },
51
+ alerts: validConfig.alerts || [],
52
+ };
47
53
 
48
- const self = { ...state };
54
+ const self = {
55
+ alerts: state.alerts,
56
+ slack: state.slack,
57
+ };
49
58
 
50
59
  return Object.freeze(self);
51
60
  };
@@ -40,7 +40,7 @@ const SiteCandidate = (data = {}) => {
40
40
  updatedBy: DEFAULT_UPDATED_BY,
41
41
  ...data,
42
42
  });
43
- delete self.id; // no id property used in SiteCandidate modal
43
+ delete self.state.id; // no id property used in SiteCandidate modal
44
44
 
45
45
  self.getBaseURL = () => self.state.baseURL;
46
46
  self.getSiteId = () => self.state.siteId;