Commit d1e004c
authored
[CHA-2961] Webhook handling spec — regenerate SDK + dual-API (#62)
* feat(webhook): regenerate with CHA-2961 helpers + dual-API on StreamSDKClient
Regenerated Webhook.java + WebhookTest.java from chat/'s
feature/cha-2961-webhook-handling-spec branch.
New surface in io.getstream.Webhook:
- UnknownEvent class (forward-compat for unknown event types)
- gunzipPayload, decodeSqsPayload, decodeSnsPayload primitives
- parseEvent (returns typed event or UnknownEvent)
- verifyAndParseWebhook HTTP composite
- parseSqsPayload, parseSnsPayload queue composites (no signature)
- InvalidWebhookException (unified exception per spec rev 2026-05-11)
Hand-added instance methods on StreamSDKClient (dual API):
- verifySignature(body, signature) — uses client's stored secret
- verifyAndParseWebhook(body, signature) — uses client's stored secret
generate.sh now also runs chat-manager's generate-webhook-fixtures
subcommand to populate src/test/resources/fixtures/webhooks/.
Refs CHA-2961.
* chore: re-regenerate against updated chat/ templates (parseSqs/parseSns rename)
* feat(webhook): add parseSqs/parseSns instance methods on StreamSDKClient
* chore: regenerate webhook helpers with base64 fallback for plain-JSON SQS
* chore: regenerate with P7 chat/ template fixes; rename InvalidWebhookException → WebhookException in StreamSDKClient
Exception class was split per spec §5.2 in chat/ 13097a0765 into a
WebhookException base + InvalidSignatureException / MalformedWebhookException
subclasses. The instance methods on StreamSDKClient declare 'throws' clauses
that referenced the old unified class name; updated to the new base class so
both subclasses propagate cleanly.
* chore: regenerate with unified InvalidWebhookError; rename Webhook.WebhookException → Webhook.InvalidWebhookError in StreamSDKClient
* chore: regenerate with P9 chat/ template fixes (WebhookHelpers wire, fixtures-present guard, WebhookException deprecation alias)
* chore: regenerate after chat/ restructure (build/chat-manager path)1 parent 10d97b4 commit d1e004c
193 files changed
Lines changed: 1993 additions & 27 deletions
File tree
- src
- main/java/io/getstream
- models
- services
- framework
- test
- java/io/getstream
- resources/fixtures/webhooks
- _invalid
- bad_base64
- bad_compression
- bad_sns_envelope
- empty_body
- malformed_json
- missing_type
- tampered_body
- unknown_type
- call.session_ended
- call.session_started
- channel.created
- channel.deleted
- channel.updated
- feeds.activity.added
- message.deleted
- message.new
- message.updated
- moderation.flagged
- reaction.new
- user.banned
- user.unbanned
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
5 | 30 | | |
6 | 31 | | |
7 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
0 commit comments