Skip to content

fix: inbound attachment types#211

Merged
gabrielmfern merged 3 commits into
mainfrom
fix/response-types-discrepancies
Jun 2, 2026
Merged

fix: inbound attachment types#211
gabrielmfern merged 3 commits into
mainfrom
fix/response-types-discrepancies

Conversation

@gabrielmfern
Copy link
Copy Markdown
Member

@gabrielmfern gabrielmfern commented Jun 2, 2026

Signed-off-by: gabriel miranda gabrielmfern@outlook.com


Summary by cubic

Align inbound and signed-URL attachment types with the API to remove response type mismatches. Includes nullable inbound fields per DEV-934 and adds a clear model for signed URL responses.

  • Bug Fixes
    • Added AttachmentWithSignedUrl for list/retrieve attachment endpoints, including download_url, expires_at, required size, and content_disposition as "inline" or "attachment".
    • Updated EmailAttachment for inbound emails to allow filename, content_id, and content_disposition to be null; size is optional/nullable.
    • Switched list responses in resend.emails._attachments and resend.emails._receiving to return List[AttachmentWithSignedUrl].
    • Exported AttachmentWithSignedUrl in resend/__init__.py.
    • Extended tests to cover download_url/expires_at and nullable inbound attachment fields.

Written for commit 6a6494c. Summary will update on new commits.

Review in cubic

Signed-off-by: gabriel miranda <gabrielmfern@outlook.com>
Signed-off-by: gabriel miranda <gabrielmfern@outlook.com>
Signed-off-by: gabriel miranda <gabrielmfern@outlook.com>
Comment thread tests/attachments_test.py Dismissed
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 9 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: This PR restructures attachment type definitions (renaming models, changing field types to Literal and NotRequired, and moving fields), which is a refactor that could break existing SDK consumers relying on the previous type shapes.

Re-trigger cubic

@drish drish self-requested a review June 2, 2026 14:57
@gabrielmfern gabrielmfern marked this pull request as ready for review June 2, 2026 15:23
@gabrielmfern gabrielmfern merged commit cb3726c into main Jun 2, 2026
22 checks passed
@gabrielmfern gabrielmfern deleted the fix/response-types-discrepancies branch June 2, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants