[api] add support for batch webhooks#247
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThis PR replaces the nullable ChangesWebhookDelivery refresh flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ThirdPartyController
participant InboxService
participant Events
Client->>ThirdPartyController: POST inbox refresh/export
ThirdPartyController->>ThirdPartyController: ResolveWebhookDelivery()
ThirdPartyController->>InboxService: Refresh(webhookDelivery)
InboxService->>Events: NewMessagesExportRequestedEvent(webhookDelivery)
Events-->>InboxService: Event payload
InboxService-->>ThirdPartyController: result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/sms-gateway/openapi/docs.go (1)
484-484: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winStale endpoint description references only the deprecated field.
The
/3rdparty/v1/inbox/refreshdescription still says the webhook trigger depends ontriggerWebhooks, but this file now documents the newwebhookDeliveryfield (and markstriggerWebhooksdeprecated) a few hundred lines later. Update the underlying Go doc comment in the handler (not shown in this diff) that generates this swagger description, so it reflectswebhookDeliveryas the primary control.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/sms-gateway/openapi/docs.go` at line 484, The `/3rdparty/v1/inbox/refresh` swagger description is stale and still mentions only the deprecated triggerWebhooks flag. Update the Go doc comment on the handler that generates this OpenAPI text so it describes webhookDelivery as the primary control, while still acknowledging triggerWebhooks only as deprecated if needed; use the refresh endpoint handler and its generated docs source to locate the comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@internal/sms-gateway/openapi/docs.go`:
- Line 484: The `/3rdparty/v1/inbox/refresh` swagger description is stale and
still mentions only the deprecated triggerWebhooks flag. Update the Go doc
comment on the handler that generates this OpenAPI text so it describes
webhookDelivery as the primary control, while still acknowledging
triggerWebhooks only as deprecated if needed; use the refresh endpoint handler
and its generated docs source to locate the comment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0073990f-bbb5-47d6-9cf1-3576a9705d9b
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (6)
go.modinternal/sms-gateway/handlers/inbox/3rdparty.gointernal/sms-gateway/handlers/messages/3rdparty.gointernal/sms-gateway/inbox/service.gointernal/sms-gateway/modules/events/events.gointernal/sms-gateway/openapi/docs.go
🤖 Pull request artifacts
|
8239b7c to
2712c9f
Compare
2712c9f to
a72cf83
Compare
a72cf83 to
61b837a
Compare
1621f50 to
93d4331
Compare
Summary by CodeRabbit
New Features
webhookDeliverymodes (Disabled,Individual,Batch) for inbox refresh and related message export webhook behavior.Bug Fixes
webhookDeliverymode instead of the legacy boolean.Documentation
webhookDelivery, deprecatetriggerWebhooks, and refresh related schemas.Chores