Skip to content

Commit

Permalink
Added WhatsApp-specific channel properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Neur0toxine authored Apr 3, 2024
2 parents ae95cb4 + f972052 commit 29ea492
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ type ChannelSettings struct {
Suggestions ChannelSettingsSuggestions `json:"suggestions,omitempty"`
Audio ChannelSettingsAudio `json:"audio"`
Template ChannelSettingsTemplate `json:"template"`
WhatsApp *WhatsAppChannelProperties `json:"whatsapp,omitempty"` // for WhatsApp channels only.
}

// Product type.
Expand Down Expand Up @@ -177,6 +178,31 @@ type ChannelSettingsTemplate struct {
Creation bool `json:"creation,omitempty"`
}

// WhatsAppChannelProperties WhatsApp-specific channel characteristics
type WhatsAppChannelProperties struct {
Tier *int `json:"tier"`
ChannelQuality *WhatsAppChannelQuality `json:"channel_quality"`
ChannelStatus *WhatsAppChannelStatus `json:"channel_status"`
}

type WhatsAppChannelQuality string

var (
WhatsAppChannelQualityHigh WhatsAppChannelQuality = "high"
WhatsAppChannelQualityMedium WhatsAppChannelQuality = "medium"
WhatsAppChannelQualityLow WhatsAppChannelQuality = "low"
)

type WhatsAppChannelStatus string

var (
WhatsAppChannelStatusConnected WhatsAppChannelStatus = "connected"
WhatsAppChannelStatusFlagged WhatsAppChannelStatus = "flagged"
WhatsAppChannelStatusOffline WhatsAppChannelStatus = "offline"
WhatsAppChannelStatusPending WhatsAppChannelStatus = "pending"
WhatsAppChannelStatusRestricted WhatsAppChannelStatus = "restricted"
)

// FullFileResponse uploaded file data.
type FullFileResponse struct {
ID string `json:"id,omitempty"`
Expand Down

0 comments on commit 29ea492

Please sign in to comment.