Consent SaaS Config: Allow definition of multiple opt-in or opt-out requests #2315
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.
Unticketed
Code Changes
consent_requests
section on the saas config haveopt_in
andopt_out
types ofUnion[SaaSRequest, List[SaaSRequest]] = []
, so the dev can define a single request or a list of requests. Validators turn everything into a list of requestshttps://mailchimp.com/developer/transactional/api/allowlists/remove-email-from-allowlist/
https://mailchimp.com/developer/transactional/api/rejects/add-email-to-denylist/
Note that opt-in, adding the user to the allowlist, still requires just one request:
https://mailchimp.com/developer/transactional/api/allowlists/add-email-to-allowlist/
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.md
Description Of Changes
The current consent_requests saas config section was set up to allow one opt-out or one opt-in request to be defined, but I think we're already hitting a scenario where a string of requests may need to be fired.
Allow optionally multiple opt in or opt out requests to be defined, that will be fired in sequence for consent requests.