feat: add brand sentiment guidelines#1297
Merged
HollywoodTonight merged 16 commits intomainfrom Feb 4, 2026
Merged
Conversation
iuliag
requested changes
Jan 29, 2026
Contributor
iuliag
left a comment
There was a problem hiding this comment.
Nothing to be addressed implementation-wise.
Please add integration tests as well: https://github.com/adobe/spacecat-shared/tree/main/packages/spacecat-shared-data-access/test/it
|
This PR will trigger a minor release when merged. |
Adds new entities for Brand Sentiment Guidelines Store: SentimentTopic: - Composite key: siteId + topicId - Fields: name, description, topicName, subPrompts, guidelineIds, audits, enabled - Methods for managing sub-prompts, guidelines, and audits - Query by siteId, enabled status, and audit type SentimentGuideline: - Composite key: siteId + guidelineId - Fields: name, instruction, enabled - Query by siteId and enabled status Both entities include full unit test coverage.
…nes are now independent
Guidelines define HOW to analyze (specific audit type associations), while Topics define WHAT to analyze. This separation allows: - Same topic to be analyzed differently on different platforms - Platform-specific guidelines (e.g., only for YouTube) - Filter guidelines by audit type at query time Changes: - Remove audits, topicName from SentimentTopic schema/model - Add audits field to SentimentGuideline schema/model - Add allBySiteIdAndAuditType collection method to SentimentGuideline - Remove allBySiteIdAndAuditType from SentimentTopic - Update TypeScript definitions and tests
…llections Per PR feedback - "Paginated" suffix is redundant since all "all..." methods should be paginated by default.
- Add fixture data for sentiment topics and guidelines - Add integration tests covering CRUD operations - Add tests for custom methods and collection methods - Add validation tests
- Add UUID auto-generation default to topicId and guidelineId schemas - Fix removeForSiteId to extract .data from paginated response - Fix findByIds to extract .data from paginated response
…t method names - Add generateCompositeKeys() to SentimentGuideline model (siteId + guidelineId) - Add generateCompositeKeys() to SentimentTopic model (siteId + topicId) - Fix test to use correct method names: enableAudit, disableAudit, isAuditEnabled - Handle getAudits() returning null for empty sets
b2d71b3 to
a30c06f
Compare
- Add tests for empty allowedPaths in byocdn-imperva and byocdn-other - Add tests with log parameter for getTemporalCondition
- Fix allBySiteId stubs to return { data, cursor } format matching implementation
- Add generateCompositeKeys tests for both sentiment models
iuliag
approved these changes
Feb 4, 2026
packages/spacecat-shared-data-access/src/models/sentiment-topic/index.d.ts
Outdated
Show resolved
Hide resolved
packages/spacecat-shared-data-access/src/models/sentiment-topic/index.d.ts
Outdated
Show resolved
Hide resolved
…ions - Remove deprecated allBySiteIdPaginated method - Update allBySiteId to return paginated result with options parameter
solaris007
pushed a commit
that referenced
this pull request
Feb 4, 2026
# [@adobe/spacecat-shared-data-access-v2.103.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.102.0...@adobe/spacecat-shared-data-access-v2.103.0) (2026-02-04) ### Features * add brand sentiment guidelines ([#1297](#1297)) ([93f0a1d](93f0a1d))
Member
|
🎉 This PR is included in version @adobe/spacecat-shared-data-access-v2.103.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Brand Sentiment Guidelines Store allows customers to define and configure topics and guidelines for sentiment analysis. Topics represent subjects of interest (e.g., "2026 Corvette Stingray", "BMW XM Latest") with associated sub-prompts, while Guidelines define analysis focus areas with specific audit type associations.
Please ensure your pull request adheres to the following guidelines:
Related Issues
Thanks for contributing!