-
Notifications
You must be signed in to change notification settings - Fork 20
/
template.go
48 lines (43 loc) · 1.73 KB
/
template.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package clerk
// Clerk supports different types of templates.
type TemplateType string
// List of supported values for template types.
const (
TemplateTypeEmail TemplateType = "email"
TemplateTypeSMS TemplateType = "sms"
)
type Template struct {
APIResource
Object string `json:"object"`
Slug string `json:"slug"`
ResourceType string `json:"resource_type"`
TemplateType TemplateType `json:"template_type"`
Name string `json:"name"`
Position int `json:"position"`
CanRevert bool `json:"can_revert"`
CanDelete bool `json:"can_delete"`
CanToggle bool `json:"can_toggle"`
FromEmailName *string `json:"from_email_name,omitempty"`
ReplyToEmailName *string `json:"reply_to_email_name,omitempty"`
DeliveredByClerk bool `json:"delivered_by_clerk"`
Enabled bool `json:"enabled"`
Subject string `json:"subject"`
Markup string `json:"markup"`
Body string `json:"body"`
AvailableVariables []string `json:"available_variables"`
RequiredVariables []string `json:"required_variables"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type TemplateList struct {
APIResource
Templates []*Template `json:"data"`
TotalCount int64 `json:"total_count"`
}
type TemplatePreview struct {
APIResource
Subject string `json:"subject,omitempty"`
Body string `json:"body"`
FromEmailAddress *string `json:"from_email_address,omitempty"`
ReplyToEmailAddress *string `json:"reply_to_email_address,omitempty"`
}