Repository navigation
fix(inboxes): match the search and update draft types to the API - #1165
Conversation
commit: |
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Type-only fix correcting Inboxes search and update-draft response types to match the API. This is a breaking change to public SDK types, and the upstream API behavior is an external claim; human sign-off needed for release/versioning.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Type-only fix aligning Inboxes search/update-draft response types to the API and bumping to 6.34.1, with tests updated. It removes/narrows public SDK response types and relies on external API-behavior claims, so human sign-off is needed.
View guided diff | Re-trigger cubic
Two Inboxes types in 6.34.0 describe responses the API no longer sends. This PR matches them to the API.
InboxThreadSearchResultno longer hashighlights, and theInboxThreadSearchHighlightKeytype is removed. The API removedhighlightsin resend/resend-monorepo#12612, and live search returns onlymatched_email_id.UpdateInboxDraftResponseSuccessis now{ object: 'inbox_draft', id }, like the other update responses. The API returns only the object and the ID since resend/resend-monorepo#12729. The SDK typed the full draft, so fields likesubjectread asundefined.Both match the OpenAPI spec in resend/resend-openapi#137.
The type changes break code that reads
highlightsor the draft fields from the update response. That code already gotundefinedat runtime.Checks:
pnpm lint,pnpm typecheck,pnpm test(762 passed) andpnpm buildpass.matched_email_idand nohighlights. A new draft's update returns{"object":"inbox_draft","id":"..."}. The draft was deleted after the check.Version: 6.34.1, a patch. 6.34.0 shipped a few hours earlier, so no released code depends on the removed type.