@adobe/spacecat-shared-data-access 3.70.0 → 3.70.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,9 @@
|
|
|
1
|
+
## [@adobe/spacecat-shared-data-access-v3.70.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.70.0...@adobe/spacecat-shared-data-access-v3.70.1) (2026-05-22)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **data-access:** drop dangling belongs_to: Brand on BrandSemrushProject ([#1617](https://github.com/adobe/spacecat-shared/issues/1617)) ([b52d815](https://github.com/adobe/spacecat-shared/commit/b52d815a2e0e86af63464c71b899b5d1057236b0))
|
|
6
|
+
|
|
1
7
|
## [@adobe/spacecat-shared-data-access-v3.70.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.69.0...@adobe/spacecat-shared-data-access-v3.70.0) (2026-05-22)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { hasText } from '@adobe/spacecat-shared-utils';
|
|
13
|
+
import { hasText, isValidUUID } from '@adobe/spacecat-shared-utils';
|
|
14
14
|
|
|
15
15
|
import SchemaBuilder from '../base/schema.builder.js';
|
|
16
16
|
import BrandSemrushProject from './brand-semrush-project.model.js';
|
|
@@ -26,9 +26,20 @@ import BrandSemrushProjectCollection from './brand-semrush-project.collection.js
|
|
|
26
26
|
const LANGUAGE_TAG_REGEX = /^[a-z]{2,3}(-[a-z]{2,4})?$/;
|
|
27
27
|
|
|
28
28
|
const schema = new SchemaBuilder(BrandSemrushProject, BrandSemrushProjectCollection)
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
|
|
29
|
+
// brandId is the FK to the brands table in mysticat-data-service. Declared
|
|
30
|
+
// explicitly (rather than via `.addReference('belongs_to', 'Brand')`)
|
|
31
|
+
// because this package does not ship a Brand entity — `belongs_to` would
|
|
32
|
+
// throw "Collection BrandCollection not found" at model instantiation
|
|
33
|
+
// (reference.js#toAccessorConfigs). The (brandId, updatedAt) index below
|
|
34
|
+
// produces the same `allByBrandId` accessor `belongs_to` would have.
|
|
35
|
+
// Swap back to `.addReference('belongs_to', 'Brand')` once Brand is
|
|
36
|
+
// registered.
|
|
37
|
+
.addAttribute('brandId', {
|
|
38
|
+
type: 'string',
|
|
39
|
+
required: true,
|
|
40
|
+
validate: (value) => isValidUUID(value),
|
|
41
|
+
})
|
|
42
|
+
.addIndex({ composite: ['brandId'] }, { composite: ['updatedAt'] })
|
|
32
43
|
.addAttribute('semrushProjectId', {
|
|
33
44
|
type: 'string',
|
|
34
45
|
required: true,
|