Skip to content

Commit

Permalink
feat: Support reply to email name for custom templates
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhong9723 committed Apr 17, 2024
1 parent 993c45a commit 696521a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Template struct {
CanRevert bool `json:"can_revert"`
CanDelete bool `json:"can_delete"`
FromEmailName *string `json:"from_email_name,omitempty"`
ReplyToEmailName *string `json:"reply_to_email_name,omitempty"`
DeliveredByClerk bool `json:"delivered_by_clerk"`
Subject string `json:"subject"`
Markup string `json:"markup"`
Expand Down
12 changes: 7 additions & 5 deletions template/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type UpdateParams struct {
Markup *string `json:"markup,omitempty"`
Body *string `json:"body,omitempty"`
FromEmailName *string `json:"from_email_name,omitempty"`
ReplyToEmailName *string `json:"reply_to_email_name,omitempty"`
DeliveredByClerk *bool `json:"delivered_by_clerk,omitempty"`
TemplateType clerk.TemplateType `json:"-"`
Slug string `json:"-"`
Expand Down Expand Up @@ -123,11 +124,12 @@ func (c *Client) ToggleDelivery(ctx context.Context, params *ToggleDeliveryParam

type PreviewParams struct {
clerk.APIParams
Subject *string `json:"subject,omitempty"`
Body *string `json:"body,omitempty"`
FromEmailName *string `json:"from_email_name,omitempty"`
TemplateType clerk.TemplateType `json:"-"`
Slug string `json:"-"`
Subject *string `json:"subject,omitempty"`
Body *string `json:"body,omitempty"`
FromEmailName *string `json:"from_email_name,omitempty"`
ReplyToEmailName *string `json:"reply_to_email_name,omitempty"`
TemplateType clerk.TemplateType `json:"-"`
Slug string `json:"-"`
}

// Preview returns a preview of a template.
Expand Down

0 comments on commit 696521a

Please sign in to comment.