bot_api_client

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 11 Imported by: 0

README

Bot API Client

A Go client library for interacting with the Message Gateway Bot API. This client provides a comprehensive set of methods for managing bots, channels, chats, dialogs, messages, and more.

Features

  • REST API Client: Generated from OpenAPI specification for type-safe API interactions
  • WebSocket Support: Real-time communication with the messaging platform
  • Comprehensive API Coverage: Methods for all Bot API operations including:
    • Bot management
    • Channel management
    • Chat and dialog operations
    • Message sending and receiving
    • File uploads and management
    • User and member management
    • Command handling

Installation

go get github.com/retailcrm/bot-api-client-gen

Usage

Initializing the Client
package main

import (
    "context"
    "log"

    "github.com/retailcrm/bot-api-client-gen"
)

func main() {
    // Create a new client with the server URL
    client, err := bot_api_client.NewClientWithResponses("https://api.example.com")
    if err != nil {
        log.Fatalf("Error creating client: %v", err)
    }

    // Use the client to make API calls
    // ...
}
REST API Examples
Listing Bots
ctx := context.Background()
resp, err := client.ListBotsWithResponse(ctx, nil)
if err != nil {
    log.Fatalf("Error listing bots: %v", err)
}

if resp.JSON200 != nil {
    for _, bot := range resp.JSON200.Bots {
        log.Printf("Bot: %s", bot.Name)
    }
}
Sending a Message
ctx := context.Background()
message := bot_api_client.SendMessageJSONRequestBody{
    ChatID: "chat123",
    Type:   "text",
    Content: bot_api_client.MessageContent{
        Text: "Hello, world!",
    },
}

resp, err := client.SendMessageWithResponse(ctx, message)
if err != nil {
    log.Fatalf("Error sending message: %v", err)
}

if resp.JSON200 != nil {
    log.Printf("Message sent with ID: %s", resp.JSON200.MessageID)
}
WebSocket Support

The client also provides WebSocket support for real-time communication:

package main

import (
    "context"
    "log"

    "github.com/retailcrm/bot-api-client-gen"
    "github.com/retailcrm/bot-api-client-gen/ws"
)

func main() {
    // Create a WebSocket controller
    controller := ws.NewController("wss://api.example.com/ws", "your-token")

    // Set up event handlers
    controller.OnMessageReceived(func(msg ws.MessageReceivedEvent) {
        log.Printf("Received message: %s", msg.Content.Text)
    })

    // Connect to the WebSocket server
    if err := controller.Connect(context.Background()); err != nil {
        log.Fatalf("Error connecting to WebSocket: %v", err)
    }

    // Keep the connection alive
    select {}
}

Error Handling

The client provides detailed error responses that can be handled as follows:

resp, err := client.SendMessageWithResponse(ctx, message)
if err != nil {
    log.Fatalf("Error sending message: %v", err)
}

if resp.JSONDefault != nil {
    log.Printf("API Error: %s - %s", resp.JSONDefault.Code, resp.JSONDefault.Message)
}

Custom Time Handling

The client includes custom time handling for API requests and responses:

  • DateTimeRFC3339: Standard RFC3339 format
  • DateTimeRFC3339Micro: Extended format with microsecond precision

License

This library is distributed under the terms of the license agreement provided with the software.

Documentation

Overview

Package bot_api_client provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	Bot_tokenScopes = "bot_token.Scopes"
)
View Source
const RFC3339Micro string = "2006-01-02T15:04:05.999999Z07:00"

Variables

This section is empty.

Functions

func NewAssignDialogResponsibleRequest

func NewAssignDialogResponsibleRequest(server string, dialogId DialogIdPath, body AssignDialogResponsibleJSONRequestBody) (*http.Request, error)

NewAssignDialogResponsibleRequest calls the generic AssignDialogResponsible builder with application/json body

func NewAssignDialogResponsibleRequestWithBody

func NewAssignDialogResponsibleRequestWithBody(server string, dialogId DialogIdPath, contentType string, body io.Reader) (*http.Request, error)

NewAssignDialogResponsibleRequestWithBody generates requests for AssignDialogResponsible with any type of body

func NewCloseDialogRequest

func NewCloseDialogRequest(server string, dialogId DialogIdPath) (*http.Request, error)

NewCloseDialogRequest generates requests for CloseDialog

func NewCreateDialogRequest

func NewCreateDialogRequest(server string, chatId ChatIdPath, body CreateDialogJSONRequestBody) (*http.Request, error)

NewCreateDialogRequest calls the generic CreateDialog builder with application/json body

func NewCreateDialogRequestWithBody

func NewCreateDialogRequestWithBody(server string, chatId ChatIdPath, contentType string, body io.Reader) (*http.Request, error)

NewCreateDialogRequestWithBody generates requests for CreateDialog with any type of body

func NewCreateOrUpdateCommandRequest

func NewCreateOrUpdateCommandRequest(server string, commandName CommandNamePath, body CreateOrUpdateCommandJSONRequestBody) (*http.Request, error)

NewCreateOrUpdateCommandRequest calls the generic CreateOrUpdateCommand builder with application/json body

func NewCreateOrUpdateCommandRequestWithBody

func NewCreateOrUpdateCommandRequestWithBody(server string, commandName CommandNamePath, contentType string, body io.Reader) (*http.Request, error)

NewCreateOrUpdateCommandRequestWithBody generates requests for CreateOrUpdateCommand with any type of body

func NewDeleteCommandRequest

func NewDeleteCommandRequest(server string, commandName CommandNamePath) (*http.Request, error)

NewDeleteCommandRequest generates requests for DeleteCommand

func NewDeleteMessageRequest

func NewDeleteMessageRequest(server string, messageId MessageIdPath) (*http.Request, error)

NewDeleteMessageRequest generates requests for DeleteMessage

func NewDialogAddTagsRequest

func NewDialogAddTagsRequest(server string, dialogId DialogIdPath, body DialogAddTagsJSONRequestBody) (*http.Request, error)

NewDialogAddTagsRequest calls the generic DialogAddTags builder with application/json body

func NewDialogAddTagsRequestWithBody

func NewDialogAddTagsRequestWithBody(server string, dialogId DialogIdPath, contentType string, body io.Reader) (*http.Request, error)

NewDialogAddTagsRequestWithBody generates requests for DialogAddTags with any type of body

func NewDialogDeleteTagsRequest

func NewDialogDeleteTagsRequest(server string, dialogId DialogIdPath, body DialogDeleteTagsJSONRequestBody) (*http.Request, error)

NewDialogDeleteTagsRequest calls the generic DialogDeleteTags builder with application/json body

func NewDialogDeleteTagsRequestWithBody

func NewDialogDeleteTagsRequestWithBody(server string, dialogId DialogIdPath, contentType string, body io.Reader) (*http.Request, error)

NewDialogDeleteTagsRequestWithBody generates requests for DialogDeleteTags with any type of body

func NewEditMessageRequest

func NewEditMessageRequest(server string, messageId MessageIdPath, body EditMessageJSONRequestBody) (*http.Request, error)

NewEditMessageRequest calls the generic EditMessage builder with application/json body

func NewEditMessageRequestWithBody

func NewEditMessageRequestWithBody(server string, messageId MessageIdPath, contentType string, body io.Reader) (*http.Request, error)

NewEditMessageRequestWithBody generates requests for EditMessage with any type of body

func NewGetFileUrlRequest

func NewGetFileUrlRequest(server string, id FileIdPath) (*http.Request, error)

NewGetFileUrlRequest generates requests for GetFileUrl

func NewListBotsRequest

func NewListBotsRequest(server string, params *ListBotsParams) (*http.Request, error)

NewListBotsRequest generates requests for ListBots

func NewListChannelsRequest

func NewListChannelsRequest(server string, params *ListChannelsParams) (*http.Request, error)

NewListChannelsRequest generates requests for ListChannels

func NewListChatsRequest

func NewListChatsRequest(server string, params *ListChatsParams) (*http.Request, error)

NewListChatsRequest generates requests for ListChats

func NewListCommandsRequest

func NewListCommandsRequest(server string, params *ListCommandsParams) (*http.Request, error)

NewListCommandsRequest generates requests for ListCommands

func NewListCustomersRequest

func NewListCustomersRequest(server string, params *ListCustomersParams) (*http.Request, error)

NewListCustomersRequest generates requests for ListCustomers

func NewListDialogsRequest

func NewListDialogsRequest(server string, params *ListDialogsParams) (*http.Request, error)

NewListDialogsRequest generates requests for ListDialogs

func NewListMembersRequest

func NewListMembersRequest(server string, params *ListMembersParams) (*http.Request, error)

NewListMembersRequest generates requests for ListMembers

func NewListMessagesRequest

func NewListMessagesRequest(server string, params *ListMessagesParams) (*http.Request, error)

NewListMessagesRequest generates requests for ListMessages

func NewListUsersRequest

func NewListUsersRequest(server string, params *ListUsersParams) (*http.Request, error)

NewListUsersRequest generates requests for ListUsers

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 NewUnassignDialogResponsibleRequest

func NewUnassignDialogResponsibleRequest(server string, dialogId DialogIdPath) (*http.Request, error)

NewUnassignDialogResponsibleRequest generates requests for UnassignDialogResponsible

func NewUpdateBotRequest

func NewUpdateBotRequest(server string, body UpdateBotJSONRequestBody) (*http.Request, error)

NewUpdateBotRequest calls the generic UpdateBot builder with application/json body

func NewUpdateBotRequestWithBody

func NewUpdateBotRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateBotRequestWithBody generates requests for UpdateBot with any type of body

func NewUpdateFileMetadataRequest

func NewUpdateFileMetadataRequest(server string, id FileIdPath, body UpdateFileMetadataJSONRequestBody) (*http.Request, error)

NewUpdateFileMetadataRequest calls the generic UpdateFileMetadata builder with application/json body

func NewUpdateFileMetadataRequestWithBody

func NewUpdateFileMetadataRequestWithBody(server string, id FileIdPath, contentType string, body io.Reader) (*http.Request, error)

NewUpdateFileMetadataRequestWithBody generates requests for UpdateFileMetadata 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

func NewUploadFileRequestWithBody

func NewUploadFileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewUploadFileRequestWithBody generates requests for UploadFile with any type of body

func NewWebSocketConnectionRequest

func NewWebSocketConnectionRequest(server string, params *WebSocketConnectionParams) (*http.Request, error)

NewWebSocketConnectionRequest generates requests for WebSocketConnection

Types

type Actor

type Actor 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  ActorType `json:"type"`

	// Username User name (for customer type user only)
	Username string `json:"username,omitempty"`
}

Actor Chat actor

type ActorType

type ActorType string

ActorType defines model for Actor.Type.

const (
	ActorTypeBot      ActorType = "bot"
	ActorTypeChannel  ActorType = "channel"
	ActorTypeCustomer ActorType = "customer"
	ActorTypeUser     ActorType = "user"
)

Defines values for ActorType.

func (ActorType) EnumValues

func (ActorType) EnumValues() []string

EnumValues returns all valid values for ActorType.

func (*ActorType) UnmarshalJSON

func (v *ActorType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ActorType.

func (ActorType) ValidateEnum

func (v ActorType) ValidateEnum() error

Validate validates the value of ActorType.

type AssignDialogResponsibleJSONBody

type AssignDialogResponsibleJSONBody struct {
	// BotID Unique identifier of the bot assigned to the dialog
	BotID int64 `binding:"omitempty,min=1" json:"bot_id"`

	// UserID Unique identifier of the user to assign as responsible
	UserID int64 `binding:"omitempty,min=1" json:"user_id"`
}

AssignDialogResponsibleJSONBody defines parameters for AssignDialogResponsible.

type AssignDialogResponsibleJSONRequestBody

type AssignDialogResponsibleJSONRequestBody AssignDialogResponsibleJSONBody

AssignDialogResponsibleJSONRequestBody defines body for AssignDialogResponsible for application/json ContentType.

type AssignDialogResponsibleResp

type AssignDialogResponsibleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DialogAssignResponse
	JSONDefault  *ErrorResponse
}

func ParseAssignDialogResponsibleResp

func ParseAssignDialogResponsibleResp(rsp *http.Response) (*AssignDialogResponsibleResp, error)

ParseAssignDialogResponsibleResp parses an HTTP response from a AssignDialogResponsibleWithResponse call

func (AssignDialogResponsibleResp) Status

Status returns HTTPResponse.Status

func (AssignDialogResponsibleResp) StatusCode

