-
Notifications
You must be signed in to change notification settings - Fork 59
refactor: reorganize attachments methods to match final API design #717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: reorganize attachments methods to match final API design #717
Conversation
commit: |
| } | ||
|
|
||
| export type GetAttachmentResponseSuccess = { | ||
| object: 'attachment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This need to be changed
| object: 'attachment'; | |
| object: 'email'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Isn't it an attachment? Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entity is email, not attachment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The api does return attachment in this field. So'll just merge as it is, if you mean that we should also change the API let me know and we can talk about this.
There was a problem hiding this 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 17 files
Linked issue analysis
Linked issue: PRODUCT-791: Rename sdk methods to follow final version
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Moved resend.attachments.sending → resend.emails.attachments | Renamed Sending → Attachments and wired under Emails |
| ✅ | Moved resend.attachments.receiving → resend.emails.receiving.attachments | Created Attachments under receiving and wired into Receiving |
| ✅ | Removed top-level resend.attachments module | Top-level attachments file removed and resend no longer exposes it |
| ✅ | Updated API paths from /emails/sending/ to /emails/ | HTTP paths updated to /emails/${emailId}/attachments in calls |
| ✅ | Replace calls: resend.attachments.sending.* → resend.emails.attachments.* | All sending attachment calls updated to resend.emails.attachments |
| ✅ | Replace calls: resend.attachments.receiving.* → resend.emails.receiving.attachments.* | All receiving attachment calls updated to resend.emails.receiving.attachments |
| ✅ | Stop importing attachments interfaces from the top-level index | Top-level export removed and imports updated to new paths |
| ✅ | Move/rename attachments interfaces under emails/attachments and update imports | Interfaces added/moved under emails/receiving/attachments and adjusted imports |
| ❌ | Depends on resend-api PR #2291 (use /emails/ endpoints) | External API PR referenced but not implemented here |
- Moved resend.attachments.sending → resend.emails.attachments - Moved resend.attachments.receiving → resend.emails.receiving.attachments - Removed top-level resend.attachments module - Updated API paths from /emails/sending/ to /emails/
b60b625 to
c957e51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. Please confirm with Bu the entity name as we discussed on Slack.
Depends on https://github.com/resend/resend-api/pull/2291
Summary by cubic
Reorganized attachments under Emails to match the final API design and align with PRODUCT-791. Endpoints now use /emails/, and the top-level attachments module is removed.
Refactors
Migration