@adobe/spacecat-shared-data-access 1.43.0 → 1.43.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 +14 -0
- package/package.json +1 -1
- package/src/models/api-key.js +12 -2
- package/src/models/site/config.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.43.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.43.1...@adobe/spacecat-shared-data-access-v1.43.2) (2024-08-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add property to include specific urls in the site config ([#343](https://github.com/adobe/spacecat-shared/issues/343)) ([184107a](https://github.com/adobe/spacecat-shared/commit/184107a5329a89653e6ec55cfbb9e4c86f1eea55))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v1.43.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.43.0...@adobe/spacecat-shared-data-access-v1.43.1) (2024-08-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add Scoped API Key docs ([#342](https://github.com/adobe/spacecat-shared/issues/342)) ([2fbf707](https://github.com/adobe/spacecat-shared/commit/2fbf707dfeff914dc47ae1f9860629873927e03e))
|
|
14
|
+
|
|
1
15
|
# [@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
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/models/api-key.js
CHANGED
|
@@ -15,8 +15,18 @@ import {
|
|
|
15
15
|
} from '@adobe/spacecat-shared-utils';
|
|
16
16
|
import { Base } from './base.js';
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
// List of known scope names that can be used with scoped API keys
|
|
19
|
+
const scopeNames = [
|
|
20
|
+
'sites.read_all',
|
|
21
|
+
'sites.write_all',
|
|
22
|
+
'organizations.read_all',
|
|
23
|
+
'organizations.write_all',
|
|
24
|
+
'audits.read_all',
|
|
25
|
+
'audits.write_all',
|
|
26
|
+
'imports.read',
|
|
27
|
+
'imports.write',
|
|
28
|
+
'imports.read_all',
|
|
29
|
+
];
|
|
20
30
|
|
|
21
31
|
const ApiKey = (data) => {
|
|
22
32
|
const self = Base(data);
|
|
@@ -30,7 +30,7 @@ export const configSchema = Joi.object({
|
|
|
30
30
|
brokenTargetURL: Joi.string().optional(),
|
|
31
31
|
targetURL: Joi.string().optional(),
|
|
32
32
|
})).optional(),
|
|
33
|
-
|
|
33
|
+
includedURLs: Joi.array().items(Joi.string()),
|
|
34
34
|
}).unknown(true)).unknown(true),
|
|
35
35
|
}).unknown(true);
|
|
36
36
|
|
|
@@ -64,7 +64,7 @@ export const Config = (data = {}) => {
|
|
|
64
64
|
self.getExcludedURLs = (type) => state?.handlers[type]?.excludedURLs;
|
|
65
65
|
self.getManualOverwrites = (type) => state?.handlers[type]?.manualOverwrites;
|
|
66
66
|
self.getFixedURLs = (type) => state?.handlers[type]?.fixedURLs;
|
|
67
|
-
self.
|
|
67
|
+
self.getIncludedURLs = (type) => state?.handlers[type]?.includedURLs;
|
|
68
68
|
|
|
69
69
|
self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
|
|
70
70
|
state.slack = {
|