func (r AssignDialogResponsibleResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 size allowed for a single audio file in bytes
	MaxItemSize *int64 `json:"max_item_size,omitempty"`

	// MaxItemsCount Maximum number of audio attachments allowed 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 Support settings for audio messages in the channel

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

func (Boolean) EnumValues() []string

EnumValues returns all valid values for Boolean.

func (*Boolean) UnmarshalJSON

func (v *Boolean) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Boolean.

func (Boolean) ValidateEnum

func (v Boolean) ValidateEnum() error

Validate validates the value of Boolean.

type Bot

type Bot struct {
	// AvatarUrl Public URL of the bot's avatar image
	AvatarUrl *string `json:"avatar_url,omitempty"`

	// ClientId Unique external client identifier of the bot
	ClientId string `json:"client_id"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// DeactivatedAt Date and time in RFC 3339 format with microseconds
	DeactivatedAt *DateTimeRFC3339Micro `json:"deactivated_at"`

	// ID Internal unique identifier of the bot
	ID int64 `json:"id"`

	// IsActive Indicates whether the bot is currently active
	IsActive bool `json:"is_active"`

	// IsSelf Indicates whether this bot is the one currently authenticated
	IsSelf bool `json:"is_self"`

	// IsSystem Indicates whether this bot is a system-level bot
	IsSystem bool `json:"is_system"`

	// Name Human-readable name of the bot
	Name string `json:"name"`

	// Roles List of roles assigned to the bot
	Roles []Role `json:"roles"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`
}

Bot Bot information

type BotActiveQuery

type BotActiveQuery = Boolean

BotActiveQuery Boolean type

type BotRoleQuery

type BotRoleQuery = Roles

BotRoleQuery Bot role types array

type BotsListResponse

type BotsListResponse = []Bot

BotsListResponse defines model for BotsListResponse.

type Channel

type Channel struct {
	// Avatar URI of the channel's custom avatar image
	Avatar string `json:"avatar"`

	// ID Unique identifier of the channel
	ID int64 `json:"id"`

	// IsActive Indicates whether the channel is currently active
	IsActive bool `json:"is_active"`

	// Name Optional human-readable name of the channel
	Name *string `json:"name,omitempty"`

	// Settings Configuration settings specific to the channel type
	Settings ChannelSettings `json:"settings"`

	// TransportID Identifier of the underlying transport system used by the channel
	TransportID int64 `json:"transport_id"`

	// Type Type of the communication channel
	Type ChannelType `json:"type"`
}

Channel Represents a communication channel used by a bot

type ChannelActiveQuery

type ChannelActiveQuery = Boolean

ChannelActiveQuery Boolean type

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 ChannelListResponseItem

type ChannelListResponseItem struct {
	// ActivatedAt Date and time in RFC 3339 format with microseconds
	ActivatedAt DateTimeRFC3339Micro `json:"activated_at"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// DeactivatedAt Date and time in RFC 3339 format with microseconds
	DeactivatedAt *DateTimeRFC3339Micro `json:"deactivated_at"`

	// ID Unique identifier of the channel
	ID int64 `json:"id"`

	// IsActive Indicates whether the channel is currently active
	IsActive bool `json:"is_active"`

	// Name Optional human-readable name of the channel
	Name *string `json:"name"`

	// Settings Configuration settings specific to the channel type
	Settings ChannelSettings `json:"settings"`

	// Type Type of the communication channel
	Type ChannelType `json:"type"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`
}

ChannelListResponseItem Communication channel used by a bot

type ChannelSettings

type ChannelSettings struct {
	// Audio Support settings for audio messages in the channel
	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 Configuration options and capabilities for a specific communication channel

type ChannelType

type ChannelType string

ChannelType Type of channel used for communication

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 = []ChannelListResponseItem

ChannelsListResponse defines model for ChannelsListResponse.

type Chat

type Chat struct {
	// AuthorID ID of the user who initiated the chat
	AuthorID *int64 `json:"author_id,omitempty"`

	// Avatar URL of the chat's avatar image
	Avatar *string `json:"avatar,omitempty"`

	// Channel The communication channel (e.g., Telegram, Viber) associated with this chat
	Channel *Channel `json:"channel,omitempty"`

	// Customer The customer participating in the chat, if any
	Customer *Actor `json:"customer"`

	// ID Unique identifier of the chat
	ID int64 `json:"id"`

	// LastActivity Date and time in RFC 3339 format
	LastActivity *DateTimeRFC3339 `json:"last_activity,omitempty"`

	// LastDialog The most recent dialog in the chat
	LastDialog *Dialog `json:"last_dialog,omitempty"`

	// LastMessage The latest message in the chat, including system or service messages
	LastMessage *Message `json:"last_message,omitempty"`

	// LastUserMessage The most recent message sent by a user in the chat
	LastUserMessage *LastUserMessage `json:"last_user_message,omitempty"`

	// Members List of chat participants
	Members *Members `json:"members,omitempty"`

	// Name Display name of the chat
	Name *string `json:"name,omitempty"`

	// NotReadMessagesCount Number of unread messages in the chat
	NotReadMessagesCount int64 `json:"not_read_messages,omitempty"`

	// ReplyDeadline Date and time in RFC 3339 format
	ReplyDeadline *DateTimeRFC3339 `json:"reply_deadline,omitempty"`

	// Unread Indicates whether any user has unread messages in this chat
	Unread bool `json:"unread,omitempty"`

	// WaitingLevel Current urgency level of the chat based on business logic (e.g., SLA violations).
	WaitingLevel *ChatWaitingLevel `json:"waiting_level,omitempty"`

	// WaitingLevelTransitionTime Date and time in RFC 3339 format
	WaitingLevelTransitionTime *DateTimeRFC3339 `json:"waiting_level_transition_time,omitempty"`
}

Chat Represents a communication thread between users and/or a customer within a specific channel

type ChatIdPath

type ChatIdPath = int64

ChatIdPath defines model for ChatIdPath.

type ChatMemberListResponse

type ChatMemberListResponse = []ChatMemberListResponseItem

ChatMemberListResponse defines model for ChatMemberListResponse.

type ChatMemberListResponseItem

type ChatMemberListResponseItem struct {
	// ChatID ID of the chat the user is a member of
	ChatID int64 `json:"chat_id"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// ID Unique ID of the chat membership record
	ID int64 `json:"id"`

	// IsAuthor Indicates whether the user is the author of the chat
	IsAuthor bool `json:"is_author"`

	// State Membership state of the user in the chat
	State ChatMemberListResponseItemState `json:"state"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at,omitempty"`

	// UserID ID of the user in the system
	UserID int64 `json:"user_id"`
}

ChatMemberListResponseItem Chat member object containing user ID, chat ID, membership state and timestamps

type ChatMemberListResponseItemState

type ChatMemberListResponseItemState string

ChatMemberListResponseItemState Membership state of the user in the chat

const (
	ChatMemberListResponseItemStateActive ChatMemberListResponseItemState = "active"
	ChatMemberListResponseItemStateKicked ChatMemberListResponseItemState = "kicked"
	ChatMemberListResponseItemStateLeaved ChatMemberListResponseItemState = "leaved"
)

Defines values for ChatMemberListResponseItemState.

func (ChatMemberListResponseItemState) EnumValues

func (ChatMemberListResponseItemState) EnumValues() []string

EnumValues returns all valid values for ChatMemberListResponseItemState.

func (*ChatMemberListResponseItemState) UnmarshalJSON

func (v *ChatMemberListResponseItemState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChatMemberListResponseItemState.

func (ChatMemberListResponseItemState) ValidateEnum

func (v ChatMemberListResponseItemState) ValidateEnum() error

Validate validates the value of ChatMemberListResponseItemState.

type ChatTimestamps

type ChatTimestamps struct {
	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`
}

ChatTimestamps Represents dates and times of creation and last update of the chat

type ChatWaitingLevel

type ChatWaitingLevel string

ChatWaitingLevel Current urgency level of the chat based on business logic (e.g., SLA violations).

const (
	ChatWaitingLevelDanger  ChatWaitingLevel = "danger"
	ChatWaitingLevelNone    ChatWaitingLevel = "none"
	ChatWaitingLevelWarning ChatWaitingLevel = "warning"
)

Defines values for ChatWaitingLevel.

func (ChatWaitingLevel) EnumValues

func (ChatWaitingLevel) EnumValues() []string

EnumValues returns all valid values for ChatWaitingLevel.

func (*ChatWaitingLevel) UnmarshalJSON

func (v *ChatWaitingLevel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChatWaitingLevel.

func (ChatWaitingLevel) ValidateEnum

func (v ChatWaitingLevel) ValidateEnum() error

Validate validates the value of ChatWaitingLevel.

type ChatsListResponse

type ChatsListResponse = []ChatsListResponseItem

ChatsListResponse defines model for ChatsListResponse.

type ChatsListResponseItem

type ChatsListResponseItem struct {
	// AuthorID ID of the user who initiated the chat
	AuthorID *int64 `json:"author_id,omitempty"`

	// Avatar URL of the chat's avatar image
	Avatar *string `json:"avatar,omitempty"`

	// Channel The communication channel (e.g., Telegram, Viber) associated with this chat
	Channel *Channel `json:"channel,omitempty"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// Customer The customer participating in the chat, if any
	Customer *Actor `json:"customer"`

	// ID Unique identifier of the chat
	ID int64 `json:"id"`

	// LastActivity Date and time in RFC 3339 format
	LastActivity *DateTimeRFC3339 `json:"last_activity,omitempty"`

	// LastDialog The most recent dialog in the chat
	LastDialog *Dialog `json:"last_dialog,omitempty"`

	// LastMessage The latest message in the chat, including system or service messages
	LastMessage *Message `json:"last_message,omitempty"`

	// LastUserMessage The most recent message sent by a user in the chat
	LastUserMessage *LastUserMessage `json:"last_user_message,omitempty"`

	// Members List of chat participants
	Members *Members `json:"members,omitempty"`

	// Name Display name of the chat
	Name *string `json:"name,omitempty"`

	// NotReadMessagesCount Number of unread messages in the chat
	NotReadMessagesCount int64 `json:"not_read_messages,omitempty"`

	// ReplyDeadline Date and time in RFC 3339 format
	ReplyDeadline *DateTimeRFC3339 `json:"reply_deadline,omitempty"`

	// Unread Indicates whether any user has unread messages in this chat
	Unread bool `json:"unread,omitempty"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`

	// WaitingLevel Current urgency level of the chat based on business logic (e.g., SLA violations).
	WaitingLevel *ChatsListResponseItemWaitingLevel `json:"waiting_level,omitempty"`

	// WaitingLevelTransitionTime Date and time in RFC 3339 format
	WaitingLevelTransitionTime *DateTimeRFC3339 `json:"waiting_level_transition_time,omitempty"`
}

ChatsListResponseItem defines model for ChatsListResponseItem.

type ChatsListResponseItemWaitingLevel

type ChatsListResponseItemWaitingLevel string

ChatsListResponseItemWaitingLevel Current urgency level of the chat based on business logic (e.g., SLA violations).

const (
	ChatsListResponseItemWaitingLevelDanger  ChatsListResponseItemWaitingLevel = "danger"
	ChatsListResponseItemWaitingLevelNone    ChatsListResponseItemWaitingLevel = "none"
	ChatsListResponseItemWaitingLevelWarning ChatsListResponseItemWaitingLevel = "warning"
)

Defines values for ChatsListResponseItemWaitingLevel.

func (ChatsListResponseItemWaitingLevel) EnumValues

EnumValues returns all valid values for ChatsListResponseItemWaitingLevel.

func (*ChatsListResponseItemWaitingLevel) UnmarshalJSON

func (v *ChatsListResponseItemWaitingLevel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChatsListResponseItemWaitingLevel.

func (ChatsListResponseItemWaitingLevel) ValidateEnum

func (v ChatsListResponseItemWaitingLevel) ValidateEnum() error

Validate validates the value of ChatsListResponseItemWaitingLevel.

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) AssignDialogResponsible

func (c *Client) AssignDialogResponsible(ctx context.Context, dialogId DialogIdPath, body AssignDialogResponsibleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AssignDialogResponsibleWithBody

func (c *Client) AssignDialogResponsibleWithBody(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CloseDialog

func (c *Client) CloseDialog(ctx context.Context, dialogId DialogIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDialog

func (c *Client) CreateDialog(ctx context.Context, chatId ChatIdPath, body CreateDialogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDialogWithBody

func (c *Client) CreateDialogWithBody(ctx context.Context, chatId ChatIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateOrUpdateCommand

func (c *Client) CreateOrUpdateCommand(ctx context.Context, commandName CommandNamePath, body CreateOrUpdateCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateOrUpdateCommandWithBody

func (c *Client) CreateOrUpdateCommandWithBody(ctx context.Context, commandName CommandNamePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteCommand

func (c *Client) DeleteCommand(ctx context.Context, commandName CommandNamePath, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteMessage

func (c *Client) DeleteMessage(ctx context.Context, messageId MessageIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DialogAddTags

func (c *Client) DialogAddTags(ctx context.Context, dialogId DialogIdPath, body DialogAddTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DialogAddTagsWithBody

func (c *Client) DialogAddTagsWithBody(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DialogDeleteTags

func (c *Client) DialogDeleteTags(ctx context.Context, dialogId DialogIdPath, body DialogDeleteTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DialogDeleteTagsWithBody

func (c *Client) DialogDeleteTagsWithBody(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EditMessage

func (c *Client) EditMessage(ctx context.Context, messageId MessageIdPath, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EditMessageWithBody

func (c *Client) EditMessageWithBody(ctx context.Context, messageId MessageIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetFileUrl

func (c *Client) GetFileUrl(ctx context.Context, id FileIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListBots

func (c *Client) ListBots(ctx context.Context, params *ListBotsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListChannels

func (c *Client) ListChannels(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListChats

func (c *Client) ListChats(ctx context.Context, params *ListChatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCommands

func (c *Client) ListCommands(ctx context.Context, params *ListCommandsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomers

func (c *Client) ListCustomers(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListDialogs

func (c *Client) ListDialogs(ctx context.Context, params *ListDialogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListMembers

func (c *Client) ListMembers(ctx context.Context, params *ListMembersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListMessages

func (c *Client) ListMessages(ctx context.Context, params *ListMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SendMessage

func (c *Client) SendMessage(ctx context.Context, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SendMessageWithBody

func (c *Client) SendMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UnassignDialogResponsible

func (c *Client) UnassignDialogResponsible(ctx context.Context, dialogId DialogIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateBot

func (c *Client) UpdateBot(ctx context.Context, body UpdateBotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateBotWithBody

func (c *Client) UpdateBotWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateFileMetadata

func (c *Client) UpdateFileMetadata(ctx context.Context, id FileIdPath, body UpdateFileMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateFileMetadataWithBody

func (c *Client) UpdateFileMetadataWithBody(ctx context.Context, id FileIdPath, 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

func (c *Client) UploadFileByUrlWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadFileWithBody

func (c *Client) UploadFileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) WebSocketConnection

func (c *Client) WebSocketConnection(ctx context.Context, params *WebSocketConnectionParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ListBots request
	ListBots(ctx context.Context, params *ListBotsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListChannels request
	ListChannels(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListChats request
	ListChats(ctx context.Context, params *ListChatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDialogWithBody request with any body
	CreateDialogWithBody(ctx context.Context, chatId ChatIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateDialog(ctx context.Context, chatId ChatIdPath, body CreateDialogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomers request
	ListCustomers(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDialogs request
	ListDialogs(ctx context.Context, params *ListDialogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AssignDialogResponsibleWithBody request with any body
	AssignDialogResponsibleWithBody(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AssignDialogResponsible(ctx context.Context, dialogId DialogIdPath, body AssignDialogResponsibleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CloseDialog request
	CloseDialog(ctx context.Context, dialogId DialogIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DialogAddTagsWithBody request with any body
	DialogAddTagsWithBody(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DialogAddTags(ctx context.Context, dialogId DialogIdPath, body DialogAddTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DialogDeleteTagsWithBody request with any body
	DialogDeleteTagsWithBody(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DialogDeleteTags(ctx context.Context, dialogId DialogIdPath, body DialogDeleteTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UnassignDialogResponsible request
	UnassignDialogResponsible(ctx context.Context, dialogId DialogIdPath, 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, id FileIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateFileMetadataWithBody request with any body
	UpdateFileMetadataWithBody(ctx context.Context, id FileIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateFileMetadata(ctx context.Context, id FileIdPath, body UpdateFileMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListMembers request
	ListMembers(ctx context.Context, params *ListMembersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListMessages request
	ListMessages(ctx context.Context, params *ListMessagesParams, 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)

	// DeleteMessage request
	DeleteMessage(ctx context.Context, messageId MessageIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EditMessageWithBody request with any body
	EditMessageWithBody(ctx context.Context, messageId MessageIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EditMessage(ctx context.Context, messageId MessageIdPath, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCommands request
	ListCommands(ctx context.Context, params *ListCommandsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteCommand request
	DeleteCommand(ctx context.Context, commandName CommandNamePath, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateOrUpdateCommandWithBody request with any body
	CreateOrUpdateCommandWithBody(ctx context.Context, commandName CommandNamePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateOrUpdateCommand(ctx context.Context, commandName CommandNamePath, body CreateOrUpdateCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateBotWithBody request with any body
	UpdateBotWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateBot(ctx context.Context, body UpdateBotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListUsers request
	ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// WebSocketConnection request
	WebSocketConnection(ctx context.Context, params *WebSocketConnectionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithBotToken added in v0.0.3

func WithBotToken(token string) ClientOption

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 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.

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) AssignDialogResponsibleWithBodyWithResponse

func (c *ClientWithResponses) AssignDialogResponsibleWithBodyWithResponse(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssignDialogResponsibleResp, error)

AssignDialogResponsibleWithBodyWithResponse request with arbitrary body returning *AssignDialogResponsibleResp

func (*ClientWithResponses) AssignDialogResponsibleWithResponse

func (c *ClientWithResponses) AssignDialogResponsibleWithResponse(ctx context.Context, dialogId DialogIdPath, body AssignDialogResponsibleJSONRequestBody, reqEditors ...RequestEditorFn) (*AssignDialogResponsibleResp, error)

func (*ClientWithResponses) CloseDialogWithResponse

func (c *ClientWithResponses) CloseDialogWithResponse(ctx context.Context, dialogId DialogIdPath, reqEditors ...RequestEditorFn) (*CloseDialogResp, error)

CloseDialogWithResponse request returning *CloseDialogResp

func (*ClientWithResponses) CreateDialogWithBodyWithResponse

func (c *ClientWithResponses) CreateDialogWithBodyWithResponse(ctx context.Context, chatId ChatIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDialogResp, error)

CreateDialogWithBodyWithResponse request with arbitrary body returning *CreateDialogResp

func (*ClientWithResponses) CreateDialogWithResponse

func (c *ClientWithResponses) CreateDialogWithResponse(ctx context.Context, chatId ChatIdPath, body CreateDialogJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDialogResp, error)

func (*ClientWithResponses) CreateOrUpdateCommandWithBodyWithResponse

func (c *ClientWithResponses) CreateOrUpdateCommandWithBodyWithResponse(ctx context.Context, commandName CommandNamePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrUpdateCommandResp, error)

CreateOrUpdateCommandWithBodyWithResponse request with arbitrary body returning *CreateOrUpdateCommandResp

func (*ClientWithResponses) CreateOrUpdateCommandWithResponse

func (c *ClientWithResponses) CreateOrUpdateCommandWithResponse(ctx context.Context, commandName CommandNamePath, body CreateOrUpdateCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrUpdateCommandResp, error)

func (*ClientWithResponses) DeleteCommandWithResponse

func (c *ClientWithResponses) DeleteCommandWithResponse(ctx context.Context, commandName CommandNamePath, reqEditors ...RequestEditorFn) (*DeleteCommandResp, error)

DeleteCommandWithResponse request returning *DeleteCommandResp

func (*ClientWithResponses) DeleteMessageWithResponse

func (c *ClientWithResponses) DeleteMessageWithResponse(ctx context.Context, messageId MessageIdPath, reqEditors ...RequestEditorFn) (*DeleteMessageResp, error)

DeleteMessageWithResponse request returning *DeleteMessageResp

func (*ClientWithResponses) DialogAddTagsWithBodyWithResponse

func (c *ClientWithResponses) DialogAddTagsWithBodyWithResponse(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DialogAddTagsResp, error)

DialogAddTagsWithBodyWithResponse request with arbitrary body returning *DialogAddTagsResp

func (*ClientWithResponses) DialogAddTagsWithResponse

func (c *ClientWithResponses) DialogAddTagsWithResponse(ctx context.Context, dialogId DialogIdPath, body DialogAddTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*DialogAddTagsResp, error)

func (*ClientWithResponses) DialogDeleteTagsWithBodyWithResponse

func (c *ClientWithResponses) DialogDeleteTagsWithBodyWithResponse(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DialogDeleteTagsResp, error)

DialogDeleteTagsWithBodyWithResponse request with arbitrary body returning *DialogDeleteTagsResp

func (*ClientWithResponses) DialogDeleteTagsWithResponse

func (c *ClientWithResponses) DialogDeleteTagsWithResponse(ctx context.Context, dialogId DialogIdPath, body DialogDeleteTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*DialogDeleteTagsResp, error)

func (*ClientWithResponses) EditMessageWithBodyWithResponse

func (c *ClientWithResponses) EditMessageWithBodyWithResponse(ctx context.Context, messageId MessageIdPath, 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, messageId MessageIdPath, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*EditMessageResp, error)

func (*ClientWithResponses) GetFileUrlWithResponse

func (c *ClientWithResponses) GetFileUrlWithResponse(ctx context.Context, id FileIdPath, reqEditors ...RequestEditorFn) (*GetFileUrlResp, error)

GetFileUrlWithResponse request returning *GetFileUrlResp

func (*ClientWithResponses) ListBotsWithResponse

func (c *ClientWithResponses) ListBotsWithResponse(ctx context.Context, params *ListBotsParams, reqEditors ...RequestEditorFn) (*ListBotsResp, error)

ListBotsWithResponse request returning *ListBotsResp

func (*ClientWithResponses) ListChannelsWithResponse

func (c *ClientWithResponses) ListChannelsWithResponse(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*ListChannelsResp, error)

ListChannelsWithResponse request returning *ListChannelsResp

func (*ClientWithResponses) ListChatsWithResponse

func (c *ClientWithResponses) ListChatsWithResponse(ctx context.Context, params *ListChatsParams, reqEditors ...RequestEditorFn) (*ListChatsResp, error)

ListChatsWithResponse request returning *ListChatsResp

func (*ClientWithResponses) ListCommandsWithResponse

func (c *ClientWithResponses) ListCommandsWithResponse(ctx context.Context, params *ListCommandsParams, reqEditors ...RequestEditorFn) (*ListCommandsResp, error)

ListCommandsWithResponse request returning *ListCommandsResp

func (*ClientWithResponses) ListCustomersWithResponse

func (c *ClientWithResponses) ListCustomersWithResponse(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*ListCustomersResp, error)

ListCustomersWithResponse request returning *ListCustomersResp

func (*ClientWithResponses) ListDialogsWithResponse

func (c *ClientWithResponses) ListDialogsWithResponse(ctx context.Context, params *ListDialogsParams, reqEditors ...RequestEditorFn) (*ListDialogsResp, error)

ListDialogsWithResponse request returning *ListDialogsResp

func (*ClientWithResponses) ListMembersWithResponse

func (c *ClientWithResponses) ListMembersWithResponse(ctx context.Context, params *ListMembersParams, reqEditors ...RequestEditorFn) (*ListMembersResp, error)

ListMembersWithResponse request returning *ListMembersResp

func (*ClientWithResponses) ListMessagesWithResponse

func (c *ClientWithResponses) ListMessagesWithResponse(ctx context.Context, params *ListMessagesParams, reqEditors ...RequestEditorFn) (*ListMessagesResp, error)

ListMessagesWithResponse request returning *ListMessagesResp

func (*ClientWithResponses) ListUsersWithResponse

func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResp, error)

ListUsersWithResponse request returning *ListUsersResp

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) UnassignDialogResponsibleWithResponse

func (c *ClientWithResponses) UnassignDialogResponsibleWithResponse(ctx context.Context, dialogId DialogIdPath, reqEditors ...RequestEditorFn) (*UnassignDialogResponsibleResp, error)

UnassignDialogResponsibleWithResponse request returning *UnassignDialogResponsibleResp

func (*ClientWithResponses) UpdateBotWithBodyWithResponse

func (c *ClientWithResponses) UpdateBotWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateBotResp, error)

UpdateBotWithBodyWithResponse request with arbitrary body returning *UpdateBotResp

func (*ClientWithResponses) UpdateBotWithResponse

func (c *ClientWithResponses) UpdateBotWithResponse(ctx context.Context, body UpdateBotJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateBotResp, error)

func (*ClientWithResponses) UpdateFileMetadataWithBodyWithResponse

func (c *ClientWithResponses) UpdateFileMetadataWithBodyWithResponse(ctx context.Context, id FileIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFileMetadataResp, error)

UpdateFileMetadataWithBodyWithResponse request with arbitrary body returning *UpdateFileMetadataResp

func (*ClientWithResponses) UpdateFileMetadataWithResponse

func (c *ClientWithResponses) UpdateFileMetadataWithResponse(ctx context.Context, id FileIdPath, body UpdateFileMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFileMetadataResp, 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

func (*ClientWithResponses) WebSocketConnectionWithResponse

func (c *ClientWithResponses) WebSocketConnectionWithResponse(ctx context.Context, params *WebSocketConnectionParams, reqEditors ...RequestEditorFn) (*WebSocketConnectionResp, error)

WebSocketConnectionWithResponse request returning *WebSocketConnectionResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListBotsWithResponse request
	ListBotsWithResponse(ctx context.Context, params *ListBotsParams, reqEditors ...RequestEditorFn) (*ListBotsResp, error)

	// ListChannelsWithResponse request
	ListChannelsWithResponse(ctx context.Context, params *ListChannelsParams, reqEditors ...RequestEditorFn) (*ListChannelsResp, error)

	// ListChatsWithResponse request
	ListChatsWithResponse(ctx context.Context, params *ListChatsParams, reqEditors ...RequestEditorFn) (*ListChatsResp, error)

	// CreateDialogWithBodyWithResponse request with any body
	CreateDialogWithBodyWithResponse(ctx context.Context, chatId ChatIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDialogResp, error)

	CreateDialogWithResponse(ctx context.Context, chatId ChatIdPath, body CreateDialogJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDialogResp, error)

	// ListCustomersWithResponse request
	ListCustomersWithResponse(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*ListCustomersResp, error)

	// ListDialogsWithResponse request
	ListDialogsWithResponse(ctx context.Context, params *ListDialogsParams, reqEditors ...RequestEditorFn) (*ListDialogsResp, error)

	// AssignDialogResponsibleWithBodyWithResponse request with any body
	AssignDialogResponsibleWithBodyWithResponse(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssignDialogResponsibleResp, error)

	AssignDialogResponsibleWithResponse(ctx context.Context, dialogId DialogIdPath, body AssignDialogResponsibleJSONRequestBody, reqEditors ...RequestEditorFn) (*AssignDialogResponsibleResp, error)

	// CloseDialogWithResponse request
	CloseDialogWithResponse(ctx context.Context, dialogId DialogIdPath, reqEditors ...RequestEditorFn) (*CloseDialogResp, error)

	// DialogAddTagsWithBodyWithResponse request with any body
	DialogAddTagsWithBodyWithResponse(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DialogAddTagsResp, error)

	DialogAddTagsWithResponse(ctx context.Context, dialogId DialogIdPath, body DialogAddTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*DialogAddTagsResp, error)

	// DialogDeleteTagsWithBodyWithResponse request with any body
	DialogDeleteTagsWithBodyWithResponse(ctx context.Context, dialogId DialogIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DialogDeleteTagsResp, error)

	DialogDeleteTagsWithResponse(ctx context.Context, dialogId DialogIdPath, body DialogDeleteTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*DialogDeleteTagsResp, error)

	// UnassignDialogResponsibleWithResponse request
	UnassignDialogResponsibleWithResponse(ctx context.Context, dialogId DialogIdPath, reqEditors ...RequestEditorFn) (*UnassignDialogResponsibleResp, 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, id FileIdPath, reqEditors ...RequestEditorFn) (*GetFileUrlResp, error)

	// UpdateFileMetadataWithBodyWithResponse request with any body
	UpdateFileMetadataWithBodyWithResponse(ctx context.Context, id FileIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFileMetadataResp, error)

	UpdateFileMetadataWithResponse(ctx context.Context, id FileIdPath, body UpdateFileMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFileMetadataResp, error)

	// ListMembersWithResponse request
	ListMembersWithResponse(ctx context.Context, params *ListMembersParams, reqEditors ...RequestEditorFn) (*ListMembersResp, error)

	// ListMessagesWithResponse request
	ListMessagesWithResponse(ctx context.Context, params *ListMessagesParams, reqEditors ...RequestEditorFn) (*ListMessagesResp, 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)

	// DeleteMessageWithResponse request
	DeleteMessageWithResponse(ctx context.Context, messageId MessageIdPath, reqEditors ...RequestEditorFn) (*DeleteMessageResp, error)

	// EditMessageWithBodyWithResponse request with any body
	EditMessageWithBodyWithResponse(ctx context.Context, messageId MessageIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditMessageResp, error)

	EditMessageWithResponse(ctx context.Context, messageId MessageIdPath, body EditMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*EditMessageResp, error)

	// ListCommandsWithResponse request
	ListCommandsWithResponse(ctx context.Context, params *ListCommandsParams, reqEditors ...RequestEditorFn) (*ListCommandsResp, error)

	// DeleteCommandWithResponse request
	DeleteCommandWithResponse(ctx context.Context, commandName CommandNamePath, reqEditors ...RequestEditorFn) (*DeleteCommandResp, error)

	// CreateOrUpdateCommandWithBodyWithResponse request with any body
	CreateOrUpdateCommandWithBodyWithResponse(ctx context.Context, commandName CommandNamePath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrUpdateCommandResp, error)

	CreateOrUpdateCommandWithResponse(ctx context.Context, commandName CommandNamePath, body CreateOrUpdateCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrUpdateCommandResp, error)

	// UpdateBotWithBodyWithResponse request with any body
	UpdateBotWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateBotResp, error)

	UpdateBotWithResponse(ctx context.Context, body UpdateBotJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateBotResp, error)

	// ListUsersWithResponse request
	ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResp, error)

	// WebSocketConnectionWithResponse request
	WebSocketConnectionWithResponse(ctx context.Context, params *WebSocketConnectionParams, reqEditors ...RequestEditorFn) (*WebSocketConnectionResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CloseDialogResp

type CloseDialogResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *EmptyResponse
	JSONDefault  *ErrorResponse
}

func ParseCloseDialogResp

func ParseCloseDialogResp(rsp *http.Response) (*CloseDialogResp, error)

ParseCloseDialogResp parses an HTTP response from a CloseDialogWithResponse call

func (CloseDialogResp) Status

func (r CloseDialogResp) Status() string

Status returns HTTPResponse.Status

func (CloseDialogResp) StatusCode

func (r CloseDialogResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ColorCode

type ColorCode string

ColorCode Code of tag color

const (
	ColorCodeBlue             ColorCode = "blue"
	ColorCodeGray             ColorCode = "gray"
	ColorCodeGrayishBlue      ColorCode = "grayish-blue"
	ColorCodeGreen            ColorCode = "green"
	ColorCodeLightBlue        ColorCode = "light-blue"
	ColorCodeLightGray        ColorCode = "light-gray"
	ColorCodeLightGrayishBlue ColorCode = "light-grayish-blue"
	ColorCodeLightGreen       ColorCode = "light-green"
	ColorCodeLightOrange      ColorCode = "light-orange"
	ColorCodeLightRed         ColorCode = "light-red"
	ColorCodeOrange           ColorCode = "orange"
	ColorCodeRed              ColorCode = "red"
)

Defines values for ColorCode.

func (ColorCode) EnumValues

func (ColorCode) EnumValues() []string

EnumValues returns all valid values for ColorCode.

func (*ColorCode) UnmarshalJSON

func (v *ColorCode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ColorCode.

func (ColorCode) ValidateEnum

func (v ColorCode) ValidateEnum() error

Validate validates the value of ColorCode.

type Command

type Command struct {
	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// Description Human-readable description of the command.
	Description string `json:"description"`

	// ID Unique identifier of the command.
	ID int64 `json:"id"`

	// Name Unique command name, used for execution or identification
	Name string `json:"name"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`
}

Command Represents a single bot command with metadata.

type CommandCreate

type CommandCreate struct {
	// CreatedAt Date and time in RFC 3339 format
	CreatedAt DateTimeRFC3339 `json:"created_at"`

	// Description Human-readable description of the command.
	Description string `json:"description"`

	// ID Unique identifier of the command.
	ID int64 `json:"id"`

	// Name Unique command name, used for execution or identification
	Name string `json:"name"`

	// UpdatedAt Date and time in RFC 3339 format
	UpdatedAt *DateTimeRFC3339 `json:"updated_at,omitempty"`
}

CommandCreate defines model for CommandCreate.

type CommandCreateResponse

type CommandCreateResponse = CommandCreate

CommandCreateResponse Represents a created command with metadata

type CommandNamePath

type CommandNamePath = string

CommandNamePath defines model for CommandNamePath.

type CommandsResponse

type CommandsResponse = []Command

CommandsResponse defines model for CommandsResponse.

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 CreateCommandRequestBody

type CreateCommandRequestBody struct {
	// Description Human-readable description of the command's purpose or behavior
	Description string `binding:"required,min=0,max=64" json:"description"`

	// Name Unique identifier for the command
	Name string `json:"name,omitempty"`
}

CreateCommandRequestBody Represents a request body for creating a new command

type CreateDialogJSONBody

type CreateDialogJSONBody struct {
	// BotID ID of the bot to associate with the dialog
	BotID *int64 `binding:"omitempty,min=1" json:"bot_id"`

	// UserID ID of the user starting the dialog
	UserID *int64 `binding:"omitempty,min=1" json:"user_id"`
}

CreateDialogJSONBody defines parameters for CreateDialog.

type CreateDialogJSONRequestBody

type CreateDialogJSONRequestBody CreateDialogJSONBody

CreateDialogJSONRequestBody defines body for CreateDialog for application/json ContentType.

type CreateDialogRequest

type CreateDialogRequest struct {
	// BotID ID of the bot to associate with the dialog
	BotID *int64 `binding:"omitempty,min=1" json:"bot_id"`

	// UserID ID of the user starting the dialog
	UserID *int64 `binding:"omitempty,min=1" json:"user_id"`
}

CreateDialogRequest defines model for CreateDialogRequest.

type CreateDialogResp

type CreateDialogResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CreateDialogResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateDialogResp

func ParseCreateDialogResp(rsp *http.Response) (*CreateDialogResp, error)

ParseCreateDialogResp parses an HTTP response from a CreateDialogWithResponse call

func (CreateDialogResp) Status

func (r CreateDialogResp) Status() string

Status returns HTTPResponse.Status

func (CreateDialogResp) StatusCode

func (r CreateDialogResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateDialogResponse

type CreateDialogResponse struct {
	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// ID Unique identifier of the created dialog
	ID int64 `json:"id"`
}

CreateDialogResponse defines model for CreateDialogResponse.

type CreateOrUpdateCommandJSONBody

type CreateOrUpdateCommandJSONBody struct {
	// contains filtered or unexported fields
}

CreateOrUpdateCommandJSONBody defines parameters for CreateOrUpdateCommand.

type CreateOrUpdateCommandJSONRequestBody

type CreateOrUpdateCommandJSONRequestBody CreateOrUpdateCommandJSONBody

CreateOrUpdateCommandJSONRequestBody defines body for CreateOrUpdateCommand for application/json ContentType.

type CreateOrUpdateCommandRequest

type CreateOrUpdateCommandRequest struct {
	// contains filtered or unexported fields
}

CreateOrUpdateCommandRequest defines model for CreateOrUpdateCommandRequest.

func (CreateOrUpdateCommandRequest) AsCreateCommandRequestBody

func (t CreateOrUpdateCommandRequest) AsCreateCommandRequestBody() (CreateCommandRequestBody, error)

AsCreateCommandRequestBody returns the union data inside the CreateOrUpdateCommandRequest as a CreateCommandRequestBody

func (CreateOrUpdateCommandRequest) AsUpdateCommandRequestBody

func (t CreateOrUpdateCommandRequest) AsUpdateCommandRequestBody() (UpdateCommandRequestBody, error)

AsUpdateCommandRequestBody returns the union data inside the CreateOrUpdateCommandRequest as a UpdateCommandRequestBody

func (*CreateOrUpdateCommandRequest) FromCreateCommandRequestBody

func (t *CreateOrUpdateCommandRequest) FromCreateCommandRequestBody(v CreateCommandRequestBody) error

FromCreateCommandRequestBody overwrites any union data inside the CreateOrUpdateCommandRequest as the provided CreateCommandRequestBody

func (*CreateOrUpdateCommandRequest) FromUpdateCommandRequestBody

func (t *CreateOrUpdateCommandRequest) FromUpdateCommandRequestBody(v UpdateCommandRequestBody) error

FromUpdateCommandRequestBody overwrites any union data inside the CreateOrUpdateCommandRequest as the provided UpdateCommandRequestBody

func (CreateOrUpdateCommandRequest) MarshalJSON

func (t CreateOrUpdateCommandRequest) MarshalJSON() ([]byte, error)

func (*CreateOrUpdateCommandRequest) MergeCreateCommandRequestBody

func (t *CreateOrUpdateCommandRequest) MergeCreateCommandRequestBody(v CreateCommandRequestBody) error

MergeCreateCommandRequestBody performs a merge with any union data inside the CreateOrUpdateCommandRequest, using the provided CreateCommandRequestBody

func (*CreateOrUpdateCommandRequest) MergeUpdateCommandRequestBody

func (t *CreateOrUpdateCommandRequest) MergeUpdateCommandRequestBody(v UpdateCommandRequestBody) error

MergeUpdateCommandRequestBody performs a merge with any union data inside the CreateOrUpdateCommandRequest, using the provided UpdateCommandRequestBody

func (*CreateOrUpdateCommandRequest) UnmarshalJSON

func (t *CreateOrUpdateCommandRequest) UnmarshalJSON(b []byte) error

type CreateOrUpdateCommandResp

type CreateOrUpdateCommandResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CommandCreateResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateOrUpdateCommandResp

func ParseCreateOrUpdateCommandResp(rsp *http.Response) (*CreateOrUpdateCommandResp, error)

ParseCreateOrUpdateCommandResp parses an HTTP response from a CreateOrUpdateCommandWithResponse call

func (CreateOrUpdateCommandResp) Status

func (r CreateOrUpdateCommandResp) Status() string

Status returns HTTPResponse.Status

func (CreateOrUpdateCommandResp) StatusCode

func (r CreateOrUpdateCommandResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Customer

type Customer struct {
	Avatar    *string `json:"avatar,omitempty"`
	ChannelId *int64  `json:"channel_id,omitempty"`
	Country   *string `json:"country,omitempty"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt  DateTimeRFC3339Micro `json:"created_at"`
	Email      *string              `json:"email,omitempty"`
	ExternalID *string              `json:"external_id,omitempty"`
	FirstName  *string              `json:"first_name,omitempty"`
	ID         int64                `json:"id"`
	IsBlocked  bool                 `json:"is_blocked"`
	Language   *string              `json:"language,omitempty"`
	LastName   *string              `json:"last_name,omitempty"`
	Phone      *string              `json:"phone,omitempty"`
	ProfileURL *string              `json:"profile_url,omitempty"`

	// RevokedAt Date and time in RFC 3339 format with microseconds
	RevokedAt *DateTimeRFC3339Micro `json:"revoked_at"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`
	Username  *string               `json:"username,omitempty"`
	Utm       *Utm                  `json:"utm"`
}

Customer Dialog object

type CustomerExternalId

type CustomerExternalId string

CustomerExternalId Support for external customer identifiers

const (
	CustomerExternalIdAny   CustomerExternalId = "any"
	CustomerExternalIdPhone CustomerExternalId = "phone"
)

Defines values for CustomerExternalId.

func (CustomerExternalId) EnumValues

func (CustomerExternalId) EnumValues() []string

EnumValues returns all valid values for CustomerExternalId.

func (*CustomerExternalId) UnmarshalJSON

func (v *CustomerExternalId) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerExternalId.

func (CustomerExternalId) ValidateEnum

func (v CustomerExternalId) ValidateEnum() error

Validate validates the value of CustomerExternalId.

type CustomersListResponse

type CustomersListResponse = []Customer

CustomersListResponse defines model for CustomersListResponse.

type DateTimeRFC3339

type DateTimeRFC3339 struct {
	Time time.Time `json:"time"`
}

func (DateTimeRFC3339) MarshalJSON

func (t DateTimeRFC3339) MarshalJSON() ([]byte, error)

func (*DateTimeRFC3339) UnmarshalJSON

func (t *DateTimeRFC3339) UnmarshalJSON(data []byte) error

type DateTimeRFC3339Micro

type DateTimeRFC3339Micro struct {
	Time time.Time `json:"time"`
}

func (DateTimeRFC3339Micro) MarshalJSON

func (t DateTimeRFC3339Micro) MarshalJSON() ([]byte, error)

func (*DateTimeRFC3339Micro) UnmarshalJSON

func (t *DateTimeRFC3339Micro) UnmarshalJSON(data []byte) error

type DeleteCommandResp

type DeleteCommandResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *EmptyResponse
	JSONDefault  *ErrorResponse
}

func ParseDeleteCommandResp

func ParseDeleteCommandResp(rsp *http.Response) (*DeleteCommandResp, error)

ParseDeleteCommandResp parses an HTTP response from a DeleteCommandWithResponse call

func (DeleteCommandResp) Status

func (r DeleteCommandResp) Status() string

Status returns HTTPResponse.Status

func (DeleteCommandResp) StatusCode

func (r DeleteCommandResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteMessageResp

type DeleteMessageResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *EmptyResponse
	JSONDefault  *ErrorResponse
}

func ParseDeleteMessageResp

func ParseDeleteMessageResp(rsp *http.Response) (*DeleteMessageResp, error)

ParseDeleteMessageResp parses an HTTP response from a DeleteMessageWithResponse call

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 Dialog

type Dialog struct {
	AssignedAt *DateTimeRFC3339 `json:"assigned_at"`

	// ClosedAt Date and time in RFC 3339 format
	ClosedAt *DateTimeRFC3339 `json:"closed_at"`

	// CreatedAt Date and time in RFC 3339 format
	CreatedAt   DateTimeRFC3339 `json:"created_at"`
	ID          int64           `json:"id"`
	Responsible *Actor          `json:"responsible"`
	Utm         *Utm            `json:"utm"`
}

Dialog Dialog object

type DialogAddTagsJSONBody

type DialogAddTagsJSONBody struct {
	// Tags List of tags to add
	Tags []struct {
		// ColorCode Optional color code for the tag
		ColorCode *ColorCode `binding:"omitempty,enum-valid" json:"color_code,omitempty"`

		// Name Name of the tag
		Name string `binding:"required,min=1,max=255" json:"name"`
	} `binding:"required,min=1,dive" json:"tags"`
}

DialogAddTagsJSONBody defines parameters for DialogAddTags.

type DialogAddTagsJSONRequestBody

type DialogAddTagsJSONRequestBody DialogAddTagsJSONBody

DialogAddTagsJSONRequestBody defines body for DialogAddTags for application/json ContentType.

type DialogAddTagsRequest

type DialogAddTagsRequest struct {
	// Tags List of tags to add
	Tags []struct {
		// ColorCode Optional color code for the tag
		ColorCode *ColorCode `binding:"omitempty,enum-valid" json:"color_code,omitempty"`

		// Name Name of the tag
		Name string `binding:"required,min=1,max=255" json:"name"`
	} `binding:"required,min=1,dive" json:"tags"`
}

DialogAddTagsRequest defines model for DialogAddTagsRequest.

type DialogAddTagsResp

type DialogAddTagsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *EmptyResponse
	JSONDefault  *ErrorResponse
}

func ParseDialogAddTagsResp

func ParseDialogAddTagsResp(rsp *http.Response) (*DialogAddTagsResp, error)

ParseDialogAddTagsResp parses an HTTP response from a DialogAddTagsWithResponse call

func (DialogAddTagsResp) Status

func (r DialogAddTagsResp) Status() string

Status returns HTTPResponse.Status

func (DialogAddTagsResp) StatusCode

func (r DialogAddTagsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DialogAssignResponse

type DialogAssignResponse struct {
	// IsReAssign Indicates if the assignment is a reassignment
	IsReAssign bool `json:"is_reassign"`

	// LeftUserID ID of the user who left the dialog, if applicable
	LeftUserID *int64 `json:"left_user_id"`

	// PreviousResponsible Previously responsible user before reassignment
	PreviousResponsible *Responsible `json:"previous_responsible"`

	// Responsible Currently responsible user for the dialog
	Responsible Responsible `json:"responsible"`
}

DialogAssignResponse defines model for DialogAssignResponse.

type DialogDeleteTagsJSONBody

type DialogDeleteTagsJSONBody struct {
	Tags []struct {
		// Name Name of the tag to delete
		Name string `binding:"required,min=1,max=255" json:"name"`
	} `binding:"required,min=1,dive" json:"tags"`
}

DialogDeleteTagsJSONBody defines parameters for DialogDeleteTags.

type DialogDeleteTagsJSONRequestBody

type DialogDeleteTagsJSONRequestBody DialogDeleteTagsJSONBody

DialogDeleteTagsJSONRequestBody defines body for DialogDeleteTags for application/json ContentType.

type DialogDeleteTagsRequest

type DialogDeleteTagsRequest struct {
	Tags []struct {
		// Name Name of the tag to delete
		Name string `binding:"required,min=1,max=255" json:"name"`
	} `binding:"required,min=1,dive" json:"tags"`
}

DialogDeleteTagsRequest defines model for DialogDeleteTagsRequest.

type DialogDeleteTagsResp

type DialogDeleteTagsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *EmptyResponse
	JSONDefault  *ErrorResponse
}

func ParseDialogDeleteTagsResp

func ParseDialogDeleteTagsResp(rsp *http.Response) (*DialogDeleteTagsResp, error)

ParseDialogDeleteTagsResp parses an HTTP response from a DialogDeleteTagsWithResponse call

func (DialogDeleteTagsResp) Status

func (r DialogDeleteTagsResp) Status() string

Status returns HTTPResponse.Status

func (DialogDeleteTagsResp) StatusCode

func (r DialogDeleteTagsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DialogIdPath

type DialogIdPath = int64

DialogIdPath defines model for DialogIdPath.

type DialogListResponseItem

type DialogListResponseItem struct {
	// BeginMessageID ID of the first message in the dialog
	BeginMessageID *int64 `json:"begin_message_id"`

	// BotID ID of the bot assigned to the dialog, if any
	BotID *int64 `json:"bot_id"`

	// ChatID ID of the chat this dialog belongs to
	ChatID int64 `json:"chat_id"`

	// ClosedAt Date and time in RFC 3339 format with microseconds
	ClosedAt *DateTimeRFC3339Micro `json:"closed_at"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// EndingMessageID ID of the last message in the dialog
	EndingMessageID *int64 `json:"ending_message_id"`

	// ID Unique identifier of the dialog
	ID int64 `json:"id"`

	// IsActive Indicates if the dialog is currently active
	IsActive bool `json:"is_active"`

	// IsAssigned Indicates if the dialog is assigned to someone
	IsAssigned bool `json:"is_assigned"`

	// Responsible Current responsible entity for the dialog
	Responsible *Responsible `json:"responsible,omitempty"`

	// Tags List of tags associated with the dialog
	Tags []Tag `json:"tags,omitempty"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`

	// Utm UTM parameters associated with the dialog
	Utm *Utm `json:"utm,omitempty"`
}

DialogListResponseItem Dialog item in the list response

type DialogResponsibleRequest

type DialogResponsibleRequest struct {
	// BotID Unique identifier of the bot assigned to the dialog
	BotID int64 `binding:"omitempty,min=1" json:"bot_id"`

	// UserID Unique identifier of the user to assign as responsible
	UserID int64 `binding:"omitempty,min=1" json:"user_id"`
}

DialogResponsibleRequest defines model for DialogResponsibleRequest.

type DialogUnassignResponse

type DialogUnassignResponse struct {
	// PreviousResponsible Previously responsible user before unassignment
	PreviousResponsible *Responsible `json:"previous_responsible,omitempty"`
}

DialogUnassignResponse defines model for DialogUnassignResponse.

type DialogsListResponse

type DialogsListResponse = []DialogListResponseItem

DialogsListResponse defines model for DialogsListResponse.

type EditMessageJSONBody

type EditMessageJSONBody struct {
	// Content Message text content (required for text messages only)
	Content *string `json:"content,omitempty"`

	// Items File attachments (required for file, audio and image messages)
	Items *[]struct {
		// Caption Caption for the file
		Caption *string `binding:"min=1,max=1024" json:"caption,omitempty"`

		// ID Unique identifier of the file
		ID openapi_types.UUID `json:"id"`
	} `json:"items,omitempty"`

	// Note Note or description for the file (required for file, audio and image messages)
	Note *string `json:"note,omitempty"`

	// Order Order data (required for order messages only)
	Order *MessageOrder `json:"order,omitempty"`

	// Product Product data (required for product messages only)
	Product *MessageProduct `json:"product,omitempty"`

	// QuoteMessageId ID of the quoted message (required for text messages only)
	QuoteMessageId int64 `json:"quote_message_id,omitempty"`
}

EditMessageJSONBody defines parameters for EditMessage.

type EditMessageJSONRequestBody

type EditMessageJSONRequestBody EditMessageJSONBody

EditMessageJSONRequestBody defines body for EditMessage for application/json ContentType.

type EditMessageRequest

type EditMessageRequest struct {
	// Content Message text content (required for text messages only)
	Content *string `json:"content,omitempty"`

	// Items File attachments (required for file, audio and image messages)
	Items *[]struct {
		// Caption Caption for the file
		Caption *string `binding:"min=1,max=1024" json:"caption,omitempty"`

		// ID Unique identifier of the file
		ID openapi_types.UUID `json:"id"`
	} `json:"items,omitempty"`

	// Note Note or description for the file (required for file, audio and image messages)
	Note *string `json:"note,omitempty"`

	// Order Order data (required for order messages only)
	Order *MessageOrder `json:"order,omitempty"`

	// Product Product data (required for product messages only)
	Product *MessageProduct `json:"product,omitempty"`

	// QuoteMessageId ID of the quoted message (required for text messages only)
	QuoteMessageId int64 `json:"quote_message_id,omitempty"`
}

EditMessageRequest Represents the payload of a message, including content, attachments, and related metadata depending on the message type

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) 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 {
	// ID Unique identifier of the file
	ID openapi_types.UUID `json:"id"`

	// Size Size of the file in bytes
	Size int `json:"size"`

	// Transcription Optional text transcription of the file content, if applicable
	Transcription *string `json:"transcription"`

	// TranscriptionStatus Status of the file transcription process
	TranscriptionStatus FileTranscriptionStatus `json:"transcription_status,omitempty"`

	// Type File type
	Type FileType `json:"type"`
}

File Metadata and processing status of an uploaded file

type FileIdPath

type FileIdPath = openapi_types.UUID

FileIdPath defines model for FileIdPath.

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 FileTranscriptionStatus

type FileTranscriptionStatus string

FileTranscriptionStatus Current status of the file transcription process

const (
	FileTranscriptionStatusError      FileTranscriptionStatus = "error"
	FileTranscriptionStatusInProgress FileTranscriptionStatus = "in_progress"
	FileTranscriptionStatusReady      FileTranscriptionStatus = "ready"
)

Defines values for FileTranscriptionStatus.

func (FileTranscriptionStatus) EnumValues

func (FileTranscriptionStatus) EnumValues() []string

EnumValues returns all valid values for FileTranscriptionStatus.

func (*FileTranscriptionStatus) UnmarshalJSON

func (v *FileTranscriptionStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FileTranscriptionStatus.

func (FileTranscriptionStatus) ValidateEnum

func (v FileTranscriptionStatus) ValidateEnum() error

Validate validates the value of FileTranscriptionStatus.

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

func (FileType) EnumValues() []string

EnumValues returns all valid values for FileType.

func (*FileType) UnmarshalJSON

func (v *FileType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FileType.

func (FileType) ValidateEnum

func (v FileType) ValidateEnum() error

Validate validates the value of FileType.

type FileWithUrl

type FileWithUrl struct {
	// ID Unique identifier of the file
	ID openapi_types.UUID `json:"id"`

	// Size Size of the file in bytes
	Size int `json:"size"`

	// Transcription Optional text transcription of the file content, if applicable
	Transcription *string `json:"transcription"`

	// TranscriptionStatus Status of the file transcription process
	TranscriptionStatus FileTranscriptionStatus `json:"transcription_status,omitempty"`

	// Type File type
	Type FileType `json:"type"`

	// Url Direct URL for downloading or accessing the uploaded file
	Url string `binding:"omitempty,Url" json:"url"`
}

FileWithUrl defines model for FileWithUrl.

type FullFileResponse

type FullFileResponse = FileWithUrl

FullFileResponse Uploaded file metadata with a temporary access URL

type GetFileUrlResp

type GetFileUrlResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *FullFileResponse
	JSONDefault  *ErrorResponse
}

func ParseGetFileUrlResp

func ParseGetFileUrlResp(rsp *http.Response) (*GetFileUrlResp, error)

ParseGetFileUrlResp parses an HTTP response from a GetFileUrlWithResponse call

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 Histogram

type Histogram = []int

Histogram Sound diagram (for audio type messages only)

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ID

type ID = int

ID defines model for IDQuery.

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 LastUserMessage

type LastUserMessage struct {
	// ID Unique identifier of the last user message
	ID int64 `json:"id"`
}

LastUserMessage The most recent message sent by a user in the chat

type LimitQuery

type LimitQuery = int

LimitQuery defines model for LimitQuery.

type ListBotsParams

type ListBotsParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// Active Filters bots by activity status
	Active *BotActiveQuery `binding:"omitempty,enum-valid" form:"active,omitempty" json:"active,omitempty"`

	// Role Filters bots by one or more assigned roles
	Role BotRoleQuery `binding:"omitempty,enum-valid" form:"role,omitempty" json:"role,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// 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"`
}

ListBotsParams defines parameters for ListBots.

type ListBotsResp

type ListBotsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BotsListResponse
	JSONDefault  *ErrorResponse
}

func ParseListBotsResp

func ParseListBotsResp(rsp *http.Response) (*ListBotsResp, error)

ParseListBotsResp parses an HTTP response from a ListBotsWithResponse call

func (ListBotsResp) Status

func (r ListBotsResp) Status() string

Status returns HTTPResponse.Status

func (ListBotsResp) StatusCode

func (r ListBotsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListChannelsParams

type ListChannelsParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// Types Filters channels by one or more specified types
	Types ChannelTypeQuery `binding:"omitempty,enum-valid" form:"types,omitempty" json:"types,omitempty"`

	// Active Filters channels by activity status
	Active *ChannelActiveQuery `binding:"omitempty,enum-valid" form:"active,omitempty" json:"active,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// 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) Status

func (r ListChannelsResp) Status() string

Status returns HTTPResponse.Status

func (ListChannelsResp) StatusCode

func (r ListChannelsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListChatsParams

type ListChatsParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// 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"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// ChannelID Filter by channel ID
	ChannelID *int `binding:"omitempty,min=1" form:"channel_id,omitempty" json:"channel_id,omitempty"`

	// ChannelType Filter by channel type
	ChannelType *ChannelType `binding:"omitempty,enum-valid" form:"channel_type,omitempty" json:"channel_type,omitempty"`

	// CustomerID Filter by customer ID
	CustomerID *int `binding:"omitempty,min=1" form:"customer_id,omitempty" json:"customer_id,omitempty"`

	// CustomerExternalID Filter by external customer ID
	CustomerExternalID *string `binding:"omitempty,min=1" form:"customer_external_id,omitempty" json:"customer_external_id,omitempty"`

	// IncludeMassCommunication Whether to include mass communication chats
	IncludeMassCommunication *Boolean `binding:"omitempty,enum-valid" form:"include_mass_communication,omitempty" json:"include_mass_communication,omitempty"`
}

ListChatsParams defines parameters for ListChats.

type ListChatsResp

type ListChatsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ChatsListResponse
	JSONDefault  *ErrorResponse
}

func ParseListChatsResp

func ParseListChatsResp(rsp *http.Response) (*ListChatsResp, error)

ParseListChatsResp parses an HTTP response from a ListChatsWithResponse call

func (ListChatsResp) Status

func (r ListChatsResp) Status() string

Status returns HTTPResponse.Status

func (ListChatsResp) StatusCode

func (r ListChatsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCommandsParams

type ListCommandsParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// 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"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// Name Filter commands by name
	Name string `binding:"omitempty,max=32,command_name" form:"name,omitempty" json:"name,omitempty"`
}

ListCommandsParams defines parameters for ListCommands.

type ListCommandsResp

type ListCommandsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CommandsResponse
	JSONDefault  *ErrorResponse
}

func ParseListCommandsResp

func ParseListCommandsResp(rsp *http.Response) (*ListCommandsResp, error)

ParseListCommandsResp parses an HTTP response from a ListCommandsWithResponse call

func (ListCommandsResp) Status

func (r ListCommandsResp) Status() string

Status returns HTTPResponse.Status

func (ListCommandsResp) StatusCode

func (r ListCommandsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomersParams

type ListCustomersParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// 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"`

	// ChannelID Channel ID
	ChannelID int `binding:"omitempty,min=1" form:"channel_id,omitempty" json:"channel_id,omitempty"`

	// ChannelType Channel type
	ChannelType *ChannelType `binding:"omitempty,enum-valid" form:"channel_type,omitempty" json:"channel_type,omitempty"`

	// ExternalID External ID
	ExternalID string `form:"external_id,omitempty" json:"external_id,omitempty"`
}

ListCustomersParams defines parameters for ListCustomers.

type ListCustomersResp

type ListCustomersResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CustomersListResponse
	JSONDefault  *ErrorResponse
}

func ParseListCustomersResp

func ParseListCustomersResp(rsp *http.Response) (*ListCustomersResp, error)

ParseListCustomersResp parses an HTTP response from a ListCustomersWithResponse call

func (ListCustomersResp) Status

func (r ListCustomersResp) Status() string

Status returns HTTPResponse.Status

func (ListCustomersResp) StatusCode

func (r ListCustomersResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListDialogsParams

type ListDialogsParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// 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"`

	// ChatID Chat ID
	ChatID int `binding:"omitempty,min=1" form:"chat_id,omitempty" json:"chat_id,omitempty"`

	// UserID User ID
	UserID int `binding:"omitempty,min=1" form:"user_id,omitempty" json:"user_id,omitempty"`

	// BotID Bot ID
	BotID int `binding:"omitempty,min=1" form:"bot_id,omitempty" json:"bot_id,omitempty"`

	// Active Activity flag
	Active *Boolean `binding:"omitempty,enum-valid" form:"active,omitempty" json:"active,omitempty"`

	// Assign Should assign
	Assign *Boolean `binding:"omitempty,enum-valid" form:"assign,omitempty" json:"assign,omitempty"`

	// IncludeMassCommunication With mass communications
	IncludeMassCommunication *Boolean `binding:"omitempty,enum-valid" form:"include_mass_communication,omitempty" json:"include_mass_communication,omitempty"`
}

ListDialogsParams defines parameters for ListDialogs.

type ListDialogsResp

type ListDialogsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DialogsListResponse
	JSONDefault  *ErrorResponse
}

func ParseListDialogsResp

func ParseListDialogsResp(rsp *http.Response) (*ListDialogsResp, error)

ParseListDialogsResp parses an HTTP response from a ListDialogsWithResponse call

func (ListDialogsResp) Status

func (r ListDialogsResp) Status() string

Status returns HTTPResponse.Status

func (ListDialogsResp) StatusCode

func (r ListDialogsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListMembersParams

type ListMembersParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// 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"`

	// ChatID Filter by chat identifier
	ChatID int `binding:"omitempty,min=1" form:"chat_id,omitempty" json:"chat_id,omitempty"`

	// UserID Filter by user identifier
	UserID int `binding:"omitempty,min=1" form:"user_id,omitempty" json:"user_id,omitempty"`

	// State Filter by member state
	State ListMembersParamsState `binding:"omitempty,oneof=active kicked leaved" form:"state,omitempty" json:"state,omitempty"`
}

ListMembersParams defines parameters for ListMembers.

type ListMembersParamsState

type ListMembersParamsState string

ListMembersParamsState defines parameters for ListMembers.

const (
	ListMembersParamsStateActive ListMembersParamsState = "active"
	ListMembersParamsStateKicked ListMembersParamsState = "kicked"
	ListMembersParamsStateLeaved ListMembersParamsState = "leaved"
)

Defines values for ListMembersParamsState.

func (ListMembersParamsState) EnumValues

func (ListMembersParamsState) EnumValues() []string

EnumValues returns all valid values for ListMembersParamsState.

func (*ListMembersParamsState) UnmarshalJSON

func (v *ListMembersParamsState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListMembersParamsState.

func (ListMembersParamsState) ValidateEnum

func (v ListMembersParamsState) ValidateEnum() error

Validate validates the value of ListMembersParamsState.

type ListMembersResp

type ListMembersResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ChatMemberListResponse
	JSONDefault  *ErrorResponse
}

func ParseListMembersResp

func ParseListMembersResp(rsp *http.Response) (*ListMembersResp, error)

ParseListMembersResp parses an HTTP response from a ListMembersWithResponse call

func (ListMembersResp) Status

func (r ListMembersResp) Status() string

Status returns HTTPResponse.Status

func (ListMembersResp) StatusCode

func (r ListMembersResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListMessagesParams

type ListMessagesParams struct {
	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// 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"`

	// ID Filter by a list of message IDs
	ID []int64 `binding:"omitempty,dive,min=1" form:"id,omitempty" json:"id,omitempty"`

	// ChatID Filter by chat ID
	ChatID int64 `binding:"omitempty,min=1" form:"chat_id,omitempty" json:"chat_id,omitempty"`

	// UserID Filter by user ID
	UserID int64 `binding:"omitempty,min=1" form:"user_id,omitempty" json:"user_id,omitempty"`

	// CustomerID Filter by customer ID
	CustomerID int64 `binding:"omitempty,min=1" form:"customer_id,omitempty" json:"customer_id,omitempty"`

	// BotID Filter by bot ID
	BotID int64 `binding:"omitempty,min=1" form:"bot_id,omitempty" json:"bot_id,omitempty"`

	// DialogID Filter by dialog ID
	DialogID int64 `binding:"omitempty,min=1" form:"dialog_id,omitempty" json:"dialog_id,omitempty"`

	// ChannelID Filter by channel ID
	ChannelID int64 `binding:"omitempty,min=1" form:"channel_id,omitempty" json:"channel_id,omitempty"`

	// ChannelType Filter by channel type
	ChannelType *ChannelType `binding:"omitempty,enum-valid" form:"channel_type,omitempty" json:"channel_type,omitempty"`

	// Type Filter by message type
	Type *MessageType `binding:"omitempty,oneof=text system file image order product command audio" form:"type,omitempty" json:"type,omitempty"`

	// IncludeMassCommunication Whether to include mass communication messages
	IncludeMassCommunication *Boolean `binding:"omitempty,enum-valid" form:"include_mass_communication,omitempty" json:"include_mass_communication,omitempty"`

	// Scope Filter by message scope (public or private)
	Scope *ListMessagesParamsScope `binding:"omitempty,oneof=public private" form:"scope,omitempty" json:"scope,omitempty"`
}

ListMessagesParams defines parameters for ListMessages.

type ListMessagesParamsScope

type ListMessagesParamsScope string

ListMessagesParamsScope defines parameters for ListMessages.

const (
	ListMessagesParamsScopePrivate ListMessagesParamsScope = "private"
	ListMessagesParamsScopePublic  ListMessagesParamsScope = "public"
)

Defines values for ListMessagesParamsScope.

func (ListMessagesParamsScope) EnumValues

func (ListMessagesParamsScope) EnumValues() []string

EnumValues returns all valid values for ListMessagesParamsScope.

func (*ListMessagesParamsScope) UnmarshalJSON

func (v *ListMessagesParamsScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListMessagesParamsScope.

func (ListMessagesParamsScope) ValidateEnum

func (v ListMessagesParamsScope) ValidateEnum() error

Validate validates the value of ListMessagesParamsScope.

type ListMessagesResp

type ListMessagesResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MessageListResponse
	JSONDefault  *ErrorResponse
}

func ParseListMessagesResp

func ParseListMessagesResp(rsp *http.Response) (*ListMessagesResp, error)

ParseListMessagesResp parses an HTTP response from a ListMessagesWithResponse call

func (ListMessagesResp) Status

func (r ListMessagesResp) Status() string

Status returns HTTPResponse.Status

func (ListMessagesResp) StatusCode

func (r ListMessagesResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListUsersParams

type ListUsersParams struct {
	// ID Identifier of the requested object
	ID ID `binding:"omitempty,min=1" form:"id,omitempty" json:"id,omitempty"`

	// Since Lower limit of the date of the last object update
	Since SinceQuery `form:"since,omitempty" json:"since,omitempty"`

	// Until Upper limit of the date of the last object update
	Until UntilQuery `form:"until,omitempty" json:"until,omitempty"`

	// SinceID Lower bound for object identifiers
	SinceID SinceID `binding:"omitempty,min=1" form:"since_id,omitempty" json:"since_id,omitempty"`

	// UntilID Upper bound for object identifiers
	UntilID UntilID `binding:"omitempty,min=1" form:"until_id,omitempty" json:"until_id,omitempty"`

	// 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"`

	// Active Filter users by activity status
	Active *Boolean `binding:"omitempty,enum-valid" form:"active,omitempty" json:"active,omitempty"`

	// Online Filter users by online status
	Online *Boolean `binding:"omitempty,enum-valid" form:"online,omitempty" json:"online,omitempty"`

	// ExternalID Filter users by external identifier
	ExternalID *string `form:"external_id,omitempty" json:"external_id,omitempty"`
}

ListUsersParams defines parameters for ListUsers.

type ListUsersResp

type ListUsersResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UserListResponse
	JSONDefault  *ErrorResponse
}

func ParseListUsersResp

func ParseListUsersResp(rsp *http.Response) (*ListUsersResp, error)

ParseListUsersResp parses an HTTP response from a ListUsersWithResponse call

func (ListUsersResp) Status

func (r ListUsersResp) Status() string

Status returns HTTPResponse.Status

func (ListUsersResp) StatusCode

func (r ListUsersResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Member

type Member struct {
	// IsAuthor Indicates whether the member is the author (creator) of the chat
	IsAuthor bool `json:"is_author"`

	// State The current state of the member in the chat
	State MemberState `json:"state"`

	// User Information about the user who is a member of the chat
	User Actor `json:"user"`
}

Member A participant in the chat, representing a user and their current membership status

type MemberState

type MemberState string

MemberState The current state of the member in the chat

const (
	MemberStateActive    MemberState = "active"
	MemberStateKicked    MemberState = "kicked"
	MemberStateLeaved    MemberState = "leaved"
	MemberStateUndefined MemberState = "undefined"
)

Defines values for MemberState.

func (MemberState) EnumValues

func (MemberState) EnumValues() []string

EnumValues returns all valid values for MemberState.

func (*MemberState) UnmarshalJSON

func (v *MemberState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MemberState.

func (MemberState) ValidateEnum

func (v MemberState) ValidateEnum() error

Validate validates the value of MemberState.

type Members

type Members = []Member

Members List of participants involved in the chat

type Message

type Message struct {
	// Action System-level action represented by the message
	Action *SystemAction `json:"action"`

	// Actions List of interactive actions associated with the message
	Actions []MessageAction `json:"actions"`

	// ChatID ID of the chat this message belongs to
	ChatID int64 `json:"chat_id"`

	// Content Text content of the message
	Content *string `json:"content"`

	// Dialog Optional dialog related to the message
	Dialog *MessageDialog `json:"dialog"`

	// Error Error info related to message sending or processing
	Error *MessageError `json:"error"`

	// From Actor who sent the message
	From *Actor `json:"from,omitempty"`

	// ID Unique identifier of the message
	ID int64 `json:"id"`

	// IsEdit Indicates whether the message was edited
	IsEdit bool `json:"is_edit"`

	// IsRead Indicates whether the message was read
	IsRead bool `json:"is_read"`

	// Items List of attached files
	Items []MessageFile `json:"items,omitempty"`

	// Note Optional internal note or comment for the message
	Note string `json:"note"`

	// Order Optional order data linked to the message
	Order *MessageOrder `json:"order"`

	// Product Optional product data referenced in the message
	Product *MessageProduct `json:"product"`

	// Quote Quoted message, if this is a reply
	Quote *QuoteMessage `json:"quote"`

	// Responsible User responsible for this message or task
	Responsible *Actor `json:"responsible"`

	// Scope Scope of the message
	Scope MessageScope `json:"scope"`

	// Status Current status of the message
	Status MessageStatus `json:"status"`

	// Time Timestamp when the message was created
	Time DateTimeRFC3339 `json:"time"`

	// TransportAttachments Attachments specific to a transport layer
	TransportAttachments *MessageTransportAttachments `json:"transport_attachments"`

	// Type Type of the message
	Type MessageType `json:"type"`

	// User User associated with the message
	User *Actor `json:"user"`
}

Message Message object representing a single chat 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 of the file to upload
	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 MessageIdPath

type MessageIdPath = int64

MessageIdPath defines model for MessageIdPath.

type MessageListResponse

type MessageListResponse = []MessageListResponseItem

MessageListResponse defines model for MessageListResponse.

type MessageListResponseItem

type MessageListResponseItem struct {
	// Action System-level action represented by the message
	Action *SystemAction `json:"action"`

	// Actions List of interactive actions associated with the message
	Actions []MessageAction `json:"actions"`

	// ChannelID ID of the channel where the message was sent
	ChannelID *int64 `json:"channel_id,omitempty"`

	// ChannelSentAt Date and time in RFC 3339 format with microseconds
	ChannelSentAt *DateTimeRFC3339Micro `json:"channel_sent_at"`

	// ChatID ID of the chat this message belongs to
	ChatID int64 `json:"chat_id"`

	// Content Text content of the message
	Content *string `json:"content"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// Dialog Optional dialog related to the message
	Dialog *MessageDialog `json:"dialog"`

	// Error Error info related to message sending or processing
	Error *MessageError `json:"error"`

	// From Actor who sent the message
	From *Actor `json:"from,omitempty"`

	// ID Unique identifier of the message
	ID int64 `json:"id"`

	// IsEdit Indicates whether the message was edited
	IsEdit bool `json:"is_edit"`

	// IsRead Indicates whether the message was read
	IsRead bool `json:"is_read"`

	// Items List of attached files
	Items []MessageFile `json:"items,omitempty"`

	// Note Optional internal note or comment for the message
	Note string `json:"note"`

	// Order Optional order data linked to the message
	Order *MessageOrder `json:"order"`

	// Product Optional product data referenced in the message
	Product *MessageProduct `json:"product"`

	// Quote Quoted message, if this is a reply
	Quote *QuoteMessage `json:"quote"`

	// Responsible User responsible for this message or task
	Responsible *Actor `json:"responsible"`

	// Scope Scope of the message
	Scope MessageScope `json:"scope"`

	// Status Current status of the message
	Status MessageStatus `json:"status"`

	// Time Timestamp when the message was created
	Time DateTimeRFC3339 `json:"time"`

	// TransportAttachments Attachments specific to a transport layer
	TransportAttachments *MessageTransportAttachments `json:"transport_attachments"`

	// Type Type of the message
	Type MessageType `json:"type"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`

	// User User associated with the message
	User *Actor `json:"user"`
}

MessageListResponseItem defines model for MessageListResponseItem.

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   *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 Type of message

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 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 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 Chat actor
	From *Actor `json:"from,omitempty"`

	// ID Identifier of the quoted message
	ID int64 `json:"id"`

	// Items Media attachments of the quoted message
	Items []MessageFile `json:"items,omitempty"`

	// Time Message sending time
	Time DateTimeRFC3339 `json:"time"`
	Type MessageType     `binding:"enum-valid" json:"type"`
}

QuoteMessage Quoted message

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 RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Responsible

type Responsible struct {
	// AssignedAt Date and time in RFC 3339 format with microseconds
	AssignedAt *DateTimeRFC3339Micro `json:"assigned_at"`

	// ExternalID External identifier for the responsible entity
	ExternalID *string `json:"external_id,omitempty"`

	// ID Unique identifier of the responsible entity
	ID int64 `json:"id"`

	// Type Type of the responsible entity
	Type ResponsibleType `json:"type"`
}

Responsible Entity responsible for the dialog (user or bot)

type ResponsibleType

type ResponsibleType string

ResponsibleType Type of the responsible entity

const (
	ResponsibleTypeBot  ResponsibleType = "bot"
	ResponsibleTypeUser ResponsibleType = "user"
)

Defines values for ResponsibleType.

func (ResponsibleType) EnumValues

func (ResponsibleType) EnumValues() []string

EnumValues returns all valid values for ResponsibleType.

func (*ResponsibleType) UnmarshalJSON

func (v *ResponsibleType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ResponsibleType.

func (ResponsibleType) ValidateEnum

func (v ResponsibleType) ValidateEnum() error

Validate validates the value of ResponsibleType.

type Role

type Role string

Role Bot role type

const (
	RoleBotRoleDistributor Role = "distributor"
	RoleBotRoleHidden      Role = "hidden"
	RoleBotRoleResponsible Role = "responsible"
)

Defines values for Role.

func (Role) EnumValues

func (Role) EnumValues() []string

EnumValues returns all valid values for Role.

func (*Role) UnmarshalJSON

func (v *Role) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Role.

func (Role) ValidateEnum

func (v Role) ValidateEnum() error

Validate validates the value of Role.

type Roles

type Roles = []Role

Roles Bot role types array

type SendMessageJSONRequestBody

type SendMessageJSONRequestBody = SendMessageRequestBody

SendMessageJSONRequestBody defines body for SendMessage for application/json ContentType.

type SendMessageRequest

type SendMessageRequest = SendMessageRequestBody

SendMessageRequest Represents the payload of a message, including content, attachments, and related metadata depending on the message type

type SendMessageRequestBody

type SendMessageRequestBody struct {
	// ChatID ID of the chat where the message is being sent
	ChatID int64 `binding:"required" json:"chat_id"`

	// Content Message text content (required for text messages only)
	Content *string `json:"content,omitempty"`

	// Items File attachments (required for file, audio and image messages)
	Items *[]struct {
		// Caption Caption for the file
		Caption *string `binding:"min=1,max=1024" json:"caption,omitempty"`

		// ID Unique identifier of the file
		ID openapi_types.UUID `json:"id"`
	} `json:"items,omitempty"`

	// Note Note or description for the file (required for file, audio and image messages)
	Note *string `json:"note,omitempty"`

	// Order Order data (required for order messages only)
	Order *MessageOrder `json:"order,omitempty"`

	// Product Product data (required for product messages only)
	Product *MessageProduct `json:"product,omitempty"`

	// QuoteMessageId ID of the quoted message (required for text messages only)
	QuoteMessageId int64 `json:"quote_message_id,omitempty"`

	// Scope Scope of the message (e.g., user, system)
	Scope                string                       `binding:"required" json:"scope"`
	TransportAttachments *MessageTransportAttachments `json:"transport_attachments"`

	// Type Type of the message (e.g. text, file, order, product)
	Type *string `json:"type,omitempty"`
}

SendMessageRequestBody Represents the payload of a message, including content, attachments, and related metadata depending on the message type

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) 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 int64     `json:"message_id"`
	Time      time.Time `json:"time" time_format:"2006-01-02T15:04:05.999999Z07:00"`
}

SendMessageResponse defines model for SendMessageResponse.

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 SinceID

type SinceID = int64

SinceID defines model for SinceIDQuery.

type SinceQuery

type SinceQuery = time.Time

SinceQuery defines model for SinceQuery.

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"
	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 Tag

type Tag struct {
	// ColorCode Color code associated with the tag
	ColorCode ColorCode `json:"color_code"`

	// Name Name of the tag
	Name string `json:"name"`
}

Tag Tag assigned to a dialog or entity

type TemplateSetting

type TemplateSetting struct {
	// Creation Support for creating templates in the system
	Creation bool `json:"creation,omitempty"`
}

TemplateSetting Support for message templates

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 UnassignDialogResponsibleResp

type UnassignDialogResponsibleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DialogUnassignResponse
	JSONDefault  *ErrorResponse
}

func ParseUnassignDialogResponsibleResp

func ParseUnassignDialogResponsibleResp(rsp *http.Response) (*UnassignDialogResponsibleResp, error)

ParseUnassignDialogResponsibleResp parses an HTTP response from a UnassignDialogResponsibleWithResponse call

func (UnassignDialogResponsibleResp) Status

Status returns HTTPResponse.Status

func (UnassignDialogResponsibleResp) StatusCode

func (r UnassignDialogResponsibleResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UntilID

type UntilID = int64

UntilID defines model for UntilIDQuery.

type UntilQuery

type UntilQuery = time.Time

UntilQuery defines model for UntilQuery.

type UpdateBotJSONBody

type UpdateBotJSONBody struct {
	// AvatarUrl URL of bot avatar
	AvatarUrl *string `binding:"omitempty,url" json:"avatar_url"`

	// Name Bot name
	Name string `binding:"omitempty,min=0,max=255" json:"name"`

	// Roles Bot role types array
	Roles Roles `binding:"omitempty,enum-valid" json:"roles,omitempty"`
}

UpdateBotJSONBody defines parameters for UpdateBot.

type UpdateBotJSONRequestBody

type UpdateBotJSONRequestBody UpdateBotJSONBody

UpdateBotJSONRequestBody defines body for UpdateBot for application/json ContentType.

type UpdateBotRequest

type UpdateBotRequest struct {
	// AvatarUrl URL of bot avatar
	AvatarUrl *string `binding:"omitempty,url" json:"avatar_url"`

	// Name Bot name
	Name string `binding:"omitempty,min=0,max=255" json:"name"`

	// Roles Bot role types array
	Roles Roles `binding:"omitempty,enum-valid" json:"roles,omitempty"`
}

UpdateBotRequest defines model for UpdateBotRequest.

type UpdateBotResp

type UpdateBotResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *EmptyResponse
	JSONDefault  *ErrorResponse
}

func ParseUpdateBotResp

func ParseUpdateBotResp(rsp *http.Response) (*UpdateBotResp, error)

ParseUpdateBotResp parses an HTTP response from a UpdateBotWithResponse call

func (UpdateBotResp) Status

func (r UpdateBotResp) Status() string

Status returns HTTPResponse.Status

func (UpdateBotResp) StatusCode

func (r UpdateBotResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateCommandRequestBody

type UpdateCommandRequestBody struct {
	// Description Human-readable description of the command's purpose or behavior
	Description string `binding:"omitempty,min=0,max=64" json:"description"`

	// Name Unique identifier for the command
	Name string `json:"name,omitempty"`
}

UpdateCommandRequestBody Represents a request body for updating a new command

type UpdateFileMetadataJSONBody

type UpdateFileMetadataJSONBody struct {
	// Transcription Updated transcription text associated with the file
	Transcription string `json:"transcription"`

	// TranscriptionStatus Current status of the file transcription process
	TranscriptionStatus *FileTranscriptionStatus `binding:"oneof=in_progress ready error" json:"transcription_status,omitempty"`
}

UpdateFileMetadataJSONBody defines parameters for UpdateFileMetadata.

type UpdateFileMetadataJSONRequestBody

type UpdateFileMetadataJSONRequestBody UpdateFileMetadataJSONBody

UpdateFileMetadataJSONRequestBody defines body for UpdateFileMetadata for application/json ContentType.

type UpdateFileMetadataRequest

type UpdateFileMetadataRequest struct {
	// Transcription Updated transcription text associated with the file
	Transcription string `json:"transcription"`

	// TranscriptionStatus Current status of the file transcription process
	TranscriptionStatus *FileTranscriptionStatus `binding:"oneof=in_progress ready error" json:"transcription_status,omitempty"`
}

UpdateFileMetadataRequest defines model for UpdateFileMetadataRequest.

type UpdateFileMetadataResp

type UpdateFileMetadataResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UploadResponse
	JSONDefault  *ErrorResponse
}

func ParseUpdateFileMetadataResp

func ParseUpdateFileMetadataResp(rsp *http.Response) (*UpdateFileMetadataResp, error)

ParseUpdateFileMetadataResp parses an HTTP response from a UpdateFileMetadataWithResponse call

func (UpdateFileMetadataResp) Status

func (r UpdateFileMetadataResp) Status() string

Status returns HTTPResponse.Status

func (UpdateFileMetadataResp) StatusCode

func (r UpdateFileMetadataResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UploadFileByUrlJSONBody

type UploadFileByUrlJSONBody struct {
	// Url The URL of the file to download and upload
	Url string `binding:"web_url" json:"url"`
}

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 The URL of the file to download and upload
	Url string `binding:"web_url" json:"url"`
}

UploadFileByUrlRequest defines model for UploadFileByUrlRequest.

type UploadFileByUrlResp

type UploadFileByUrlResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UploadResponse
	JSONDefault  *ErrorResponse
}

func ParseUploadFileByUrlResp

func ParseUploadFileByUrlResp(rsp *http.Response) (*UploadFileByUrlResp, error)

ParseUploadFileByUrlResp parses an HTTP response from a UploadFileByUrlWithResponse call

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 struct {
	// File Binary file data to upload (e.g. image, document, video)
	File openapi_types.File `json:"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      *UploadResponse
	JSONDefault  *ErrorResponse
}

func ParseUploadFileResp

func ParseUploadFileResp(rsp *http.Response) (*UploadFileResp, error)

ParseUploadFileResp parses an HTTP response from a UploadFileWithResponse call

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 UploadResponse

type UploadResponse = File

UploadResponse Metadata and processing status of an uploaded file

type UserListResponse

type UserListResponse = []UserListResponseItem

UserListResponse defines model for UserListResponse.

type UserListResponseItem

type UserListResponseItem struct {
	// Available Indicates if the user is available for communication
	Available bool `json:"available"`

	// Avatar URL of the user's avatar
	Avatar *string `json:"avatar_url,omitempty"`

	// Connected Indicates if the user has ever connected to the system
	Connected bool `json:"connected"`

	// CreatedAt Date and time in RFC 3339 format with microseconds
	CreatedAt DateTimeRFC3339Micro `json:"created_at"`

	// ExternalID External identifier of the user (e.g. from external system)
	ExternalID *string `json:"external_id,omitempty"`

	// FirstName First name of the user
	FirstName *string `json:"first_name,omitempty"`

	// ID Internal user ID
	ID int64 `json:"id"`

	// IsActive Flag indicating if the user is marked as active
	IsActive bool `json:"is_active"`

	// IsOnline Flag indicating if the user is currently online
	IsOnline bool `json:"is_online"`

	// IsTechnicalAccount Indicates if the user is a technical (system) account
	IsTechnicalAccount bool `json:"is_technical_account"`

	// LastName Last name of the user
	LastName *string `json:"last_name,omitempty"`

	// RevokedAt Date and time in RFC 3339 format with microseconds
	RevokedAt *DateTimeRFC3339Micro `json:"revoked_at"`

	// UpdatedAt Date and time in RFC 3339 format with microseconds
	UpdatedAt *DateTimeRFC3339Micro `json:"updated_at"`

	// Username Username or login name of the user
	Username *string `json:"username,omitempty"`
}

UserListResponseItem User object containing profile data, activity status and timestamps

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 WebSocketConnectionParams

type WebSocketConnectionParams struct {
	// Events Comma-separated list of events to subscribe to via WebSocket (message_new, message_updated, message_restored, message_deleted, dialog_opened, dialog_closed, dialog_assign, chat_created, chat_updated, chats_deleted, user_joined_chat, user_left_chat, user_updated, user_online_updated, channel_updated, customer_updated, bot_updated)
	Events string `binding:"required" form:"events,omitempty" json:"events,omitempty"`

	// Options Additional WebSocket connection parameters (include_mass_communication — allow receiving events for messages sent via mass mailing actions)
	Options string `binding:"omitempty" form:"options,omitempty" json:"options,omitempty"`
}

WebSocketConnectionParams defines parameters for WebSocketConnection.

type WebSocketConnectionResp

type WebSocketConnectionResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON101      *EmptyResponse
	JSONDefault  *ErrorResponse
}

func ParseWebSocketConnectionResp

func ParseWebSocketConnectionResp(rsp *http.Response) (*WebSocketConnectionResp, error)

ParseWebSocketConnectionResp parses an HTTP response from a WebSocketConnectionWithResponse call

func (WebSocketConnectionResp) Status

func (r WebSocketConnectionResp) Status() string

Status returns HTTPResponse.Status

func (WebSocketConnectionResp) StatusCode

func (r WebSocketConnectionResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Directories

Path Synopsis
Package "ws" provides primitives to interact with the AsyncAPI specification.
Package "ws" provides primitives to interact with the AsyncAPI specification.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL