@adobe/spacecat-shared-data-access 1.54.0 → 1.56.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 +1 -1
- package/src/dto/audit.js +2 -0
- package/src/index.d.ts +6 -0
- package/src/models/configuration.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.56.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.55.0...@adobe/spacecat-shared-data-access-v1.56.0) (2024-11-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* introduce missing audit id property ([#452](https://github.com/adobe/spacecat-shared/issues/452)) ([c17e447](https://github.com/adobe/spacecat-shared/commit/c17e447b275d9788d587dc44f3043fb60e83c51b))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v1.55.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.54.0...@adobe/spacecat-shared-data-access-v1.55.0) (2024-11-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Adding getEnabledSiteIdsForHandler in Configuration ([#449](https://github.com/adobe/spacecat-shared/issues/449)) ([ba3f3aa](https://github.com/adobe/spacecat-shared/commit/ba3f3aa3578551c39fc1115956967b74e824b659))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v1.54.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.53.1...@adobe/spacecat-shared-data-access-v1.54.0) (2024-11-20)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/dto/audit.js
CHANGED
|
@@ -43,6 +43,7 @@ export const AuditDto = {
|
|
|
43
43
|
} : {};
|
|
44
44
|
|
|
45
45
|
return {
|
|
46
|
+
id: audit.getId(),
|
|
46
47
|
siteId: audit.getSiteId(),
|
|
47
48
|
auditedAt: audit.getAuditedAt(),
|
|
48
49
|
auditResult: audit.getAuditResult(),
|
|
@@ -62,6 +63,7 @@ export const AuditDto = {
|
|
|
62
63
|
*/
|
|
63
64
|
fromDynamoItem: (dynamoItem) => {
|
|
64
65
|
const auditData = {
|
|
66
|
+
id: dynamoItem.id,
|
|
65
67
|
siteId: dynamoItem.siteId,
|
|
66
68
|
auditedAt: dynamoItem.auditedAt,
|
|
67
69
|
auditResult: dynamoItem.auditResult,
|
package/src/index.d.ts
CHANGED
|
@@ -33,6 +33,12 @@ export declare const ImportUrlStatus: {
|
|
|
33
33
|
* Represents an individual audit of a site.
|
|
34
34
|
*/
|
|
35
35
|
export interface Audit {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the ID of the audit.
|
|
39
|
+
* @returns {string} The audit ID.
|
|
40
|
+
*/
|
|
41
|
+
getId: () => string;
|
|
36
42
|
/**
|
|
37
43
|
* Retrieves the site ID associated with this audit.
|
|
38
44
|
* @returns {string} The site ID.
|
|
@@ -29,6 +29,10 @@ const Configuration = (data = {}) => {
|
|
|
29
29
|
const roles = self.getSlackRoles();
|
|
30
30
|
return roles ? roles[role] : [];
|
|
31
31
|
};
|
|
32
|
+
self.getEnabledSiteIdsForHandler = (type) => {
|
|
33
|
+
const handler = state.handlers?.[type];
|
|
34
|
+
return handler?.enabled?.sites || [];
|
|
35
|
+
};
|
|
32
36
|
self.isHandlerEnabledForSite = (type, site) => {
|
|
33
37
|
const handler = state.handlers[type];
|
|
34
38
|
if (!handler) return false;
|