feat(audit-url): add URL store data model and data access#1211
Merged
HollywoodTonight merged 21 commits intomainfrom Dec 8, 2025
Merged
feat(audit-url): add URL store data model and data access#1211HollywoodTonight merged 21 commits intomainfrom
HollywoodTonight merged 21 commits intomainfrom
Conversation
Add AuditUrl entity to provide URL store functionality for tracking and managing URLs to be audited. Features: - Composite primary key: siteId + url (unique per site) - byCustomer boolean flag to distinguish customer-added vs system-added URLs - audits field as set type for efficient querying - GSI for filtering by siteId and byCustomer Data Access Methods: - allBySiteId: Get all URLs for a site (with pagination/sorting) - allBySiteIdByCustomer: Filter by byCustomer flag - allBySiteIdAndAuditType: Get URLs with specific audit enabled - findBySiteIdAndUrl: Get specific URL by composite key - removeForSiteIdByCustomer: Bulk delete by customer flag Model Methods: - isAuditEnabled/enableAudit/disableAudit: Manage audit types - isCustomerUrl: Check if URL was customer-provided Includes: - Full TypeScript definitions - Unit tests for model and collection - Integration tests
|
This PR will trigger a minor release when merged. |
- Remove composite primary key (siteId + url) in favor of standard auditUrlId - Use GSI for siteId + url lookups via findBySiteIdAndUrl - Revert removeForSiteId and removeForSiteIdByCustomer to use removeByIds - Add getAuditUrlId() to TypeScript definitions - Update tests for allBySiteIdAndByCustomer method name
- allBySiteIdByCustomerSorted now uses allBySiteId + filter - removeForSiteIdByCustomer now uses allBySiteId + filter - The accessor utility's hasText validation fails for boolean false - Update test expectations for audit type count
- Update tests to stub allBySiteId instead of allBySiteIdAndByCustomer - Add comprehensive tests for removeForSiteIdByCustomer filtering - Add c8 ignore for defensive numeric comparison code in sortAuditUrls
2 tasks
- Use siteId + url as unique composite key for AuditUrl entities - Update schema to use auditUrlId derived from siteId and url - Update collection methods for composite key lookups - Update integration and unit tests
- Add generateCompositeKeys() override in AuditUrl model - Update Patcher to use schema's primary index keys for patch operations - Add unit tests for generateCompositeKeys method
Please ensure your pull request adheres to the following guidelines: - [ ] make sure to link the related issues in this description - [ ] when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes ## Related Issues Thanks for contributing!
# [@adobe/spacecat-shared-athena-client-v1.8.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-athena-client-v1.8.2...@adobe/spacecat-shared-athena-client-v1.8.3) (2025-12-04) ### Bug Fixes * month query passes 0 week ([#1215](#1215)) ([1821efd](1821efd))
Following patch was created with the test data:
```
{
"url": "https://www.adobe.com/products/firefly.html",
"version": "1.0",
"forceFail": false,
"prerender": true,
"patches": [
{
"opportunityId": "7a663e47-e132-4bba-954a-26419e0541b8",
"suggestionId": "ee8fc5e8-29c1-4894-9391-efc10b8a5f5c",
"prerenderRequired": true,
"lastUpdated": 1764683693803,
"op": "insertAfter",
"selector": "#create-with-multiple-top-ai-models-all-in-one-place",
"value": "Blah Blah some text",
"valueFormat": "text",
"target": "ai-bots"
}
]
}
```
# [@adobe/spacecat-shared-tokowaka-client-v1.3.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-tokowaka-client-v1.2.4...@adobe/spacecat-shared-tokowaka-client-v1.3.0) (2025-12-04) ### Features * Tokowaka generic oppty mapper ([#1204](#1204)) ([710a36c](710a36c))
Please ensure your pull request adheres to the following guidelines: - [ ] make sure to link the related issues in this description - [ ] when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes ## Related Issues Thanks for contributing!
# [@adobe/spacecat-shared-data-access-v2.88.9](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.88.8...@adobe/spacecat-shared-data-access-v2.88.9) (2025-12-04) ### Bug Fixes * adding toc audit type ([#1214](#1214)) ([7dab7d7](7dab7d7))
iuliag
reviewed
Dec 4, 2025
Contributor
iuliag
left a comment
There was a problem hiding this comment.
Sending in a partial review with the most pressing points.
packages/spacecat-shared-data-access/src/models/audit-url/audit-url.collection.js
Show resolved
Hide resolved
packages/spacecat-shared-data-access/src/models/audit-url/audit-url.collection.js
Outdated
Show resolved
Hide resolved
packages/spacecat-shared-data-access/src/models/audit-url/audit-url.collection.js
Outdated
Show resolved
Hide resolved
…d consistent pagination
- Add GSI bySiteIdAndByCustomer for efficient querying by customer flag
- Add boolean type support in accessor.utils.js validation
- Add FilterExpression (where clause) support in base collection
- Use FilterExpression for auditType filtering (reduces network transfer)
- Return consistent { data, cursor } format matching base collection
- Remove deprecated tag from findBySiteIdAndUrl (new feature)
- Update tests for new implementations
…2sk) SchemaBuilder auto-generates GSI names, not custom names. Also add test coverage for where clause (FilterExpression) in base collection.
iuliag
approved these changes
Dec 5, 2025
solaris007
pushed a commit
that referenced
this pull request
Dec 8, 2025
# [@adobe/spacecat-shared-athena-client-v1.9.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-athena-client-v1.8.4...@adobe/spacecat-shared-athena-client-v1.9.0) (2025-12-08) ### Features * **audit-url:** add URL store data model and data access ([#1211](#1211)) ([a7e458e](a7e458e))
Member
|
🎉 This PR is included in version @adobe/spacecat-shared-athena-client-v1.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
solaris007
pushed a commit
that referenced
this pull request
Dec 8, 2025
# [@adobe/spacecat-shared-data-access-v2.89.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.88.9...@adobe/spacecat-shared-data-access-v2.89.0) (2025-12-08) ### Features * **audit-url:** add URL store data model and data access ([#1211](#1211)) ([a7e458e](a7e458e))
Member
|
🎉 This PR is included in version @adobe/spacecat-shared-data-access-v2.89.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.
Add AuditUrl entity to provide URL store functionality for tracking and managing URLs to be audited.
Features:
Data Access Methods:
Model Methods:
Includes:
Please ensure your pull request adheres to the following guidelines:
Related Issues
Thanks for contributing!