@adobe/spacecat-shared-data-access 3.32.1 → 3.33.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 +6 -0
- package/package.json +1 -1
- package/src/models/site/config.js +22 -0
- package/src/models/site/index.d.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [@adobe/spacecat-shared-data-access-v3.33.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.32.1...@adobe/spacecat-shared-data-access-v3.33.0) (2026-03-30)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add onboard config and opportunity maps ([#1464](https://github.com/adobe/spacecat-shared/issues/1464)) ([9bd59f5](https://github.com/adobe/spacecat-shared/commit/9bd59f5e2b05f3fd29ea7568daf0e369bd4d2535))
|
|
6
|
+
|
|
1
7
|
## [@adobe/spacecat-shared-data-access-v3.32.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.32.0...@adobe/spacecat-shared-data-access-v3.32.1) (2026-03-28)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -383,6 +383,15 @@ export const configSchema = Joi.object({
|
|
|
383
383
|
}),
|
|
384
384
|
).optional(),
|
|
385
385
|
}).optional(),
|
|
386
|
+
onboardConfig: Joi.object({
|
|
387
|
+
lastProfile: Joi.string().optional(),
|
|
388
|
+
lastStartTime: Joi.number().optional(),
|
|
389
|
+
forcedOverride: Joi.boolean().optional(),
|
|
390
|
+
history: Joi.array().items(Joi.object({
|
|
391
|
+
profile: Joi.string().optional(),
|
|
392
|
+
startTime: Joi.number().optional(),
|
|
393
|
+
})).optional(),
|
|
394
|
+
}).optional(),
|
|
386
395
|
commerceLlmoConfig: Joi.object().pattern(
|
|
387
396
|
Joi.string(),
|
|
388
397
|
Joi.object({
|
|
@@ -506,6 +515,7 @@ export const Config = (data = {}) => {
|
|
|
506
515
|
self.getLlmoCdnBucketConfig = () => state?.llmo?.cdnBucketConfig;
|
|
507
516
|
self.getTokowakaConfig = () => state?.tokowakaConfig;
|
|
508
517
|
self.getEdgeOptimizeConfig = () => state?.edgeOptimizeConfig;
|
|
518
|
+
self.getOnboardConfig = () => state?.onboardConfig;
|
|
509
519
|
self.getCommerceLlmoConfig = () => state?.commerceLlmoConfig;
|
|
510
520
|
self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
|
|
511
521
|
state.slack = {
|
|
@@ -827,6 +837,17 @@ export const Config = (data = {}) => {
|
|
|
827
837
|
state.edgeOptimizeConfig = edgeOptimizeConfig;
|
|
828
838
|
};
|
|
829
839
|
|
|
840
|
+
self.updateOnboardConfig = (onboardConfig, { maxHistory } = {}) => {
|
|
841
|
+
let history = [...(state.onboardConfig?.history || [])];
|
|
842
|
+
if (onboardConfig.lastProfile && onboardConfig.lastStartTime) {
|
|
843
|
+
history.push({ profile: onboardConfig.lastProfile, startTime: onboardConfig.lastStartTime });
|
|
844
|
+
}
|
|
845
|
+
if (maxHistory && history.length > maxHistory) {
|
|
846
|
+
history = history.slice(-maxHistory);
|
|
847
|
+
}
|
|
848
|
+
state.onboardConfig = { ...onboardConfig, history };
|
|
849
|
+
};
|
|
850
|
+
|
|
830
851
|
self.updateCommerceLlmoConfig = (commerceLlmoConfig) => {
|
|
831
852
|
state.commerceLlmoConfig = commerceLlmoConfig;
|
|
832
853
|
};
|
|
@@ -848,5 +869,6 @@ Config.toDynamoItem = (config) => ({
|
|
|
848
869
|
llmo: config.getLlmoConfig(),
|
|
849
870
|
tokowakaConfig: config.getTokowakaConfig(),
|
|
850
871
|
edgeOptimizeConfig: config.getEdgeOptimizeConfig(),
|
|
872
|
+
onboardConfig: config.getOnboardConfig?.(),
|
|
851
873
|
commerceLlmoConfig: config.getCommerceLlmoConfig?.(),
|
|
852
874
|
});
|
|
@@ -146,6 +146,12 @@ export interface SiteConfig {
|
|
|
146
146
|
urlPatterns?: Array<LlmoUrlPattern>;
|
|
147
147
|
customerIntent?: Array<LlmoCustomerIntent>;
|
|
148
148
|
};
|
|
149
|
+
onboardConfig?: {
|
|
150
|
+
lastProfile?: string;
|
|
151
|
+
lastStartTime?: number;
|
|
152
|
+
forcedOverride?: boolean;
|
|
153
|
+
history?: Array<{ profile?: string; startTime?: number }>;
|
|
154
|
+
};
|
|
149
155
|
};
|
|
150
156
|
extractWellKnownTags(tags: Array<string>): Partial<Record<WellKnownLmmoTag, string>>;
|
|
151
157
|
getSlackConfig(): { workspace?: string; channel?: string; invitedUserCount?: number };
|
|
@@ -197,6 +203,8 @@ export interface SiteConfig {
|
|
|
197
203
|
updateLlmoCustomerIntent(intentKey: string, updateData: Partial<LlmoCustomerIntent>): void;
|
|
198
204
|
addLlmoTag(tag: string): void;
|
|
199
205
|
removeLlmoTag(tag: string): void;
|
|
206
|
+
getOnboardConfig(): { lastProfile?: string; lastStartTime?: number; forcedOverride?: boolean; history?: Array<{ profile?: string; startTime?: number }> } | undefined;
|
|
207
|
+
updateOnboardConfig(onboardConfig: { lastProfile?: string; lastStartTime?: number; forcedOverride?: boolean }, options?: { maxHistory?: number }): void;
|
|
200
208
|
}
|
|
201
209
|
|
|
202
210
|
export interface Site extends BaseModel {
|