You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
revert(audience-env): drop AudienceEnvironment enum per PR review
Addresses review feedback on #709 from @nattb8: avoid exposing a public
enum of environments and match the Web/Pixel SDK pattern.
Problems with the enum:
- Makes Dev a first-class, permanently-supported public choice that
cannot be removed later without a breaking change.
- Forces every future backend addition onto the public enum surface.
- Diverges from @imtbl/audience, which has no enum.
This commit undoes the enum wiring and restores the key-prefix URL
derivation that existed before the PR. A follow-up commit adds an
optional BaseUrl override on AudienceConfig (Web SDK parity) so devs
who need Dev can point the SDK there directly.
- Delete AudienceEnvironment.cs.
- Constants: restore TestKeyPrefix and the
MessagesUrl/ConsentUrl/DataUrl(string?) signatures.
- AudienceConfig: drop the Environment field.
- HttpTransport: drop the AudienceEnvironment ctor parameter; URL
derives from publishableKey prefix.
- ImmutableAudience: remove the CurrentEnvironment getter and its
cached backing field; revert DeleteData, SyncConsentToBackend, and
Init to pass publishableKey into the URL helpers.
- Tests: remove the CurrentEnvironment_* cases and the per-env URL
cases; restore the pre-PR test-key / prod-key URL assertions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments