Sync Go client with updated Control API spec#42
Closed
kennethkalmer wants to merge 1 commit intomainfrom
Closed
Conversation
Add support for new rule types (before-publish hooks and content moderation), APNs token-based auth fields on apps, new namespace fields (mutableMessages, populateChannelRegistry), and token expiry on the /me endpoint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
Closing in favour of #41 — this library is being deprecated. |
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
Syncs this Go client library with the Control API spec changes from ably/docs#3306.
aws/lambda/before-publish,http/before-publish,hive/text-model-only,hive/dashboard,bodyguard/text-moderation,tisane/text-moderation,azure/text-moderationInvocationModeandBeforePublishConfigto support before-publish rule behaviorChatRoomFilterto ruleSourceApnsAuthType,ApnsSigningKey,ApnsSigningKeyId,ApnsIssuerKey,ApnsTopicHeader) toNewAppandAppApp(Created,Modified,FcmServiceAccountConfigured,ApnsCertificateConfigured,ApnsSigningKeyConfigured)MutableMessages,PopulateChannelRegistry, andAppIDtoNamespaceExpiresAttoTokenNot addressed
defaultcase inRule.UnmarshalJSONstill returns a hard error for unknown rule types. This is the existing behavior. A graceful fallback (e.g. storing as a raw/generic type) could prevent breakage when further rule types are added, but that would be a behavioral change worth discussing separately.Test plan
go build ./...compiles cleanlySKIP_INTEGRATION=trueTestRuleMarshalRoundTripcovers JSON marshal/unmarshal for all 7 new rule typesTestRuleWithInvocationModeandTestSourceChatRoomFilterverify new fields deserialize correctlyABLY_ACCOUNT_TOKEN)🤖 Generated with Claude Code