feat: add headless CDN API client - #140
Closed
ethanpschoen wants to merge 3 commits into
Closed
Conversation
This was referenced Aug 6, 2026
ethanpschoen
marked this pull request as ready for review
August 6, 2026 20:59
8 tasks
Adds a standalone client for the config/consent/rights/subscriptions CDN endpoints, independent of the WebView-hosted tag. Part 4/5 of the split of #126.
…onfig requests The long config path (which carries environment) was only taken when environment, jurisdiction, and language were all present. A caller who set environment and jurisdiction but not language fell to the short path, which carries no environment at all, so a staging-configured app with a jurisdiction set silently received the default environment's config. Synthesize language from the device locale whenever environment and jurisdiction are both set, so the long path is always used in that case. Not adding ?environment= to the short path — nothing in ketch-tag suggests the CDN reads it. Refs #126.
parseConsent() left purposes undefined whenever a server response omitted it, while emptyConsent() returns { purposes: {} }. A vendors-only or protocols-only response therefore returned an inconsistent shape, and a caller doing Object.keys(consent.purposes) on it would throw.
Refs #126.
ethanpschoen
force-pushed
the
ethanpschoen/feat/rule-triggers
branch
from
August 6, 2026 21:22
590fde6 to
738c2b1
Compare
ethanpschoen
force-pushed
the
ethanpschoen/feat/headless-api-client
branch
from
August 6, 2026 21:22
bc61706 to
b54c0ab
Compare
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.
Description of this change
Why is this change being made?
How was this tested? How can the reviewer verify your testing?
Related issues
Checklist