Skip to content

fix(emails): make filename and content_disposition nullable in EmailAttachment types#205

Merged
drish merged 1 commit into
mainfrom
feature/dev-609-received-email-attachment-types-in-python
May 12, 2026
Merged

fix(emails): make filename and content_disposition nullable in EmailAttachment types#205
drish merged 1 commit into
mainfrom
feature/dev-609-received-email-attachment-types-in-python

Conversation

@dielduarte
Copy link
Copy Markdown
Contributor

@dielduarte dielduarte commented May 12, 2026

open api spec updated here: resend/resend-openapi#64

Summary by cubic

Make filename and content_disposition nullable in received email attachment types to match API responses and avoid type errors. Applies to EmailAttachment and EmailAttachmentDetails in resend/emails/_received_email.py and addresses DEV-609.

  • Bug Fixes
    • Changed filename and content_disposition from str to Optional[str] in EmailAttachment and EmailAttachmentDetails.
    • Aligns Python types with cases where these fields are null in real emails.

Written for commit e4e9b27. Summary will update on new commits.

…ttachment types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gabrielmfern
Copy link
Copy Markdown
Member

good to ask @drish for a review here too

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.

cubic analysis

No issues found across 1 file

Confidence score: 5/5

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

Linked issue analysis

Linked issue: DEV-609: received email attachment types in python

Status Acceptance criteria Notes
Make filename nullable (Optional[str]) in EmailAttachment and EmailAttachmentDetails Diff changes the filename field type to Optional[str] in both EmailAttachment and EmailAttachmentDetails TypedDicts.
Make content_disposition nullable (Optional[str]) in EmailAttachment and EmailAttachmentDetails Diff changes the content_disposition field type to Optional[str] in both EmailAttachment and EmailAttachmentDetails TypedDicts.

Auto-approved: This change only updates two type annotations from str to Optional[str] in EmailAttachment and EmailAttachmentDetails TypedDicts, aligning with the API spec where filename and content_disposition can be null, with no impact on runtime logic or broader system behavior.

@drish drish merged commit 7fef8c8 into main May 12, 2026
20 checks passed
@drish drish deleted the feature/dev-609-received-email-attachment-types-in-python branch May 12, 2026 22:10
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