@adobe/spacecat-shared-data-access 3.32.0 → 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 CHANGED
@@ -1,3 +1,15 @@
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
+
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)
8
+
9
+ ### Bug Fixes
10
+
11
+ * **deps:** update external fixes ([#1477](https://github.com/adobe/spacecat-shared/issues/1477)) ([67bdd1a](https://github.com/adobe/spacecat-shared/commit/67bdd1a2c497bed088bc1e54ae22e60c171308d1))
12
+
1
13
  ## [@adobe/spacecat-shared-data-access-v3.32.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.31.1...@adobe/spacecat-shared-data-access-v3.32.0) (2026-03-27)
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.32.0",
3
+ "version": "3.33.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -42,11 +42,11 @@
42
42
  "dependencies": {
43
43
  "@adobe/fetch": "^4.2.3",
44
44
  "@adobe/spacecat-shared-utils": "1.105.0",
45
- "@supabase/postgrest-js": "2.99.3",
45
+ "@supabase/postgrest-js": "2.100.1",
46
46
  "@aws-sdk/client-s3": "^3.940.0",
47
47
  "@types/joi": "17.2.3",
48
48
  "aws-xray-sdk": "3.12.0",
49
- "joi": "18.0.2",
49
+ "joi": "18.1.1",
50
50
  "pluralize": "8.0.0"
51
51
  },
52
52
  "devDependencies": {
@@ -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 {