feat: add Batch.SendParams with scheduled_at, tags, and attachments#236
Draft
cpenned wants to merge 2 commits into
Draft
feat: add Batch.SendParams with scheduled_at, tags, and attachments#236cpenned wants to merge 2 commits into
cpenned wants to merge 2 commits into
Conversation
Introduce a dedicated Batch.SendParams type for batch email sends so scheduled_at, tags, and attachments are explicitly documented and typed. Update batch send signatures, tests, and examples to use the new type. Co-authored-by: cpenned <cpenned@users.noreply.github.com>
Co-authored-by: cpenned <cpenned@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Auto-approved: Adds a new TypedDict subclass, updates type annotations, and adds a test. No runtime logic changes, just explicit typing and documentation.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The batch send API now supports
scheduled_at,tags, andattachmentsper email. This PR adds a dedicatedBatch.SendParamstype so those fields are explicitly documented and typed for batch sends.Changes
Batch.SendParamsextendingEmails.SendParamswith batch-specific documentation forscheduled_at,tags, andattachmentsBatch.send/Batch.send_asyncsignatures to acceptList[Batch.SendParams]scheduled_atonEmails.SendParams(was present in the TypedDict but missing from docs)scheduled_atare serialized in the batch request payloadBatch.SendParamsNotes
Runtime behavior is unchanged — the SDK already forwarded these fields when using
Emails.SendParams. This makes the batch API surface explicit and discoverable.Summary by cubic
Adds a dedicated
Batch.SendParamsso per-emailscheduled_at,tags, andattachmentsare clearly supported in batch sends. Updates the batch API to accept the new type; no runtime behavior change. Also resolves lint and mypy errors introduced by these changes.New Features
Batch.SendParams(extendsEmails.SendParams) with explicit docs forscheduled_at,tags, andattachments; documentedscheduled_atonEmails.SendParams.Batch.send/Batch.send_asyncto acceptList[Batch.SendParams]; tests verify serialization; examples updated.Migration
List[resend.Emails.SendParams]withList[resend.Batch.SendParams]when callingBatch.sendorBatch.send_async.Written for commit f97748d. Summary will update on new commits.