Skip to content

[client] add inbox DTOs#48

Merged
capcom6 merged 2 commits intomasterfrom
client/inbox-dtos
Apr 17, 2026
Merged

[client] add inbox DTOs#48
capcom6 merged 2 commits intomasterfrom
client/inbox-dtos

Conversation

@capcom6
Copy link
Copy Markdown
Member

@capcom6 capcom6 commented Apr 11, 2026

Summary by CodeRabbit

  • New Features
    • Added support for receiving and processing multiple message types including SMS, MMS, and raw data messages
    • Added comprehensive webhook event system for tracking message lifecycle including receipt, delivery, failure states, and system notifications

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

Warning

Rate limit exceeded

@capcom6 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 16 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 16 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 844a0bc4-e172-4be2-8e5a-783ca8389b9a

📥 Commits

Reviewing files that changed from the base of the PR and between 517ad1f and 4976472.

📒 Files selected for processing (2)
  • smsgateway/dto_inbox.go
  • smsgateway/dto_webhooks.go

Walkthrough

Added two new DTO files defining data structures for incoming SMS/MMS messages and webhook event payloads. Introduced message type constants, message metadata structs, and webhook payload types for SMS, MMS, and system events with appropriate JSON serialization annotations.

Changes

Cohort / File(s) Summary
Incoming Message DTOs
smsgateway/dto_inbox.go
New IncomingMessageType type with four constants (SMS, DATA_SMS, MMS, MMS_DOWNLOADED) and IncomingMessage struct containing message metadata fields with optional recipient and SIM number fields.
Webhook Event Payloads
smsgateway/dto_webhooks.go
New webhook payload DTOs for SMS events (SmsReceivedPayload, SmsSentPayload, SmsDeliveredPayload, SmsFailedPayload, SmsDataReceivedPayload) and MMS events (MmsReceivedPayload, MmsDownloadedPayload with attachments). Includes base SmsEventPayload struct and system ping payload.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

ready

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[client] add inbox DTOs' directly reflects the main changes: adding two new DTO files (dto_inbox.go and dto_webhooks.go) for inbox-related functionality. It is clear, specific, and accurately summarizes the primary changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@smsgateway/dto_webhooks.go`:
- Around line 100-106: Update the documentation comments on the
MmsDownloadedAttachment struct to reflect that unknown sizes are represented as
nil (pointer) rather than 0: change the package-level/comment line "Size is the
size in bytes, 0 if unknown." and the Size field comment in struct
MmsDownloadedAttachment to state "nil if unknown" (and adjust the example value
accordingly) so the comments match the actual wire shape where Size is a *int
with omitempty.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d29a1dce-dfa2-4059-b7e8-92c1bb07ecd9

📥 Commits

Reviewing files that changed from the base of the PR and between 6fc2205 and 517ad1f.

📒 Files selected for processing (2)
  • smsgateway/dto_inbox.go
  • smsgateway/dto_webhooks.go

Comment thread smsgateway/dto_webhooks.go Outdated
@capcom6 capcom6 force-pushed the client/inbox-dtos branch from ba8bed3 to 4976472 Compare April 12, 2026 01:37
@capcom6 capcom6 added the ready label Apr 12, 2026
@capcom6 capcom6 merged commit 4691ceb into master Apr 17, 2026
8 checks passed
@capcom6 capcom6 deleted the client/inbox-dtos branch April 17, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant