From a670e8561f8c77b175cb6d2d30c0585395835deb Mon Sep 17 00:00:00 2001 From: Tyschitskaya Maria Date: Tue, 14 Jun 2022 16:35:00 +0300 Subject: [PATCH 1/2] add voice audio message struct --- v1/types.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/v1/types.go b/v1/types.go index f0e57eb..44bed9f 100644 --- a/v1/types.go +++ b/v1/types.go @@ -106,6 +106,7 @@ type ChannelSettings struct { CustomerExternalID string `json:"customer_external_id,omitempty"` SendingPolicy SendingPolicy `json:"sending_policy,omitempty"` Suggestions ChannelSettingsSuggestions `json:"suggestions,omitempty"` + Audio ChannelSettingsAudioBase `json:"audio"` } // Product type. @@ -148,6 +149,16 @@ type ChannelSettingsFilesBase struct { CommentMaxCharsCount int `json:"comment_max_chars_count,omitempty"` } +// ChannelSettingsAudioBase struct. +type ChannelSettingsAudioBase struct { + Creating string `json:"creating,omitempty"` + Quoting string `json:"quoting,omitempty"` + Deleting string `json:"deleting,omitempty"` + Max uint64 `json:"max_items_count,omitempty"` + CommentAttribute string `json:"comment_attribute,omitempty"` + CommentMaxCharsCount int `json:"comment_max_chars_count,omitempty"` +} + type SendingPolicy struct { NewCustomer string `json:"new_customer,omitempty"` AfterReplyTimeout string `json:"after_reply_timeout,omitempty"` From 3baf86c345daae3f224b4754246d1426e101034c Mon Sep 17 00:00:00 2001 From: Tyschitskaya Maria Date: Tue, 14 Jun 2022 16:53:10 +0300 Subject: [PATCH 2/2] edit voice audio message struct --- v1/types.go | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/v1/types.go b/v1/types.go index 44bed9f..0a3a82b 100644 --- a/v1/types.go +++ b/v1/types.go @@ -106,7 +106,7 @@ type ChannelSettings struct { CustomerExternalID string `json:"customer_external_id,omitempty"` SendingPolicy SendingPolicy `json:"sending_policy,omitempty"` Suggestions ChannelSettingsSuggestions `json:"suggestions,omitempty"` - Audio ChannelSettingsAudioBase `json:"audio"` + Audio ChannelSettingsAudio `json:"audio"` } // Product type. @@ -140,23 +140,20 @@ type ChannelSettingsText struct { // ChannelSettingsFilesBase struct. type ChannelSettingsFilesBase struct { - Creating string `json:"creating,omitempty"` - Editing string `json:"editing,omitempty"` - Quoting string `json:"quoting,omitempty"` - Deleting string `json:"deleting,omitempty"` - Max uint64 `json:"max_items_count,omitempty"` - CommentAttribute string `json:"comment_attribute,omitempty"` - CommentMaxCharsCount int `json:"comment_max_chars_count,omitempty"` + Creating string `json:"creating,omitempty"` + Editing string `json:"editing,omitempty"` + Quoting string `json:"quoting,omitempty"` + Deleting string `json:"deleting,omitempty"` + Max uint64 `json:"max_items_count,omitempty"` + NoteMaxCharsCount *uint16 `json:"note_max_chars_count,omitempty"` } -// ChannelSettingsAudioBase struct. -type ChannelSettingsAudioBase struct { - Creating string `json:"creating,omitempty"` - Quoting string `json:"quoting,omitempty"` - Deleting string `json:"deleting,omitempty"` - Max uint64 `json:"max_items_count,omitempty"` - CommentAttribute string `json:"comment_attribute,omitempty"` - CommentMaxCharsCount int `json:"comment_max_chars_count,omitempty"` +// ChannelSettingsAudio struct. +type ChannelSettingsAudio struct { + Creating string `json:"creating,omitempty"` + Quoting string `json:"quoting,omitempty"` + Deleting string `json:"deleting,omitempty"` + MaxItemsCount uint64 `json:"max_items_count,omitempty"` } type SendingPolicy struct {