Skip to content

fix(inboxes): match the search and update draft types to the API - #1165

Merged
felipefreitag merged 2 commits into
canaryfrom
fix/inboxes-search-and-update-draft-types
Oct 16, 2026
Merged

felipefreitag merged 2 commits into
canaryfrom
fix/inboxes-search-and-update-draft-types

Conversation

@felipefreitag

@felipefreitag felipefreitag commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Two Inboxes types in 6.34.0 describe responses the API no longer sends. This PR matches them to the API.

  • Search threads: InboxThreadSearchResult no longer has highlights, and the InboxThreadSearchHighlightKey type is removed. The API removed highlights in resend/resend-monorepo#12612, and live search returns only matched_email_id.
  • Update draft: UpdateInboxDraftResponseSuccess is 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 like subject read as undefined.

Both match the OpenAPI spec in resend/resend-openapi#137.

The type changes break code that reads highlights or the draft fields from the update response. That code already got undefined at runtime.

Checks:

  • pnpm lint, pnpm typecheck, pnpm test (762 passed) and pnpm build pass.
  • Live, with the built SDK on the test inbox: search returns matched_email_id and no highlights. 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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/resend@1165

commit: 4aae807

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@felipefreitag
felipefreitag merged commit 7943103 into canary Oct 16, 2026
12 of 13 checks passed
@felipefreitag
felipefreitag deleted the fix/inboxes-search-and-update-draft-types branch October 16, 2026 17:25
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