Skip to content

Conversation

@titouv
Copy link

@titouv titouv commented Jan 21, 2026

Summary

  • Exclude attachments and scheduledAt from CreateBatchEmailOptions type to reflect batch API limitations
  • Add new CreateBatchEmailOptions type using Omit<CreateEmailOptions, 'attachments' | 'scheduledAt'>

These fields are not supported by the batch API as documented at https://resend.com/docs/dashboard/emails/batch-sending#limitations

Objective

This tries to solve a problem I encountered where the types allowed an attachments array value, but no attachments could be sent via the Batch API and the "issue" was just ignored misleading the developper.

This provides compile-time errors when users attempt to use unsupported features with batch sending.


Summary by cubic

Align batch email types with API limitations by excluding attachments and scheduledAt. Adds CreateBatchEmailOptions and updates CreateBatchOptions to use it, so unsupported fields cause compile-time errors.

Written for commit 5e3f2e5. Summary will update on new commits.

@titouv titouv requested a review from a team as a code owner January 21, 2026 22:58
@titouv titouv requested a review from CarolinaMoraes January 21, 2026 22:58
Copy link
Contributor

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

Choose a reason for hiding this comment

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

No issues found across 1 file

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 26, 2026

Open in StackBlitz

npm i https://pkg.pr.new/resend/resend-node/resend@801

commit: 5e3f2e5

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