Skip to content

feat: add received_for to inbound email and received webhook types#991

Closed
platoresend wants to merge 3 commits into
mainfrom
feat/received-for
Closed

feat: add received_for to inbound email and received webhook types#991
platoresend wants to merge 3 commits into
mainfrom
feat/received-for

Conversation

@platoresend

@platoresend platoresend commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Context

Slack thread

Opened on behalf of: @lucasfcosta

What

Adds the new received_for field (merged in resend-monorepo #4637) to the SDK types.

  • GetReceivingEmailResponseSuccess (src/emails/receiving/interfaces/get-receiving-email.interface.ts) — the emails.receiving.get response now includes received_for: string[].
  • ReceivedEmailEventData (src/webhooks/interfaces/webhook-event.interface.ts) — the email.received webhook payload now includes received_for: string[].

Why

The field is already returned by the GET /emails/receiving/:id route and the email.received webhook; the SDK types were missing it.

How

Typed fixtures in receiving.spec.ts updated to include the now-required field; inline snapshots regenerated. pnpm typecheck and pnpm lint clean (pre-existing tsconfig moduleResolution=node10 deprecation is unrelated).


Summary by cubic

Add received_for to inbound email responses and email.received webhooks so the SDK matches the API. Also expose message_id on get/list email responses.

  • New Features
    • GetReceivingEmailResponseSuccess: adds received_for: string[].
    • ReceivedEmailEventData (email.received webhook): adds received_for: string[].
    • GetEmailResponseSuccess: adds message_id.
    • Updated tests and snapshots to include the new fields.

Written for commit da86148. Summary will update on new commits.

Review in cubic

@platoresend platoresend requested a review from a team as a code owner June 25, 2026 22:19
@platoresend platoresend requested review from CarolinaMoraes and lucasfcosta and removed request for a team and CarolinaMoraes June 25, 2026 22:19
@pkg-pr-new

pkg-pr-new Bot commented Jun 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: da86148

@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 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Adds missing received_for and message_id fields to TypeScript types, aligning the SDK with existing API responses; no logic or infrastructure changes.

Re-trigger cubic

@lucasfcosta

Copy link
Copy Markdown
Contributor

Superseded by #993, which targets canary so the diff is just the received_for change (this one against main also carried the already-merged message_id commits).

@lucasfcosta lucasfcosta deleted the feat/received-for branch June 26, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants