@adobe/spacecat-shared-data-access 1.13.0 → 1.13.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,10 @@
1
+ # [@adobe/spacecat-shared-data-access-v1.13.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.13.0...@adobe/spacecat-shared-data-access-v1.13.1) (2024-01-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * allow update config for site ([ad9e677](https://github.com/adobe/spacecat-shared/commit/ad9e677c7c721aa70e37b97373a4b9545f2f21fd))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v1.13.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.12.0...@adobe/spacecat-shared-data-access-v1.13.0) (2024-01-30)
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.13.0",
3
+ "version": "1.13.1",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -93,6 +93,22 @@ const Site = (data = {}) => {
93
93
  return self;
94
94
  };
95
95
 
96
+ /**
97
+ * Updates the site config.
98
+ * @param {string} config - The Site config.
99
+ * @return {Base} The updated site.
100
+ */
101
+ self.updateConfig = (config) => {
102
+ if (!isObject(config)) {
103
+ throw new Error('Config must be provided');
104
+ }
105
+
106
+ self.state.config = Config.toDynamoItem(config);
107
+ self.touch();
108
+
109
+ return self;
110
+ };
111
+
96
112
  self.updateDeliveryType = (deliveryType) => {
97
113
  if (!Object.values(DELIVERY_TYPES).includes(deliveryType)) {
98
114
  throw new Error(`Invalid delivery type: ${deliveryType}`);