@adobe/spacecat-shared-data-access 3.8.0 → 3.10.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,15 @@
1
+ ## [@adobe/spacecat-shared-data-access-v3.10.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.9.0...@adobe/spacecat-shared-data-access-v3.10.0) (2026-03-06)
2
+
3
+ ### Features
4
+
5
+ * add skipReason and skipDetail attributes to Suggestion ([#1372](https://github.com/adobe/spacecat-shared/issues/1372)) ([1069556](https://github.com/adobe/spacecat-shared/commit/1069556b6b01bebdf215395fec34c317c290b7c0))
6
+
7
+ ## [@adobe/spacecat-shared-data-access-v3.9.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.8.0...@adobe/spacecat-shared-data-access-v3.9.0) (2026-03-05)
8
+
9
+ ### Features
10
+
11
+ * add optional aws region to cdn bucket config ([#1404](https://github.com/adobe/spacecat-shared/issues/1404)) ([76a7051](https://github.com/adobe/spacecat-shared/commit/76a7051f465d0d43cb03875fcc77b3ff174c4317))
12
+
1
13
  ## [@adobe/spacecat-shared-data-access-v3.8.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.7.0...@adobe/spacecat-shared-data-access-v3.8.0) (2026-03-05)
2
14
 
3
15
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -46,6 +46,7 @@ export const IMPORT_SOURCES = {
46
46
  };
47
47
 
48
48
  const LLMO_TAG_PATTERN = /^(market|product|topic):\s?.+/;
49
+ const AWS_REGION_PATTERN = /^[a-z]{2}(?:-[a-z]+)+-\d+$/i;
49
50
  const LLMO_TAG = Joi.alternatives()
50
51
  .try(
51
52
  // Tag market, product, topic like this: "market: ch", "product: firefly", "topic: copyright"
@@ -324,6 +325,7 @@ export const configSchema = Joi.object({
324
325
  bucketName: Joi.string().optional(),
325
326
  orgId: Joi.string().optional(),
326
327
  cdnProvider: Joi.string().optional(),
328
+ region: Joi.string().pattern(AWS_REGION_PATTERN).optional(),
327
329
  }).optional(),
328
330
  }).optional(),
329
331
  cdnLogsConfig: Joi.object({
@@ -46,6 +46,15 @@ class Suggestion extends BaseModel {
46
46
  CONFIG_UPDATE: 'CONFIG_UPDATE',
47
47
  };
48
48
 
49
+ /** Predefined categories for skip reasons. */
50
+ static SKIP_REASONS = {
51
+ ALREADY_IMPLEMENTED: 'ALREADY_IMPLEMENTED',
52
+ INACCURATE_OR_INCOMPLETE: 'INACCURATE_OR_INCOMPLETE',
53
+ TOO_RISKY: 'TOO_RISKY',
54
+ NO_REASON: 'NO_REASON',
55
+ OTHER: 'OTHER',
56
+ };
57
+
49
58
  // Import schemas from external file for maintainability
50
59
  static FIELD_TRANSFORMERS = FIELD_TRANSFORMERS;
51
60
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  /* c8 ignore start */
14
14
 
15
- import { isNonEmptyObject } from '@adobe/spacecat-shared-utils';
15
+ import { isNonEmptyObject, isString } from '@adobe/spacecat-shared-utils';
16
16
 
17
17
  import SchemaBuilder from '../base/schema.builder.js';
18
18
  import Suggestion from './suggestion.model.js';
@@ -49,6 +49,13 @@ const schema = new SchemaBuilder(Suggestion, SuggestionCollection)
49
49
  type: Object.values(Suggestion.STATUSES),
50
50
  required: true,
51
51
  default: Suggestion.STATUSES.NEW,
52
+ })
53
+ .addAttribute('skipReason', {
54
+ type: Object.values(Suggestion.SKIP_REASONS),
55
+ })
56
+ .addAttribute('skipDetail', {
57
+ type: 'string',
58
+ validate: (value) => !value || (isString(value) && value.length <= 500),
52
59
  });
53
60
 
54
61
  export default schema.build();