WebhookData.Attachments
This commit is contained in:
commit
9630c4274c
43
v1/types.go
43
v1/types.go
@ -85,15 +85,16 @@ type Channel struct {
|
|||||||
|
|
||||||
// ChannelSettings struct
|
// ChannelSettings struct
|
||||||
type ChannelSettings struct {
|
type ChannelSettings struct {
|
||||||
SpamAllowed bool `json:"spam_allowed"`
|
SpamAllowed bool `json:"spam_allowed"`
|
||||||
Status Status `json:"status"`
|
Status Status `json:"status"`
|
||||||
Text ChannelSettingsText `json:"text"`
|
Text ChannelSettingsText `json:"text"`
|
||||||
Product Product `json:"product"`
|
Product Product `json:"product"`
|
||||||
Order Order `json:"order"`
|
Order Order `json:"order"`
|
||||||
File ChannelSettingsFilesBase `json:"file"`
|
File ChannelSettingsFilesBase `json:"file"`
|
||||||
Image ChannelSettingsFilesBase `json:"image"`
|
Image ChannelSettingsFilesBase `json:"image"`
|
||||||
CustomerExternalID string `json:"customer_external_id,omitempty"`
|
CustomerExternalID string `json:"customer_external_id,omitempty"`
|
||||||
SendingPolicy SendingPolicy `json:"sending_policy,omitempty"`
|
SendingPolicy SendingPolicy `json:"sending_policy,omitempty"`
|
||||||
|
Suggestions ChannelSettingsSuggestions `json:"suggestions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Product type
|
// Product type
|
||||||
@ -141,6 +142,12 @@ type SendingPolicy struct {
|
|||||||
AfterReplyTimeout string `json:"after_reply_timeout,omitempty"`
|
AfterReplyTimeout string `json:"after_reply_timeout,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ChannelSettingsSuggestions struct {
|
||||||
|
Text string `json:"text,omitempty"`
|
||||||
|
Phone string `json:"phone,omitempty"`
|
||||||
|
Email string `json:"email,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// FullFileResponse uploaded file data
|
// FullFileResponse uploaded file data
|
||||||
type FullFileResponse struct {
|
type FullFileResponse struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
@ -331,6 +338,24 @@ type WebhookData struct {
|
|||||||
Order *MessageDataOrder `json:"order,omitempty"`
|
Order *MessageDataOrder `json:"order,omitempty"`
|
||||||
Items *[]FileItem `json:"items,omitempty"`
|
Items *[]FileItem `json:"items,omitempty"`
|
||||||
Template *TemplateInfo `json:"template,omitempty"`
|
Template *TemplateInfo `json:"template,omitempty"`
|
||||||
|
Attachments *Attachments `json:"attachments,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Attachments struct {
|
||||||
|
Suggestions []Suggestion `json:"suggestions,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SuggestionTypeText SuggestionType = "text"
|
||||||
|
SuggestionTypeEmail SuggestionType = "email"
|
||||||
|
SuggestionTypePhone SuggestionType = "phone"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SuggestionType string
|
||||||
|
|
||||||
|
type Suggestion struct {
|
||||||
|
Type SuggestionType `json:"type"`
|
||||||
|
Title string `json:"title,omitempty"` // required for type=text and ignored for others
|
||||||
}
|
}
|
||||||
|
|
||||||
type TemplateInfo struct {
|
type TemplateInfo struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user