@adobe/spacecat-shared-data-access 1.61.6 → 1.61.7

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,10 @@
1
+ # [@adobe/spacecat-shared-data-access-v1.61.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.61.6...@adobe/spacecat-shared-data-access-v1.61.7) (2024-12-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * job groups & schedules, engine version ([#514](https://github.com/adobe/spacecat-shared/issues/514)) ([995f81e](https://github.com/adobe/spacecat-shared/commit/995f81eedb76d45a09cfd2ae3952f3676033a235))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v1.61.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.61.5...@adobe/spacecat-shared-data-access-v1.61.6) (2024-12-30)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "1.61.6",
3
+ "version": "1.61.7",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">=20.0.0 <23.0.0",
8
- "npm": ">=10.0.0 <12.0.0"
7
+ "node": ">=22.0.0 <23.0.0",
8
+ "npm": ">=10.9.0 <12.0.0"
9
9
  },
10
10
  "main": "src/index.js",
11
11
  "types": "src/index.d.ts",
@@ -34,8 +34,8 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@adobe/spacecat-shared-dynamo": "1.5.0",
38
- "@adobe/spacecat-shared-utils": "1.25.1",
37
+ "@adobe/spacecat-shared-dynamo": "1.5.1",
38
+ "@adobe/spacecat-shared-utils": "1.25.2",
39
39
  "@aws-sdk/client-dynamodb": "3.716.0",
40
40
  "@aws-sdk/lib-dynamodb": "3.716.0",
41
41
  "@types/joi": "17.2.3",
@@ -23,6 +23,24 @@ import BaseModel from '../base/base.model.js';
23
23
  * @extends BaseModel
24
24
  */
25
25
  class Configuration extends BaseModel {
26
+ static JOB_GROUPS = {
27
+ AUDITS: 'audits',
28
+ IMPORTS: 'imports',
29
+ REPORTS: 'reports',
30
+ SCRAPES: 'scrapes',
31
+ };
32
+
33
+ static JOB_INTERVALS = {
34
+ EVERY_HOUR: 'every-hour',
35
+ DAILY: 'daily',
36
+ WEEKLY: 'weekly',
37
+ EVERY_SATURDAY: 'every-saturday',
38
+ EVERY_SUNDAY: 'every-sunday',
39
+ FORTNIGHTLY: 'fortnightly',
40
+ FORTNIGHTLY_SATURDAY: 'fortnightly-saturday',
41
+ FORTNIGHTLY_SUNDAY: 'fortnightly-sunday',
42
+ MONTHLY: 'monthly',
43
+ };
26
44
  // add your custom methods or overrides here
27
45
 
28
46
  getHandler(type) {
@@ -78,9 +78,9 @@ const schema = new SchemaBuilder(Configuration, ConfigurationCollection)
78
78
  items: {
79
79
  type: 'map',
80
80
  properties: {
81
- group: { type: ['audits', 'imports', 'reports', 'scrapes'] },
81
+ group: { type: Object.values(Configuration.JOB_GROUPS), required: true },
82
82
  type: { type: 'string', required: true },
83
- interval: { type: ['daily', 'weekly', 'every-saturday', 'every-sunday', 'fortnightly', 'monthly'] },
83
+ interval: { type: Object.values(Configuration.JOB_INTERVALS), required: true },
84
84
  },
85
85
  },
86
86
  })