@adobe/spacecat-shared-data-access 1.41.8 → 1.43.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 +14 -0
- package/package.json +6 -2
- package/src/dto/import-job.js +2 -0
- package/src/index.d.ts +5 -0
- package/src/models/importer/import-job.js +1 -0
- package/src/models/site/config.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.43.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.42.0...@adobe/spacecat-shared-data-access-v1.43.0) (2024-08-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add initiatedBy attribute to import job ([#341](https://github.com/adobe/spacecat-shared/issues/341)) ([8a7634c](https://github.com/adobe/spacecat-shared/commit/8a7634c68cf0df01a71abc5d99a17519869f3c45))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v1.42.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.41.8...@adobe/spacecat-shared-data-access-v1.42.0) (2024-08-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* introduce url inspect in google client ([#326](https://github.com/adobe/spacecat-shared/issues/326)) ([eb9e8ae](https://github.com/adobe/spacecat-shared/commit/eb9e8ae67f7a95ca5e4abb993f8b625400735312))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v1.41.8](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.41.7...@adobe/spacecat-shared-data-access-v1.41.8) (2024-08-20)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-data-access",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.43.0",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Data Access",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^20.0.0 <21.0.0",
|
|
8
|
+
"npm": "^10.0.0 <11.0.0"
|
|
9
|
+
},
|
|
6
10
|
"main": "src/index.js",
|
|
7
11
|
"types": "src/index.d.ts",
|
|
8
12
|
"scripts": {
|
|
@@ -40,7 +44,7 @@
|
|
|
40
44
|
"devDependencies": {
|
|
41
45
|
"chai": "5.1.1",
|
|
42
46
|
"chai-as-promised": "8.0.0",
|
|
43
|
-
"dynamo-db-local": "
|
|
47
|
+
"dynamo-db-local": "9.2.0",
|
|
44
48
|
"sinon": "18.0.0",
|
|
45
49
|
"sinon-chai": "4.0.0"
|
|
46
50
|
}
|
package/src/dto/import-job.js
CHANGED
|
@@ -38,6 +38,7 @@ export const ImportJobDto = {
|
|
|
38
38
|
successCount: importJob.getSuccessCount(),
|
|
39
39
|
failedCount: importJob.getFailedCount(),
|
|
40
40
|
importQueueId: importJob.getImportQueueId(),
|
|
41
|
+
initiatedBy: importJob.getInitiatedBy(),
|
|
41
42
|
GSI1PK: 'ALL_IMPORT_JOBS',
|
|
42
43
|
}),
|
|
43
44
|
|
|
@@ -58,6 +59,7 @@ export const ImportJobDto = {
|
|
|
58
59
|
successCount: dynamoItem.successCount,
|
|
59
60
|
failedCount: dynamoItem.failedCount,
|
|
60
61
|
importQueueId: dynamoItem.importQueueId,
|
|
62
|
+
initiatedBy: dynamoItem.initiatedBy,
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
return createImportJob(importJobData);
|
package/src/index.d.ts
CHANGED
|
@@ -510,6 +510,11 @@ export interface ImportJob {
|
|
|
510
510
|
*/
|
|
511
511
|
getImportQueueId: () => string;
|
|
512
512
|
|
|
513
|
+
/**
|
|
514
|
+
* Retrieves the initiatedBy metadata (name, imsOrgId, imsUserId, userAgent) of the import job.
|
|
515
|
+
*/
|
|
516
|
+
getInitiatedBy: () => object;
|
|
517
|
+
|
|
513
518
|
}
|
|
514
519
|
|
|
515
520
|
export interface ImportUrl {
|
|
@@ -41,6 +41,7 @@ const ImportJob = (data) => {
|
|
|
41
41
|
self.getSuccessCount = () => self.state.successCount;
|
|
42
42
|
self.getFailedCount = () => self.state.failedCount;
|
|
43
43
|
self.getImportQueueId = () => self.state.importQueueId;
|
|
44
|
+
self.getInitiatedBy = () => self.state.initiatedBy;
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* Updates the end time of the ImportJob.
|
|
@@ -30,6 +30,7 @@ export const configSchema = Joi.object({
|
|
|
30
30
|
brokenTargetURL: Joi.string().optional(),
|
|
31
31
|
targetURL: Joi.string().optional(),
|
|
32
32
|
})).optional(),
|
|
33
|
+
productDetailPages: Joi.array().items(Joi.string()),
|
|
33
34
|
}).unknown(true)).unknown(true),
|
|
34
35
|
}).unknown(true);
|
|
35
36
|
|
|
@@ -63,6 +64,7 @@ export const Config = (data = {}) => {
|
|
|
63
64
|
self.getExcludedURLs = (type) => state?.handlers[type]?.excludedURLs;
|
|
64
65
|
self.getManualOverwrites = (type) => state?.handlers[type]?.manualOverwrites;
|
|
65
66
|
self.getFixedURLs = (type) => state?.handlers[type]?.fixedURLs;
|
|
67
|
+
self.getProductDetailPages = (type) => state?.handlers[type]?.productDetailPages;
|
|
66
68
|
|
|
67
69
|
self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
|
|
68
70
|
state.slack = {
|