Documentation
¶
Overview ¶
Package transport_api_client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Package transport_api_client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- func ExtractError(resp Err, err error) error
- func NewAckMessageRequest(server string, body AckMessageJSONRequestBody) (*http.Request, error)
- func NewAckMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewActivateChannelRequest(server string, body ActivateChannelJSONRequestBody) (*http.Request, error)
- func NewActivateChannelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewActivateTemplateRequest(server string, channelIDPath ChannelIDPath, ...) (*http.Request, error)
- func NewActivateTemplateRequestWithBody(server string, channelIDPath ChannelIDPath, contentType string, body io.Reader) (*http.Request, error)
- func NewAddMessageReactionRequest(server string, body AddMessageReactionJSONRequestBody) (*http.Request, error)
- func NewAddMessageReactionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeactivateChannelRequest(server string, channelIDPath ChannelIDPath) (*http.Request, error)
- func NewDeactivateTemplateRequest(server string, channelIDPath ChannelIDPath, templateCode TemplateCodePath) (*http.Request, error)
- func NewDeleteMessageReactionRequest(server string, body DeleteMessageReactionJSONRequestBody) (*http.Request, error)
- func NewDeleteMessageReactionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteMessageRequest(server string, body DeleteMessageJSONRequestBody) (*http.Request, error)
- func NewDeleteMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewEditMessageRequest(server string, body EditMessageJSONRequestBody) (*http.Request, error)
- func NewEditMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetFileUrlRequest(server string, fileUUIDPath FileUUIDPath) (*http.Request, error)
- func NewGetTemplatesRequest(server string) (*http.Request, error)
- func NewListChannelsRequest(server string, params *ListChannelsParams) (*http.Request, error)
- func NewMarkMessageReadRequest(server string, body MarkMessageReadJSONRequestBody) (*http.Request, error)
- func NewMarkMessageReadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewMarkMessagesReadUntilRequest(server string, body MarkMessagesReadUntilJSONRequestBody) (*http.Request, error)
- func NewMarkMessagesReadUntilRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewRestoreMessageRequest(server string, body RestoreMessageJSONRequestBody) (*http.Request, error)
- func NewRestoreMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSendHistoryMessageRequest(server string, body SendHistoryMessageJSONRequestBody) (*http.Request, error)
- func NewSendHistoryMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSendMessageRequest(server string, body SendMessageJSONRequestBody) (*http.Request, error)
- func NewSendMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateChannelRequest(server string, channelIDPath ChannelIDPath, body UpdateChannelJSONRequestBody) (*http.Request, error)
- func NewUpdateChannelRequestWithBody(server string, channelIDPath ChannelIDPath, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateTemplateRequest(server string, channelIDPath ChannelIDPath, templateCode TemplateCodePath, ...) (*http.Request, error)
- func NewUpdateTemplateRequestWithBody(server string, channelIDPath ChannelIDPath, templateCode TemplateCodePath, ...) (*http.Request, error)
- func NewUploadFileByUrlRequest(server string, body UploadFileByUrlJSONRequestBody) (*http.Request, error)
- func NewUploadFileByUrlRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUploadFileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func WithLogLevel(ctx context.Context, level LogLevel) context.Context
- type AckMessageJSONBody
- type AckMessageJSONRequestBody
- type AckMessageRequest
- type AckMessageResp
- type ActivateChannelJSONBody
- type ActivateChannelJSONRequestBody
- type ActivateChannelRequest
- type ActivateChannelResp
- type ActivateChannelResponse
- type ActivateTemplateJSONBody
- type ActivateTemplateJSONRequestBody
- type ActivateTemplateRequest
- type ActivateTemplateResp
- type AddMessageReactionJSONBody
- type AddMessageReactionJSONRequestBody
- type AddMessageReactionResp
- type AddReactionRequest
- type AudioMessageSetting
- type BaseWebhookRequestData
- type Boolean
- type Channel
- type ChannelActiveQuery
- type ChannelFeature
- type ChannelIDPath
- type ChannelSettings
- type ChannelType
- type ChannelTypeQuery
- type ChannelsListResponse
- type Client
- func (c *Client) AckMessage(ctx context.Context, body AckMessageJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AckMessageWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ActivateChannel(ctx context.Context, body ActivateChannelJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ActivateChannelWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ActivateTemplate(ctx context.Context, channelIDPath ChannelIDPath, ...) (*http.Response, error)
- func (c *Client) ActivateTemplateWithBody(ctx context.Context, channelIDPath ChannelIDPath, contentType string, ...) (*http.Response, error)
- func (c *Client) AddMessageReaction(ctx context.Context, body AddMessageReactionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AddMessageReactionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeactivateChannel(ctx context.Context, channelIDPath ChannelIDPath, ...) (*http.Response, error)
- func (c *Client) DeactivateTemplate(ctx context.Context, channelIDPath ChannelIDPath, ...) (*http.Response, error)
- func (c *Client) DeleteMessage(ctx context.Context, body DeleteMessageJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) DeleteMessageReaction(ctx context.Context, body DeleteMessageReactionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) DeleteMessageReactionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteMessageWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) EditMessage(ctx context.Context, body EditMessageJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) EditMessageWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetFileUrl(ctx context.Context, fileUUIDPath FileUUIDPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTemplates(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListChannels(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) MarkMessageRead(ctx context.Context, body MarkMessageReadJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) MarkMessageReadWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) MarkMessagesReadUntil(ctx context.Context, body MarkMessagesReadUntilJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) MarkMessagesReadUntilWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RestoreMessage(ctx context.Context, body RestoreMessageJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RestoreMessageWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SendHistoryMessage(ctx context.Context, body SendHistoryMessageJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SendHistoryMessageWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SendMessage(ctx context.Context, body SendMessageJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SendMessageWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateChannel(ctx context.Context, channelIDPath ChannelIDPath, ...) (*http.Response, error)
- func (c *Client) UpdateChannelWithBody(ctx context.Context, channelIDPath ChannelIDPath, contentType string, ...) (*http.Response, error)
- func (c *Client) UpdateTemplate(ctx context.Context, channelIDPath ChannelIDPath, ...) (*http.Response, error)
- func (c *Client) UpdateTemplateWithBody(ctx context.Context, channelIDPath ChannelIDPath, ...) (*http.Response, error)
- func (c *Client) UploadFileByUrl(ctx context.Context, body UploadFileByUrlJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UploadFileByUrlWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UploadFileWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AckMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AckMessageResp, error)
- func (c *ClientWithResponses) AckMessageWithResponse(ctx context.Context, body AckMessageJSONRequestBody, ...) (*AckMessageResp, error)
- func (c *ClientWithResponses) ActivateChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ActivateChannelResp, error)
- func (c *ClientWithResponses) ActivateChannelWithResponse(ctx context.Context, body ActivateChannelJSONRequestBody, ...) (*ActivateChannelResp, error)
- func (c *ClientWithResponses) ActivateTemplateWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, contentType string, ...) (*ActivateTemplateResp, error)
- func (c *ClientWithResponses) ActivateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, ...) (*ActivateTemplateResp, error)
- func (c *ClientWithResponses) AddMessageReactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AddMessageReactionResp, error)
- func (c *ClientWithResponses) AddMessageReactionWithResponse(ctx context.Context, body AddMessageReactionJSONRequestBody, ...) (*AddMessageReactionResp, error)
- func (c *ClientWithResponses) DeactivateChannelWithResponse(ctx context.Context, channelIDPath ChannelIDPath, ...) (*DeactivateChannelResp, error)
- func (c *ClientWithResponses) DeactivateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, ...) (*DeactivateTemplateResp, error)
- func (c *ClientWithResponses) DeleteMessageReactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*DeleteMessageReactionResp, error)
- func (c *ClientWithResponses) DeleteMessageReactionWithResponse(ctx context.Context, body DeleteMessageReactionJSONRequestBody, ...) (*DeleteMessageReactionResp, error)
- func (c *ClientWithResponses) DeleteMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*DeleteMessageResp, error)
- func (c *ClientWithResponses) DeleteMessageWithResponse(ctx context.Context, body DeleteMessageJSONRequestBody, ...) (*DeleteMessageResp, error)
- func (c *ClientWithResponses) EditMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*EditMessageResp, error)
- func (c *ClientWithResponses) EditMessageWithResponse(ctx context.Context, body EditMessageJSONRequestBody, ...) (*EditMessageResp, error)
- func (c *ClientWithResponses) GetFileUrlWithResponse(ctx context.Context, fileUUIDPath FileUUIDPath, reqEditors ...RequestEditorFn) (*GetFileUrlResp, error)
- func (c *ClientWithResponses) GetTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTemplatesResp, error)
- func (c *ClientWithResponses) ListChannelsWithResponse(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*ListChannelsResp, error)
- func (c *ClientWithResponses) MarkMessageReadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*MarkMessageReadResp, error)
- func (c *ClientWithResponses) MarkMessageReadWithResponse(ctx context.Context, body MarkMessageReadJSONRequestBody, ...) (*MarkMessageReadResp, error)
- func (c *ClientWithResponses) MarkMessagesReadUntilWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*MarkMessagesReadUntilResp, error)
- func (c *ClientWithResponses) MarkMessagesReadUntilWithResponse(ctx context.Context, body MarkMessagesReadUntilJSONRequestBody, ...) (*MarkMessagesReadUntilResp, error)
- func (c *ClientWithResponses) RestoreMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RestoreMessageResp, error)
- func (c *ClientWithResponses) RestoreMessageWithResponse(ctx context.Context, body RestoreMessageJSONRequestBody, ...) (*RestoreMessageResp, error)
- func (c *ClientWithResponses) SendHistoryMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SendHistoryMessageResp, error)
- func (c *ClientWithResponses) SendHistoryMessageWithResponse(ctx context.Context, body SendHistoryMessageJSONRequestBody, ...) (*SendHistoryMessageResp, error)
- func (c *ClientWithResponses) SendMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SendMessageResp, error)
- func (c *ClientWithResponses) SendMessageWithResponse(ctx context.Context, body SendMessageJSONRequestBody, ...) (*SendMessageResp, error)
- func (c *ClientWithResponses) UpdateChannelWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, contentType string, ...) (*UpdateChannelResp, error)
- func (c *ClientWithResponses) UpdateChannelWithResponse(ctx context.Context, channelIDPath ChannelIDPath, ...) (*UpdateChannelResp, error)
- func (c *ClientWithResponses) UpdateTemplateWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, ...) (*UpdateTemplateResp, error)
- func (c *ClientWithResponses) UpdateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, ...) (*UpdateTemplateResp, error)
- func (c *ClientWithResponses) UploadFileByUrlWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UploadFileByUrlResp, error)
- func (c *ClientWithResponses) UploadFileByUrlWithResponse(ctx context.Context, body UploadFileByUrlJSONRequestBody, ...) (*UploadFileByUrlResp, error)
- func (c *ClientWithResponses) UploadFileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UploadFileResp, error)
- type ClientWithResponsesInterface
- type Cost
- type CustomerExternalID
- type DeactivateChannelResp
- type DeactivateChannelResponse
- type DeactivateTemplateResp
- type DeleteMessageJSONBody
- type DeleteMessageJSONRequestBody
- type DeleteMessageReactionJSONBody
- type DeleteMessageReactionJSONRequestBody
- type DeleteMessageReactionResp
- type DeleteMessageRequest
- type DeleteMessageResp
- type DeleteReactionRequest
- type DoerFunc
- type EditMessageJSONBody
- type EditMessageJSONRequestBody
- type EditMessageRequest
- type EditMessageRequestMessage
- type EditMessageResp
- type EmptyResponse
- type Err
- type ErrorResponse
- type File
- type FileMessageSetting
- type FileResponse
- type FileType
- type FileUUIDPath
- type GetFileUrlResp
- type GetTemplatesResp
- type Histogram
- type HttpRequestDoer
- type ID
- type ImageMessageSetting
- type LimitQuery
- type ListChannelsParams
- type ListChannelsResp
- type LogLevel
- type Logger
- type MarkMessageReadJSONBody
- type MarkMessageReadJSONRequestBody
- type MarkMessageReadRequest
- type MarkMessageReadResp
- type MarkMessagesReadUntilJSONBody
- type MarkMessagesReadUntilJSONRequestBody
- type MarkMessagesReadUntilRequest
- type MarkMessagesReadUntilResp
- type MarkMessagesReadUntilResponse
- type Message
- type MessageAction
- type MessageDialog
- type MessageError
- type MessageErrorCode
- type MessageFile
- type MessageIdentifier
- type MessageOrder
- type MessageOrderDelivery
- type MessageOrderItem
- type MessageOrderPayment
- type MessageOrderPaymentStatus
- type MessageOrderStatus
- type MessageOrderStatusCode
- type MessageProduct
- type MessageResponse
- type MessageScope
- type MessageStatus
- type MessageTransportAttachments
- type MessageType
- type Middleware
- type OrderMessageSetting
- type Originator
- type ProductMessageSetting
- type Quantity
- type QuoteMessage
- type RateLimiter
- type Reactions
- type RejectReason
- type RequestEditorFn
- type RestoreMessageJSONBody
- type RestoreMessageJSONRequestBody
- type RestoreMessageRequest
- type RestoreMessageResp
- type SendHistoryMessageJSONBody
- type SendHistoryMessageJSONRequestBody
- type SendHistoryMessageRequest
- type SendHistoryMessageResp
- type SendMessageJSONBody
- type SendMessageJSONRequestBody
- type SendMessageRequest
- type SendMessageRequestCustomer
- type SendMessageRequestMessage
- type SendMessageRequestMessageFileItem
- type SendMessageResp
- type SendMessageResponse
- type SendingError
- type SendingErrorCode
- type SendingPolicy
- type SendingPolicyAfterReplyTimeout
- type SendingPolicyNewCustomer
- type SendingPolicyOutgoing
- type SinceQuery
- type StatusSetting
- type Suggestion
- type SuggestionType
- type Suggestions
- type SystemAction
- type SystemMessage
- type Template
- type TemplateBase
- type TemplateButton
- type TemplateButtonType
- type TemplateButtons
- type TemplateCodePath
- type TemplateExample
- type TemplateExampleAttachment
- type TemplateHeader
- type TemplateHeaderContent
- type TemplateHeaderContentType
- type TemplateItem
- type TemplateItemType
- type TemplateListResponse
- type TemplateQuality
- type TemplateSetting
- type TemplateType
- type TemplateVarType
- type TemplateVerificationStatus
- type TextMessage
- type TextMessageSetting
- type UntilQuery
- type UpdateChannelJSONBody
- type UpdateChannelJSONRequestBody
- type UpdateChannelRequest
- type UpdateChannelResp
- type UpdateChannelResponse
- type UpdateTemplateJSONBody
- type UpdateTemplateJSONRequestBody
- type UpdateTemplateRequest
- type UpdateTemplateResp
- type UploadFileByUrlJSONBody
- type UploadFileByUrlJSONRequestBody
- type UploadFileByUrlRequest
- type UploadFileByUrlResp
- type UploadFileMultipartBody
- type UploadFileMultipartRequestBody
- type UploadFileResp
- type UserRef
- type UserType
- type Utm
- type WAChannelProperties
- type WAChannelQuality
- type WAChannelStatus
- type WebhookBotData
- type WebhookCustomerData
- type WebhookEmptyResponse
- type WebhookMessageDeleted
- type WebhookMessageDeletedData
- type WebhookMessageDeletedType
- type WebhookMessageFile
- type WebhookMessageMeta
- type WebhookMessageReactionAdd
- type WebhookMessageReactionAddData
- type WebhookMessageReactionAddType
- type WebhookMessageReactionData
- type WebhookMessageReactionDelete
- type WebhookMessageReactionDeleteData
- type WebhookMessageReactionDeleteType
- type WebhookMessageRead
- type WebhookMessageReadData
- type WebhookMessageReadType
- type WebhookMessageSendingError
- type WebhookMessageSent
- type WebhookMessageSentData
- type WebhookMessageSentType
- type WebhookMessageUpdated
- type WebhookMessageUpdatedData
- type WebhookMessageUpdatedType
- type WebhookReactionItem
- type WebhookRequest
- type WebhookRequestData
- func (t WebhookRequestData) AsWebhookMessageDeleted() (WebhookMessageDeleted, error)
- func (t WebhookRequestData) AsWebhookMessageReactionAdd() (WebhookMessageReactionAdd, error)
- func (t WebhookRequestData) AsWebhookMessageReactionDelete() (WebhookMessageReactionDelete, error)
- func (t WebhookRequestData) AsWebhookMessageRead() (WebhookMessageRead, error)
- func (t WebhookRequestData) AsWebhookMessageSent() (WebhookMessageSent, error)
- func (t WebhookRequestData) AsWebhookMessageUpdated() (WebhookMessageUpdated, error)
- func (t WebhookRequestData) AsWebhookTemplateCreate() (WebhookTemplateCreate, error)
- func (t WebhookRequestData) AsWebhookTemplateDelete() (WebhookTemplateDelete, error)
- func (t WebhookRequestData) AsWebhookTemplateUpdate() (WebhookTemplateUpdate, error)
- func (t WebhookRequestData) Discriminator() (string, error)
- func (t *WebhookRequestData) FromWebhookMessageDeleted(v WebhookMessageDeleted) error
- func (t *WebhookRequestData) FromWebhookMessageReactionAdd(v WebhookMessageReactionAdd) error
- func (t *WebhookRequestData) FromWebhookMessageReactionDelete(v WebhookMessageReactionDelete) error
- func (t *WebhookRequestData) FromWebhookMessageRead(v WebhookMessageRead) error
- func (t *WebhookRequestData) FromWebhookMessageSent(v WebhookMessageSent) error
- func (t *WebhookRequestData) FromWebhookMessageUpdated(v WebhookMessageUpdated) error
- func (t *WebhookRequestData) FromWebhookTemplateCreate(v WebhookTemplateCreate) error
- func (t *WebhookRequestData) FromWebhookTemplateDelete(v WebhookTemplateDelete) error
- func (t *WebhookRequestData) FromWebhookTemplateUpdate(v WebhookTemplateUpdate) error
- func (t WebhookRequestData) MarshalJSON() ([]byte, error)
- func (t *WebhookRequestData) MergeWebhookMessageDeleted(v WebhookMessageDeleted) error
- func (t *WebhookRequestData) MergeWebhookMessageReactionAdd(v WebhookMessageReactionAdd) error
- func (t *WebhookRequestData) MergeWebhookMessageReactionDelete(v WebhookMessageReactionDelete) error
- func (t *WebhookRequestData) MergeWebhookMessageRead(v WebhookMessageRead) error
- func (t *WebhookRequestData) MergeWebhookMessageSent(v WebhookMessageSent) error
- func (t *WebhookRequestData) MergeWebhookMessageUpdated(v WebhookMessageUpdated) error
- func (t *WebhookRequestData) MergeWebhookTemplateCreate(v WebhookTemplateCreate) error
- func (t *WebhookRequestData) MergeWebhookTemplateDelete(v WebhookTemplateDelete) error
- func (t *WebhookRequestData) MergeWebhookTemplateUpdate(v WebhookTemplateUpdate) error
- func (t *WebhookRequestData) UnmarshalJSON(b []byte) error
- func (t WebhookRequestData) ValueByDiscriminator() (interface{}, error)
- type WebhookRequestMeta
- type WebhookResponse
- func (t WebhookResponse) AsWebhookEmptyResponse() (WebhookEmptyResponse, error)
- func (t WebhookResponse) AsWebhookSendMessageResponseData() (WebhookSendMessageResponseData, error)
- func (t WebhookResponse) AsWebhookTemplateCreateResponseData() (WebhookTemplateCreateResponseData, error)
- func (t *WebhookResponse) FromWebhookEmptyResponse(v WebhookEmptyResponse) error
- func (t *WebhookResponse) FromWebhookSendMessageResponseData(v WebhookSendMessageResponseData) error
- func (t *WebhookResponse) FromWebhookTemplateCreateResponseData(v WebhookTemplateCreateResponseData) error
- func (t WebhookResponse) MarshalJSON() ([]byte, error)
- func (t *WebhookResponse) MergeWebhookEmptyResponse(v WebhookEmptyResponse) error
- func (t *WebhookResponse) MergeWebhookSendMessageResponseData(v WebhookSendMessageResponseData) error
- func (t *WebhookResponse) MergeWebhookTemplateCreateResponseData(v WebhookTemplateCreateResponseData) error
- func (t *WebhookResponse) UnmarshalJSON(b []byte) error
- type WebhookSendMessageResponseData
- type WebhookTemplateArguments
- type WebhookTemplateBodyArguments
- type WebhookTemplateButtonArguments
- type WebhookTemplateCategory
- type WebhookTemplateContent
- type WebhookTemplateCreate
- type WebhookTemplateCreateData
- type WebhookTemplateCreateResponseData
- type WebhookTemplateCreateType
- type WebhookTemplateDelete
- type WebhookTemplateDeleteData
- type WebhookTemplateDeleteType
- type WebhookTemplateHeaderArguments
- type WebhookTemplateInfo
- type WebhookTemplateUpdate
- type WebhookTemplateUpdateData
- type WebhookTemplateUpdateType
- type WebhookType
- type WebhookUserData
Constants ¶
const (
Transport_tokenScopes = "transport_token.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func ExtractError ¶ added in v0.0.7
func NewAckMessageRequest ¶
func NewAckMessageRequest(server string, body AckMessageJSONRequestBody) (*http.Request, error)
NewAckMessageRequest calls the generic AckMessage builder with application/json body
func NewAckMessageRequestWithBody ¶
func NewAckMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAckMessageRequestWithBody generates requests for AckMessage with any type of body
func NewActivateChannelRequest ¶
func NewActivateChannelRequest(server string, body ActivateChannelJSONRequestBody) (*http.Request, error)
NewActivateChannelRequest calls the generic ActivateChannel builder with application/json body
func NewActivateChannelRequestWithBody ¶
func NewActivateChannelRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewActivateChannelRequestWithBody generates requests for ActivateChannel with any type of body
func NewActivateTemplateRequest ¶
func NewActivateTemplateRequest(server string, channelIDPath ChannelIDPath, body ActivateTemplateJSONRequestBody) (*http.Request, error)
NewActivateTemplateRequest calls the generic ActivateTemplate builder with application/json body
func NewActivateTemplateRequestWithBody ¶
func NewActivateTemplateRequestWithBody(server string, channelIDPath ChannelIDPath, contentType string, body io.Reader) (*http.Request, error)
NewActivateTemplateRequestWithBody generates requests for ActivateTemplate with any type of body
func NewAddMessageReactionRequest ¶
func NewAddMessageReactionRequest(server string, body AddMessageReactionJSONRequestBody) (*http.Request, error)
NewAddMessageReactionRequest calls the generic AddMessageReaction builder with application/json body
func NewAddMessageReactionRequestWithBody ¶
func NewAddMessageReactionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAddMessageReactionRequestWithBody generates requests for AddMessageReaction with any type of body
func NewDeactivateChannelRequest ¶
func NewDeactivateChannelRequest(server string, channelIDPath ChannelIDPath) (*http.Request, error)
NewDeactivateChannelRequest generates requests for DeactivateChannel
func NewDeactivateTemplateRequest ¶
func NewDeactivateTemplateRequest(server string, channelIDPath ChannelIDPath, templateCode TemplateCodePath) (*http.Request, error)
NewDeactivateTemplateRequest generates requests for DeactivateTemplate
func NewDeleteMessageReactionRequest ¶
func NewDeleteMessageReactionRequest(server string, body DeleteMessageReactionJSONRequestBody) (*http.Request, error)
NewDeleteMessageReactionRequest calls the generic DeleteMessageReaction builder with application/json body
func NewDeleteMessageReactionRequestWithBody ¶
func NewDeleteMessageReactionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewDeleteMessageReactionRequestWithBody generates requests for DeleteMessageReaction with any type of body
func NewDeleteMessageRequest ¶
func NewDeleteMessageRequest(server string, body DeleteMessageJSONRequestBody) (*http.Request, error)
NewDeleteMessageRequest calls the generic DeleteMessage builder with application/json body
func NewDeleteMessageRequestWithBody ¶
func NewDeleteMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewDeleteMessageRequestWithBody generates requests for DeleteMessage with any type of body
func NewEditMessageRequest ¶
func NewEditMessageRequest(server string, body EditMessageJSONRequestBody) (*http.Request, error)
NewEditMessageRequest calls the generic EditMessage builder with application/json body
func NewEditMessageRequestWithBody ¶
func NewEditMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewEditMessageRequestWithBody generates requests for EditMessage with any type of body
func NewGetFileUrlRequest ¶
func NewGetFileUrlRequest(server string, fileUUIDPath FileUUIDPath) (*http.Request, error)
NewGetFileUrlRequest generates requests for GetFileUrl
func NewGetTemplatesRequest ¶
NewGetTemplatesRequest generates requests for GetTemplates
func NewListChannelsRequest ¶
func NewListChannelsRequest(server string, params *ListChannelsParams) (*http.Request, error)
NewListChannelsRequest generates requests for ListChannels
func NewMarkMessageReadRequest ¶
func NewMarkMessageReadRequest(server string, body MarkMessageReadJSONRequestBody) (*http.Request, error)
NewMarkMessageReadRequest calls the generic MarkMessageRead builder with application/json body
func NewMarkMessageReadRequestWithBody ¶
func NewMarkMessageReadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewMarkMessageReadRequestWithBody generates requests for MarkMessageRead with any type of body
func NewMarkMessagesReadUntilRequest ¶
func NewMarkMessagesReadUntilRequest(server string, body MarkMessagesReadUntilJSONRequestBody) (*http.Request, error)
NewMarkMessagesReadUntilRequest calls the generic MarkMessagesReadUntil builder with application/json body
func NewMarkMessagesReadUntilRequestWithBody ¶
func NewMarkMessagesReadUntilRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewMarkMessagesReadUntilRequestWithBody generates requests for MarkMessagesReadUntil with any type of body
func NewRestoreMessageRequest ¶
func NewRestoreMessageRequest(server string, body RestoreMessageJSONRequestBody) (*http.Request, error)
NewRestoreMessageRequest calls the generic RestoreMessage builder with application/json body
func NewRestoreMessageRequestWithBody ¶
func NewRestoreMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRestoreMessageRequestWithBody generates requests for RestoreMessage with any type of body
func NewSendHistoryMessageRequest ¶
func NewSendHistoryMessageRequest(server string, body SendHistoryMessageJSONRequestBody) (*http.Request, error)
NewSendHistoryMessageRequest calls the generic SendHistoryMessage builder with application/json body
func NewSendHistoryMessageRequestWithBody ¶
func NewSendHistoryMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSendHistoryMessageRequestWithBody generates requests for SendHistoryMessage with any type of body
func NewSendMessageRequest ¶
func NewSendMessageRequest(server string, body SendMessageJSONRequestBody) (*http.Request, error)
NewSendMessageRequest calls the generic SendMessage builder with application/json body
func NewSendMessageRequestWithBody ¶
func NewSendMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSendMessageRequestWithBody generates requests for SendMessage with any type of body
func NewUpdateChannelRequest ¶
func NewUpdateChannelRequest(server string, channelIDPath ChannelIDPath, body UpdateChannelJSONRequestBody) (*http.Request, error)
NewUpdateChannelRequest calls the generic UpdateChannel builder with application/json body
func NewUpdateChannelRequestWithBody ¶
func NewUpdateChannelRequestWithBody(server string, channelIDPath ChannelIDPath, contentType string, body io.Reader) (*http.Request, error)
NewUpdateChannelRequestWithBody generates requests for UpdateChannel with any type of body
func NewUpdateTemplateRequest ¶
func NewUpdateTemplateRequest(server string, channelIDPath ChannelIDPath, templateCode TemplateCodePath, body UpdateTemplateJSONRequestBody) (*http.Request, error)
NewUpdateTemplateRequest calls the generic UpdateTemplate builder with application/json body
func NewUpdateTemplateRequestWithBody ¶
func NewUpdateTemplateRequestWithBody(server string, channelIDPath ChannelIDPath, templateCode TemplateCodePath, contentType string, body io.Reader) (*http.Request, error)
NewUpdateTemplateRequestWithBody generates requests for UpdateTemplate with any type of body
func NewUploadFileByUrlRequest ¶
func NewUploadFileByUrlRequest(server string, body UploadFileByUrlJSONRequestBody) (*http.Request, error)
NewUploadFileByUrlRequest calls the generic UploadFileByUrl builder with application/json body
func NewUploadFileByUrlRequestWithBody ¶
func NewUploadFileByUrlRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewUploadFileByUrlRequestWithBody generates requests for UploadFileByUrl with any type of body
Types ¶
type AckMessageJSONBody ¶
type AckMessageJSONBody struct {
// Channel Sending channel identifier
Channel int64 `binding:"required" json:"channel"`
// CreatedAt Date and time of sending
CreatedAt *time.Time `json:"created_at"`
Error *SendingError `json:"error"`
// ExternalMessageID External identifier of a message
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
ExternalMessageID *string `binding:"omitempty,max=255" json:"external_message_id,omitempty" mod:"trim,escape"`
// Message Message identifier
Message *MessageIdentifier `json:"message,omitempty"`
// TransportMessageID Message identifier in transport
TransportMessageID *string `binding:"omitempty,max=255" json:"transport_message_id" mod:"trim,escape"`
}
AckMessageJSONBody defines parameters for AckMessage.
type AckMessageJSONRequestBody ¶
type AckMessageJSONRequestBody AckMessageJSONBody
AckMessageJSONRequestBody defines body for AckMessage for application/json ContentType.
type AckMessageRequest ¶
type AckMessageRequest struct {
// Channel Sending channel identifier
Channel int64 `binding:"required" json:"channel"`
// CreatedAt Date and time of sending
CreatedAt *time.Time `json:"created_at"`
Error *SendingError `json:"error"`
// ExternalMessageID External identifier of a message
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
ExternalMessageID *string `binding:"omitempty,max=255" json:"external_message_id,omitempty" mod:"trim,escape"`
// Message Message identifier
Message *MessageIdentifier `json:"message,omitempty"`
// TransportMessageID Message identifier in transport
TransportMessageID *string `binding:"omitempty,max=255" json:"transport_message_id" mod:"trim,escape"`
}
AckMessageRequest defines model for AckMessageRequest.
type AckMessageResp ¶
type AckMessageResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseAckMessageResp ¶
func ParseAckMessageResp(rsp *http.Response) (*AckMessageResp, error)
ParseAckMessageResp parses an HTTP response from a AckMessageWithResponse call
func (AckMessageResp) Error ¶ added in v0.0.6
func (r AckMessageResp) Error() error
func (AckMessageResp) Status ¶
func (r AckMessageResp) Status() string
Status returns HTTPResponse.Status
func (AckMessageResp) StatusCode ¶
func (r AckMessageResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ActivateChannelJSONBody ¶
type ActivateChannelJSONBody struct {
// AvatarUrl Channel avatar URL
AvatarUrl *string `binding:"omitempty,max=255" json:"avatar_url,omitempty" mod:"trim,escape"`
// ExternalID External identifier of a channel
ExternalID string `binding:"omitempty,max=64" json:"external_id" mod:"trim,escape"`
// ID Channel identifier
ID int64 `binding:"min=0" json:"id"`
// Name Channel name
Name *string `binding:"omitempty,max=100" json:"name,omitempty" mod:"trim,escape"`
// Settings Channel settings
Settings ChannelSettings `json:"settings,omitempty"`
Type ChannelType `binding:"required,enum-valid" json:"type"`
}
ActivateChannelJSONBody defines parameters for ActivateChannel.
type ActivateChannelJSONRequestBody ¶
type ActivateChannelJSONRequestBody ActivateChannelJSONBody
ActivateChannelJSONRequestBody defines body for ActivateChannel for application/json ContentType.
type ActivateChannelRequest ¶
type ActivateChannelRequest struct {
// AvatarUrl Channel avatar URL
AvatarUrl *string `binding:"omitempty,max=255" json:"avatar_url,omitempty" mod:"trim,escape"`
// ExternalID External identifier of a channel
ExternalID string `binding:"omitempty,max=64" json:"external_id" mod:"trim,escape"`
// ID Channel identifier
ID int64 `binding:"min=0" json:"id"`
// Name Channel name
Name *string `binding:"omitempty,max=100" json:"name,omitempty" mod:"trim,escape"`
// Settings Channel settings
Settings ChannelSettings `json:"settings,omitempty"`
Type ChannelType `binding:"required,enum-valid" json:"type"`
}
ActivateChannelRequest defines model for ActivateChannelRequest.
type ActivateChannelResp ¶
type ActivateChannelResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ActivateChannelResponse
JSON201 *ActivateChannelResponse
JSONDefault *ErrorResponse
}
func ParseActivateChannelResp ¶
func ParseActivateChannelResp(rsp *http.Response) (*ActivateChannelResp, error)
ParseActivateChannelResp parses an HTTP response from a ActivateChannelWithResponse call
func (ActivateChannelResp) Error ¶ added in v0.0.6
func (r ActivateChannelResp) Error() error
func (ActivateChannelResp) Status ¶
func (r ActivateChannelResp) Status() string
Status returns HTTPResponse.Status
func (ActivateChannelResp) StatusCode ¶
func (r ActivateChannelResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ActivateChannelResponse ¶
type ActivateChannelResponse struct {
// ActivatedAt Date and time of channel activation
ActivatedAt time.Time `json:"activated_at" time_format:"2006-01-02T15:04:05Z07:00"`
// ID Channel identifier
ID int64 `json:"id"`
}
ActivateChannelResponse defines model for ActivateChannelResponse.
type ActivateTemplateJSONBody ¶
type ActivateTemplateJSONBody struct {
// Body Template body
Body string `json:"body" mod:"trim,escape"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Template category
Category *string `json:"category,omitempty" mod:"trim,escape"`
// Code Template unique code
Code string `binding:"required,min=1,max=512" json:"code,omitempty" mod:"trim,escape"`
Footer *string `json:"footer,omitempty" mod:"trim,escape"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Template language
Lang *string `json:"lang,omitempty" mod:"trim,escape"`
// Name Template name
Name string `binding:"required,min=1,max=512" json:"name" mod:"trim,escape"`
Quality *TemplateQuality `binding:"omitempty,enum-valid" json:"quality,omitempty"`
RejectionReason *RejectReason `binding:"omitempty,enum-valid" json:"rejection_reason,omitempty" mod:"trim,escape"`
Template []TemplateItem `json:"template"`
Type *TemplateType `binding:"required" json:"type,omitempty"`
VerificationStatus *TemplateVerificationStatus `binding:"omitempty,enum-valid" json:"verification_status,omitempty"`
}
ActivateTemplateJSONBody defines parameters for ActivateTemplate.
type ActivateTemplateJSONRequestBody ¶
type ActivateTemplateJSONRequestBody ActivateTemplateJSONBody
ActivateTemplateJSONRequestBody defines body for ActivateTemplate for application/json ContentType.
type ActivateTemplateRequest ¶
type ActivateTemplateRequest struct {
// Body Template body
Body string `json:"body" mod:"trim,escape"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Template category
Category *string `json:"category,omitempty" mod:"trim,escape"`
// Code Template unique code
Code string `binding:"required,min=1,max=512" json:"code,omitempty" mod:"trim,escape"`
Footer *string `json:"footer,omitempty" mod:"trim,escape"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Template language
Lang *string `json:"lang,omitempty" mod:"trim,escape"`
// Name Template name
Name string `binding:"required,min=1,max=512" json:"name" mod:"trim,escape"`
Quality *TemplateQuality `binding:"omitempty,enum-valid" json:"quality,omitempty"`
RejectionReason *RejectReason `binding:"omitempty,enum-valid" json:"rejection_reason,omitempty" mod:"trim,escape"`
Template []TemplateItem `json:"template"`
Type *TemplateType `binding:"required" json:"type,omitempty"`
VerificationStatus *TemplateVerificationStatus `binding:"omitempty,enum-valid" json:"verification_status,omitempty"`
}
ActivateTemplateRequest defines model for ActivateTemplateRequest.
type ActivateTemplateResp ¶
type ActivateTemplateResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseActivateTemplateResp ¶
func ParseActivateTemplateResp(rsp *http.Response) (*ActivateTemplateResp, error)
ParseActivateTemplateResp parses an HTTP response from a ActivateTemplateWithResponse call
func (ActivateTemplateResp) Error ¶ added in v0.0.6
func (r ActivateTemplateResp) Error() error
func (ActivateTemplateResp) Status ¶
func (r ActivateTemplateResp) Status() string
Status returns HTTPResponse.Status
func (ActivateTemplateResp) StatusCode ¶
func (r ActivateTemplateResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AddMessageReactionJSONBody ¶
type AddMessageReactionJSONBody struct {
// Channel Sending channel identifier
Channel int64 `binding:"required" json:"channel"`
Message MessageIdentifier `binding:"required" json:"message"`
// Reaction Removable reaction
Reaction string `binding:"required" json:"reaction"`
}
AddMessageReactionJSONBody defines parameters for AddMessageReaction.
type AddMessageReactionJSONRequestBody ¶
type AddMessageReactionJSONRequestBody AddMessageReactionJSONBody
AddMessageReactionJSONRequestBody defines body for AddMessageReaction for application/json ContentType.
type AddMessageReactionResp ¶
type AddMessageReactionResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseAddMessageReactionResp ¶
func ParseAddMessageReactionResp(rsp *http.Response) (*AddMessageReactionResp, error)
ParseAddMessageReactionResp parses an HTTP response from a AddMessageReactionWithResponse call
func (AddMessageReactionResp) Error ¶ added in v0.0.6
func (r AddMessageReactionResp) Error() error
func (AddMessageReactionResp) Status ¶
func (r AddMessageReactionResp) Status() string
Status returns HTTPResponse.Status
func (AddMessageReactionResp) StatusCode ¶
func (r AddMessageReactionResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AddReactionRequest ¶
type AddReactionRequest struct {
// Channel Sending channel identifier
Channel int64 `binding:"required" json:"channel"`
Message MessageIdentifier `binding:"required" json:"message"`
// Reaction Removable reaction
Reaction string `binding:"required" json:"reaction"`
}
AddReactionRequest defines model for AddReactionRequest.
type AudioMessageSetting ¶
type AudioMessageSetting struct {
// Creating Support for operation with messages of the given type
Creating ChannelFeature `json:"creating,omitempty"`
// Deleting Support for operation with messages of the given type
Deleting ChannelFeature `json:"deleting,omitempty"`
// MaxItemSize Maximum audio size to send
MaxItemSize *int64 `json:"max_item_size,omitempty"`
// MaxItemsCount Maximum number of audio attachments per message
MaxItemsCount *int `json:"max_items_count,omitempty"`
// Quoting Support for operation with messages of the given type
Quoting ChannelFeature `json:"quoting,omitempty"`
// Reaction Support for operation with messages of the given type
Reaction ChannelFeature `json:"reaction,omitempty"`
}
AudioMessageSetting Audio messages support
type BaseWebhookRequestData ¶ added in v0.0.3
type BaseWebhookRequestData struct {
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
// Type Type of webhook event
Type WebhookType `json:"type"`
}
BaseWebhookRequestData Base structure for webhook request data
type Boolean ¶
type Boolean string
Boolean Boolean type
const ( BooleanFalse Boolean = "false" BooleanN0 Boolean = "0" BooleanN1 Boolean = "1" BooleanTrue Boolean = "true" )
Defines values for Boolean.
func (Boolean) EnumValues ¶
EnumValues returns all valid values for Boolean.
func (*Boolean) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Boolean.
func (Boolean) ValidateEnum ¶
Validate validates the value of Boolean.
type Channel ¶
type Channel struct {
ActivatedAt time.Time `json:"activated_at" time_format:"2006-01-02T15:04:05.999999Z07:00"`
CreatedAt time.Time `json:"created_at" time_format:"2006-01-02T15:04:05.999999Z07:00"`
DeactivatedAt *time.Time `json:"deactivated_at" time_format:"2006-01-02T15:04:05.999999Z07:00"`
ExternalID *string `json:"external_id"`
ID int64 `json:"id"`
IsActive bool `json:"is_active"`
Name *string `json:"name"`
Settings ChannelSettings `json:"settings"`
// Type Channel types
Type ChannelType `json:"type"`
UpdatedAt *time.Time `json:"updated_at" time_format:"2006-01-02T15:04:05.999999Z07:00"`
}
Channel Channel
type ChannelFeature ¶
type ChannelFeature string
ChannelFeature Support for operation with messages of the given type
const ( ChannelFeatureBoth ChannelFeature = "both" ChannelFeatureNone ChannelFeature = "none" ChannelFeatureReceive ChannelFeature = "receive" ChannelFeatureSend ChannelFeature = "send" )
Defines values for ChannelFeature.
func (ChannelFeature) EnumValues ¶
func (ChannelFeature) EnumValues() []string
EnumValues returns all valid values for ChannelFeature.
func (*ChannelFeature) UnmarshalJSON ¶
func (v *ChannelFeature) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for ChannelFeature.
func (ChannelFeature) ValidateEnum ¶
func (v ChannelFeature) ValidateEnum() error
Validate validates the value of ChannelFeature.
type ChannelIDPath ¶ added in v0.0.10
type ChannelIDPath = int64
ChannelIDPath defines model for ChannelIdPath.
type ChannelSettings ¶
type ChannelSettings struct {
// Audio Audio messages support
Audio AudioMessageSetting `json:"audio,omitempty"`
// CustomerExternalID Support for external customer identifiers
CustomerExternalID CustomerExternalID `json:"customer_external_id,omitempty"`
// File File messages support
File FileMessageSetting `json:"file,omitempty"`
// Image Media messages support
Image ImageMessageSetting `json:"image,omitempty"`
// Order Order messages support
Order OrderMessageSetting `json:"order,omitempty"`
// Product Product messages support
Product ProductMessageSetting `json:"product,omitempty"`
// Reactions Support for working with reactions for messages
Reactions Reactions `json:"reactions,omitempty"`
// SendingPolicy Message sending policy
SendingPolicy SendingPolicy `json:"sending_policy,omitempty"`
// Status Transmitting message status information
Status StatusSetting `json:"status,omitempty"`
// Suggestions Support for quick response types
Suggestions Suggestions `json:"suggestions,omitempty"`
// Template Support for message templates
Template TemplateSetting `json:"template,omitempty"`
// Text Text messages support
Text TextMessageSetting `json:"text,omitempty"`
// Whatsapp WhatsApp channel properties
Whatsapp *WAChannelProperties `json:"whatsapp,omitempty"`
}
ChannelSettings Channel settings
type ChannelType ¶
type ChannelType string
ChannelType Channel types
const ( ChannelTypeAvito ChannelType = "avito" ChannelTypeConsultant ChannelType = "consultant" ChannelTypeCustom ChannelType = "custom" ChannelTypeDrom ChannelType = "drom" ChannelTypeFbmessenger ChannelType = "fbmessenger" ChannelTypeInstagram ChannelType = "instagram" ChannelTypeMax ChannelType = "max" ChannelTypeMegaMarket ChannelType = "mega_market" ChannelTypeOdnoklassniki ChannelType = "odnoklassniki" ChannelTypeOzon ChannelType = "ozon" ChannelTypeSkype ChannelType = "skype" ChannelTypeTelegram ChannelType = "telegram" ChannelTypeViber ChannelType = "viber" ChannelTypeVk ChannelType = "vk" ChannelTypeWhatsapp ChannelType = "whatsapp" ChannelTypeWildberries ChannelType = "wildberries" ChannelTypeYandexChat ChannelType = "yandex_chat" ChannelTypeYandexMarket ChannelType = "yandex_market" ChannelTypeYoula ChannelType = "youla" )
Defines values for ChannelType.
func (ChannelType) EnumValues ¶
func (ChannelType) EnumValues() []string
EnumValues returns all valid values for ChannelType.
func (*ChannelType) UnmarshalJSON ¶
func (v *ChannelType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for ChannelType.
func (ChannelType) ValidateEnum ¶
func (v ChannelType) ValidateEnum() error
Validate validates the value of ChannelType.
type ChannelTypeQuery ¶
type ChannelTypeQuery = []ChannelType
ChannelTypeQuery defines model for ChannelTypeQuery.
type ChannelsListResponse ¶
type ChannelsListResponse = []Channel
ChannelsListResponse defines model for ChannelsListResponse.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) AckMessage ¶
func (c *Client) AckMessage(ctx context.Context, body AckMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AckMessageWithBody ¶
func (*Client) ActivateChannel ¶
func (c *Client) ActivateChannel(ctx context.Context, body ActivateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ActivateChannelWithBody ¶
func (*Client) ActivateTemplate ¶
func (c *Client) ActivateTemplate(ctx context.Context, channelIDPath ChannelIDPath, body ActivateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ActivateTemplateWithBody ¶
func (*Client) AddMessageReaction ¶
func (c *Client) AddMessageReaction(ctx context.Context, body AddMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AddMessageReactionWithBody ¶
func (*Client) DeactivateChannel ¶
func (c *Client) DeactivateChannel(ctx context.Context, channelIDPath ChannelIDPath, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeactivateTemplate ¶
func (c *Client) DeactivateTemplate(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteMessage ¶
func (c *Client) DeleteMessage(ctx context.Context, body DeleteMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteMessageReaction ¶
func (c *Client) DeleteMessageReaction(ctx context.Context, body DeleteMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteMessageReactionWithBody ¶
func (*Client) DeleteMessageWithBody ¶
func (*Client) EditMessage ¶
func (c *Client) EditMessage(ctx context.Context, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) EditMessageWithBody ¶
func (*Client) GetFileUrl ¶
func (c *Client) GetFileUrl(ctx context.Context, fileUUIDPath FileUUIDPath, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetTemplates ¶
func (*Client) ListChannels ¶
func (c *Client) ListChannels(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) MarkMessageRead ¶
func (c *Client) MarkMessageRead(ctx context.Context, body MarkMessageReadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) MarkMessageReadWithBody ¶
func (*Client) MarkMessagesReadUntil ¶
func (c *Client) MarkMessagesReadUntil(ctx context.Context, body MarkMessagesReadUntilJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) MarkMessagesReadUntilWithBody ¶
func (*Client) RestoreMessage ¶
func (c *Client) RestoreMessage(ctx context.Context, body RestoreMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RestoreMessageWithBody ¶
func (*Client) SendHistoryMessage ¶
func (c *Client) SendHistoryMessage(ctx context.Context, body SendHistoryMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SendHistoryMessageWithBody ¶
func (*Client) SendMessage ¶
func (c *Client) SendMessage(ctx context.Context, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SendMessageWithBody ¶
func (*Client) UpdateChannel ¶
func (c *Client) UpdateChannel(ctx context.Context, channelIDPath ChannelIDPath, body UpdateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateChannelWithBody ¶
func (*Client) UpdateTemplate ¶
func (c *Client) UpdateTemplate(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateTemplateWithBody ¶
func (c *Client) UpdateTemplateWithBody(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UploadFileByUrl ¶
func (c *Client) UploadFileByUrl(ctx context.Context, body UploadFileByUrlJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UploadFileByUrlWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// ListChannels request
ListChannels(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ActivateChannelWithBody request with any body
ActivateChannelWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ActivateChannel(ctx context.Context, body ActivateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeactivateChannel request
DeactivateChannel(ctx context.Context, channelIDPath ChannelIDPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateChannelWithBody request with any body
UpdateChannelWithBody(ctx context.Context, channelIDPath ChannelIDPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateChannel(ctx context.Context, channelIDPath ChannelIDPath, body UpdateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ActivateTemplateWithBody request with any body
ActivateTemplateWithBody(ctx context.Context, channelIDPath ChannelIDPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ActivateTemplate(ctx context.Context, channelIDPath ChannelIDPath, body ActivateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeactivateTemplate request
DeactivateTemplate(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateTemplateWithBody request with any body
UpdateTemplateWithBody(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateTemplate(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// UploadFileWithBody request with any body
UploadFileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UploadFileByUrlWithBody request with any body
UploadFileByUrlWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UploadFileByUrl(ctx context.Context, body UploadFileByUrlJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetFileUrl request
GetFileUrl(ctx context.Context, fileUUIDPath FileUUIDPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteMessageWithBody request with any body
DeleteMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteMessage(ctx context.Context, body DeleteMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SendMessageWithBody request with any body
SendMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SendMessage(ctx context.Context, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// EditMessageWithBody request with any body
EditMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
EditMessage(ctx context.Context, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AckMessageWithBody request with any body
AckMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AckMessage(ctx context.Context, body AckMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SendHistoryMessageWithBody request with any body
SendHistoryMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SendHistoryMessage(ctx context.Context, body SendHistoryMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteMessageReactionWithBody request with any body
DeleteMessageReactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteMessageReaction(ctx context.Context, body DeleteMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AddMessageReactionWithBody request with any body
AddMessageReactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AddMessageReaction(ctx context.Context, body AddMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// MarkMessageReadWithBody request with any body
MarkMessageReadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
MarkMessageRead(ctx context.Context, body MarkMessageReadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// MarkMessagesReadUntilWithBody request with any body
MarkMessagesReadUntilWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
MarkMessagesReadUntil(ctx context.Context, body MarkMessagesReadUntilJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RestoreMessageWithBody request with any body
RestoreMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RestoreMessage(ctx context.Context, body RestoreMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTemplates request
GetTemplates(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithMiddlewares ¶ added in v0.0.6
func WithMiddlewares(mws ...Middleware) ClientOption
WithMiddlewares applies a chain of middlewares to the client. Middlewares are applied in the order they are passed.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithTransportToken ¶
func WithTransportToken(token string) ClientOption
WithTransportToken sets a transport token in the HTTP request header for authentication purposes.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AckMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) AckMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AckMessageResp, error)
AckMessageWithBodyWithResponse request with arbitrary body returning *AckMessageResp
func (*ClientWithResponses) AckMessageWithResponse ¶
func (c *ClientWithResponses) AckMessageWithResponse(ctx context.Context, body AckMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*AckMessageResp, error)
func (*ClientWithResponses) ActivateChannelWithBodyWithResponse ¶
func (c *ClientWithResponses) ActivateChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivateChannelResp, error)
ActivateChannelWithBodyWithResponse request with arbitrary body returning *ActivateChannelResp
func (*ClientWithResponses) ActivateChannelWithResponse ¶
func (c *ClientWithResponses) ActivateChannelWithResponse(ctx context.Context, body ActivateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivateChannelResp, error)
func (*ClientWithResponses) ActivateTemplateWithBodyWithResponse ¶
func (c *ClientWithResponses) ActivateTemplateWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivateTemplateResp, error)
ActivateTemplateWithBodyWithResponse request with arbitrary body returning *ActivateTemplateResp
func (*ClientWithResponses) ActivateTemplateWithResponse ¶
func (c *ClientWithResponses) ActivateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, body ActivateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivateTemplateResp, error)
func (*ClientWithResponses) AddMessageReactionWithBodyWithResponse ¶
func (c *ClientWithResponses) AddMessageReactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddMessageReactionResp, error)
AddMessageReactionWithBodyWithResponse request with arbitrary body returning *AddMessageReactionResp
func (*ClientWithResponses) AddMessageReactionWithResponse ¶
func (c *ClientWithResponses) AddMessageReactionWithResponse(ctx context.Context, body AddMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddMessageReactionResp, error)
func (*ClientWithResponses) DeactivateChannelWithResponse ¶
func (c *ClientWithResponses) DeactivateChannelWithResponse(ctx context.Context, channelIDPath ChannelIDPath, reqEditors ...RequestEditorFn) (*DeactivateChannelResp, error)
DeactivateChannelWithResponse request returning *DeactivateChannelResp
func (*ClientWithResponses) DeactivateTemplateWithResponse ¶
func (c *ClientWithResponses) DeactivateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, reqEditors ...RequestEditorFn) (*DeactivateTemplateResp, error)
DeactivateTemplateWithResponse request returning *DeactivateTemplateResp
func (*ClientWithResponses) DeleteMessageReactionWithBodyWithResponse ¶
func (c *ClientWithResponses) DeleteMessageReactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMessageReactionResp, error)
DeleteMessageReactionWithBodyWithResponse request with arbitrary body returning *DeleteMessageReactionResp
func (*ClientWithResponses) DeleteMessageReactionWithResponse ¶
func (c *ClientWithResponses) DeleteMessageReactionWithResponse(ctx context.Context, body DeleteMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMessageReactionResp, error)
func (*ClientWithResponses) DeleteMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) DeleteMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMessageResp, error)
DeleteMessageWithBodyWithResponse request with arbitrary body returning *DeleteMessageResp
func (*ClientWithResponses) DeleteMessageWithResponse ¶
func (c *ClientWithResponses) DeleteMessageWithResponse(ctx context.Context, body DeleteMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMessageResp, error)
func (*ClientWithResponses) EditMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) EditMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditMessageResp, error)
EditMessageWithBodyWithResponse request with arbitrary body returning *EditMessageResp
func (*ClientWithResponses) EditMessageWithResponse ¶
func (c *ClientWithResponses) EditMessageWithResponse(ctx context.Context, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*EditMessageResp, error)
func (*ClientWithResponses) GetFileUrlWithResponse ¶
func (c *ClientWithResponses) GetFileUrlWithResponse(ctx context.Context, fileUUIDPath FileUUIDPath, reqEditors ...RequestEditorFn) (*GetFileUrlResp, error)
GetFileUrlWithResponse request returning *GetFileUrlResp
func (*ClientWithResponses) GetTemplatesWithResponse ¶
func (c *ClientWithResponses) GetTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTemplatesResp, error)
GetTemplatesWithResponse request returning *GetTemplatesResp
func (*ClientWithResponses) ListChannelsWithResponse ¶
func (c *ClientWithResponses) ListChannelsWithResponse(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*ListChannelsResp, error)
ListChannelsWithResponse request returning *ListChannelsResp
func (*ClientWithResponses) MarkMessageReadWithBodyWithResponse ¶
func (c *ClientWithResponses) MarkMessageReadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MarkMessageReadResp, error)
MarkMessageReadWithBodyWithResponse request with arbitrary body returning *MarkMessageReadResp
func (*ClientWithResponses) MarkMessageReadWithResponse ¶
func (c *ClientWithResponses) MarkMessageReadWithResponse(ctx context.Context, body MarkMessageReadJSONRequestBody, reqEditors ...RequestEditorFn) (*MarkMessageReadResp, error)
func (*ClientWithResponses) MarkMessagesReadUntilWithBodyWithResponse ¶
func (c *ClientWithResponses) MarkMessagesReadUntilWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MarkMessagesReadUntilResp, error)
MarkMessagesReadUntilWithBodyWithResponse request with arbitrary body returning *MarkMessagesReadUntilResp
func (*ClientWithResponses) MarkMessagesReadUntilWithResponse ¶
func (c *ClientWithResponses) MarkMessagesReadUntilWithResponse(ctx context.Context, body MarkMessagesReadUntilJSONRequestBody, reqEditors ...RequestEditorFn) (*MarkMessagesReadUntilResp, error)
func (*ClientWithResponses) RestoreMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) RestoreMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestoreMessageResp, error)
RestoreMessageWithBodyWithResponse request with arbitrary body returning *RestoreMessageResp
func (*ClientWithResponses) RestoreMessageWithResponse ¶
func (c *ClientWithResponses) RestoreMessageWithResponse(ctx context.Context, body RestoreMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*RestoreMessageResp, error)
func (*ClientWithResponses) SendHistoryMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) SendHistoryMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendHistoryMessageResp, error)
SendHistoryMessageWithBodyWithResponse request with arbitrary body returning *SendHistoryMessageResp
func (*ClientWithResponses) SendHistoryMessageWithResponse ¶
func (c *ClientWithResponses) SendHistoryMessageWithResponse(ctx context.Context, body SendHistoryMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendHistoryMessageResp, error)
func (*ClientWithResponses) SendMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) SendMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendMessageResp, error)
SendMessageWithBodyWithResponse request with arbitrary body returning *SendMessageResp
func (*ClientWithResponses) SendMessageWithResponse ¶
func (c *ClientWithResponses) SendMessageWithResponse(ctx context.Context, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendMessageResp, error)
func (*ClientWithResponses) UpdateChannelWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateChannelWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateChannelResp, error)
UpdateChannelWithBodyWithResponse request with arbitrary body returning *UpdateChannelResp
func (*ClientWithResponses) UpdateChannelWithResponse ¶
func (c *ClientWithResponses) UpdateChannelWithResponse(ctx context.Context, channelIDPath ChannelIDPath, body UpdateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateChannelResp, error)
func (*ClientWithResponses) UpdateTemplateWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateTemplateWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTemplateResp, error)
UpdateTemplateWithBodyWithResponse request with arbitrary body returning *UpdateTemplateResp
func (*ClientWithResponses) UpdateTemplateWithResponse ¶
func (c *ClientWithResponses) UpdateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTemplateResp, error)
func (*ClientWithResponses) UploadFileByUrlWithBodyWithResponse ¶
func (c *ClientWithResponses) UploadFileByUrlWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadFileByUrlResp, error)
UploadFileByUrlWithBodyWithResponse request with arbitrary body returning *UploadFileByUrlResp
func (*ClientWithResponses) UploadFileByUrlWithResponse ¶
func (c *ClientWithResponses) UploadFileByUrlWithResponse(ctx context.Context, body UploadFileByUrlJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadFileByUrlResp, error)
func (*ClientWithResponses) UploadFileWithBodyWithResponse ¶
func (c *ClientWithResponses) UploadFileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadFileResp, error)
UploadFileWithBodyWithResponse request with arbitrary body returning *UploadFileResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListChannelsWithResponse request
ListChannelsWithResponse(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*ListChannelsResp, error)
// ActivateChannelWithBodyWithResponse request with any body
ActivateChannelWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivateChannelResp, error)
ActivateChannelWithResponse(ctx context.Context, body ActivateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivateChannelResp, error)
// DeactivateChannelWithResponse request
DeactivateChannelWithResponse(ctx context.Context, channelIDPath ChannelIDPath, reqEditors ...RequestEditorFn) (*DeactivateChannelResp, error)
// UpdateChannelWithBodyWithResponse request with any body
UpdateChannelWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateChannelResp, error)
UpdateChannelWithResponse(ctx context.Context, channelIDPath ChannelIDPath, body UpdateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateChannelResp, error)
// ActivateTemplateWithBodyWithResponse request with any body
ActivateTemplateWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivateTemplateResp, error)
ActivateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, body ActivateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivateTemplateResp, error)
// DeactivateTemplateWithResponse request
DeactivateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, reqEditors ...RequestEditorFn) (*DeactivateTemplateResp, error)
// UpdateTemplateWithBodyWithResponse request with any body
UpdateTemplateWithBodyWithResponse(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTemplateResp, error)
UpdateTemplateWithResponse(ctx context.Context, channelIDPath ChannelIDPath, templateCode TemplateCodePath, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTemplateResp, error)
// UploadFileWithBodyWithResponse request with any body
UploadFileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadFileResp, error)
// UploadFileByUrlWithBodyWithResponse request with any body
UploadFileByUrlWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadFileByUrlResp, error)
UploadFileByUrlWithResponse(ctx context.Context, body UploadFileByUrlJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadFileByUrlResp, error)
// GetFileUrlWithResponse request
GetFileUrlWithResponse(ctx context.Context, fileUUIDPath FileUUIDPath, reqEditors ...RequestEditorFn) (*GetFileUrlResp, error)
// DeleteMessageWithBodyWithResponse request with any body
DeleteMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMessageResp, error)
DeleteMessageWithResponse(ctx context.Context, body DeleteMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMessageResp, error)
// SendMessageWithBodyWithResponse request with any body
SendMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendMessageResp, error)
SendMessageWithResponse(ctx context.Context, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendMessageResp, error)
// EditMessageWithBodyWithResponse request with any body
EditMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditMessageResp, error)
EditMessageWithResponse(ctx context.Context, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*EditMessageResp, error)
// AckMessageWithBodyWithResponse request with any body
AckMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AckMessageResp, error)
AckMessageWithResponse(ctx context.Context, body AckMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*AckMessageResp, error)
// SendHistoryMessageWithBodyWithResponse request with any body
SendHistoryMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendHistoryMessageResp, error)
SendHistoryMessageWithResponse(ctx context.Context, body SendHistoryMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendHistoryMessageResp, error)
// DeleteMessageReactionWithBodyWithResponse request with any body
DeleteMessageReactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMessageReactionResp, error)
DeleteMessageReactionWithResponse(ctx context.Context, body DeleteMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMessageReactionResp, error)
// AddMessageReactionWithBodyWithResponse request with any body
AddMessageReactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddMessageReactionResp, error)
AddMessageReactionWithResponse(ctx context.Context, body AddMessageReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddMessageReactionResp, error)
// MarkMessageReadWithBodyWithResponse request with any body
MarkMessageReadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MarkMessageReadResp, error)
MarkMessageReadWithResponse(ctx context.Context, body MarkMessageReadJSONRequestBody, reqEditors ...RequestEditorFn) (*MarkMessageReadResp, error)
// MarkMessagesReadUntilWithBodyWithResponse request with any body
MarkMessagesReadUntilWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MarkMessagesReadUntilResp, error)
MarkMessagesReadUntilWithResponse(ctx context.Context, body MarkMessagesReadUntilJSONRequestBody, reqEditors ...RequestEditorFn) (*MarkMessagesReadUntilResp, error)
// RestoreMessageWithBodyWithResponse request with any body
RestoreMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestoreMessageResp, error)
RestoreMessageWithResponse(ctx context.Context, body RestoreMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*RestoreMessageResp, error)
// GetTemplatesWithResponse request
GetTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTemplatesResp, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Cost ¶
type Cost struct {
// Currency Currency code
Currency string `binding:"required,currency" json:"currency"`
// Value Numerical value of the cost
Value float64 `binding:"gte=0" json:"value"`
}
Cost Represents a monetary value with its corresponding currency
type CustomerExternalID ¶ added in v0.0.10
type CustomerExternalID string
CustomerExternalID Support for external customer identifiers
const ( CustomerExternalIDAny CustomerExternalID = "any" CustomerExternalIDPhone CustomerExternalID = "phone" )
Defines values for CustomerExternalID.
func (CustomerExternalID) EnumValues ¶ added in v0.0.10
func (CustomerExternalID) EnumValues() []string
EnumValues returns all valid values for CustomerExternalID.
func (*CustomerExternalID) UnmarshalJSON ¶ added in v0.0.10
func (v *CustomerExternalID) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for CustomerExternalID.
func (CustomerExternalID) ValidateEnum ¶ added in v0.0.10
func (v CustomerExternalID) ValidateEnum() error
Validate validates the value of CustomerExternalID.
type DeactivateChannelResp ¶
type DeactivateChannelResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DeactivateChannelResponse
JSONDefault *ErrorResponse
}
func ParseDeactivateChannelResp ¶
func ParseDeactivateChannelResp(rsp *http.Response) (*DeactivateChannelResp, error)
ParseDeactivateChannelResp parses an HTTP response from a DeactivateChannelWithResponse call
func (DeactivateChannelResp) Error ¶ added in v0.0.6
func (r DeactivateChannelResp) Error() error
func (DeactivateChannelResp) Status ¶
func (r DeactivateChannelResp) Status() string
Status returns HTTPResponse.Status
func (DeactivateChannelResp) StatusCode ¶
func (r DeactivateChannelResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeactivateChannelResponse ¶
type DeactivateChannelResponse struct {
// DeactivatedAt Date and time of channel deactivation
DeactivatedAt time.Time `json:"deactivated_at" time_format:"2006-01-02T15:04:05Z07:00"`
// ID Identifier of the deactivated channel
ID int64 `json:"id"`
}
DeactivateChannelResponse defines model for DeactivateChannelResponse.
type DeactivateTemplateResp ¶
type DeactivateTemplateResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseDeactivateTemplateResp ¶
func ParseDeactivateTemplateResp(rsp *http.Response) (*DeactivateTemplateResp, error)
ParseDeactivateTemplateResp parses an HTTP response from a DeactivateTemplateWithResponse call
func (DeactivateTemplateResp) Error ¶ added in v0.0.6
func (r DeactivateTemplateResp) Error() error
func (DeactivateTemplateResp) Status ¶
func (r DeactivateTemplateResp) Status() string
Status returns HTTPResponse.Status
func (DeactivateTemplateResp) StatusCode ¶
func (r DeactivateTemplateResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteMessageJSONBody ¶
type DeleteMessageJSONBody struct {
// Channel Channel identifier
Channel int64 `binding:"required" json:"channel"`
Message MessageIdentifier `binding:"required" json:"message"`
}
DeleteMessageJSONBody defines parameters for DeleteMessage.
type DeleteMessageJSONRequestBody ¶
type DeleteMessageJSONRequestBody DeleteMessageJSONBody
DeleteMessageJSONRequestBody defines body for DeleteMessage for application/json ContentType.
type DeleteMessageReactionJSONBody ¶
type DeleteMessageReactionJSONBody struct {
// Channel Sending channel identifier
Channel int64 `binding:"required" json:"channel"`
Message MessageIdentifier `binding:"required" json:"message"`
// Reaction Removable reaction
Reaction *string `binding:"omitempty" json:"reaction"`
}
DeleteMessageReactionJSONBody defines parameters for DeleteMessageReaction.
type DeleteMessageReactionJSONRequestBody ¶
type DeleteMessageReactionJSONRequestBody DeleteMessageReactionJSONBody
DeleteMessageReactionJSONRequestBody defines body for DeleteMessageReaction for application/json ContentType.
type DeleteMessageReactionResp ¶
type DeleteMessageReactionResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseDeleteMessageReactionResp ¶
func ParseDeleteMessageReactionResp(rsp *http.Response) (*DeleteMessageReactionResp, error)
ParseDeleteMessageReactionResp parses an HTTP response from a DeleteMessageReactionWithResponse call
func (DeleteMessageReactionResp) Error ¶ added in v0.0.6
func (r DeleteMessageReactionResp) Error() error
func (DeleteMessageReactionResp) Status ¶
func (r DeleteMessageReactionResp) Status() string
Status returns HTTPResponse.Status
func (DeleteMessageReactionResp) StatusCode ¶
func (r DeleteMessageReactionResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteMessageRequest ¶
type DeleteMessageRequest struct {
// Channel Channel identifier
Channel int64 `binding:"required" json:"channel"`
Message MessageIdentifier `binding:"required" json:"message"`
}
DeleteMessageRequest defines model for DeleteMessageRequest.
type DeleteMessageResp ¶
type DeleteMessageResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *MessageResponse
JSONDefault *ErrorResponse
}
func ParseDeleteMessageResp ¶
func ParseDeleteMessageResp(rsp *http.Response) (*DeleteMessageResp, error)
ParseDeleteMessageResp parses an HTTP response from a DeleteMessageWithResponse call
func (DeleteMessageResp) Error ¶ added in v0.0.6
func (r DeleteMessageResp) Error() error
func (DeleteMessageResp) Status ¶
func (r DeleteMessageResp) Status() string
Status returns HTTPResponse.Status
func (DeleteMessageResp) StatusCode ¶
func (r DeleteMessageResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteReactionRequest ¶
type DeleteReactionRequest struct {
// Channel Sending channel identifier
Channel int64 `binding:"required" json:"channel"`
Message MessageIdentifier `binding:"required" json:"message"`
// Reaction Removable reaction
Reaction *string `binding:"omitempty" json:"reaction"`
}
DeleteReactionRequest defines model for DeleteReactionRequest.
type EditMessageJSONBody ¶
type EditMessageJSONBody struct {
// Channel Message channel
Channel int64 `binding:"required" json:"channel"`
Message EditMessageRequestMessage `binding:"required" json:"message"`
}
EditMessageJSONBody defines parameters for EditMessage.
type EditMessageJSONRequestBody ¶
type EditMessageJSONRequestBody EditMessageJSONBody
EditMessageJSONRequestBody defines body for EditMessage for application/json ContentType.
type EditMessageRequest ¶
type EditMessageRequest struct {
// Channel Message channel
Channel int64 `binding:"required" json:"channel"`
Message EditMessageRequestMessage `binding:"required" json:"message"`
}
EditMessageRequest defines model for EditMessageRequest.
type EditMessageRequestMessage ¶
type EditMessageRequestMessage struct {
// EditedAt Date and time of last update of message
EditedAt int64 `json:"edited_at,omitempty"`
// ExternalID External identifier of the message
ExternalID *string `binding:"omitempty,max=255" json:"external_id,omitempty" mod:"trim,escape"`
// ID Message identifier in MessageGateway
ID *int64 `json:"id,omitempty"`
// PageLink Link to the page from which the message was sent
PageLink *string `json:"page_link,omitempty" mod:"trim,escape"`
// Text Message text
Text string `binding:"required,min=1,max=65535" json:"text" mod:"trim,escape"`
}
EditMessageRequestMessage defines model for EditMessageRequestMessage.
type EditMessageResp ¶
type EditMessageResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseEditMessageResp ¶
func ParseEditMessageResp(rsp *http.Response) (*EditMessageResp, error)
ParseEditMessageResp parses an HTTP response from a EditMessageWithResponse call
func (EditMessageResp) Error ¶ added in v0.0.6
func (r EditMessageResp) Error() error
func (EditMessageResp) Status ¶
func (r EditMessageResp) Status() string
Status returns HTTPResponse.Status
func (EditMessageResp) StatusCode ¶
func (r EditMessageResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EmptyResponse ¶
type EmptyResponse = map[string]interface{}
EmptyResponse defines model for EmptyResponse.
type ErrorResponse ¶
type ErrorResponse struct {
// Errors List of errors
Errors []string `json:"errors,omitempty"`
}
ErrorResponse defines model for ErrorResponse.
type File ¶
type File struct {
// UrlLegacy File download URL (legacy, use `url` instead)
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
UrlLegacy string `json:"Url,omitempty"`
// ID UUID of the uploaded file
ID openapi_types.UUID `json:"id"`
// MimeType MIME file type
MimeType string `json:"mime_type,omitempty"`
// Size File size (in bytes)
Size int `json:"size"`
// Type File type
Type FileType `json:"type"`
// Url File download URL
Url string `json:"url,omitempty"`
}
File Uploaded file information
type FileMessageSetting ¶
type FileMessageSetting struct {
// Creating Support for operation with messages of the given type
Creating ChannelFeature `json:"creating,omitempty"`
// Deleting Support for operation with messages of the given type
Deleting ChannelFeature `json:"deleting,omitempty"`
// Editing Support for operation with messages of the given type
Editing ChannelFeature `json:"editing,omitempty"`
// MaxItemSize Maximum file size to send
MaxItemSize *int64 `json:"max_item_size,omitempty"`
// MaxItemsCount Maximum number of file attachments per message
MaxItemsCount *int `json:"max_items_count,omitempty"`
// NoteMaxCharsCount Maximum number of characters in a file message annotation
NoteMaxCharsCount *uint16 `json:"note_max_chars_count,omitempty"`
// Quoting Support for operation with messages of the given type
Quoting ChannelFeature `json:"quoting,omitempty"`
// Reaction Support for operation with messages of the given type
Reaction ChannelFeature `json:"reaction,omitempty"`
}
FileMessageSetting File messages support
type FileType ¶
type FileType string
FileType File type
const ( FileTypeAudio FileType = "audio" FileTypeFile FileType = "file" FileTypeImage FileType = "image" FileTypeNone FileType = "none" FileTypeVideo FileType = "video" )
Defines values for FileType.
func (FileType) EnumValues ¶
EnumValues returns all valid values for FileType.
func (*FileType) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for FileType.
func (FileType) ValidateEnum ¶
Validate validates the value of FileType.
type GetFileUrlResp ¶
type GetFileUrlResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FileResponse
JSONDefault *ErrorResponse
}
func ParseGetFileUrlResp ¶
func ParseGetFileUrlResp(rsp *http.Response) (*GetFileUrlResp, error)
ParseGetFileUrlResp parses an HTTP response from a GetFileUrlWithResponse call
func (GetFileUrlResp) Error ¶ added in v0.0.6
func (r GetFileUrlResp) Error() error
func (GetFileUrlResp) Status ¶
func (r GetFileUrlResp) Status() string
Status returns HTTPResponse.Status
func (GetFileUrlResp) StatusCode ¶
func (r GetFileUrlResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTemplatesResp ¶
type GetTemplatesResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TemplateListResponse
JSONDefault *ErrorResponse
}
func ParseGetTemplatesResp ¶
func ParseGetTemplatesResp(rsp *http.Response) (*GetTemplatesResp, error)
ParseGetTemplatesResp parses an HTTP response from a GetTemplatesWithResponse call
func (GetTemplatesResp) Error ¶ added in v0.0.6
func (r GetTemplatesResp) Error() error
func (GetTemplatesResp) Status ¶
func (r GetTemplatesResp) Status() string
Status returns HTTPResponse.Status
func (GetTemplatesResp) StatusCode ¶
func (r GetTemplatesResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ImageMessageSetting ¶
type ImageMessageSetting struct {
// Creating Support for operation with messages of the given type
Creating ChannelFeature `json:"creating,omitempty"`
// Deleting Support for operation with messages of the given type
Deleting ChannelFeature `json:"deleting,omitempty"`
// Editing Support for operation with messages of the given type
Editing ChannelFeature `json:"editing,omitempty"`
// MaxItemSize Maximum image size to send
MaxItemSize *int64 `json:"max_item_size,omitempty"`
// MaxItemsCount Maximum number of media attachments per message
MaxItemsCount *int `json:"max_items_count,omitempty"`
// NoteMaxCharsCount Maximum number of characters in a media message annotation
NoteMaxCharsCount *uint16 `json:"note_max_chars_count,omitempty"`
// Quoting Support for operation with messages of the given type
Quoting ChannelFeature `json:"quoting,omitempty"`
// Reaction Support for operation with messages of the given type
Reaction ChannelFeature `json:"reaction,omitempty"`
}
ImageMessageSetting Media messages support
type ListChannelsParams ¶
type ListChannelsParams struct {
// ID Identifier of the requested object
ID *ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`
// Active Channel activity flag
Active *ChannelActiveQuery `binding:"omitempty,enum-valid" form:"active,omitempty" json:"active,omitempty"`
// Types Channel types
Types *ChannelTypeQuery `binding:"omitempty,enum-valid" form:"types,omitempty" json:"types,omitempty"`
// Since Lower limit of the date of the last object update
Since *SinceQuery `form:"since,omitempty" json:"since,omitempty" time_format:"2006-01-02T15:04:05.999999Z07:00" time_utc:"1"`
// Until Upper limit of the date of the last object update
Until *UntilQuery `form:"until,omitempty" json:"until,omitempty" time_format:"2006-01-02T15:04:05.999999Z07:00" time_utc:"1"`
// Limit The number of elements in the response. Default value is 100
Limit *LimitQuery `binding:"omitempty,min=1,max=1000" form:"limit,omitempty" json:"limit,omitempty"`
}
ListChannelsParams defines parameters for ListChannels.
type ListChannelsResp ¶
type ListChannelsResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ChannelsListResponse
JSONDefault *ErrorResponse
}
func ParseListChannelsResp ¶
func ParseListChannelsResp(rsp *http.Response) (*ListChannelsResp, error)
ParseListChannelsResp parses an HTTP response from a ListChannelsWithResponse call
func (ListChannelsResp) Error ¶ added in v0.0.6
func (r ListChannelsResp) Error() error
func (ListChannelsResp) Status ¶
func (r ListChannelsResp) Status() string
Status returns HTTPResponse.Status
func (ListChannelsResp) StatusCode ¶
func (r ListChannelsResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LogLevel ¶ added in v0.0.6
type LogLevel int
LogLevel defines severity levels for Logging middleware.
func LogLevelFromContext ¶ added in v0.0.6
LogLevelFromContext extracts log level from context or returns LogLevelInfo
type Logger ¶ added in v0.0.6
Logger is an abstraction used by the Logging middleware. Implementations can log messages in any format or destination.
func NewDefaultLogger ¶ added in v0.0.6
NewDefaultLogger wraps a standard log.Logger into a Logger compatible with the Logging middleware.
type MarkMessageReadJSONBody ¶
type MarkMessageReadJSONBody struct {
// ChannelID Identifier of the sending channel
ChannelID int64 `binding:"required" json:"channel_id"`
Message MessageIdentifier `binding:"required" json:"message"`
}
MarkMessageReadJSONBody defines parameters for MarkMessageRead.
type MarkMessageReadJSONRequestBody ¶
type MarkMessageReadJSONRequestBody MarkMessageReadJSONBody
MarkMessageReadJSONRequestBody defines body for MarkMessageRead for application/json ContentType.
type MarkMessageReadRequest ¶
type MarkMessageReadRequest struct {
// ChannelID Identifier of the sending channel
ChannelID int64 `binding:"required" json:"channel_id"`
Message MessageIdentifier `binding:"required" json:"message"`
}
MarkMessageReadRequest defines model for MarkMessageReadRequest.
type MarkMessageReadResp ¶
type MarkMessageReadResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseMarkMessageReadResp ¶
func ParseMarkMessageReadResp(rsp *http.Response) (*MarkMessageReadResp, error)
ParseMarkMessageReadResp parses an HTTP response from a MarkMessageReadWithResponse call
func (MarkMessageReadResp) Error ¶ added in v0.0.6
func (r MarkMessageReadResp) Error() error
func (MarkMessageReadResp) Status ¶
func (r MarkMessageReadResp) Status() string
Status returns HTTPResponse.Status
func (MarkMessageReadResp) StatusCode ¶
func (r MarkMessageReadResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MarkMessagesReadUntilJSONBody ¶
type MarkMessagesReadUntilJSONBody struct {
// ChannelID Channel identifier
ChannelID int64 `binding:"required,min=1" json:"channel_id"`
// CustomerExternalID Customer external identifier
CustomerExternalID string `binding:"required" json:"customer_external_id" mod:"trim,escape"`
// Until Read until date
Until time.Time `binding:"required" json:"until"`
}
MarkMessagesReadUntilJSONBody defines parameters for MarkMessagesReadUntil.
type MarkMessagesReadUntilJSONRequestBody ¶
type MarkMessagesReadUntilJSONRequestBody MarkMessagesReadUntilJSONBody
MarkMessagesReadUntilJSONRequestBody defines body for MarkMessagesReadUntil for application/json ContentType.
type MarkMessagesReadUntilRequest ¶
type MarkMessagesReadUntilRequest struct {
// ChannelID Channel identifier
ChannelID int64 `binding:"required,min=1" json:"channel_id"`
// CustomerExternalID Customer external identifier
CustomerExternalID string `binding:"required" json:"customer_external_id" mod:"trim,escape"`
// Until Read until date
Until time.Time `binding:"required" json:"until"`
}
MarkMessagesReadUntilRequest defines model for MarkMessagesReadUntilRequest.
type MarkMessagesReadUntilResp ¶
type MarkMessagesReadUntilResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *MarkMessagesReadUntilResponse
JSONDefault *ErrorResponse
}
func ParseMarkMessagesReadUntilResp ¶
func ParseMarkMessagesReadUntilResp(rsp *http.Response) (*MarkMessagesReadUntilResp, error)
ParseMarkMessagesReadUntilResp parses an HTTP response from a MarkMessagesReadUntilWithResponse call
func (MarkMessagesReadUntilResp) Error ¶ added in v0.0.6
func (r MarkMessagesReadUntilResp) Error() error
func (MarkMessagesReadUntilResp) Status ¶
func (r MarkMessagesReadUntilResp) Status() string
Status returns HTTPResponse.Status
func (MarkMessagesReadUntilResp) StatusCode ¶
func (r MarkMessagesReadUntilResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MarkMessagesReadUntilResponse ¶
type MarkMessagesReadUntilResponse struct {
// IDs Identifiers of messages marked as read
IDs []int64 `json:"ids"`
}
MarkMessagesReadUntilResponse defines model for MarkMessagesReadUntilResponse.
type Message ¶
type Message struct {
// Action System action of the message (for system type messages only)
Action SystemAction `json:"action"`
// Actions Actions available for this message
Actions []MessageAction `json:"actions,omitempty"`
// ChatID Chat identifier
ChatID int64 `json:"chat_id"`
// Content Message text
Content string `json:"content,omitempty"`
// Dialog Message dialog
Dialog *MessageDialog `json:"dialog,omitempty"`
// Error Message error details (only for messages with status `failed`)
Error *MessageError `json:"error,omitempty"`
// From Details about a user
From *UserRef `json:"from,omitempty"`
// ID Message identifier
ID int64 `json:"id"`
// IsEdit Message editing indicator
IsEdit bool `json:"is_edit"`
// IsRead Message read indicator
IsRead bool `json:"is_read"`
Items []MessageFile `json:"items,omitempty"`
// Note Media data annotation (for media message)
Note string `json:"note,omitempty"`
// Order Represents the details of an order within a message
Order *MessageOrder `json:"order,omitempty"`
// Product Describes a product mentioned in a message
Product *MessageProduct `json:"product,omitempty"`
// Quote Quoted message
Quote *QuoteMessage `json:"quote,omitempty"`
// Responsible Details about a user
Responsible *UserRef `json:"responsible,omitempty"`
// Scope Message scope
Scope MessageScope `json:"scope"`
// Status Message status
Status MessageStatus `json:"status"`
// Time Message creation time
Time time.Time `json:"time"`
// TransportAttachments Transport attachments
TransportAttachments *MessageTransportAttachments `json:"transport_attachments,omitempty"`
// Type Message type
Type MessageType `json:"type"`
// User Details about a user
User *UserRef `json:"user,omitempty"`
}
Message defines model for Message.
type MessageAction ¶
type MessageAction string
MessageAction Defines possible actions that can be performed on a message
const ( MessageActionDelete MessageAction = "delete" MessageActionEdit MessageAction = "edit" MessageActionQuote MessageAction = "quote" )
Defines values for MessageAction.
func (MessageAction) EnumValues ¶
func (MessageAction) EnumValues() []string
EnumValues returns all valid values for MessageAction.
func (*MessageAction) UnmarshalJSON ¶
func (v *MessageAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for MessageAction.
func (MessageAction) ValidateEnum ¶
func (v MessageAction) ValidateEnum() error
Validate validates the value of MessageAction.
type MessageDialog ¶
type MessageDialog struct {
// ID Dialog identifier
ID int64 `json:"id"`
}
MessageDialog Message dialog
type MessageError ¶
type MessageError struct {
Code MessageErrorCode `binding:"enum-valid" json:"code"`
// Message Text description of error
Message string `json:"message,omitempty"`
}
MessageError Message error details (only for messages with status `failed`)
type MessageErrorCode ¶
type MessageErrorCode string
MessageErrorCode Message error code
const ( MessageErrorCodeAccessRestricted MessageErrorCode = "access_restricted" MessageErrorCodeAsyncSendTimeout MessageErrorCode = "async_send_timeout" MessageErrorCodeCustomerNotExists MessageErrorCode = "customer_not_exists" MessageErrorCodeGeneral MessageErrorCode = "general" MessageErrorCodeMalformedResponse MessageErrorCode = "malformed_response" MessageErrorCodeNetworkError MessageErrorCode = "network_error" MessageErrorCodeReplyTimedOut MessageErrorCode = "reply_timed_out" MessageErrorCodeSpamSuspicion MessageErrorCode = "spam_suspicion" MessageErrorCodeUnknown MessageErrorCode = "unknown" )
Defines values for MessageErrorCode.
func (MessageErrorCode) EnumValues ¶
func (MessageErrorCode) EnumValues() []string
EnumValues returns all valid values for MessageErrorCode.
func (*MessageErrorCode) UnmarshalJSON ¶
func (v *MessageErrorCode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for MessageErrorCode.
func (MessageErrorCode) ValidateEnum ¶
func (v MessageErrorCode) ValidateEnum() error
Validate validates the value of MessageErrorCode.
type MessageFile ¶
type MessageFile struct {
// Caption Text description of the media attachment
Caption string `json:"caption,omitempty"`
// Duration Audio recording duration (for audio type messages only)
Duration int `json:"duration,omitempty"`
// Height Image height in pixels (for image type messages only)
Height int `json:"height,omitempty"`
Histogram Histogram `json:"histogram,omitempty"`
// ID UUID of the attached file
ID openapi_types.UUID `json:"id,omitempty"`
Kind FileType `json:"kind,omitempty"`
// PreviewURL URL for previewing or downloading the file
PreviewURL string `json:"preview_url,omitempty"`
// Size Attachment size (in bytes)
Size int `json:"size,omitempty"`
// Transcription Transcription of the uploaded file
Transcription string `json:"transcription,omitempty"`
// Type Attachment type
Type string `json:"type,omitempty"`
// Width Image width in pixels (for image type messages only)
Width int `json:"width,omitempty"`
}
MessageFile Attached message file
type MessageIdentifier ¶
type MessageIdentifier struct {
// ExternalID External identifier of the message
ExternalID *string `binding:"omitempty,max=255" json:"external_id,omitempty" mod:"trim,escape"`
// ID Message identifier in MessageGateway
ID *int64 `json:"id,omitempty"`
}
MessageIdentifier Message identifier
type MessageOrder ¶
type MessageOrder struct {
// Cost Represents a monetary value with its corresponding currency
Cost *Cost `json:"cost,omitempty"`
// Date Order creation date
Date *time.Time `json:"date,omitempty"`
// Delivery Order delivery information
Delivery *MessageOrderDelivery `json:"delivery,omitempty"`
// Discount Represents a monetary value with its corresponding currency
Discount *Cost `json:"discount,omitempty"`
// ExternalID External identifier of an order
ExternalID int64 `json:"external_id,omitempty"`
// Items Array of order items
Items []MessageOrderItem `json:"items,omitempty"`
// Number Order number
Number string `binding:"max=255" json:"number,omitempty"`
// Payments Payments array
Payments []MessageOrderPayment `json:"payments,omitempty"`
// Status Order status
Status *MessageOrderStatus `json:"status,omitempty"`
// Url Order URL
Url string `binding:"max=2048" json:"url,omitempty"`
}
MessageOrder Represents the details of an order within a message
type MessageOrderDelivery ¶
type MessageOrderDelivery struct {
// Address Delivery address
Address string `json:"address,omitempty"`
// Comment Delivery comment
Comment string `json:"comment,omitempty"`
// Name Delivery method name
Name string `json:"name,omitempty"`
// Price Represents a monetary value with its corresponding currency
Price *Cost `json:"price,omitempty"`
}
MessageOrderDelivery Order delivery information
type MessageOrderItem ¶
type MessageOrderItem struct {
// ExternalID External identifier of a product
ExternalID int64 `json:"external_id,omitempty"`
// Img Product image
Img string `binding:"max=2048" json:"img,omitempty"`
// Name Product name
Name string `binding:"max=255" json:"name,omitempty"`
// Price Represents a monetary value with its corresponding currency
Price *Cost `json:"price,omitempty"`
Quantity Quantity `json:"quantity,omitempty"`
// Url Product URL
Url string `binding:"max=2048" json:"url,omitempty"`
}
MessageOrderItem Order product
type MessageOrderPayment ¶
type MessageOrderPayment struct {
// Amount Represents a monetary value with its corresponding currency
Amount *Cost `json:"amount,omitempty"`
// Name Payment name
Name string `json:"name,omitempty"`
// Status Order payment status
Status *MessageOrderPaymentStatus `json:"status,omitempty"`
}
MessageOrderPayment Order payment information
type MessageOrderPaymentStatus ¶
type MessageOrderPaymentStatus struct {
// Name Payment name
Name string `json:"name,omitempty"`
// Payed Payment execution indicator
Payed *bool `json:"payed,omitempty"`
}
MessageOrderPaymentStatus Order payment status
type MessageOrderStatus ¶
type MessageOrderStatus struct {
Code MessageOrderStatusCode `binding:"enum-valid" json:"code,omitempty"`
// Name Status name
Name string `binding:"max=255" json:"name,omitempty"`
}
MessageOrderStatus Order status
type MessageOrderStatusCode ¶
type MessageOrderStatusCode string
MessageOrderStatusCode Status code
const ( MessageOrderStatusCodeApproval MessageOrderStatusCode = "approval" MessageOrderStatusCodeAssembling MessageOrderStatusCode = "assembling" MessageOrderStatusCodeCancel MessageOrderStatusCode = "cancel" MessageOrderStatusCodeComplete MessageOrderStatusCode = "complete" MessageOrderStatusCodeDelivery MessageOrderStatusCode = "delivery" MessageOrderStatusCodeNew MessageOrderStatusCode = "new" )
Defines values for MessageOrderStatusCode.
func (MessageOrderStatusCode) EnumValues ¶
func (MessageOrderStatusCode) EnumValues() []string
EnumValues returns all valid values for MessageOrderStatusCode.
func (*MessageOrderStatusCode) UnmarshalJSON ¶
func (v *MessageOrderStatusCode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for MessageOrderStatusCode.
func (MessageOrderStatusCode) ValidateEnum ¶
func (v MessageOrderStatusCode) ValidateEnum() error
Validate validates the value of MessageOrderStatusCode.
type MessageProduct ¶
type MessageProduct struct {
// Article Product description
Article string `binding:"max=128" json:"article,omitempty"`
// Cost Represents a monetary value with its corresponding currency
Cost *Cost `json:"cost,omitempty"`
// ID Product identifier
ID uint64 `json:"id"`
// Img Product image URL
Img string `binding:"max=2048" json:"img,omitempty"`
// Name Product name
Name string `binding:"required,min=1,max=255" json:"name"`
// Unit Units of measure of the product
Unit string `binding:"max=16" json:"unit"`
// Url Product URL
Url string `binding:"max=2048" json:"url,omitempty"`
}
MessageProduct Describes a product mentioned in a message
type MessageScope ¶
type MessageScope string
MessageScope Message scope
const ( MessageScopePrivate MessageScope = "private" MessageScopePublic MessageScope = "public" MessageScopeUndefined MessageScope = "undefined" )
Defines values for MessageScope.
func (MessageScope) EnumValues ¶
func (MessageScope) EnumValues() []string
EnumValues returns all valid values for MessageScope.
func (*MessageScope) UnmarshalJSON ¶
func (v *MessageScope) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for MessageScope.
func (MessageScope) ValidateEnum ¶
func (v MessageScope) ValidateEnum() error
Validate validates the value of MessageScope.
type MessageStatus ¶
type MessageStatus string
MessageStatus Message status
const ( MessageStatusFailed MessageStatus = "failed" MessageStatusReceived MessageStatus = "received" MessageStatusSeen MessageStatus = "seen" MessageStatusSending MessageStatus = "sending" MessageStatusSent MessageStatus = "sent" MessageStatusUndefined MessageStatus = "undefined" )
Defines values for MessageStatus.
func (MessageStatus) EnumValues ¶
func (MessageStatus) EnumValues() []string
EnumValues returns all valid values for MessageStatus.
func (*MessageStatus) UnmarshalJSON ¶
func (v *MessageStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for MessageStatus.
func (MessageStatus) ValidateEnum ¶
func (v MessageStatus) ValidateEnum() error
Validate validates the value of MessageStatus.
type MessageTransportAttachments ¶
type MessageTransportAttachments struct {
// Suggestions Quick responses
Suggestions []Suggestion `json:"suggestions,omitempty"`
}
MessageTransportAttachments Transport attachments
type MessageType ¶
type MessageType string
MessageType Message type
const ( MessageTypeAudio MessageType = "audio" MessageTypeCommand MessageType = "command" MessageTypeFile MessageType = "file" MessageTypeImage MessageType = "image" MessageTypeOrder MessageType = "order" MessageTypeProduct MessageType = "product" MessageTypeSystem MessageType = "system" MessageTypeText MessageType = "text" )
Defines values for MessageType.
func (MessageType) EnumValues ¶
func (MessageType) EnumValues() []string
EnumValues returns all valid values for MessageType.
func (*MessageType) UnmarshalJSON ¶
func (v *MessageType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for MessageType.
func (MessageType) ValidateEnum ¶
func (v MessageType) ValidateEnum() error
Validate validates the value of MessageType.
type Middleware ¶ added in v0.0.6
type Middleware func(HttpRequestDoer) HttpRequestDoer
Middleware wraps an HttpRequestDoer to add cross-cutting functionality such as logging, retries, tracing, or rate limiting.
func Limiter ¶ added in v0.0.6
func Limiter(l RateLimiter) Middleware
Limiter is a middleware that applies a RateLimiter before forwarding the request. If the limiter denies the request (e.g. due to context cancellation), an error is returned.
func Logging ¶ added in v0.0.6
func Logging(l Logger) Middleware
Logging is a middleware that logs outgoing HTTP requests and their results. It records the request method, URL, status code, and total duration (including waiting in other middlewares such as Limiter).
type OrderMessageSetting ¶
type OrderMessageSetting struct {
// Creating Support for operation with messages of the given type
Creating ChannelFeature `json:"creating,omitempty"`
// Deleting Support for operation with messages of the given type
Deleting ChannelFeature `json:"deleting,omitempty"`
// Editing Support for operation with messages of the given type
Editing ChannelFeature `json:"editing,omitempty"`
// Quoting Support for operation with messages of the given type
Quoting ChannelFeature `json:"quoting,omitempty"`
// Reaction Support for operation with messages of the given type
Reaction ChannelFeature `json:"reaction,omitempty"`
}
OrderMessageSetting Order messages support
type Originator ¶
type Originator string
Originator Message sender type
const ( OriginatorChannel Originator = "channel" OriginatorCustomer Originator = "customer" OriginatorUser Originator = "user" )
Defines values for Originator.
func (Originator) EnumValues ¶
func (Originator) EnumValues() []string
EnumValues returns all valid values for Originator.
func (*Originator) UnmarshalJSON ¶
func (v *Originator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for Originator.
func (Originator) ValidateEnum ¶
func (v Originator) ValidateEnum() error
Validate validates the value of Originator.
type ProductMessageSetting ¶
type ProductMessageSetting struct {
// Creating Support for operation with messages of the given type
Creating ChannelFeature `json:"creating,omitempty"`
// Deleting Support for operation with messages of the given type
Deleting ChannelFeature `json:"deleting,omitempty"`
// Editing Support for operation with messages of the given type
Editing ChannelFeature `json:"editing,omitempty"`
// Quoting Support for operation with messages of the given type
Quoting ChannelFeature `json:"quoting,omitempty"`
// Reaction Support for operation with messages of the given type
Reaction ChannelFeature `json:"reaction,omitempty"`
}
ProductMessageSetting Product messages support
type Quantity ¶
type Quantity struct {
// Unit Units of measure
Unit string `binding:"max=16" json:"unit,omitempty"`
// Value Quantitative value
Value float64 `binding:"gte=0" json:"value,omitempty"`
}
Quantity Quantity
type QuoteMessage ¶
type QuoteMessage struct {
// Content Message text
Content string `json:"content,omitempty"`
// From Details about a user
From *UserRef `json:"from,omitempty"`
// ID Identifier of the quoted message
ID int64 `json:"id,omitempty"`
// Items Media attachments of the quoted message
Items []MessageFile `json:"items,omitempty"`
// Time Message sending time
Time time.Time `json:"time,omitempty"`
Type MessageType `binding:"enum-valid" json:"type,omitempty"`
}
QuoteMessage Quoted message
type RateLimiter ¶ added in v0.0.6
RateLimiter abstracts a token bucket rate limiter.
func NewDefaultLimiter ¶ added in v0.0.6
func NewDefaultLimiter(r float64, burst int) RateLimiter
NewDefaultLimiter creates a new token-bucket limiter that allows events up to rate r, with a maximum burst size of burst.
type Reactions ¶
type Reactions struct {
// Dictionary Dictionary of available reactions
Dictionary []string `json:"dictionary,omitempty"`
// MaxCount Maximum number of reactions added from the system
MaxCount int64 `json:"max_count,omitempty"`
}
Reactions Support for working with reactions for messages
type RejectReason ¶
type RejectReason string
RejectReason Reason for template rejection (for `Rejected` status)
const ( RejectReasonAbusiveContent RejectReason = "abusive_content" RejectReasonIncorrectCategory RejectReason = "incorrect_category" RejectReasonInvalidFormat RejectReason = "invalid_format" RejectReasonScam RejectReason = "scam" )
Defines values for RejectReason.
func (RejectReason) EnumValues ¶
func (RejectReason) EnumValues() []string
EnumValues returns all valid values for RejectReason.
func (*RejectReason) UnmarshalJSON ¶
func (v *RejectReason) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for RejectReason.
func (RejectReason) ValidateEnum ¶
func (v RejectReason) ValidateEnum() error
Validate validates the value of RejectReason.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RestoreMessageJSONBody ¶
type RestoreMessageJSONBody struct {
// ChannelID Identifier of the sending channel
ChannelID int64 `binding:"required" json:"channel_id"`
Message MessageIdentifier `binding:"required" json:"message"`
}
RestoreMessageJSONBody defines parameters for RestoreMessage.
type RestoreMessageJSONRequestBody ¶
type RestoreMessageJSONRequestBody RestoreMessageJSONBody
RestoreMessageJSONRequestBody defines body for RestoreMessage for application/json ContentType.
type RestoreMessageRequest ¶
type RestoreMessageRequest struct {
// ChannelID Identifier of the sending channel
ChannelID int64 `binding:"required" json:"channel_id"`
Message MessageIdentifier `binding:"required" json:"message"`
}
RestoreMessageRequest defines model for RestoreMessageRequest.
type RestoreMessageResp ¶
type RestoreMessageResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *MessageResponse
JSONDefault *ErrorResponse
}
func ParseRestoreMessageResp ¶
func ParseRestoreMessageResp(rsp *http.Response) (*RestoreMessageResp, error)
ParseRestoreMessageResp parses an HTTP response from a RestoreMessageWithResponse call
func (RestoreMessageResp) Error ¶ added in v0.0.6
func (r RestoreMessageResp) Error() error
func (RestoreMessageResp) Status ¶
func (r RestoreMessageResp) Status() string
Status returns HTTPResponse.Status
func (RestoreMessageResp) StatusCode ¶
func (r RestoreMessageResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SendHistoryMessageJSONBody ¶
type SendHistoryMessageJSONBody struct {
// ChannelID Channel identifier
ChannelID int64 `binding:"required" json:"channel_id"`
Customer *SendMessageRequestCustomer `binding:"required" json:"customer"`
// ExternalChatID External identifier
ExternalChatID string `binding:"omitempty,min=0,max=64" json:"external_chat_id"`
Message SendMessageRequestMessage `binding:"required" json:"message"`
Originator Originator `binding:"omitempty,enum-valid" json:"originator"`
Quote *MessageIdentifier `binding:"omitempty" json:"quote"`
// ReplyDeadline Deadline for response
ReplyDeadline *time.Time `binding:"omitempty" json:"reply_deadline"`
}
SendHistoryMessageJSONBody defines parameters for SendHistoryMessage.
type SendHistoryMessageJSONRequestBody ¶
type SendHistoryMessageJSONRequestBody SendHistoryMessageJSONBody
SendHistoryMessageJSONRequestBody defines body for SendHistoryMessage for application/json ContentType.
type SendHistoryMessageRequest ¶
type SendHistoryMessageRequest struct {
// ChannelID Channel identifier
ChannelID int64 `binding:"required" json:"channel_id"`
Customer *SendMessageRequestCustomer `binding:"required" json:"customer"`
// ExternalChatID External identifier
ExternalChatID string `binding:"omitempty,min=0,max=64" json:"external_chat_id"`
Message SendMessageRequestMessage `binding:"required" json:"message"`
Originator Originator `binding:"omitempty,enum-valid" json:"originator"`
Quote *MessageIdentifier `binding:"omitempty" json:"quote"`
// ReplyDeadline Deadline for response
ReplyDeadline *time.Time `binding:"omitempty" json:"reply_deadline"`
}
SendHistoryMessageRequest defines model for SendHistoryMessageRequest.
type SendHistoryMessageResp ¶
type SendHistoryMessageResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SendMessageResponse
JSONDefault *ErrorResponse
}
func ParseSendHistoryMessageResp ¶
func ParseSendHistoryMessageResp(rsp *http.Response) (*SendHistoryMessageResp, error)
ParseSendHistoryMessageResp parses an HTTP response from a SendHistoryMessageWithResponse call
func (SendHistoryMessageResp) Error ¶ added in v0.0.6
func (r SendHistoryMessageResp) Error() error
func (SendHistoryMessageResp) Status ¶
func (r SendHistoryMessageResp) Status() string
Status returns HTTPResponse.Status
func (SendHistoryMessageResp) StatusCode ¶
func (r SendHistoryMessageResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SendMessageJSONBody ¶
type SendMessageJSONBody struct {
// Channel Channel identifier
Channel int64 `binding:"required" json:"channel"`
Customer *SendMessageRequestCustomer `binding:"omitempty" json:"customer"`
// ExternalChatID External identifier
ExternalChatID string `binding:"min=0,max=64" json:"external_chat_id"`
Message SendMessageRequestMessage `binding:"required" json:"message"`
Originator Originator `binding:"enum-valid" json:"originator"`
Quote *MessageIdentifier `json:"quote"`
// ReplyDeadline Deadline for response
ReplyDeadline *time.Time `binding:"omitempty" json:"reply_deadline"`
// SecondaryExternalChatIDs Array of additional external chat identifiers
SecondaryExternalChatIDs []string `binding:"omitempty,dive,min=0,max=64" json:"secondary_external_chat_ids"`
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
User *SendMessageRequestCustomer `binding:"omitempty" json:"user"`
}
SendMessageJSONBody defines parameters for SendMessage.
type SendMessageJSONRequestBody ¶
type SendMessageJSONRequestBody SendMessageJSONBody
SendMessageJSONRequestBody defines body for SendMessage for application/json ContentType.
type SendMessageRequest ¶
type SendMessageRequest struct {
// Channel Channel identifier
Channel int64 `binding:"required" json:"channel"`
Customer *SendMessageRequestCustomer `binding:"omitempty" json:"customer"`
// ExternalChatID External identifier
ExternalChatID string `binding:"min=0,max=64" json:"external_chat_id"`
Message SendMessageRequestMessage `binding:"required" json:"message"`
Originator Originator `binding:"enum-valid" json:"originator"`
Quote *MessageIdentifier `json:"quote"`
// ReplyDeadline Deadline for response
ReplyDeadline *time.Time `binding:"omitempty" json:"reply_deadline"`
// SecondaryExternalChatIDs Array of additional external chat identifiers
SecondaryExternalChatIDs []string `binding:"omitempty,dive,min=0,max=64" json:"secondary_external_chat_ids"`
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
User *SendMessageRequestCustomer `binding:"omitempty" json:"user"`
}
SendMessageRequest defines model for SendMessageRequest.
type SendMessageRequestCustomer ¶
type SendMessageRequestCustomer struct {
// Avatar Sender avatar URL
Avatar *string `json:"avatar" mod:"trim,escape"`
// Country Sender country code
Country *string `json:"country" mod:"trim,escape"`
// Email Sender email
Email *string `json:"email" mod:"trim,escape"`
// ExternalID External identifier of the sender
ExternalID string `binding:"required,min=1,max=64" json:"external_id" mod:"trim,escape"`
// FirstName Sender name
FirstName *string `binding:"omitempty,max=255" json:"first_name" mod:"trim,escape"`
// Language Sender language
Language *string `json:"language" mod:"trim,escape"`
// LastName Sender last name
LastName *string `binding:"omitempty,max=255" json:"last_name,omitempty" mod:"trim,escape"`
// Nickname Sender nickname
Nickname string `binding:"required,min=1,max=255" json:"nickname" mod:"trim,escape"`
// Phone Sender phone
Phone *string `json:"phone" mod:"trim,escape"`
// ProfileURL Sender profile URL
ProfileURL *string `json:"profile_url" mod:"trim,escape"`
// SecondaryExternalIDs Array of additional external customer identifiers
SecondaryExternalIDs []string `binding:"omitempty,dive,min=0,max=64" json:"secondary_external_ids"`
Utm *Utm `json:"utm"`
}
SendMessageRequestCustomer Contains information about the customer sending a message
type SendMessageRequestMessage ¶
type SendMessageRequestMessage struct {
// CreatedAt Message creation date
CreatedAt *time.Time `binding:"omitempty" json:"created_at"`
// ExternalID External identifier of a message
ExternalID *string `binding:"omitempty,min=0,max=255" json:"external_id"`
// Items List of media objects in a message
Items []SendMessageRequestMessageFileItem `binding:"omitempty,min=1,max=20,dive" json:"items"`
// Note Message description (for messages with media data)
Note string `binding:"omitempty,min=1,max=64000" json:"note" mod:"trim,escape"`
Order *MessageOrder `binding:"required_if=Type order" json:"order,omitempty"`
// PageLink Link to the page from which the message was sent
PageLink *string `binding:"omitempty,web_url_length,web_url" json:"page_link,omitempty"`
Product *MessageProduct `binding:"required_if=Type product" json:"product,omitempty"`
// Text Message text
Text string `binding:"min=0,max=65535" json:"text"`
Type MessageType `binding:"required,enum-valid" json:"type"`
}
SendMessageRequestMessage Defines the message content in a sending request
type SendMessageRequestMessageFileItem ¶
type SendMessageRequestMessageFileItem struct {
// Caption Description of the message media attachment
Caption string `binding:"omitempty,max=1024" json:"caption,omitempty" mod:"trim,escape"`
// ID UUID of the uploaded file
ID openapi_types.UUID `binding:"required" json:"id"`
}
SendMessageRequestMessageFileItem Represents a file attachment in a message
type SendMessageResp ¶
type SendMessageResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SendMessageResponse
JSONDefault *ErrorResponse
}
func ParseSendMessageResp ¶
func ParseSendMessageResp(rsp *http.Response) (*SendMessageResp, error)
ParseSendMessageResp parses an HTTP response from a SendMessageWithResponse call
func (SendMessageResp) Error ¶ added in v0.0.6
func (r SendMessageResp) Error() error
func (SendMessageResp) Status ¶
func (r SendMessageResp) Status() string
Status returns HTTPResponse.Status
func (SendMessageResp) StatusCode ¶
func (r SendMessageResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SendMessageResponse ¶
type SendMessageResponse struct {
// MessageID Identifier of the created message
MessageID int64 `json:"message_id"`
// Time Message creation time
Time time.Time `json:"time"`
// Warnings Warnings that occurred while creating a message
Warnings []string `json:"warnings,omitempty"`
}
SendMessageResponse defines model for SendMessageResponse.
type SendingError ¶
type SendingError struct {
Code SendingErrorCode `binding:"enum-valid" json:"code"`
// ExternalCode External error code
ExternalCode *string `binding:"omitempty,max=100" json:"external_code,omitempty"`
// Message Description of the error that occurred while sending
Message string `json:"message" mod:"trim,escape"`
}
SendingError Details about the error that occurred during the sending process
type SendingErrorCode ¶
type SendingErrorCode string
SendingErrorCode Code representing possible sending error codes
const ( SendingErrorCodeAccessRestricted SendingErrorCode = "access_restricted" SendingErrorCodeCustomerNotExists SendingErrorCode = "customer_not_exists" SendingErrorCodeGeneral SendingErrorCode = "general" SendingErrorCodeReplyTimedOut SendingErrorCode = "reply_timed_out" SendingErrorCodeSpamSuspicion SendingErrorCode = "spam_suspicion" )
Defines values for SendingErrorCode.
func (SendingErrorCode) EnumValues ¶
func (SendingErrorCode) EnumValues() []string
EnumValues returns all valid values for SendingErrorCode.
func (*SendingErrorCode) UnmarshalJSON ¶
func (v *SendingErrorCode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for SendingErrorCode.
func (SendingErrorCode) ValidateEnum ¶
func (v SendingErrorCode) ValidateEnum() error
Validate validates the value of SendingErrorCode.
type SendingPolicy ¶
type SendingPolicy struct {
// AfterReplyTimeout Types of messages to send after response time expires
AfterReplyTimeout SendingPolicyAfterReplyTimeout `json:"after_reply_timeout,omitempty"`
// NewCustomer Types of messages to send to a new customer
NewCustomer SendingPolicyNewCustomer `json:"new_customer,omitempty"`
// Outgoing Outgoing message support
Outgoing SendingPolicyOutgoing `json:"outgoing,omitempty"`
}
SendingPolicy Message sending policy
type SendingPolicyAfterReplyTimeout ¶
type SendingPolicyAfterReplyTimeout string
SendingPolicyAfterReplyTimeout Types of messages to send after response time expires
const ( SendingPolicyAfterReplyTimeoutNo SendingPolicyAfterReplyTimeout = "no" SendingPolicyAfterReplyTimeoutTemplate SendingPolicyAfterReplyTimeout = "template" )
Defines values for SendingPolicyAfterReplyTimeout.
func (SendingPolicyAfterReplyTimeout) EnumValues ¶
func (SendingPolicyAfterReplyTimeout) EnumValues() []string
EnumValues returns all valid values for SendingPolicyAfterReplyTimeout.
func (*SendingPolicyAfterReplyTimeout) UnmarshalJSON ¶
func (v *SendingPolicyAfterReplyTimeout) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for SendingPolicyAfterReplyTimeout.
func (SendingPolicyAfterReplyTimeout) ValidateEnum ¶
func (v SendingPolicyAfterReplyTimeout) ValidateEnum() error
Validate validates the value of SendingPolicyAfterReplyTimeout.
type SendingPolicyNewCustomer ¶
type SendingPolicyNewCustomer string
SendingPolicyNewCustomer Types of messages to send to a new customer
const ( SendingPolicyNewCustomerNo SendingPolicyNewCustomer = "no" SendingPolicyNewCustomerTemplate SendingPolicyNewCustomer = "template" SendingPolicyNewCustomerText SendingPolicyNewCustomer = "text" )
Defines values for SendingPolicyNewCustomer.
func (SendingPolicyNewCustomer) EnumValues ¶
func (SendingPolicyNewCustomer) EnumValues() []string
EnumValues returns all valid values for SendingPolicyNewCustomer.
func (*SendingPolicyNewCustomer) UnmarshalJSON ¶
func (v *SendingPolicyNewCustomer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for SendingPolicyNewCustomer.
func (SendingPolicyNewCustomer) ValidateEnum ¶
func (v SendingPolicyNewCustomer) ValidateEnum() error
Validate validates the value of SendingPolicyNewCustomer.
type SendingPolicyOutgoing ¶
type SendingPolicyOutgoing string
SendingPolicyOutgoing Outgoing message support
const ( SendingPolicyOutgoingAllowed SendingPolicyOutgoing = "allowed" SendingPolicyOutgoingRestricted SendingPolicyOutgoing = "restricted" )
Defines values for SendingPolicyOutgoing.
func (SendingPolicyOutgoing) EnumValues ¶
func (SendingPolicyOutgoing) EnumValues() []string
EnumValues returns all valid values for SendingPolicyOutgoing.
func (*SendingPolicyOutgoing) UnmarshalJSON ¶
func (v *SendingPolicyOutgoing) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for SendingPolicyOutgoing.
func (SendingPolicyOutgoing) ValidateEnum ¶
func (v SendingPolicyOutgoing) ValidateEnum() error
Validate validates the value of SendingPolicyOutgoing.
type StatusSetting ¶
type StatusSetting struct {
// Delivered Support for operation with messages of the given type
Delivered ChannelFeature `json:"delivered,omitempty"`
// Read Support for operation with messages of the given type
Read ChannelFeature `json:"read,omitempty"`
}
StatusSetting Transmitting message status information
type Suggestion ¶
type Suggestion struct {
// Payload Quick response payload
Payload string `json:"payload,omitempty"`
// Title Quick response name
Title string `json:"title,omitempty"`
Type SuggestionType `binding:"enum-valid" json:"type,omitempty"`
}
Suggestion Quick response suggestion
type SuggestionType ¶
type SuggestionType string
SuggestionType Quick response type
const ( SuggestionTypeEmail SuggestionType = "email" SuggestionTypePhone SuggestionType = "phone" SuggestionTypeText SuggestionType = "text" SuggestionTypeUrl SuggestionType = "url" )
Defines values for SuggestionType.
func (SuggestionType) EnumValues ¶
func (SuggestionType) EnumValues() []string
EnumValues returns all valid values for SuggestionType.
func (*SuggestionType) UnmarshalJSON ¶
func (v *SuggestionType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for SuggestionType.
func (SuggestionType) ValidateEnum ¶
func (v SuggestionType) ValidateEnum() error
Validate validates the value of SuggestionType.
type Suggestions ¶
type Suggestions struct {
// Email Support for operation with messages of the given type
Email ChannelFeature `json:"email,omitempty"`
// Phone Support for operation with messages of the given type
Phone ChannelFeature `json:"phone,omitempty"`
// Text Support for operation with messages of the given type
Text ChannelFeature `json:"text,omitempty"`
// Url Support for operation with messages of the given type
Url ChannelFeature `json:"url,omitempty"`
}
Suggestions Support for quick response types
type SystemAction ¶
type SystemAction string
SystemAction System action of the message (for system type messages only)
const ( SystemActionCustomerBlocked SystemAction = "customer_blocked" SystemActionCustomerUnblocked SystemAction = "customer_unblocked" SystemActionDialogAssign SystemAction = "dialog_assign" SystemActionDialogClosed SystemAction = "dialog_closed" SystemActionDialogOpened SystemAction = "dialog_opened" SystemActionDialogTagAdded SystemAction = "dialog_tag_added" SystemActionDialogTagRemoved SystemAction = "dialog_tag_removed" SystemActionDialogUnassign SystemAction = "dialog_unassign" SystemActionUserJoined SystemAction = "user_joined" SystemActionUserLeft SystemAction = "user_left" )
Defines values for SystemAction.
func (SystemAction) EnumValues ¶
func (SystemAction) EnumValues() []string
EnumValues returns all valid values for SystemAction.
func (*SystemAction) UnmarshalJSON ¶
func (v *SystemAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for SystemAction.
func (SystemAction) ValidateEnum ¶
func (v SystemAction) ValidateEnum() error
Validate validates the value of SystemAction.
type SystemMessage ¶
type SystemMessage struct {
// Action System action of the message (for system type messages only)
Action SystemAction `json:"action"`
// Responsible Details about a user
Responsible *UserRef `json:"responsible,omitempty"`
// User Details about a user
User *UserRef `json:"user,omitempty"`
}
SystemMessage Represents system-generated events in messaging
type Template ¶
type Template struct {
// Body Template body
Body string `json:"body" mod:"trim,escape"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Template category
Category string `json:"category,omitempty"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// Code Template unique code
Code *string `json:"code"`
// Enabled Template activity indicator
Enabled bool `json:"enabled"`
// Example Template example
Example *TemplateExample `json:"example,omitempty"`
Footer string `json:"footer,omitempty"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// ID Template identifier
ID int64 `json:"id"`
// Lang Template language
Lang string `json:"lang,omitempty"`
// Name Template name
Name string `binding:"required,min=1,max=512" json:"name" mod:"trim,escape"`
Quality *TemplateQuality `binding:"omitempty,enum-valid" json:"quality,omitempty"`
RejectionReason RejectReason `binding:"omitempty,enum-valid" json:"rejection_reason,omitempty"`
Template []TemplateItem `json:"template"`
Type TemplateType `json:"type,omitempty"`
VerificationStatus TemplateVerificationStatus `binding:"omitempty,enum-valid" json:"verification_status,omitempty"`
}
Template defines model for Template.
type TemplateBase ¶
type TemplateBase struct {
// Body Template body
Body string `json:"body" mod:"trim,escape"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Template category
Category *string `json:"category,omitempty" mod:"trim,escape"`
Footer *string `json:"footer,omitempty" mod:"trim,escape"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Template language
Lang *string `json:"lang,omitempty" mod:"trim,escape"`
// Name Template name
Name string `binding:"required,min=1,max=512" json:"name" mod:"trim,escape"`
Quality *TemplateQuality `binding:"omitempty,enum-valid" json:"quality,omitempty"`
RejectionReason *RejectReason `binding:"omitempty,enum-valid" json:"rejection_reason,omitempty" mod:"trim,escape"`
Template []TemplateItem `json:"template"`
VerificationStatus *TemplateVerificationStatus `binding:"omitempty,enum-valid" json:"verification_status,omitempty"`
}
TemplateBase Template base
type TemplateButton ¶
type TemplateButton struct {
// Label Button name
Label string `json:"label"`
// Phone Phone number (for button type `phone`)
Phone *string `json:"phone,omitempty"`
// Type Button type
Type TemplateButtonType `json:"type"`
// Url URL address (for button type `url`)
Url *string `json:"url,omitempty"`
}
TemplateButton Template button
type TemplateButtonType ¶
type TemplateButtonType string
TemplateButtonType Button type
const ( TemplateButtonTypePhone TemplateButtonType = "phone" TemplateButtonTypePlain TemplateButtonType = "plain" TemplateButtonTypeUrl TemplateButtonType = "url" )
Defines values for TemplateButtonType.
func (TemplateButtonType) EnumValues ¶
func (TemplateButtonType) EnumValues() []string
EnumValues returns all valid values for TemplateButtonType.
func (*TemplateButtonType) UnmarshalJSON ¶
func (v *TemplateButtonType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateButtonType.
func (TemplateButtonType) ValidateEnum ¶
func (v TemplateButtonType) ValidateEnum() error
Validate validates the value of TemplateButtonType.
type TemplateButtons ¶
type TemplateButtons struct {
Items []TemplateButton `json:"items,omitempty"`
}
TemplateButtons List of template buttons
type TemplateCodePath ¶
type TemplateCodePath = string
TemplateCodePath defines model for TemplateCodePath.
type TemplateExample ¶
type TemplateExample struct {
// Attachments Template attachments
Attachments []TemplateExampleAttachment `json:"attachments,omitempty"`
// Body Array of example template body values
Body []string `json:"body,omitempty"`
// Buttons Array of example template button values
Buttons [][]string `json:"buttons,omitempty"`
// Header Array of example values for the header section of the template
Header []string `json:"header,omitempty"`
}
TemplateExample Template example
type TemplateExampleAttachment ¶
type TemplateExampleAttachment struct {
// Caption Original file name
Caption string `json:"caption,omitempty"`
// ID UID of the uploaded file
ID openapi_types.UUID `json:"id"`
}
TemplateExampleAttachment Example of a template attachment
type TemplateHeader ¶
type TemplateHeader struct {
Content TemplateHeaderContent `json:"content,omitempty"`
}
TemplateHeader Header section of the template
type TemplateHeaderContent ¶
type TemplateHeaderContent struct {
// Body Text content of the header section (for content type `text`)
Body string `json:"body,omitempty"`
// Type Header section type
Type TemplateHeaderContentType `json:"type"`
}
TemplateHeaderContent Template header content
type TemplateHeaderContentType ¶
type TemplateHeaderContentType string
TemplateHeaderContentType Header section type
const ( TemplateHeaderContentTypeDocument TemplateHeaderContentType = "document" TemplateHeaderContentTypeImage TemplateHeaderContentType = "image" TemplateHeaderContentTypeText TemplateHeaderContentType = "text" TemplateHeaderContentTypeVideo TemplateHeaderContentType = "video" )
Defines values for TemplateHeaderContentType.
func (TemplateHeaderContentType) EnumValues ¶
func (TemplateHeaderContentType) EnumValues() []string
EnumValues returns all valid values for TemplateHeaderContentType.
func (*TemplateHeaderContentType) UnmarshalJSON ¶
func (v *TemplateHeaderContentType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateHeaderContentType.
func (TemplateHeaderContentType) ValidateEnum ¶
func (v TemplateHeaderContentType) ValidateEnum() error
Validate validates the value of TemplateHeaderContentType.
type TemplateItem ¶
type TemplateItem struct {
// Text Text of the template item (for type `text`)
Text string `json:"text,omitempty"`
Type TemplateItemType `json:"-"`
// VarType Template variable (for type `var`)
VarType TemplateVarType `json:"var,omitempty"`
}
TemplateItem Template item
type TemplateItemType ¶
type TemplateItemType uint8
TemplateItemType Template item type
const ( TemplateItemTypeText TemplateItemType = 1 TemplateItemTypeVar TemplateItemType = 2 )
Defines values for TemplateItemType.
func (TemplateItemType) EnumValues ¶
func (TemplateItemType) EnumValues() []string
EnumValues returns all valid values for TemplateItemType.
func (*TemplateItemType) UnmarshalJSON ¶
func (v *TemplateItemType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateItemType.
func (TemplateItemType) ValidateEnum ¶
func (v TemplateItemType) ValidateEnum() error
Validate validates the value of TemplateItemType.
type TemplateListResponse ¶
type TemplateListResponse = []Template
TemplateListResponse defines model for TemplateListResponse.
type TemplateQuality ¶
type TemplateQuality string
TemplateQuality Template quality
const ( TemplateQualityHigh TemplateQuality = "high" TemplateQualityLow TemplateQuality = "low" TemplateQualityMedium TemplateQuality = "medium" TemplateQualityPending TemplateQuality = "pending" )
Defines values for TemplateQuality.
func (TemplateQuality) EnumValues ¶
func (TemplateQuality) EnumValues() []string
EnumValues returns all valid values for TemplateQuality.
func (*TemplateQuality) UnmarshalJSON ¶
func (v *TemplateQuality) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateQuality.
func (TemplateQuality) ValidateEnum ¶
func (v TemplateQuality) ValidateEnum() error
Validate validates the value of TemplateQuality.
type TemplateSetting ¶
type TemplateSetting struct {
// Creation Support for creating templates in the system
Creation bool `json:"creation,omitempty"`
}
TemplateSetting Support for message templates
type TemplateType ¶
type TemplateType string
TemplateType Template type
const ( TemplateTypeMedia TemplateType = "media" TemplateTypeText TemplateType = "text" )
Defines values for TemplateType.
func (TemplateType) EnumValues ¶
func (TemplateType) EnumValues() []string
EnumValues returns all valid values for TemplateType.
func (*TemplateType) UnmarshalJSON ¶
func (v *TemplateType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateType.
func (TemplateType) ValidateEnum ¶
func (v TemplateType) ValidateEnum() error
Validate validates the value of TemplateType.
type TemplateVarType ¶
type TemplateVarType uint8
TemplateVarType Template variable type
const ( TemplateVarTypeCustom TemplateVarType = 0 TemplateVarTypeFirstname TemplateVarType = 2 TemplateVarTypeLastname TemplateVarType = 3 TemplateVarTypeName TemplateVarType = 1 )
Defines values for TemplateVarType.
func (TemplateVarType) EnumValues ¶
func (TemplateVarType) EnumValues() []string
EnumValues returns all valid values for TemplateVarType.
func (*TemplateVarType) UnmarshalJSON ¶
func (v *TemplateVarType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateVarType.
func (TemplateVarType) ValidateEnum ¶
func (v TemplateVarType) ValidateEnum() error
Validate validates the value of TemplateVarType.
type TemplateVerificationStatus ¶
type TemplateVerificationStatus string
TemplateVerificationStatus Template verification status
const ( TemplateVerificationStatusApproved TemplateVerificationStatus = "approved" TemplateVerificationStatusDisabled TemplateVerificationStatus = "disabled" TemplateVerificationStatusPaused TemplateVerificationStatus = "paused" TemplateVerificationStatusPending TemplateVerificationStatus = "pending" TemplateVerificationStatusRejected TemplateVerificationStatus = "rejected" )
Defines values for TemplateVerificationStatus.
func (TemplateVerificationStatus) EnumValues ¶
func (TemplateVerificationStatus) EnumValues() []string
EnumValues returns all valid values for TemplateVerificationStatus.
func (*TemplateVerificationStatus) UnmarshalJSON ¶
func (v *TemplateVerificationStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateVerificationStatus.
func (TemplateVerificationStatus) ValidateEnum ¶
func (v TemplateVerificationStatus) ValidateEnum() error
Validate validates the value of TemplateVerificationStatus.
type TextMessage ¶
type TextMessage struct {
// Content Message text
Content string `json:"content,omitempty"`
// Quote Quoted message
Quote *QuoteMessage `json:"quote,omitempty"`
}
TextMessage Text message
type TextMessageSetting ¶
type TextMessageSetting struct {
// Creating Support for operation with messages of the given type
Creating ChannelFeature `json:"creating,omitempty"`
// Deleting Support for operation with messages of the given type
Deleting ChannelFeature `json:"deleting,omitempty"`
// Editing Support for operation with messages of the given type
Editing ChannelFeature `json:"editing,omitempty"`
// MaxCharsCount Maximum number of characters in a text message
MaxCharsCount *uint16 `json:"max_chars_count,omitempty"`
// Quoting Support for operation with messages of the given type
Quoting ChannelFeature `json:"quoting,omitempty"`
// Reaction Support for operation with messages of the given type
Reaction ChannelFeature `json:"reaction,omitempty"`
}
TextMessageSetting Text messages support
type UpdateChannelJSONBody ¶
type UpdateChannelJSONBody struct {
// AvatarUrl Channel avatar URL
AvatarUrl *string `binding:"omitempty,max=255" json:"avatar_url,omitempty" mod:"trim,escape"`
// ExternalID External identifier
ExternalID *string `binding:"omitempty,max=64" json:"external_id,omitempty" mod:"trim,escape"`
// Name Channel name
Name *string `binding:"omitempty,max=100" json:"name,omitempty" mod:"trim,escape"`
// Settings Channel settings
Settings ChannelSettings `json:"settings,omitempty"`
Type *ChannelType `binding:"omitempty,enum-valid" json:"type,omitempty"`
}
UpdateChannelJSONBody defines parameters for UpdateChannel.
type UpdateChannelJSONRequestBody ¶
type UpdateChannelJSONRequestBody UpdateChannelJSONBody
UpdateChannelJSONRequestBody defines body for UpdateChannel for application/json ContentType.
type UpdateChannelRequest ¶
type UpdateChannelRequest struct {
// AvatarUrl Channel avatar URL
AvatarUrl *string `binding:"omitempty,max=255" json:"avatar_url,omitempty" mod:"trim,escape"`
// ExternalID External identifier
ExternalID *string `binding:"omitempty,max=64" json:"external_id,omitempty" mod:"trim,escape"`
// Name Channel name
Name *string `binding:"omitempty,max=100" json:"name,omitempty" mod:"trim,escape"`
// Settings Channel settings
Settings ChannelSettings `json:"settings,omitempty"`
Type *ChannelType `binding:"omitempty,enum-valid" json:"type,omitempty"`
}
UpdateChannelRequest defines model for UpdateChannelRequest.
type UpdateChannelResp ¶
type UpdateChannelResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *UpdateChannelResponse
JSONDefault *ErrorResponse
}
func ParseUpdateChannelResp ¶
func ParseUpdateChannelResp(rsp *http.Response) (*UpdateChannelResp, error)
ParseUpdateChannelResp parses an HTTP response from a UpdateChannelWithResponse call
func (UpdateChannelResp) Error ¶ added in v0.0.6
func (r UpdateChannelResp) Error() error
func (UpdateChannelResp) Status ¶
func (r UpdateChannelResp) Status() string
Status returns HTTPResponse.Status
func (UpdateChannelResp) StatusCode ¶
func (r UpdateChannelResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateChannelResponse ¶
type UpdateChannelResponse struct {
// ID Channel identifier
ID int64 `json:"id"`
// UpdatedAt Date and time of last update
UpdatedAt time.Time `json:"updated_at" time_format:"2006-01-02T15:04:05Z07:00"`
}
UpdateChannelResponse defines model for UpdateChannelResponse.
type UpdateTemplateJSONBody ¶
type UpdateTemplateJSONBody struct {
// Body Template body
Body string `json:"body" mod:"trim,escape"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Template category
Category *string `json:"category,omitempty" mod:"trim,escape"`
Footer *string `json:"footer,omitempty" mod:"trim,escape"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Template language
Lang *string `json:"lang,omitempty" mod:"trim,escape"`
// Name Template name
Name string `binding:"required,min=1,max=512" json:"name" mod:"trim,escape"`
Quality *TemplateQuality `binding:"omitempty,enum-valid" json:"quality,omitempty"`
RejectionReason *RejectReason `binding:"omitempty,enum-valid" json:"rejection_reason,omitempty" mod:"trim,escape"`
Template []TemplateItem `json:"template"`
VerificationStatus TemplateVerificationStatus `binding:"omitempty,enum-valid" json:"verification_status,omitempty"`
}
UpdateTemplateJSONBody defines parameters for UpdateTemplate.
type UpdateTemplateJSONRequestBody ¶
type UpdateTemplateJSONRequestBody UpdateTemplateJSONBody
UpdateTemplateJSONRequestBody defines body for UpdateTemplate for application/json ContentType.
type UpdateTemplateRequest ¶
type UpdateTemplateRequest struct {
// Body Template body
Body string `json:"body" mod:"trim,escape"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Template category
Category *string `json:"category,omitempty" mod:"trim,escape"`
Footer *string `json:"footer,omitempty" mod:"trim,escape"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Template language
Lang *string `json:"lang,omitempty" mod:"trim,escape"`
// Name Template name
Name string `binding:"required,min=1,max=512" json:"name" mod:"trim,escape"`
Quality *TemplateQuality `binding:"omitempty,enum-valid" json:"quality,omitempty"`
RejectionReason *RejectReason `binding:"omitempty,enum-valid" json:"rejection_reason,omitempty" mod:"trim,escape"`
Template []TemplateItem `json:"template"`
VerificationStatus TemplateVerificationStatus `binding:"omitempty,enum-valid" json:"verification_status,omitempty"`
}
UpdateTemplateRequest defines model for UpdateTemplateRequest.
type UpdateTemplateResp ¶
type UpdateTemplateResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmptyResponse
JSONDefault *ErrorResponse
}
func ParseUpdateTemplateResp ¶
func ParseUpdateTemplateResp(rsp *http.Response) (*UpdateTemplateResp, error)
ParseUpdateTemplateResp parses an HTTP response from a UpdateTemplateWithResponse call
func (UpdateTemplateResp) Error ¶ added in v0.0.6
func (r UpdateTemplateResp) Error() error
func (UpdateTemplateResp) Status ¶
func (r UpdateTemplateResp) Status() string
Status returns HTTPResponse.Status
func (UpdateTemplateResp) StatusCode ¶
func (r UpdateTemplateResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UploadFileByUrlJSONBody ¶
type UploadFileByUrlJSONBody struct {
// Url Upload source URL
Url string `binding:"web_url" json:"url" mod:"trim,escape"`
}
UploadFileByUrlJSONBody defines parameters for UploadFileByUrl.
type UploadFileByUrlJSONRequestBody ¶
type UploadFileByUrlJSONRequestBody UploadFileByUrlJSONBody
UploadFileByUrlJSONRequestBody defines body for UploadFileByUrl for application/json ContentType.
type UploadFileByUrlRequest ¶
type UploadFileByUrlRequest struct {
// Url Upload source URL
Url string `binding:"web_url" json:"url" mod:"trim,escape"`
}
UploadFileByUrlRequest defines model for UploadFileByUrlRequest.
type UploadFileByUrlResp ¶
type UploadFileByUrlResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FileResponse
JSONDefault *ErrorResponse
}
func ParseUploadFileByUrlResp ¶
func ParseUploadFileByUrlResp(rsp *http.Response) (*UploadFileByUrlResp, error)
ParseUploadFileByUrlResp parses an HTTP response from a UploadFileByUrlWithResponse call
func (UploadFileByUrlResp) Error ¶ added in v0.0.6
func (r UploadFileByUrlResp) Error() error
func (UploadFileByUrlResp) Status ¶
func (r UploadFileByUrlResp) Status() string
Status returns HTTPResponse.Status
func (UploadFileByUrlResp) StatusCode ¶
func (r UploadFileByUrlResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UploadFileMultipartBody ¶
type UploadFileMultipartBody = openapi_types.File
UploadFileMultipartBody defines parameters for UploadFile.
type UploadFileMultipartRequestBody ¶
type UploadFileMultipartRequestBody = UploadFileMultipartBody
UploadFileMultipartRequestBody defines body for UploadFile for multipart/form-data ContentType.
type UploadFileResp ¶
type UploadFileResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FileResponse
JSONDefault *ErrorResponse
}
func ParseUploadFileResp ¶
func ParseUploadFileResp(rsp *http.Response) (*UploadFileResp, error)
ParseUploadFileResp parses an HTTP response from a UploadFileWithResponse call
func (UploadFileResp) Error ¶ added in v0.0.6
func (r UploadFileResp) Error() error
func (UploadFileResp) Status ¶
func (r UploadFileResp) Status() string
Status returns HTTPResponse.Status
func (UploadFileResp) StatusCode ¶
func (r UploadFileResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UserRef ¶
type UserRef struct {
// Available User status indicator (for user of the user type only)
Available bool `json:"available,omitempty"`
// Avatar User avatar
Avatar string `json:"avatar,omitempty"`
// Email User email (for customer type user only)
Email string `json:"email,omitempty"`
// ExternalID External identifier of a user
ExternalID string `json:"external_id"`
// FirstName User name (for customer and user types only)
FirstName string `json:"first_name,omitempty"`
// ID User identifier
ID int64 `json:"id"`
// IsBlocked User blocking indicator (for customer type user only)
IsBlocked bool `json:"is_blocked,omitempty"`
// IsSystem System user indicator (for bot type user only)
IsSystem bool `json:"is_system,omitempty"`
// IsTechnicalAccount Technical account indicator (for user of the user type only)
IsTechnicalAccount bool `json:"is_technical_account,omitempty"`
// LastName User last name (for customer and user types only)
LastName string `json:"last_name,omitempty"`
// Name User nickname
Name string `json:"name"`
// Phone User phone number
Phone string `json:"phone,omitempty"`
// Type User type
Type UserType `json:"type"`
// Username User name (for customer type user only)
Username string `json:"username,omitempty"`
}
UserRef Details about a user
type UserType ¶
type UserType string
UserType User type
const ( UserTypeBot UserType = "bot" UserTypeChannel UserType = "channel" UserTypeCustomer UserType = "customer" UserTypeUser UserType = "user" )
Defines values for UserType.
func (UserType) EnumValues ¶
EnumValues returns all valid values for UserType.
func (*UserType) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for UserType.
func (UserType) ValidateEnum ¶
Validate validates the value of UserType.
type Utm ¶
type Utm struct {
// Campaign Campaign
Campaign *string `binding:"omitempty,min=1,max=255" json:"campaign,omitempty"`
// Content Ad content
Content *string `binding:"omitempty,min=1,max=255" json:"content,omitempty"`
// Medium Medium
Medium *string `binding:"omitempty,min=1,max=255" json:"medium,omitempty"`
// Source Source
Source *string `binding:"omitempty,min=1,max=255" json:"source,omitempty"`
// Term Keyword
Term *string `binding:"omitempty,min=1,max=255" json:"term,omitempty"`
}
Utm UTM parameters for tracking marketing campaigns
type WAChannelProperties ¶
type WAChannelProperties struct {
ChannelQuality *WAChannelQuality `binding:"omitempty,enum-valid" json:"channel_quality,omitempty"`
ChannelStatus *WAChannelStatus `binding:"omitempty,enum-valid" json:"channel_status,omitempty"`
Tier *int `binding:"omitempty,min=0" json:"tier,omitempty"`
}
WAChannelProperties WhatsApp channel properties
type WAChannelQuality ¶
type WAChannelQuality string
WAChannelQuality WhatsApp channel quality
const ( WAChannelQualityHigh WAChannelQuality = "high" WAChannelQualityLow WAChannelQuality = "low" WAChannelQualityMedium WAChannelQuality = "medium" )
Defines values for WAChannelQuality.
func (WAChannelQuality) EnumValues ¶
func (WAChannelQuality) EnumValues() []string
EnumValues returns all valid values for WAChannelQuality.
func (*WAChannelQuality) UnmarshalJSON ¶
func (v *WAChannelQuality) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WAChannelQuality.
func (WAChannelQuality) ValidateEnum ¶
func (v WAChannelQuality) ValidateEnum() error
Validate validates the value of WAChannelQuality.
type WAChannelStatus ¶
type WAChannelStatus string
WAChannelStatus WhatsApp channel status
const ( WAChannelStatusConnected WAChannelStatus = "connected" WAChannelStatusFlagged WAChannelStatus = "flagged" WAChannelStatusOffline WAChannelStatus = "offline" WAChannelStatusPending WAChannelStatus = "pending" WAChannelStatusRestricted WAChannelStatus = "restricted" )
Defines values for WAChannelStatus.
func (WAChannelStatus) EnumValues ¶
func (WAChannelStatus) EnumValues() []string
EnumValues returns all valid values for WAChannelStatus.
func (*WAChannelStatus) UnmarshalJSON ¶
func (v *WAChannelStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WAChannelStatus.
func (WAChannelStatus) ValidateEnum ¶
func (v WAChannelStatus) ValidateEnum() error
Validate validates the value of WAChannelStatus.
type WebhookBotData ¶ added in v0.0.3
type WebhookBotData struct {
// Avatar URL of the bot's avatar
Avatar string `json:"avatar"`
// ID Bot identifier
ID int64 `json:"id"`
// Name Bot name
Name string `json:"name"`
}
WebhookBotData Represents bot data in the webhook
type WebhookCustomerData ¶ added in v0.0.3
type WebhookCustomerData struct {
// Avatar URL of the customer's avatar
Avatar string `json:"avatar"`
// FirstName Customer's first name
FirstName string `json:"first_name"`
// LastName Customer's last name
LastName string `json:"last_name"`
}
WebhookCustomerData Represents customer data in the webhook
type WebhookEmptyResponse ¶ added in v0.0.3
type WebhookEmptyResponse = interface{}
WebhookEmptyResponse Empty response for webhook events that do not require a response
type WebhookMessageDeleted ¶ added in v0.0.3
type WebhookMessageDeleted struct {
// Data Webhook event for a message being deleted
Data WebhookMessageDeletedData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookMessageDeletedType `json:"type"`
}
WebhookMessageDeleted defines model for WebhookMessageDeleted.
type WebhookMessageDeletedData ¶ added in v0.0.3
type WebhookMessageDeletedData struct {
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalMessageID External identifier of the message
ExternalMessageID string `json:"external_message_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
}
WebhookMessageDeletedData defines model for WebhookMessageDeletedData.
type WebhookMessageDeletedType ¶ added in v0.0.3
type WebhookMessageDeletedType string
WebhookMessageDeletedType defines model for WebhookMessageDeleted.Type.
const (
WebhookMessageDeletedTypeMessageDeleted WebhookMessageDeletedType = "message_deleted"
)
Defines values for WebhookMessageDeletedType.
func (WebhookMessageDeletedType) EnumValues ¶ added in v0.0.3
func (WebhookMessageDeletedType) EnumValues() []string
EnumValues returns all valid values for WebhookMessageDeletedType.
func (*WebhookMessageDeletedType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookMessageDeletedType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookMessageDeletedType.
func (WebhookMessageDeletedType) ValidateEnum ¶ added in v0.0.3
func (v WebhookMessageDeletedType) ValidateEnum() error
Validate validates the value of WebhookMessageDeletedType.
type WebhookMessageFile ¶ added in v0.0.3
type WebhookMessageFile struct {
// Caption Text description of the media attachment
Caption string `json:"caption,omitempty"`
// Height Image height in pixels (for image type messages only)
Height int `json:"height,omitempty"`
// ID UUID of the attached file
ID openapi_types.UUID `json:"id,omitempty"`
// Size Attachment size (in bytes)
Size int `json:"size,omitempty"`
// Width Image width in pixels (for image type messages only)
Width int `json:"width,omitempty"`
}
WebhookMessageFile Attached message file
type WebhookMessageMeta ¶ added in v0.0.3
type WebhookMessageMeta struct {
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
}
WebhookMessageMeta Metadata for webhook events
type WebhookMessageReactionAdd ¶ added in v0.0.3
type WebhookMessageReactionAdd struct {
// Data Webhook event data for a reaction being added to a message
Data WebhookMessageReactionAddData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookMessageReactionAddType `json:"type"`
}
WebhookMessageReactionAdd defines model for WebhookMessageReactionAdd.
type WebhookMessageReactionAddData ¶ added in v0.0.3
type WebhookMessageReactionAddData struct {
// AllReactions List of all reactions on the message
AllReactions []WebhookReactionItem `json:"all_reactions"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalMessageID External identifier of the message
ExternalMessageID string `json:"external_message_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
// NewReaction New reaction added to the message
NewReaction string `json:"new_reaction"`
// OldReaction Old reaction removed from the message
OldReaction *string `json:"old_reaction,omitempty"`
}
WebhookMessageReactionAddData defines model for WebhookMessageReactionAddData.
type WebhookMessageReactionAddType ¶ added in v0.0.3
type WebhookMessageReactionAddType string
WebhookMessageReactionAddType defines model for WebhookMessageReactionAdd.Type.
const (
WebhookMessageReactionAddTypeReactionAdd WebhookMessageReactionAddType = "reaction_add"
)
Defines values for WebhookMessageReactionAddType.
func (WebhookMessageReactionAddType) EnumValues ¶ added in v0.0.3
func (WebhookMessageReactionAddType) EnumValues() []string
EnumValues returns all valid values for WebhookMessageReactionAddType.
func (*WebhookMessageReactionAddType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookMessageReactionAddType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookMessageReactionAddType.
func (WebhookMessageReactionAddType) ValidateEnum ¶ added in v0.0.3
func (v WebhookMessageReactionAddType) ValidateEnum() error
Validate validates the value of WebhookMessageReactionAddType.
type WebhookMessageReactionData ¶ added in v0.0.3
type WebhookMessageReactionData struct {
// AllReactions List of all reactions on the message
AllReactions []WebhookReactionItem `json:"all_reactions"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalMessageID External identifier of the message
ExternalMessageID string `json:"external_message_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
// NewReaction New reaction added to the message
NewReaction *string `json:"new_reaction,omitempty"`
// OldReaction Old reaction removed from the message
OldReaction *string `json:"old_reaction,omitempty"`
}
WebhookMessageReactionData defines model for WebhookMessageReactionData.
type WebhookMessageReactionDelete ¶ added in v0.0.3
type WebhookMessageReactionDelete struct {
// Data Webhook event data for a reaction being deleted from a message
Data WebhookMessageReactionDeleteData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookMessageReactionDeleteType `json:"type"`
}
WebhookMessageReactionDelete defines model for WebhookMessageReactionDelete.
type WebhookMessageReactionDeleteData ¶ added in v0.0.3
type WebhookMessageReactionDeleteData struct {
// AllReactions List of all reactions on the message
AllReactions []WebhookReactionItem `json:"all_reactions"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalMessageID External identifier of the message
ExternalMessageID string `json:"external_message_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
// NewReaction New reaction added to the message
NewReaction *string `json:"new_reaction,omitempty"`
// OldReaction Old reaction removed from the message
OldReaction *string `json:"old_reaction,omitempty"`
}
WebhookMessageReactionDeleteData defines model for WebhookMessageReactionDeleteData.
type WebhookMessageReactionDeleteType ¶ added in v0.0.3
type WebhookMessageReactionDeleteType string
WebhookMessageReactionDeleteType defines model for WebhookMessageReactionDelete.Type.
const (
WebhookMessageReactionDeleteTypeReactionDelete WebhookMessageReactionDeleteType = "reaction_delete"
)
Defines values for WebhookMessageReactionDeleteType.
func (WebhookMessageReactionDeleteType) EnumValues ¶ added in v0.0.3
func (WebhookMessageReactionDeleteType) EnumValues() []string
EnumValues returns all valid values for WebhookMessageReactionDeleteType.
func (*WebhookMessageReactionDeleteType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookMessageReactionDeleteType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookMessageReactionDeleteType.
func (WebhookMessageReactionDeleteType) ValidateEnum ¶ added in v0.0.3
func (v WebhookMessageReactionDeleteType) ValidateEnum() error
Validate validates the value of WebhookMessageReactionDeleteType.
type WebhookMessageRead ¶ added in v0.0.3
type WebhookMessageRead struct {
// Data Webhook event for a message being read
Data WebhookMessageReadData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookMessageReadType `json:"type"`
}
WebhookMessageRead defines model for WebhookMessageRead.
type WebhookMessageReadData ¶ added in v0.0.3
type WebhookMessageReadData struct {
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalMessageID External identifier of the message
ExternalMessageID string `json:"external_message_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
}
WebhookMessageReadData defines model for WebhookMessageReadData.
type WebhookMessageReadType ¶ added in v0.0.3
type WebhookMessageReadType string
WebhookMessageReadType defines model for WebhookMessageRead.Type.
const (
WebhookMessageReadTypeMessageRead WebhookMessageReadType = "message_read"
)
Defines values for WebhookMessageReadType.
func (WebhookMessageReadType) EnumValues ¶ added in v0.0.3
func (WebhookMessageReadType) EnumValues() []string
EnumValues returns all valid values for WebhookMessageReadType.
func (*WebhookMessageReadType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookMessageReadType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookMessageReadType.
func (WebhookMessageReadType) ValidateEnum ¶ added in v0.0.3
func (v WebhookMessageReadType) ValidateEnum() error
Validate validates the value of WebhookMessageReadType.
type WebhookMessageSendingError ¶ added in v0.0.3
type WebhookMessageSendingError struct {
// Code Message error code
Code MessageErrorCode `json:"code"`
// ExternalCode External error code, if available
ExternalCode *string `json:"external_code,omitempty"`
// Message Error message
Message string `json:"message" mod:"trim,escape"`
}
WebhookMessageSendingError Represents an error that occurred while sending a message
type WebhookMessageSent ¶ added in v0.0.3
type WebhookMessageSent struct {
// Data Webhook event data for a message being sent
Data WebhookMessageSentData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookMessageSentType `json:"type"`
}
WebhookMessageSent defines model for WebhookMessageSent.
type WebhookMessageSentData ¶ added in v0.0.3
type WebhookMessageSentData struct {
// Attachments Transport attachments
Attachments *MessageTransportAttachments `json:"attachments,omitempty"`
// Bot Represents bot data in the webhook
Bot *WebhookBotData `json:"bot,omitempty"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// Content Message content
Content *string `json:"content"`
// Customer Represents customer data in the webhook
Customer *WebhookCustomerData `json:"customer,omitempty"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
// ID Unique identifier of the message in MessageGateway
ID int64 `json:"id"`
// InAppID System identifier for the message
InAppID *int32 `json:"in_app_id,omitempty"`
// Items List of media attachments in the message
Items []WebhookMessageFile `json:"items,omitempty"`
// Order Represents the details of an order within a message
Order *MessageOrder `json:"order,omitempty"`
// Product Describes a product mentioned in a message
Product *MessageProduct `json:"product,omitempty"`
// QuoteContent Content of the quoted message
QuoteContent *string `json:"quote_content"`
// QuoteExternalID External identifier of the quoted message
QuoteExternalID *string `json:"quote_external_id"`
// Template Represents a chat template information
Template *WebhookTemplateInfo `json:"template,omitempty"`
// Type Message type
Type MessageType `json:"type"`
// User Represents user data in the webhook
User *WebhookUserData `json:"user,omitempty"`
}
WebhookMessageSentData defines model for WebhookMessageSentData.
type WebhookMessageSentType ¶ added in v0.0.3
type WebhookMessageSentType string
WebhookMessageSentType defines model for WebhookMessageSent.Type.
const (
WebhookMessageSentTypeMessageSent WebhookMessageSentType = "message_sent"
)
Defines values for WebhookMessageSentType.
func (WebhookMessageSentType) EnumValues ¶ added in v0.0.3
func (WebhookMessageSentType) EnumValues() []string
EnumValues returns all valid values for WebhookMessageSentType.
func (*WebhookMessageSentType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookMessageSentType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookMessageSentType.
func (WebhookMessageSentType) ValidateEnum ¶ added in v0.0.3
func (v WebhookMessageSentType) ValidateEnum() error
Validate validates the value of WebhookMessageSentType.
type WebhookMessageUpdated ¶ added in v0.0.3
type WebhookMessageUpdated struct {
// Data Webhook event data for a message being updated
Data WebhookMessageUpdatedData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookMessageUpdatedType `json:"type"`
}
WebhookMessageUpdated defines model for WebhookMessageUpdated.
type WebhookMessageUpdatedData ¶ added in v0.0.3
type WebhookMessageUpdatedData struct {
// Attachments Transport attachments
Attachments *MessageTransportAttachments `json:"attachments,omitempty"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// Content Message content
Content string `json:"content"`
// ExternalChatID External identifier of the chat
ExternalChatID string `json:"external_chat_id"`
// ExternalMessageID External identifier of the message
ExternalMessageID string `json:"external_message_id"`
// ExternalUserID External identifier of the user
ExternalUserID string `json:"external_user_id"`
// Order Represents the details of an order within a message
Order *MessageOrder `json:"order,omitempty"`
// Product Describes a product mentioned in a message
Product *MessageProduct `json:"product,omitempty"`
// Type Message type
Type MessageType `json:"type"`
}
WebhookMessageUpdatedData defines model for WebhookMessageUpdatedData.
type WebhookMessageUpdatedType ¶ added in v0.0.3
type WebhookMessageUpdatedType string
WebhookMessageUpdatedType defines model for WebhookMessageUpdated.Type.
const (
WebhookMessageUpdatedTypeMessageUpdated WebhookMessageUpdatedType = "message_updated"
)
Defines values for WebhookMessageUpdatedType.
func (WebhookMessageUpdatedType) EnumValues ¶ added in v0.0.3
func (WebhookMessageUpdatedType) EnumValues() []string
EnumValues returns all valid values for WebhookMessageUpdatedType.
func (*WebhookMessageUpdatedType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookMessageUpdatedType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookMessageUpdatedType.
func (WebhookMessageUpdatedType) ValidateEnum ¶ added in v0.0.3
func (v WebhookMessageUpdatedType) ValidateEnum() error
Validate validates the value of WebhookMessageUpdatedType.
type WebhookReactionItem ¶ added in v0.0.3
type WebhookReactionItem struct {
Reaction string `json:"reaction,omitempty"`
}
WebhookReactionItem Represents a reaction item in the webhook
type WebhookRequest ¶ added in v0.0.3
type WebhookRequest = WebhookRequestData
WebhookRequest Common structure for webhook request data
type WebhookRequestData ¶ added in v0.0.3
type WebhookRequestData struct {
Data map[string]interface{} `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
// Type Type of webhook event
Type WebhookType `json:"type"`
// contains filtered or unexported fields
}
WebhookRequestData Common structure for webhook request data
func (WebhookRequestData) AsWebhookMessageDeleted ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookMessageDeleted() (WebhookMessageDeleted, error)
AsWebhookMessageDeleted returns the union data inside the WebhookRequestData as a WebhookMessageDeleted
func (WebhookRequestData) AsWebhookMessageReactionAdd ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookMessageReactionAdd() (WebhookMessageReactionAdd, error)
AsWebhookMessageReactionAdd returns the union data inside the WebhookRequestData as a WebhookMessageReactionAdd
func (WebhookRequestData) AsWebhookMessageReactionDelete ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookMessageReactionDelete() (WebhookMessageReactionDelete, error)
AsWebhookMessageReactionDelete returns the union data inside the WebhookRequestData as a WebhookMessageReactionDelete
func (WebhookRequestData) AsWebhookMessageRead ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookMessageRead() (WebhookMessageRead, error)
AsWebhookMessageRead returns the union data inside the WebhookRequestData as a WebhookMessageRead
func (WebhookRequestData) AsWebhookMessageSent ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookMessageSent() (WebhookMessageSent, error)
AsWebhookMessageSent returns the union data inside the WebhookRequestData as a WebhookMessageSent
func (WebhookRequestData) AsWebhookMessageUpdated ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookMessageUpdated() (WebhookMessageUpdated, error)
AsWebhookMessageUpdated returns the union data inside the WebhookRequestData as a WebhookMessageUpdated
func (WebhookRequestData) AsWebhookTemplateCreate ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookTemplateCreate() (WebhookTemplateCreate, error)
AsWebhookTemplateCreate returns the union data inside the WebhookRequestData as a WebhookTemplateCreate
func (WebhookRequestData) AsWebhookTemplateDelete ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookTemplateDelete() (WebhookTemplateDelete, error)
AsWebhookTemplateDelete returns the union data inside the WebhookRequestData as a WebhookTemplateDelete
func (WebhookRequestData) AsWebhookTemplateUpdate ¶ added in v0.0.3
func (t WebhookRequestData) AsWebhookTemplateUpdate() (WebhookTemplateUpdate, error)
AsWebhookTemplateUpdate returns the union data inside the WebhookRequestData as a WebhookTemplateUpdate
func (WebhookRequestData) Discriminator ¶ added in v0.0.3
func (t WebhookRequestData) Discriminator() (string, error)
func (*WebhookRequestData) FromWebhookMessageDeleted ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookMessageDeleted(v WebhookMessageDeleted) error
FromWebhookMessageDeleted overwrites any union data inside the WebhookRequestData as the provided WebhookMessageDeleted
func (*WebhookRequestData) FromWebhookMessageReactionAdd ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookMessageReactionAdd(v WebhookMessageReactionAdd) error
FromWebhookMessageReactionAdd overwrites any union data inside the WebhookRequestData as the provided WebhookMessageReactionAdd
func (*WebhookRequestData) FromWebhookMessageReactionDelete ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookMessageReactionDelete(v WebhookMessageReactionDelete) error
FromWebhookMessageReactionDelete overwrites any union data inside the WebhookRequestData as the provided WebhookMessageReactionDelete
func (*WebhookRequestData) FromWebhookMessageRead ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookMessageRead(v WebhookMessageRead) error
FromWebhookMessageRead overwrites any union data inside the WebhookRequestData as the provided WebhookMessageRead
func (*WebhookRequestData) FromWebhookMessageSent ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookMessageSent(v WebhookMessageSent) error
FromWebhookMessageSent overwrites any union data inside the WebhookRequestData as the provided WebhookMessageSent
func (*WebhookRequestData) FromWebhookMessageUpdated ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookMessageUpdated(v WebhookMessageUpdated) error
FromWebhookMessageUpdated overwrites any union data inside the WebhookRequestData as the provided WebhookMessageUpdated
func (*WebhookRequestData) FromWebhookTemplateCreate ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookTemplateCreate(v WebhookTemplateCreate) error
FromWebhookTemplateCreate overwrites any union data inside the WebhookRequestData as the provided WebhookTemplateCreate
func (*WebhookRequestData) FromWebhookTemplateDelete ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookTemplateDelete(v WebhookTemplateDelete) error
FromWebhookTemplateDelete overwrites any union data inside the WebhookRequestData as the provided WebhookTemplateDelete
func (*WebhookRequestData) FromWebhookTemplateUpdate ¶ added in v0.0.3
func (t *WebhookRequestData) FromWebhookTemplateUpdate(v WebhookTemplateUpdate) error
FromWebhookTemplateUpdate overwrites any union data inside the WebhookRequestData as the provided WebhookTemplateUpdate
func (WebhookRequestData) MarshalJSON ¶ added in v0.0.3
func (t WebhookRequestData) MarshalJSON() ([]byte, error)
func (*WebhookRequestData) MergeWebhookMessageDeleted ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookMessageDeleted(v WebhookMessageDeleted) error
MergeWebhookMessageDeleted performs a merge with any union data inside the WebhookRequestData, using the provided WebhookMessageDeleted
func (*WebhookRequestData) MergeWebhookMessageReactionAdd ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookMessageReactionAdd(v WebhookMessageReactionAdd) error
MergeWebhookMessageReactionAdd performs a merge with any union data inside the WebhookRequestData, using the provided WebhookMessageReactionAdd
func (*WebhookRequestData) MergeWebhookMessageReactionDelete ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookMessageReactionDelete(v WebhookMessageReactionDelete) error
MergeWebhookMessageReactionDelete performs a merge with any union data inside the WebhookRequestData, using the provided WebhookMessageReactionDelete
func (*WebhookRequestData) MergeWebhookMessageRead ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookMessageRead(v WebhookMessageRead) error
MergeWebhookMessageRead performs a merge with any union data inside the WebhookRequestData, using the provided WebhookMessageRead
func (*WebhookRequestData) MergeWebhookMessageSent ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookMessageSent(v WebhookMessageSent) error
MergeWebhookMessageSent performs a merge with any union data inside the WebhookRequestData, using the provided WebhookMessageSent
func (*WebhookRequestData) MergeWebhookMessageUpdated ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookMessageUpdated(v WebhookMessageUpdated) error
MergeWebhookMessageUpdated performs a merge with any union data inside the WebhookRequestData, using the provided WebhookMessageUpdated
func (*WebhookRequestData) MergeWebhookTemplateCreate ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookTemplateCreate(v WebhookTemplateCreate) error
MergeWebhookTemplateCreate performs a merge with any union data inside the WebhookRequestData, using the provided WebhookTemplateCreate
func (*WebhookRequestData) MergeWebhookTemplateDelete ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookTemplateDelete(v WebhookTemplateDelete) error
MergeWebhookTemplateDelete performs a merge with any union data inside the WebhookRequestData, using the provided WebhookTemplateDelete
func (*WebhookRequestData) MergeWebhookTemplateUpdate ¶ added in v0.0.3
func (t *WebhookRequestData) MergeWebhookTemplateUpdate(v WebhookTemplateUpdate) error
MergeWebhookTemplateUpdate performs a merge with any union data inside the WebhookRequestData, using the provided WebhookTemplateUpdate
func (*WebhookRequestData) UnmarshalJSON ¶ added in v0.0.3
func (t *WebhookRequestData) UnmarshalJSON(b []byte) error
func (WebhookRequestData) ValueByDiscriminator ¶ added in v0.0.3
func (t WebhookRequestData) ValueByDiscriminator() (interface{}, error)
type WebhookRequestMeta ¶ added in v0.0.3
type WebhookRequestMeta struct {
Timestamp int64 `json:"timestamp"`
}
WebhookRequestMeta Metadata for webhook request
type WebhookResponse ¶ added in v0.0.3
type WebhookResponse struct {
// contains filtered or unexported fields
}
WebhookResponse defines model for WebhookResponse.
func (WebhookResponse) AsWebhookEmptyResponse ¶ added in v0.0.3
func (t WebhookResponse) AsWebhookEmptyResponse() (WebhookEmptyResponse, error)
AsWebhookEmptyResponse returns the union data inside the WebhookResponse as a WebhookEmptyResponse
func (WebhookResponse) AsWebhookSendMessageResponseData ¶ added in v0.0.3
func (t WebhookResponse) AsWebhookSendMessageResponseData() (WebhookSendMessageResponseData, error)
AsWebhookSendMessageResponseData returns the union data inside the WebhookResponse as a WebhookSendMessageResponseData
func (WebhookResponse) AsWebhookTemplateCreateResponseData ¶ added in v0.0.3
func (t WebhookResponse) AsWebhookTemplateCreateResponseData() (WebhookTemplateCreateResponseData, error)
AsWebhookTemplateCreateResponseData returns the union data inside the WebhookResponse as a WebhookTemplateCreateResponseData
func (*WebhookResponse) FromWebhookEmptyResponse ¶ added in v0.0.3
func (t *WebhookResponse) FromWebhookEmptyResponse(v WebhookEmptyResponse) error
FromWebhookEmptyResponse overwrites any union data inside the WebhookResponse as the provided WebhookEmptyResponse
func (*WebhookResponse) FromWebhookSendMessageResponseData ¶ added in v0.0.3
func (t *WebhookResponse) FromWebhookSendMessageResponseData(v WebhookSendMessageResponseData) error
FromWebhookSendMessageResponseData overwrites any union data inside the WebhookResponse as the provided WebhookSendMessageResponseData
func (*WebhookResponse) FromWebhookTemplateCreateResponseData ¶ added in v0.0.3
func (t *WebhookResponse) FromWebhookTemplateCreateResponseData(v WebhookTemplateCreateResponseData) error
FromWebhookTemplateCreateResponseData overwrites any union data inside the WebhookResponse as the provided WebhookTemplateCreateResponseData
func (WebhookResponse) MarshalJSON ¶ added in v0.0.3
func (t WebhookResponse) MarshalJSON() ([]byte, error)
func (*WebhookResponse) MergeWebhookEmptyResponse ¶ added in v0.0.3
func (t *WebhookResponse) MergeWebhookEmptyResponse(v WebhookEmptyResponse) error
MergeWebhookEmptyResponse performs a merge with any union data inside the WebhookResponse, using the provided WebhookEmptyResponse
func (*WebhookResponse) MergeWebhookSendMessageResponseData ¶ added in v0.0.3
func (t *WebhookResponse) MergeWebhookSendMessageResponseData(v WebhookSendMessageResponseData) error
MergeWebhookSendMessageResponseData performs a merge with any union data inside the WebhookResponse, using the provided WebhookSendMessageResponseData
func (*WebhookResponse) MergeWebhookTemplateCreateResponseData ¶ added in v0.0.3
func (t *WebhookResponse) MergeWebhookTemplateCreateResponseData(v WebhookTemplateCreateResponseData) error
MergeWebhookTemplateCreateResponseData performs a merge with any union data inside the WebhookResponse, using the provided WebhookTemplateCreateResponseData
func (*WebhookResponse) UnmarshalJSON ¶ added in v0.0.3
func (t *WebhookResponse) UnmarshalJSON(b []byte) error
type WebhookSendMessageResponseData ¶ added in v0.0.3
type WebhookSendMessageResponseData struct {
// Async Indicates if the message was sent asynchronously
Async bool `json:"async"`
// Error Represents an error that occurred while sending a message
Error *WebhookMessageSendingError `json:"error,omitempty"`
// ExternalChatID External identifier of the chat
ExternalChatID *string `json:"external_chat_id,omitempty"`
// ExternalCustomerID External identifier of the customer
ExternalCustomerID *string `json:"external_customer_id,omitempty"`
// ExternalMessageID External identifier of the message
ExternalMessageID *string `json:"external_message_id,omitempty"`
}
WebhookSendMessageResponseData Response data for sending a message via webhook
type WebhookTemplateArguments ¶ added in v0.0.3
type WebhookTemplateArguments struct {
Body WebhookTemplateBodyArguments `json:"body,omitempty"`
// Buttons Template button arguments
Buttons []WebhookTemplateButtonArguments `json:"buttons,omitempty"`
// Header Represents the arguments for the header section of a template
Header *WebhookTemplateHeaderArguments `json:"header,omitempty"`
}
WebhookTemplateArguments Represents the arguments for a template
type WebhookTemplateBodyArguments ¶ added in v0.0.3
type WebhookTemplateBodyArguments struct {
// Args Arguments for the body
Args []string `json:"args"`
}
WebhookTemplateBodyArguments Represents the arguments for the body section of a template
type WebhookTemplateButtonArguments ¶ added in v0.0.3
type WebhookTemplateButtonArguments struct {
// Args Arguments for the button
Args []string `json:"args,omitempty"`
// Title Title of the button
Title string `json:"title"`
// Type Button type
Type TemplateButtonType `json:"type"`
}
WebhookTemplateButtonArguments Represents the arguments for a template button
type WebhookTemplateCategory ¶ added in v0.0.11
type WebhookTemplateCategory string
WebhookTemplateCategory Category of the template
const ( WebhookTemplateCategoryAuthentication WebhookTemplateCategory = "authentication" WebhookTemplateCategoryMarketing WebhookTemplateCategory = "marketing" WebhookTemplateCategoryUtility WebhookTemplateCategory = "utility" )
Defines values for WebhookTemplateCategory.
func (WebhookTemplateCategory) EnumValues ¶ added in v0.0.11
func (WebhookTemplateCategory) EnumValues() []string
EnumValues returns all valid values for WebhookTemplateCategory.
func (*WebhookTemplateCategory) UnmarshalJSON ¶ added in v0.0.11
func (v *WebhookTemplateCategory) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookTemplateCategory.
func (WebhookTemplateCategory) ValidateEnum ¶ added in v0.0.11
func (v WebhookTemplateCategory) ValidateEnum() error
Validate validates the value of WebhookTemplateCategory.
type WebhookTemplateContent ¶ added in v0.0.3
type WebhookTemplateContent struct {
// Body Body content of the template
Body string `json:"body"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Category of the template
Category string `json:"category"`
// Example Template example
Example *TemplateExample `json:"example,omitempty"`
Footer string `json:"footer,omitempty"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Language code for the template
Lang string `json:"lang"`
// Name Template name
Name string `json:"name"`
}
WebhookTemplateContent Represents the content of a chat template
type WebhookTemplateCreate ¶ added in v0.0.3
type WebhookTemplateCreate struct {
// Data Webhook event data for a template being created
Data WebhookTemplateCreateData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookTemplateCreateType `json:"type"`
}
WebhookTemplateCreate defines model for WebhookTemplateCreate.
type WebhookTemplateCreateData ¶ added in v0.0.3
type WebhookTemplateCreateData struct {
// Body Body content of the template
Body string `json:"body"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Category of the template
Category string `json:"category"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// Example Template example
Example *TemplateExample `json:"example,omitempty"`
Footer string `json:"footer,omitempty"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Language code for the template
Lang string `json:"lang"`
// Name Template name
Name string `json:"name"`
}
WebhookTemplateCreateData defines model for WebhookTemplateCreateData.
type WebhookTemplateCreateResponseData ¶ added in v0.0.3
type WebhookTemplateCreateResponseData struct {
// Code Template code
Code string `binding:"required" json:"code"`
}
WebhookTemplateCreateResponseData Response data for creating a template via webhook
type WebhookTemplateCreateType ¶ added in v0.0.3
type WebhookTemplateCreateType string
WebhookTemplateCreateType defines model for WebhookTemplateCreate.Type.
const (
WebhookTemplateCreateTypeTemplateCreate WebhookTemplateCreateType = "template_create"
)
Defines values for WebhookTemplateCreateType.
func (WebhookTemplateCreateType) EnumValues ¶ added in v0.0.3
func (WebhookTemplateCreateType) EnumValues() []string
EnumValues returns all valid values for WebhookTemplateCreateType.
func (*WebhookTemplateCreateType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookTemplateCreateType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookTemplateCreateType.
func (WebhookTemplateCreateType) ValidateEnum ¶ added in v0.0.3
func (v WebhookTemplateCreateType) ValidateEnum() error
Validate validates the value of WebhookTemplateCreateType.
type WebhookTemplateDelete ¶ added in v0.0.3
type WebhookTemplateDelete struct {
// Data Webhook event data for a template being deleted
Data WebhookTemplateDeleteData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookTemplateDeleteType `json:"type"`
}
WebhookTemplateDelete defines model for WebhookTemplateDelete.
type WebhookTemplateDeleteData ¶ added in v0.0.3
type WebhookTemplateDeleteData struct {
// Body Body content of the template
Body string `json:"body"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Category of the template
Category string `json:"category"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// Code Template code
Code string `json:"code"`
// Example Template example
Example *TemplateExample `json:"example,omitempty"`
Footer string `json:"footer,omitempty"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Language code for the template
Lang string `json:"lang"`
// Name Template name
Name string `json:"name"`
}
WebhookTemplateDeleteData defines model for WebhookTemplateDeleteData.
type WebhookTemplateDeleteType ¶ added in v0.0.3
type WebhookTemplateDeleteType string
WebhookTemplateDeleteType defines model for WebhookTemplateDelete.Type.
const (
WebhookTemplateDeleteTypeTemplateDelete WebhookTemplateDeleteType = "template_delete"
)
Defines values for WebhookTemplateDeleteType.
func (WebhookTemplateDeleteType) EnumValues ¶ added in v0.0.3
func (WebhookTemplateDeleteType) EnumValues() []string
EnumValues returns all valid values for WebhookTemplateDeleteType.
func (*WebhookTemplateDeleteType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookTemplateDeleteType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookTemplateDeleteType.
func (WebhookTemplateDeleteType) ValidateEnum ¶ added in v0.0.3
func (v WebhookTemplateDeleteType) ValidateEnum() error
Validate validates the value of WebhookTemplateDeleteType.
type WebhookTemplateHeaderArguments ¶ added in v0.0.3
type WebhookTemplateHeaderArguments struct {
// Args Arguments for the header
Args []string `json:"args,omitempty"`
// Attachments Attachments for the header
Attachments []TemplateExampleAttachment `json:"attachments,omitempty"`
// Type Type of header content
Type TemplateHeaderContentType `json:"type"`
}
WebhookTemplateHeaderArguments Represents the arguments for the header section of a template
type WebhookTemplateInfo ¶ added in v0.0.3
type WebhookTemplateInfo struct {
// Args Template arguments
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Args []string `json:"args,omitempty"`
// Category Category of the template
Category *WebhookTemplateCategory `json:"category,omitempty"`
// Code Template code
Code string `json:"code,omitempty"`
Variables WebhookTemplateArguments `json:"variables,omitempty"`
}
WebhookTemplateInfo Represents a chat template information
type WebhookTemplateUpdate ¶ added in v0.0.3
type WebhookTemplateUpdate struct {
// Data Webhook event data for a template being updated
Data WebhookTemplateUpdateData `json:"data"`
// Meta Metadata for webhook request
Meta WebhookRequestMeta `json:"meta"`
Type WebhookTemplateUpdateType `json:"type"`
}
WebhookTemplateUpdate defines model for WebhookTemplateUpdate.
type WebhookTemplateUpdateData ¶ added in v0.0.3
type WebhookTemplateUpdateData struct {
// Body Body content of the template
Body string `json:"body"`
// Buttons List of template buttons
Buttons *TemplateButtons `json:"buttons,omitempty"`
// Category Category of the template
Category string `json:"category"`
// ChannelID Channel identifier
ChannelID int64 `json:"channel_id"`
// Code Template code
Code string `json:"code"`
// Example Template example
Example *TemplateExample `json:"example,omitempty"`
Footer string `json:"footer,omitempty"`
// Header Header section of the template
Header *TemplateHeader `json:"header,omitempty"`
// Lang Language code for the template
Lang string `json:"lang"`
// Name Template name
Name string `json:"name"`
}
WebhookTemplateUpdateData defines model for WebhookTemplateUpdateData.
type WebhookTemplateUpdateType ¶ added in v0.0.3
type WebhookTemplateUpdateType string
WebhookTemplateUpdateType defines model for WebhookTemplateUpdate.Type.
const (
WebhookTemplateUpdateTypeTemplateUpdate WebhookTemplateUpdateType = "template_update"
)
Defines values for WebhookTemplateUpdateType.
func (WebhookTemplateUpdateType) EnumValues ¶ added in v0.0.3
func (WebhookTemplateUpdateType) EnumValues() []string
EnumValues returns all valid values for WebhookTemplateUpdateType.
func (*WebhookTemplateUpdateType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookTemplateUpdateType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookTemplateUpdateType.
func (WebhookTemplateUpdateType) ValidateEnum ¶ added in v0.0.3
func (v WebhookTemplateUpdateType) ValidateEnum() error
Validate validates the value of WebhookTemplateUpdateType.
type WebhookType ¶ added in v0.0.3
type WebhookType string
WebhookType Type of webhook event
const ( WebhookTypeMessageDeleted WebhookType = "message_deleted" WebhookTypeMessageRead WebhookType = "message_read" WebhookTypeMessageSent WebhookType = "message_sent" WebhookTypeMessageUpdated WebhookType = "message_updated" WebhookTypeReactionAdd WebhookType = "reaction_add" WebhookTypeReactionDelete WebhookType = "reaction_delete" WebhookTypeTemplateCreate WebhookType = "template_create" WebhookTypeTemplateDelete WebhookType = "template_delete" WebhookTypeTemplateUpdate WebhookType = "template_update" )
Defines values for WebhookType.
func (WebhookType) EnumValues ¶ added in v0.0.3
func (WebhookType) EnumValues() []string
EnumValues returns all valid values for WebhookType.
func (*WebhookType) UnmarshalJSON ¶ added in v0.0.3
func (v *WebhookType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebhookType.
func (WebhookType) ValidateEnum ¶ added in v0.0.3
func (v WebhookType) ValidateEnum() error
Validate validates the value of WebhookType.
type WebhookUserData ¶ added in v0.0.3
type WebhookUserData struct {
// Avatar URL of the user's avatar
Avatar string `json:"avatar"`
// FirstName User's first name
FirstName string `json:"first_name"`
// ID User identifier
ID int64 `json:"id"`
// LastName User's last name
LastName string `json:"last_name"`
}
WebhookUserData Represents user data in the webhook