@adobe/spacecat-shared-data-access 3.9.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,9 @@
|
|
|
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
|
+
|
|
1
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)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/package.json
CHANGED
|
@@ -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();
|