@adobe/spacecat-shared-data-access 3.78.0 → 3.79.1

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.79.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.79.0...@adobe/spacecat-shared-data-access-v3.79.1) (2026-06-22)
2
+
3
+ ### Bug Fixes
4
+
5
+ * data structure for Sitemap "error" suggestions ([#1697](https://github.com/adobe/spacecat-shared/issues/1697)) ([a9b550c](https://github.com/adobe/spacecat-shared/commit/a9b550c8bf6c3411e312fe1c305f38b5a90dfdde))
6
+
7
+ ## [@adobe/spacecat-shared-data-access-v3.79.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.78.0...@adobe/spacecat-shared-data-access-v3.79.0) (2026-06-19)
8
+
9
+ ### Features
10
+
11
+ * **data-access:** add brand pendingSemrushProvisioning attribute ([#1692](https://github.com/adobe/spacecat-shared/issues/1692)) ([1c2bc2a](https://github.com/adobe/spacecat-shared/commit/1c2bc2a2043246268e0ebe421de7c2c9e9241cdc))
12
+
1
13
  ## [@adobe/spacecat-shared-data-access-v3.78.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.77.0...@adobe/spacecat-shared-data-access-v3.78.0) (2026-06-17)
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.78.0",
3
+ "version": "3.79.1",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -46,6 +46,15 @@ const schema = new SchemaBuilder(Brand, BrandCollection)
46
46
  type: 'string',
47
47
  validate: (value) => value == null || hasText(value),
48
48
  })
49
+ // Nullable JSONB blob holding deferred Semrush provisioning data for a
50
+ // pending (draft) brand. Maps to brands.pending_semrush_provisioning
51
+ // (migration 20260618120000). Validated loosely here (object-or-null); the
52
+ // DB CHECK enforces the object shape and the controller owns field-level
53
+ // validation and the activate-flow consumption semantics.
54
+ .addAttribute('pendingSemrushProvisioning', {
55
+ type: 'any',
56
+ validate: (value) => value == null || (typeof value === 'object' && !Array.isArray(value)),
57
+ })
49
58
  // Uniqueness is enforced at the DB level via the UNIQUE constraint on
50
59
  // brands.semrush_workspace_id (mysticat-data-service migration
51
60
  // 20260615102123), so findBySemrushWorkspaceId returns at most one row.
@@ -436,15 +436,30 @@ export const DATA_SCHEMAS = {
436
436
  },
437
437
  },
438
438
  },
439
+ // Sitemap has two data shapes from the audit worker:
440
+ // 1. URL-type (type='url'): sitemapUrl + pageUrl identify a probed page issue
441
+ // 2. Error-type (type='error'): site/sitemap infrastructure failures; sitemapUrl may be empty
439
442
  [OPPORTUNITY_TYPES.SITEMAP]: {
440
443
  schema: Joi.object({
441
- sitemapUrl: Joi.string().uri().required(),
442
- pageUrl: Joi.string().uri().required(),
443
444
  type: Joi.string().valid('url', 'error').optional(),
445
+ error: Joi.when('type', {
446
+ is: 'error',
447
+ then: Joi.string().required(),
448
+ otherwise: Joi.string().optional(),
449
+ }),
450
+ sitemapUrl: Joi.when('type', {
451
+ is: 'error',
452
+ then: Joi.string().uri().allow('').optional(),
453
+ otherwise: Joi.string().uri().required(),
454
+ }),
455
+ pageUrl: Joi.when('type', {
456
+ is: 'error',
457
+ then: Joi.string().uri().allow('').optional(),
458
+ otherwise: Joi.string().uri().required(),
459
+ }),
444
460
  statusCode: Joi.number().optional(),
445
- urlsSuggested: Joi.string().uri().optional(),
446
- recommendedAction: Joi.string().optional(),
447
- error: Joi.string().optional(),
461
+ urlsSuggested: Joi.string().uri().allow('').optional(),
462
+ recommendedAction: Joi.string().allow('').optional(),
448
463
  aggregationKey: Joi.string().allow(null).optional(),
449
464
  }).unknown(true),
450
465
  projections: {