@adobe/spacecat-shared-data-access 1.39.0 → 1.40.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-v1.40.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.39.1...@adobe/spacecat-shared-data-access-v1.40.0) (2024-08-08)
2
+
3
+
4
+ ### Features
5
+
6
+ * update import job models to include hashed key ([#318](https://github.com/adobe/spacecat-shared/issues/318)) ([cd90252](https://github.com/adobe/spacecat-shared/commit/cd902522629d13e2707b7a78a38bdffc5d6194c0))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v1.39.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.39.0...@adobe/spacecat-shared-data-access-v1.39.1) (2024-08-06)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update external fixes ([#314](https://github.com/adobe/spacecat-shared/issues/314)) ([cc47ba3](https://github.com/adobe/spacecat-shared/commit/cc47ba34b7f3e859deea89da57bfa4887e788772))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v1.39.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.38.2...@adobe/spacecat-shared-data-access-v1.39.0) (2024-07-31)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "1.39.0",
3
+ "version": "1.40.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@adobe/spacecat-shared-dynamo": "1.2.5",
33
33
  "@adobe/spacecat-shared-utils": "1.2.0",
34
- "@aws-sdk/client-dynamodb": "3.620.0",
35
- "@aws-sdk/lib-dynamodb": "3.620.0",
34
+ "@aws-sdk/client-dynamodb": "3.623.0",
35
+ "@aws-sdk/lib-dynamodb": "3.623.0",
36
36
  "@types/joi": "17.2.3",
37
37
  "joi": "17.13.3",
38
38
  "uuid": "10.0.0"
@@ -28,7 +28,7 @@ export const ImportJobDto = {
28
28
  toDynamoItem: (importJob) => ({
29
29
  id: importJob.getId(),
30
30
  baseURL: importJob.getBaseURL(),
31
- apiKey: importJob.getApiKey(),
31
+ hashedApiKey: importJob.getHashedApiKey(),
32
32
  options: importJob.getOptions(),
33
33
  startTime: importJob.getStartTime(),
34
34
  endTime: importJob.getEndTime(),
@@ -48,7 +48,7 @@ export const ImportJobDto = {
48
48
  const importJobData = {
49
49
  id: dynamoItem.id,
50
50
  baseURL: dynamoItem.baseURL,
51
- apiKey: dynamoItem.apiKey,
51
+ hashedApiKey: dynamoItem.hashedApiKey,
52
52
  options: dynamoItem.options,
53
53
  startTime: dynamoItem.startTime,
54
54
  endTime: dynamoItem.endTime,
package/src/index.d.ts CHANGED
@@ -455,9 +455,9 @@ export interface ImportJob {
455
455
  getId: () => string;
456
456
 
457
457
  /**
458
- * Retrieves the apiKey of the import job.
458
+ * Retrieves the hashed apiKey of the import job.
459
459
  */
460
- getApiKey: () => string;
460
+ getHashedApiKey: () => string;
461
461
 
462
462
  /**
463
463
  * Retrieves the status of the import job.
@@ -31,7 +31,7 @@ const ImportJob = (data) => {
31
31
  const self = Base(data);
32
32
 
33
33
  self.getBaseURL = () => self.state.baseURL;
34
- self.getApiKey = () => self.state.apiKey;
34
+ self.getHashedApiKey = () => self.state.hashedApiKey;
35
35
  self.getOptions = () => self.state.options;
36
36
  self.getStartTime = () => self.state.startTime;
37
37
  self.getEndTime = () => self.state.endTime;
@@ -168,8 +168,8 @@ export const createImportJob = (data) => {
168
168
  throw new Error(`Invalid base URL: ${newState.baseURL}`);
169
169
  }
170
170
 
171
- if (!isString(newState.apiKey)) {
172
- throw new Error(`Invalid API key: ${newState.apiKey}`);
171
+ if (!isString(newState.hashedApiKey)) {
172
+ throw new Error(`Invalid API key: ${newState.hashedApiKey}`);
173
173
  }
174
174
 
175
175
  if (hasText(newState.startTime) && !isIsoDate(newState.startTime)) {