Skip to content

feat(resend): implement resend provider #578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zephraph
Copy link
Collaborator

@zephraph zephraph commented Jul 6, 2025

Implements issue #577 by creating a complete Resend provider with:

  • ✨ ResendDomain resource for email domain management
  • ✨ ResendAudience resource for contact list management
  • ✨ ResendBroadcast resource for email campaign management
  • 📄 Complete documentation and guides
  • 🧪 Comprehensive test suites
  • 📦 Example project demonstrating usage
  • 🌍 Multi-region support for compliance

Generated with Claude Code

…e, and broadcast resources

- Add ResendDomain resource for email domain management with DNS verification
- Add ResendAudience resource for contact list management  
- Add ResendBroadcast resource for email campaign management with scheduling
- Include comprehensive test suites for all resources
- Add complete documentation with examples and guides
- Add resend example project demonstrating full email infrastructure setup
- Support multi-region deployment (US, EU, SA) for compliance requirements
- Follow repository conventions for resource lifecycle, error handling, and testing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Justin Bennett <[email protected]>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm skeptical about this doc, maybe just best to delete it?


Clean up your email infrastructure when you're done:

::: code-group
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to update the CLAUDE.md not to do this

name: "Weekly Newsletter",
subject: "This Week's Updates",
from: "[email protected]",
html: "<h1>Weekly Newsletter</h1><p>Content here...</p>",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we use the sdk under the hood we can pass react here. IF we do that, we'd probably want it to be under @alchemy.run/resend.

Copy link

github-actions bot commented Jul 6, 2025

🚀 Website Preview Deployed

Your website preview is ready!

Preview URL: https://4be52fdd-alchemy-website.alchemy-run.workers.dev

This preview was built from commit 0fb7912


🤖 This comment will be updated automatically when you push new commits to this PR.

Comment on lines 57 to 61
/**
* When to send the broadcast (ISO 8601 format)
* If not provided, broadcast will be created as draft
*/
scheduled_at?: string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@claude, scheduled_at shouldn't be included on the broadcast resource. This is just creating, updating, or deleting the broadcast but explicitly not sending it.

Copy link
Contributor

@claude claude bot Jul 6, 2025

Choose a reason for hiding this comment

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

Claude finished @zephraph's task —— View job


Removing scheduled_at from broadcast resource ✅

I understand the issue - the broadcast resource should handle CRUD operations but not sending/scheduling. I've successfully removed the scheduled_at field from the broadcast resource.

Tasks:

  • Read current broadcast.ts implementation
  • Check and update related documentation
  • Remove scheduled_at from interface and implementation
  • Update tests (remove scheduled broadcast test)
  • Run linting/formatting
  • Commit changes

Changes made:

  1. broadcast.ts: Removed scheduled_at from ResendBroadcastProps interface and all API calls
  2. broadcast.md: Removed all scheduling documentation, examples, and references
  3. broadcast.test.ts: Removed dedicated scheduled broadcast test case
  4. Linting: Fixed formatting issues

The broadcast resource now focuses solely on CRUD operations without scheduling functionality. The scheduled_at field remains in the API response interface as read-only data from the Resend API.

Commit: e8b05212d7c0a4773de66f87fc2a4c79c7231c04

Remove scheduling functionality from ResendBroadcast resource to focus on CRUD operations only:
- Remove scheduled_at from ResendBroadcastProps interface
- Remove scheduled_at from all API calls (create/update)
- Remove scheduling documentation and examples
- Remove scheduled broadcast test case
- Keep scheduled_at in API response interface as read-only

Co-authored-by: Justin Bennett <[email protected]>
@zephraph zephraph marked this pull request as draft July 6, 2025 03:29
Comment on lines +56 to +59
import { ResendDomain, ResendAudience, ResendBroadcast } from "alchemy/resend";

// Step 1: Set up your email domain
const emailDomain = await ResendDomain("company-domain", {
Copy link
Owner

Choose a reason for hiding this comment

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

We have not been adding prefixes to resource names.

Preferred convention is:

import resend from "alchemy/resend";

resend.Domain

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@claude, make it so

Copy link
Contributor

@claude claude bot Jul 7, 2025

Choose a reason for hiding this comment

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

Claude encountered an error —— View job

Failed with exit code 1

I'll analyze this and get back to you.

Copy link
Owner

Choose a reason for hiding this comment

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

Damn, failed. I find it does this after a version bump. Try merging from main

@sam-goodwin
Copy link
Owner

What's the status of this? Seems like a great resource

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.

2 participants