feat: add publish method#574
Merged
CarolinaMoraes merged 11 commits intopreview-templatesfrom Aug 22, 2025
Merged
Conversation
joaopcm
reviewed
Aug 20, 2025
Member
joaopcm
left a comment
There was a problem hiding this comment.
In order to make the experience of using our SDK smoother, what do you think of implementing additional methods for create, update, and duplicate? I was thinking of something like this:
Create
await resend.templates.create(/** ... */).publish()Update
await resend.templates.update(/** ... */).publish()Duplicate
await resend.templates.duplicate(/** ... */).publish()Instead of having to call the SDK twice for these operations, like:
await resend.templates.create(/** ... */);
await resend.templates.publish(/** ... */);What do you think?
Contributor
Author
|
@joaopcm I loove this idea! I will start working on it |
…ub.com/resend/resend-node into feature/product-403-add-publish-method
CarolinaMoraes
commented
Aug 22, 2025
Contributor
Author
There was a problem hiding this comment.
📢: This approach was reviewed on #575
Feel free to add new questions about it, but also be mindful of the ones that were answered there
pedro-stramantinoli
approved these changes
Aug 22, 2025
CarolinaMoraes
added a commit
that referenced
this pull request
Aug 25, 2025
CarolinaMoraes
added a commit
that referenced
this pull request
Sep 29, 2025
CarolinaMoraes
added a commit
that referenced
this pull request
Sep 29, 2025
CarolinaMoraes
added a commit
that referenced
this pull request
Sep 29, 2025
CarolinaMoraes
added a commit
that referenced
this pull request
Sep 29, 2025
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 by cubic
Adds a publish method to Templates to publish a template by ID and return a typed result. Supports Product-403.