Skip to content

Conversation

@lucasfcosta
Copy link
Contributor

@lucasfcosta lucasfcosta commented Oct 8, 2025

This builds on top of #666 to make the attachment methods require nesting for receiving and sending. In other words, now you must call resend.attachments.receiving.<method> instead of just resend.attachments passing an inboundId.

Note that I also updated the argument so we pass an emailId given receiving is already part of the path to use the desired method.

Finally, worth mentioning that I did change the response to be snake_cased like all the other methods on the SDK. I previously was converting to camel cased because we discussed that on Slack but it was actually inconsistent with other methods.

This is as per the RFC.


Summary by cubic

Moved inbound attachment APIs under attachments.receiving and renamed inboundId to emailId to align with the receiving scope. This is a breaking change.

  • Migration

    • Update calls: attachments.get/list → attachments.receiving.get/list
    • Rename option: inboundId → emailId
    • Update imports to use attachments/receiving/interfaces
  • Refactors

    • Added Receiving class; Attachments now exposes receiving with get and list
    • Moved receiving interfaces and updated index export path
    • Removed duplicate logic and updated tests accordingly

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/resend-node/resend@667

commit: 3450b80

@lucasfcosta lucasfcosta force-pushed the feat/move-emails-inbound-method branch from 1aa7565 to f218d56 Compare October 9, 2025 12:51
@lucasfcosta lucasfcosta force-pushed the feat/move-attachments-inbound-method branch from a089288 to 0da8392 Compare October 9, 2025 13:12
@lucasfcosta lucasfcosta force-pushed the feat/move-attachments-inbound-method branch from 0da8392 to 3450b80 Compare October 9, 2025 13:14
@lucasfcosta lucasfcosta marked this pull request as ready for review October 9, 2025 13:26
@lucasfcosta lucasfcosta requested a review from a team as a code owner October 9, 2025 13:26
@lucasfcosta lucasfcosta requested review from vieiralucas and removed request for a team October 9, 2025 13:26
Copy link
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

Base automatically changed from feat/move-emails-inbound-method to canary October 9, 2025 19:55
@lucasfcosta lucasfcosta merged commit f4fe9f2 into canary Oct 9, 2025
11 of 12 checks passed
@lucasfcosta lucasfcosta deleted the feat/move-attachments-inbound-method branch October 9, 2025 19:57
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