@adobe/spacecat-shared-data-access 2.0.0 → 2.0.2

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.0.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.0.1...@adobe/spacecat-shared-data-access-v2.0.2) (2025-01-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * patcher should use schema getter, schema omissions ([#539](https://github.com/adobe/spacecat-shared/issues/539)) ([b14b469](https://github.com/adobe/spacecat-shared/commit/b14b469d3714795c6291ddcf742c38abd94250e6))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v2.0.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.0.0...@adobe/spacecat-shared-data-access-v2.0.1) (2025-01-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update external fixes ([#538](https://github.com/adobe/spacecat-shared/issues/538)) ([a3bddf6](https://github.com/adobe/spacecat-shared/commit/a3bddf6cb2a9b60db8f8c3450e81205cd10c0b23))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v2.0.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.61.19...@adobe/spacecat-shared-data-access-v2.0.0) (2025-01-10)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -34,15 +34,15 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@adobe/spacecat-shared-utils": "1.25.4",
38
- "@aws-sdk/client-dynamodb": "3.721.0",
39
- "@aws-sdk/lib-dynamodb": "3.721.0",
37
+ "@adobe/spacecat-shared-utils": "1.26.1",
38
+ "@aws-sdk/client-dynamodb": "3.726.1",
39
+ "@aws-sdk/lib-dynamodb": "3.726.1",
40
40
  "@types/joi": "17.2.3",
41
41
  "aws-xray-sdk": "3.10.2",
42
42
  "electrodb": "3.0.1",
43
43
  "joi": "17.13.3",
44
44
  "pluralize": "8.0.0",
45
- "uuid": "11.0.4"
45
+ "uuid": "11.0.5"
46
46
  },
47
47
  "devDependencies": {
48
48
  "chai": "5.1.2",
@@ -59,6 +59,12 @@ const schema = new SchemaBuilder(ApiKey, ApiKeyCollection)
59
59
  items: {
60
60
  type: 'map',
61
61
  properties: {
62
+ actions: {
63
+ type: 'list',
64
+ items: {
65
+ type: 'string',
66
+ },
67
+ },
62
68
  domains: {
63
69
  type: 'list',
64
70
  items: {
@@ -122,15 +122,16 @@ class Patcher {
122
122
  #set(attribute, value) {
123
123
  this.patchRecord = this.#getPatchRecord().set({ [attribute.name]: value });
124
124
 
125
+ const transmutedValue = attribute.get(value);
125
126
  const update = {
126
127
  [attribute.name]: {
127
128
  previous: this.record[attribute.name],
128
- current: value,
129
+ current: transmutedValue,
129
130
  },
130
131
  };
131
132
 
132
133
  // update the record with the update value for later save
133
- this.record[attribute.name] = value;
134
+ this.record[attribute.name] = transmutedValue;
134
135
 
135
136
  // remember the update operation with the previous and current value
136
137
  this.updates = { ...this.updates, ...update };