feat(audience): add core types (AudienceConfig, ConsentLevel, AudienceError, Constants)#682
Merged
Merged
Conversation
…eError, Constants) Adds public types needed before any implementation work begins: - AudienceConfig: PublishableKey, Consent, DistributionPlatform, Debug, FlushIntervalSeconds, FlushSize, OnError. No Environment field. - ConsentLevel: None / Anonymous / Full - AudienceError + AudienceErrorCode - Constants: key-prefix URL routing, API paths, flush defaults, DistributionPlatforms string constants - ImmutableAudience: wire in Init(AudienceConfig) now that the type exists Linear: SDK-119
8a8a3ea to
81cd297
Compare
3d0dd95 to
efeda6a
Compare
- Remove RFC comment and rename TestKeyPrefix -> SandboxKeyPrefix in Constants - Drop Status and Endpoint from AudienceError (leaked internal HTTP details) - Move OnError from AudienceConfig callback property to a static event on ImmutableAudience, following the same pattern as Passport.OnAuthEvent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Error scaffold TestKeyPrefix matches the prod/test mental model consumers have. OnError belongs in the implementation PR (SDK-99), not the scaffold. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No sample app yet; add back when examples/audience is created. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…butionPlatforms Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ImmutableJeffrey
approved these changes
Apr 14, 2026
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.
Summary
Adds the Audience public types needed before any implementation work can begin.
Linear: SDK-119
🤖 Generated with Claude Code