@adobe/spacecat-shared-data-access 3.47.0 → 3.48.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.48.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.47.0...@adobe/spacecat-shared-data-access-v3.48.0) (2026-04-08)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **data-access:** add INACTIVE status, reviews field, and REVIEW_DECISIONS to PlgOnboarding ([#1516](https://github.com/adobe/spacecat-shared/issues/1516)) ([8f038e9](https://github.com/adobe/spacecat-shared/commit/8f038e93287da51acf0e586f3e786aeb00d4a0d3))
|
|
6
|
+
|
|
1
7
|
## [@adobe/spacecat-shared-data-access-v3.47.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.46.0...@adobe/spacecat-shared-data-access-v3.47.0) (2026-04-07)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/package.json
CHANGED
|
@@ -18,7 +18,18 @@ export type PlgOnboardingStatus =
|
|
|
18
18
|
| 'ONBOARDED'
|
|
19
19
|
| 'ERROR'
|
|
20
20
|
| 'WAITING_FOR_IP_ALLOWLISTING'
|
|
21
|
-
| 'WAITLISTED'
|
|
21
|
+
| 'WAITLISTED'
|
|
22
|
+
| 'INACTIVE';
|
|
23
|
+
|
|
24
|
+
export type PlgOnboardingReviewDecision = 'BYPASSED' | 'UPHELD';
|
|
25
|
+
|
|
26
|
+
export interface PlgOnboardingReview {
|
|
27
|
+
reason: string;
|
|
28
|
+
decision: PlgOnboardingReviewDecision;
|
|
29
|
+
reviewedBy: string;
|
|
30
|
+
reviewedAt: string;
|
|
31
|
+
justification: string;
|
|
32
|
+
}
|
|
22
33
|
|
|
23
34
|
export interface PlgOnboarding extends BaseModel {
|
|
24
35
|
getImsOrgId(): string;
|
|
@@ -31,6 +42,7 @@ export interface PlgOnboarding extends BaseModel {
|
|
|
31
42
|
getError(): object | null;
|
|
32
43
|
getBotBlocker(): object | null;
|
|
33
44
|
getWaitlistReason(): string | null;
|
|
45
|
+
getReviews(): PlgOnboardingReview[] | null;
|
|
34
46
|
getCompletedAt(): string | null;
|
|
35
47
|
setStatus(status: PlgOnboardingStatus): PlgOnboarding;
|
|
36
48
|
setSiteId(siteId: string): PlgOnboarding;
|
|
@@ -39,6 +51,7 @@ export interface PlgOnboarding extends BaseModel {
|
|
|
39
51
|
setError(error: object): PlgOnboarding;
|
|
40
52
|
setBotBlocker(botBlocker: object): PlgOnboarding;
|
|
41
53
|
setWaitlistReason(waitlistReason: string): PlgOnboarding;
|
|
54
|
+
setReviews(reviews: PlgOnboardingReview[]): PlgOnboarding;
|
|
42
55
|
setCompletedAt(completedAt: string): PlgOnboarding;
|
|
43
56
|
}
|
|
44
57
|
|
|
@@ -33,6 +33,12 @@ class PlgOnboarding extends BaseModel {
|
|
|
33
33
|
ERROR: 'ERROR',
|
|
34
34
|
WAITING_FOR_IP_ALLOWLISTING: 'WAITING_FOR_IP_ALLOWLISTING',
|
|
35
35
|
WAITLISTED: 'WAITLISTED',
|
|
36
|
+
INACTIVE: 'INACTIVE',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
static REVIEW_DECISIONS = {
|
|
40
|
+
BYPASSED: 'BYPASSED',
|
|
41
|
+
UPHELD: 'UPHELD',
|
|
36
42
|
};
|
|
37
43
|
}
|
|
38
44
|
|
|
@@ -80,6 +80,25 @@ const schema = new SchemaBuilder(PlgOnboarding, PlgOnboardingCollection)
|
|
|
80
80
|
type: 'string',
|
|
81
81
|
required: false,
|
|
82
82
|
})
|
|
83
|
+
.addAttribute('reviews', {
|
|
84
|
+
type: 'list',
|
|
85
|
+
required: false,
|
|
86
|
+
items: {
|
|
87
|
+
type: 'map',
|
|
88
|
+
properties: {
|
|
89
|
+
reason: { type: 'string' },
|
|
90
|
+
decision: { type: 'string' },
|
|
91
|
+
reviewedBy: { type: 'string' },
|
|
92
|
+
reviewedAt: { type: 'string' },
|
|
93
|
+
justification: { type: 'string' },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
validate: (value) => {
|
|
97
|
+
if (!Array.isArray(value)) return false;
|
|
98
|
+
const valid = Object.values(PlgOnboarding.REVIEW_DECISIONS);
|
|
99
|
+
return value.every((r) => valid.includes(r.decision) && isIsoDate(r.reviewedAt));
|
|
100
|
+
},
|
|
101
|
+
})
|
|
83
102
|
.addAttribute('completedAt', {
|
|
84
103
|
type: 'string',
|
|
85
104
|
validate: (value) => !value || isIsoDate(value),
|