1
0
mirror of synced 2025-02-16 12:13:17 +03:00

added fields WebhookData.Attachments and ChannelSettings.Suggestions

This commit is contained in:
Alexander Kulinich 2020-08-06 19:01:12 +03:00
parent 485233cd2f
commit 73e617a073

View File

@ -94,6 +94,7 @@ type ChannelSettings struct {
Image ChannelSettingsFilesBase `json:"image"`
CustomerExternalID string `json:"customer_external_id,omitempty"`
SendingPolicy SendingPolicy `json:"sending_policy,omitempty"`
Suggestions ChannelSettingsSuggestions `json:"suggestions,omitempty"`
}
// Product type
@ -141,6 +142,12 @@ type SendingPolicy struct {
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
type FullFileResponse struct {
ID string `json:"id,omitempty"`
@ -331,6 +338,24 @@ type WebhookData struct {
Order *MessageDataOrder `json:"order,omitempty"`
Items *[]FileItem `json:"items,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"` // for text type required, for email and phone types always empty
}
type TemplateInfo struct {