Skip to content

feat: allow CNAME type on domain SPF records - #1085

Merged
vieiralucas merged 2 commits into
canaryfrom
feat/spf-cname-record-type
Aug 28, 2026
Merged

feat: allow CNAME type on domain SPF records#1085
vieiralucas merged 2 commits into
canaryfrom
feat/spf-cname-record-type

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Aug 27, 2026

Copy link
Copy Markdown
Member

DomainSpfRecord.type was typed 'MX' | 'TXT', but the API can return an SPF record with type: 'CNAME' for domains on Resend's internal MTA (the return-path is a managed CNAME instead of the classic MX+TXT pair). This widens the type to include 'CNAME' so those records type-check correctly.

Note: this is a type widening on an output union, so consumers doing exhaustive switch/assertNever on an SPF record's type will get a compile nudge to handle the CNAME case — which is the intended outcome, since the API can already return it.


Summary by cubic

Widens DomainSpfRecord.type to include 'CNAME' because the API returns that value for domains on Resend's internal MTA (the return-path is a managed CNAME instead of the classic MX+TXT pair), and bumps the package version to 6.25.0. This is a type widening on an output union, so consumers doing exhaustive switch/assertNever on an SPF record's type will get a compile nudge to handle the CNAME case — which is the intended outcome.

Written for commit 2c2e315. Summary will update on new commits.

Review in cubic

@vieiralucas
vieiralucas requested a review from a team as a code owner August 27, 2026 21:16
@vieiralucas
vieiralucas requested a review from vcapretz August 27, 2026 21:16
@pkg-pr-new

pkg-pr-new Bot commented Aug 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 2c2e315

@klotty klotty left a comment

Copy link
Copy Markdown

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

Confidence score: 5/5

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

Auto-approved: Type widening on DomainSpfRecord to include 'CNAME', reflecting actual API return values; no behavioral, operational, or security tradeoff, just a type correction.

Re-trigger cubic

@gabrielmfern

Copy link
Copy Markdown
Member

we got to make sure this is also right in the docs, open api spec, and all of the other sdks

@gabrielmfern

Copy link
Copy Markdown
Member

you rock!

Amp-Thread-ID: https://ampcode.com/threads/T-01a04537-de81-73ba-b5dd-982f0e54b8b1
Co-authored-by: Gabriel Miranda <gabriel@resend.com>

@klotty klotty left a comment

Copy link
Copy Markdown

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.

Auto-approved: Type-only widening of DomainSpfRecord.type to include 'CNAME' to match actual API output, plus a version bump; no behavioral, operational, security, or data tradeoff.

Re-trigger cubic

@vieiralucas
vieiralucas merged commit a73eb3b into canary Aug 28, 2026
13 checks passed
@vieiralucas
vieiralucas deleted the feat/spf-cname-record-type branch August 28, 2026 17:11
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.

4 participants