Skip to content

[client] add inbox dtos - #63

Open
capcom6 wants to merge 1 commit into
masterfrom
client/add-inbox-dtos
Open

[client] add inbox dtos#63
capcom6 wants to merge 1 commit into
masterfrom
client/add-inbox-dtos

Conversation

@capcom6

@capcom6 capcom6 commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added support for submitting batches of incoming mobile messages with optional recipient, SIM details, and attachments.
    • Inbox messages now indicate whether content is encrypted.
    • Added MMS attachment details, including part ID, filename, size, and content type.
    • Added the inbox:read permission scope for accessing inbox messages.
    • Added date, pagination, message-type, and device filters when listing inbox messages.
  • Documentation
    • Clarified inbox message terminology in the message listing API documentation.

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
smsgateway/client.go 98.64% <ø> (ø)
smsgateway/requests_3rdparty.go 100.00% <100.00%> (ø)
smsgateway/requests_inbox.go 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@capcom6, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 124634e0-7560-4d67-9ce3-a7502a097f39

📥 Commits

Reviewing files that changed from the base of the PR and between 79bbc01 and ca8711d.

📒 Files selected for processing (1)
  • smsgateway/requests_inbox.go
📝 Walkthrough

Walkthrough

The PR adds mobile inbox request payloads, extends inbox responses with encryption and MMS attachment data, adds reusable listing options, restores inbox-specific filters, updates related tests, and adds the inbox:read JWT scope.

Changes

Inbox API

Layer / File(s) Summary
Inbox message contracts
smsgateway/requests_mobile.go, smsgateway/dto_inbox.go, smsgateway/client.go
Adds mobile inbox request and attachment types. Adds encryption and MMS attachment fields to IncomingMessage. Updates inbox terminology in documentation.
Inbox listing options
smsgateway/requests_3rdparty.go, smsgateway/requests_inbox.go, smsgateway/*_test.go
Adds reusable DatePeriodOptions and PaginationOptions. Moves ListInboxOptions to requests_inbox.go. Updates ListMessagesOptions, query serialization, and tests to use embedded option groups.
Inbox read authorization
smsgateway/domain_auth.go
Adds the exported ScopeInboxRead JWT scope with value "inbox:read".

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding inbox DTOs and related client request types.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@capcom6
capcom6 marked this pull request as ready for review July 27, 2026 01:58
@capcom6 capcom6 added the ready label Jul 27, 2026
@capcom6
capcom6 force-pushed the client/add-inbox-dtos branch 3 times, most recently from 217caab to b993582 Compare August 4, 2026 00:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
smsgateway/dto_inbox.go (1)

35-36: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover the new response fields in a client test.

TestClient_ListInboxMessages only checks the message count. Include isEncrypted and one attachment in the mock JSON, then assert InboxMessage.IsEncrypted and all InboxAttachment fields.

🤖 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 `@smsgateway/dto_inbox.go` around lines 35 - 36, Update
TestClient_ListInboxMessages to include isEncrypted and one attachment in the
mock inbox response, then assert InboxMessage.IsEncrypted and every field on the
decoded InboxAttachment, while retaining the existing message-count assertion.
🤖 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.

Inline comments:
In `@smsgateway/dto_inbox.go`:
- Around line 7-15: The v1 API removes the exported IncomingMessageType*,
IncomingMessage, and IncomingAttachment symbols without compatibility aliases.
Preserve existing imports by adding deprecated aliases for each removed symbol
alongside InboxMessageType and the related message/attachment types, unless this
release is explicitly intended to be breaking v1.

---

Nitpick comments:
In `@smsgateway/dto_inbox.go`:
- Around line 35-36: Update TestClient_ListInboxMessages to include isEncrypted
and one attachment in the mock inbox response, then assert
InboxMessage.IsEncrypted and every field on the decoded InboxAttachment, while
retaining the existing message-count assertion.
🪄 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 Plus

Run ID: 5c8b42bd-3a2d-4904-986d-14f334f01fe0

📥 Commits

Reviewing files that changed from the base of the PR and between 831d54a and 19bd9f2.

📒 Files selected for processing (7)
  • smsgateway/client.go
  • smsgateway/client_test.go
  • smsgateway/dto_inbox.go
  • smsgateway/requests_3rdparty.go
  • smsgateway/requests_3rdparty_test.go
  • smsgateway/requests_inbox.go
  • smsgateway/requests_mobile.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • smsgateway/requests_mobile.go

Comment thread smsgateway/dto_inbox.go Outdated
@capcom6
capcom6 force-pushed the client/add-inbox-dtos branch from b993582 to b7355e5 Compare August 4, 2026 07:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
smsgateway/dto_inbox.go (1)

28-38: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover the new JSON fields in the client test.

The existing test at smsgateway/client_test.go (Lines 1052-1173) does not send isEncrypted or attachments. Add a fixture with both fields and assert IncomingMessage.IsEncrypted and IncomingMessage.Attachments after ListInboxMessages. This protects the new JSON tags and field types.

🤖 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 `@smsgateway/dto_inbox.go` around lines 28 - 38, Update the client test
covering ListInboxMessages in smsgateway/client_test.go to include isEncrypted
and attachments in the fixture response, then assert the decoded
IncomingMessage.IsEncrypted and IncomingMessage.Attachments values. Preserve the
existing inbox message assertions while covering both new JSON fields and their
types.
🤖 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.

Nitpick comments:
In `@smsgateway/dto_inbox.go`:
- Around line 28-38: Update the client test covering ListInboxMessages in
smsgateway/client_test.go to include isEncrypted and attachments in the fixture
response, then assert the decoded IncomingMessage.IsEncrypted and
IncomingMessage.Attachments values. Preserve the existing inbox message
assertions while covering both new JSON fields and their types.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 24ce504d-0e01-4170-a002-10d3ce9c872e

📥 Commits

Reviewing files that changed from the base of the PR and between 19bd9f2 and b7355e5.

📒 Files selected for processing (4)
  • smsgateway/client.go
  • smsgateway/domain_auth.go
  • smsgateway/dto_inbox.go
  • smsgateway/requests_mobile.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • smsgateway/domain_auth.go
  • smsgateway/requests_mobile.go

@capcom6
capcom6 force-pushed the client/add-inbox-dtos branch 2 times, most recently from 79bbc01 to 3ac93d1 Compare August 8, 2026 10:51
@capcom6
capcom6 force-pushed the client/add-inbox-dtos branch from 3ac93d1 to ca8711d Compare August 18, 2026 00:40
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