Skip to content

feat(audit-url): add moneyPages source to auditTargetURLs config#1496

Open
nitinja wants to merge 6 commits intomainfrom
SITES-42547-add-moneyPages-source
Open

feat(audit-url): add moneyPages source to auditTargetURLs config#1496
nitinja wants to merge 6 commits intomainfrom
SITES-42547-add-moneyPages-source

Conversation

@nitinja
Copy link
Copy Markdown
Member

@nitinja nitinja commented Apr 1, 2026

Add moneyPages as a new audit target URL source alongside manual, with identical structure (array of { url } entries) and full cross-source deduplication support.

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!

slitviachenko and others added 6 commits March 30, 2026 22:51
Add moneyPages as a new audit target URL source alongside manual,
with identical structure (array of { url } entries) and full
cross-source deduplication support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nitinja nitinja requested a review from slitviachenko April 1, 2026 21:27
Base automatically changed from SITES-42547-Manage-a-custom-list-of-audit-target-URLs to main April 3, 2026 17:05
manual: Joi.array().items(Joi.object({
url: Joi.string().uri().required(),
})).optional().default([]),
moneyPages: Joi.array().items(Joi.object({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nitinja , Let's make sure we can update individual auditTargetURLs keys separately without affecting each other, for example:

% curl -X PATCH \
-d '{
  "config": {
    "auditTargetURLs": {
      "manual": [
        {
          "url": "https://example.com/path1"
        },
        {
          "url": "https://example.com/path2"
        }
      ]
    }
  }
}' \
"https://SPACECAT_API/sites/SITE_ID"

% curl -X PATCH \
-d '{
  "config": {
    "auditTargetURLs": {
      "moneyPages": [
        {
          "url": "https://example.com/money-page1"
        },
        {
          "url": "https://example.com/money-page2"
        }
      ]
    }
  }
}' \
"https://SPACECAT_API/sites/SITE_ID"

In the database, we should have both manual and moneyPages.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^^ That way, the API will be more resilient, and we will have less payload input data. Otherwise, to update any individual key, you would need to include all keys to preserve them.

Copy link
Copy Markdown
Contributor

@slitviachenko slitviachenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nitinja , I left a comment, please take a look when you have time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants