Skip to content

fix(backend): require html or text in emails.create at the type level#9011

Merged
cbnsndwch merged 1 commit into
serge/clerk-email-sdkfrom
serge/clerk-email-cr-fixes
Jun 26, 2026
Merged

fix(backend): require html or text in emails.create at the type level#9011
cbnsndwch merged 1 commit into
serge/clerk-email-sdkfrom
serge/clerk-email-cr-fixes

Conversation

@cbnsndwch

Copy link
Copy Markdown

Summary

Stacked on #9010. Addresses CodeRabbit review feedback on that PR.

  • Enforce the "at least one of html / text" content requirement at the type level. CreateEmailParams now intersects a union, so omitting both bodies is a compile-time error instead of a server-side one. (CodeRabbit: Major)
  • Add a text-only test for emails.create to match the existing html request/response coverage. (CodeRabbit: Minor)

No changelog impact: the user-facing entry for emails.create already ships in #9010, so this carries an empty changeset.

@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3a84533

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jun 26, 2026 1:32am
swingset Ready Ready Preview, Comment Jun 26, 2026 1:32am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ea63bbf4-30cb-47f2-93ff-3088b1493402

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@cbnsndwch cbnsndwch merged commit 01ba8cb into serge/clerk-email-sdk Jun 26, 2026
8 checks passed
@cbnsndwch cbnsndwch deleted the serge/clerk-email-cr-fixes branch June 26, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant