refactor(types): align attachment types with monorepo public-api#855
Merged
gabrielmfern merged 1 commit intocanaryfrom Feb 27, 2026
Merged
refactor(types): align attachment types with monorepo public-api#855gabrielmfern merged 1 commit intocanaryfrom
gabrielmfern merged 1 commit intocanaryfrom
Conversation
gabrielmfern
approved these changes
Feb 27, 2026
- Rename Attachment → AttachmentData and add JSDoc with correct endpoint paths
- Remove redundant ListAttachmentsApiResponse (duplicate of ListAttachmentsResponseSuccess)
- Extract InboundAttachment interface for raw DB metadata in GET /inbounds/{id}
- Fix GetReceivingEmailResponseSuccess: headers is nullable, raw is optional
b43d63f to
d695be8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR mostly refactors the types for the Node SDK so they align more closely with the API and so that there's less repetition:
My request for reviewers: can you double check if I missed anything comparing this to the API? I compared myself and it looks correct, but given we're iterating on this it would be worth a second pass.
Important note: the types are indeed not equal. That's because inbound attachments that appear on the list don't get a download URL (that's intended) and we cannot make both the inbound and outbound type 100% equal due to breaking changes that would be needed.
Summary by cubic
Refactors attachment types to match the public API and clearly separate signed-URL attachments from inbound metadata. This reduces duplication and fixes mismatches in the receiving email response.
Written for commit d695be8. Summary will update on new commits.