ws

package
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: 8 Imported by: 0

Documentation

Overview

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

Code generated by github.com/lerenn/asyncapi-codegen version v0.45.3 DO NOT EDIT.

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

Code generated by github.com/lerenn/asyncapi-codegen version v0.45.3 DO NOT EDIT.

Index

Constants

View Source
const AsyncAPIVersion = "1.0.0"

AsyncAPIVersion is the version of the used AsyncAPI document

View Source
const (
	// EventsChannelPath is the constant representing the 'EventsChannel' channel path.
	EventsChannelPath = "events={events}&options={options}"
)

Variables

View Source
var ChannelsPaths = []string{
	EventsChannelPath,
}

ChannelsPaths is an array of all channels paths

Functions

This section is empty.

Types

type AppController

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

AppController is the structure that provides sending capabilities to the developer and and connect the broker with the App

func NewAppController

func NewAppController(bc extensions.BrokerController, options ...ControllerOption) (*AppController, error)

NewAppController links the App to the broker

func NewController

func NewController(url, token string, options ...Option) (*AppController, error)

func (*AppController) Close

func (c *AppController) Close(ctx context.Context)

Close will clean up any existing resources on the controller

func (*AppController) SubscribeToAllChannels

func (c *AppController) SubscribeToAllChannels(ctx context.Context, as AppSubscriber) error

SubscribeToAllChannels will receive messages from channels where channel has no parameter on which the app is expecting messages. For channels with parameters, they should be subscribed independently.

func (*AppController) SubscribeToReceiveEventsOperation

func (c *AppController) SubscribeToReceiveEventsOperation(
	ctx context.Context,
	params EventsChannelParameters,
	fn func(ctx context.Context, msg EventMessageFromEventsChannel) error,
) error

SubscribeToReceiveEventsOperation will receive EventMessageFromEventsChannel messages from Events channel.

Callback function 'fn' will be called each time a new message is received.

NOTE: for now, this only support the first message from AsyncAPI list.

NOTE: for now, this only support the first message from AsyncAPI list. If you need support for other messages, please raise an issue.

func (*AppController) UnsubscribeFromAllChannels

func (c *AppController) UnsubscribeFromAllChannels(ctx context.Context)

UnsubscribeFromAllChannels will stop the subscription of all remaining subscribed channels

func (*AppController) UnsubscribeFromReceiveEventsOperation

func (c *AppController) UnsubscribeFromReceiveEventsOperation(
	ctx context.Context,
	params EventsChannelParameters,
)

UnsubscribeFromReceiveEventsOperation will stop the reception of EventMessageFromEventsChannel messages from Events channel. A timeout can be set in context to avoid blocking operation, if needed.

type AppSubscriber

type AppSubscriber interface {
	// ReceiveEventsOperationReceived receive all EventMessageFromEventsChannel messages from Events channel.
	ReceiveEventsOperationReceived(ctx context.Context, msg EventMessageFromEventsChannel) error
}

AppSubscriber contains all handlers that are listening messages for App

type AudioMessageSettingSchema

type AudioMessageSettingSchema struct {
	// Description: Support for operations with messages of this type
	Creating *ChannelFeatureSchema `json:"creating,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Deleting *ChannelFeatureSchema `json:"deleting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Maximum audio size for sending
	MaxItemSize *int64 `json:"max_item_size,omitempty"`

	// Description: Maximum number of audio attachments in a message
	MaxItemsCount *int `json:"max_items_count,omitempty"`

	// Description: Support for operations with messages of this type
	Quoting *ChannelFeatureSchema `json:"quoting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Reaction *ChannelFeatureSchema `json:"reaction,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

AudioMessageSettingSchema is a schema from the AsyncAPI specification required in messages Description: Audio message support

type BotUpdatedDataSchema

type BotUpdatedDataSchema UserRefSchema

BotUpdatedDataSchema is a schema from the AsyncAPI specification required in messages Description: Bot information update data

type ChannelFeatureSchema

type ChannelFeatureSchema string

ChannelFeatureSchema is a schema from the AsyncAPI specification required in messages Description: Support for operations with messages of this type

type ChannelSchema

type ChannelSchema struct {
	// Description: Channel avatar
	Avatar *string `json:"avatar,omitempty"`

	// Description: Channel ID
	Id int64 `json:"id"`

	// Description: Channel activity flag
	IsActive bool `json:"is_active"`

	// Description: Channel name
	Name *string `json:"name,omitempty"`

	// Description: Channel settings
	Settings *ChannelSettingsSchema `json:"settings,omitempty"`

	// Description: Channel transport ID
	TransportId int64 `json:"transport_id"`

	// Description: Channel type
	Type ChannelTypeSchema `` /* 229-byte string literal not displayed */
}

ChannelSchema is a schema from the AsyncAPI specification required in messages

type ChannelSettingsSchema

type ChannelSettingsSchema struct {
	// Description: Audio message support
	Audio *AudioMessageSettingSchema `json:"audio,omitempty"`

	// Description: Support for customer external IDs
	CustomerExternalId *CustomerExternalIdSchema `json:"customer_external_id,omitempty" validate:"omitempty,oneof='any' 'phone'"`

	// Description: File message support
	File *FileMessageSettingSchema `json:"file,omitempty"`

	// Description: Media message support
	Image *ImageMessageSettingSchema `json:"image,omitempty"`

	// Description: Order message support
	Order *OrderMessageSettingSchema `json:"order,omitempty"`

	// Description: Product message support
	Product *ProductMessageSettingSchema `json:"product,omitempty"`

	// Description: Support for working with message reactions
	Reactions *ReactionsSchema `json:"reactions,omitempty"`

	// Description: Message sending policy
	SendingPolicy *SendingPolicySchema `json:"sending_policy,omitempty"`

	// Description: Message status information transmission
	Status *StatusSettingSchema `json:"status,omitempty"`

	// Description: Quick reply types support
	Suggestions *SuggestionsSchema `json:"suggestions,omitempty"`

	// Description: Message templates support
	Template *TemplateSettingSchema `json:"template,omitempty"`

	// Description: Text message support
	Text *TextMessageSettingSchema `json:"text,omitempty"`

	// Description: WhatsApp channel properties
	Whatsapp *WAChannelPropertiesSchema `json:"whatsapp,omitempty"`
}

ChannelSettingsSchema is a schema from the AsyncAPI specification required in messages Description: Channel settings

type ChannelTypeSchema

type ChannelTypeSchema string

ChannelTypeSchema is a schema from the AsyncAPI specification required in messages Description: Channel type

type ChannelUpdatedDataSchema

type ChannelUpdatedDataSchema struct {
	Channel *ChannelSchema `json:"channel,omitempty"`
}

ChannelUpdatedDataSchema is a schema from the AsyncAPI specification required in messages Description: Channel update data

type ChatDataSchema

type ChatDataSchema struct {
	Chat ChatSchema `json:"chat"`
}

ChatDataSchema is a schema from the AsyncAPI specification required in messages Description: Chat data

type ChatIDSchema

type ChatIDSchema struct {
	// Description: Chat ID
	Id int64 `json:"id"`
}

ChatIDSchema is a schema from the AsyncAPI specification required in messages Description: Object with chat ID

type ChatSchema

type ChatSchema struct {
	// Description: Author ID
	AuthorId *int64 `json:"author_id,omitempty"`

	// Description: Avatar URL
	Avatar  *string        `json:"avatar,omitempty"`
	Channel *ChannelSchema `json:"channel,omitempty"`

	// Description: Creation date and time
	CreatedAt time.Time      `json:"created_at"`
	Customer  *UserRefSchema `json:"customer,omitempty"`

	// Description: Chat ID
	Id int64 `json:"id"`

	// Description: Date and time of last activity
	LastActivity time.Time `json:"last_activity"`

	// Description: Last dialog in the chat
	LastDialog *DialogSchema `json:"last_dialog,omitempty"`

	// Description: Last message in the chat
	LastMessage *MessageSchema `json:"last_message,omitempty"`

	// Description: Last user message in the chat
	LastUserMessage *MessageIDSchema `json:"last_user_message,omitempty"`

	// Description: Chat participants
	Members []MemberSchema `json:"members,omitempty"`

	// Description: Chat name
	Name *string `json:"name,omitempty"`

	// Description: Number of unread messages
	NotReadMessagesCount *int64 `json:"not_read_messages_count,omitempty"`

	// Description: Reply deadline time
	ReplyDeadline *time.Time `json:"reply_deadline,omitempty"`

	// Description: Unread chat flag
	Unread *bool `json:"unread,omitempty"`

	// Description: Waiting level
	WaitingLevel *WaitingLevelSchema `json:"waiting_level,omitempty" validate:"omitempty,oneof='warning' 'danger' 'none'"`

	// Description: Time of transition to the next waiting level
	WaitingLevelTransitionTime *time.Time `json:"waiting_level_transition_time,omitempty"`
}

ChatSchema is a schema from the AsyncAPI specification required in messages

type ChatsDeletedDataSchema

type ChatsDeletedDataSchema struct {
	ChatIds []int64 `json:"chat_ids" validate:"required"`
}

ChatsDeletedDataSchema is a schema from the AsyncAPI specification required in messages Description: Deleted chats data

type Controller

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

func (Controller) Publish

func (c Controller) Publish(ctx context.Context, channel string, mw extensions.BrokerMessage) error

func (Controller) Subscribe

type ControllerOption

type ControllerOption func(controller *controller)

ControllerOption is the type of the options that can be passed when creating a new Controller

func WithErrorHandler

func WithErrorHandler(handler extensions.ErrorHandler) ControllerOption

WithErrorHandler attaches a errorhandler to handle errors from subscriber functions

func WithLogger

func WithLogger(logger extensions.Logger) ControllerOption

WithLogger attaches a logger to the controller

func WithMiddlewares

func WithMiddlewares(middlewares ...extensions.Middleware) ControllerOption

WithMiddlewares attaches middlewares that will be executed when sending or receiving messages

type CostSchema

type CostSchema struct {
	// Description: Currency code
	Currency *string `json:"currency,omitempty" validate:"omitempty,min=3,max=3"`

	// Description: Numerical cost value
	Value *float64 `json:"value,omitempty"`
}

CostSchema is a schema from the AsyncAPI specification required in messages Description: Cost information

type CustomerExternalIdSchema

type CustomerExternalIdSchema string

CustomerExternalIdSchema is a schema from the AsyncAPI specification required in messages Description: Support for customer external IDs

type CustomerUpdatedDataSchema

type CustomerUpdatedDataSchema UserRefSchema

CustomerUpdatedDataSchema is a schema from the AsyncAPI specification required in messages Description: Customer information update data

type DataPropertyFromEventSchema

type DataPropertyFromEventSchema struct{}

DataPropertyFromEventSchema is a schema from the AsyncAPI specification required in messages Description: Data depending on the event type

type DialogAssignDataSchema

type DialogAssignDataSchema struct {
	Chat   ChatSchema        `json:"chat"`
	Dialog DialogEventSchema `json:"dialog"`
}

DialogAssignDataSchema is a schema from the AsyncAPI specification required in messages Description: Dialog assignment data

type DialogDataSchema

type DialogDataSchema struct {
	Dialog DialogEventSchema `json:"dialog"`
}

DialogDataSchema is a schema from the AsyncAPI specification required in messages Description: Dialog data

type DialogEventSchema

type DialogEventSchema struct {
	// Description: Dialog assignment date and time
	AssignedAt *time.Time `json:"assigned_at,omitempty"`

	// Description: ID of the starting message of the dialog
	BeginMessageId *int64      `json:"begin_message_id,omitempty"`
	Chat           *ChatSchema `json:"chat,omitempty"`

	// Description: Dialog closing date and time
	ClosedAt *time.Time `json:"closed_at,omitempty"`

	// Description: Dialog creation date and time
	CreatedAt time.Time `json:"created_at"`

	// Description: ID of the ending message of the dialog
	EndingMessageId *int64 `json:"ending_message_id,omitempty"`

	// Description: Dialog ID
	Id int64 `json:"id"`

	// Description: Information about the responsible person
	Responsible *ResponsibleSchema `json:"responsible,omitempty"`

	// Description: UTM tags
	Utm *UtmSchema `json:"utm,omitempty"`
}

DialogEventSchema is a schema from the AsyncAPI specification required in messages

type DialogSchema

type DialogSchema struct {
	// Description: Dialog assignment date and time
	AssignedAt *time.Time `json:"assigned_at,omitempty"`

	// Description: Dialog closing date and time
	ClosedAt *time.Time `json:"closed_at,omitempty"`

	// Description: Dialog creation date and time
	CreatedAt time.Time `json:"created_at"`

	// Description: Dialog ID
	Id          int64          `json:"id"`
	Responsible *UserRefSchema `json:"responsible,omitempty"`

	// Description: UTM tags
	Utm *UtmSchema `json:"utm,omitempty"`
}

DialogSchema is a schema from the AsyncAPI specification required in messages

type Error

type Error struct {
	Channel string
	Err     error
}

func (*Error) Error

func (e *Error) Error() string

type EventBotUpdatedSchema

type EventBotUpdatedSchema struct {
	// Description: Bot information update data
	Data BotUpdatedDataSchema `json:"data"`
	Type string               `json:"type" validate:"oneof='bot_updated'"`
}

EventBotUpdatedSchema is a schema from the AsyncAPI specification required in messages Description: Bot data update event

type EventChannelUpdatedSchema

type EventChannelUpdatedSchema struct {
	// Description: Channel update data
	Data ChannelUpdatedDataSchema `json:"data"`
	Type string                   `json:"type" validate:"oneof='channel_updated'"`
}

EventChannelUpdatedSchema is a schema from the AsyncAPI specification required in messages Description: Channel data update event

type EventChatCreatedSchema

type EventChatCreatedSchema struct {
	// Description: Chat data
	Data ChatDataSchema `json:"data"`
	Type string         `json:"type" validate:"oneof='chat_created'"`
}

EventChatCreatedSchema is a schema from the AsyncAPI specification required in messages Description: Chat creation event

type EventChatDeletedSchema

type EventChatDeletedSchema struct {
	// Description: Deleted chats data
	Data ChatsDeletedDataSchema `json:"data"`
	Type string                 `json:"type" validate:"oneof='chats_deleted'"`
}

EventChatDeletedSchema is a schema from the AsyncAPI specification required in messages Description: Chat deletion event

type EventChatUpdatedSchema

type EventChatUpdatedSchema struct {
	// Description: Chat data
	Data ChatDataSchema `json:"data"`
	Type string         `json:"type" validate:"oneof='chat_updated'"`
}

EventChatUpdatedSchema is a schema from the AsyncAPI specification required in messages Description: Chat update event

type EventCustomerUpdatedSchema

type EventCustomerUpdatedSchema struct {
	// Description: Customer information update data
	Data CustomerUpdatedDataSchema `json:"data"`
	Type string                    `json:"type" validate:"oneof='customer_updated'"`
}

EventCustomerUpdatedSchema is a schema from the AsyncAPI specification required in messages Description: Customer data update event

type EventDialogAssignSchema

type EventDialogAssignSchema struct {
	// Description: Dialog assignment data
	Data DialogAssignDataSchema `json:"data"`
	Type string                 `json:"type" validate:"oneof='dialog_assign'"`
}

EventDialogAssignSchema is a schema from the AsyncAPI specification required in messages Description: Dialog assignment event

type EventDialogClosedSchema

type EventDialogClosedSchema struct {
	// Description: Dialog data
	Data DialogDataSchema `json:"data"`
	Type string           `json:"type" validate:"oneof='dialog_closed'"`
}

EventDialogClosedSchema is a schema from the AsyncAPI specification required in messages Description: Dialog closing event

type EventDialogOpenedSchema

type EventDialogOpenedSchema struct {
	// Description: Dialog data
	Data DialogDataSchema `json:"data"`
	Type string           `json:"type" validate:"oneof='dialog_opened'"`
}

EventDialogOpenedSchema is a schema from the AsyncAPI specification required in messages Description: Dialog opening event

type EventMessageDeletedSchema

type EventMessageDeletedSchema struct {
	// Description: Message data
	Data MessageDataSchema `json:"data"`
	Type string            `json:"type" validate:"oneof='message_deleted'"`
}

EventMessageDeletedSchema is a schema from the AsyncAPI specification required in messages Description: Message deletion event

type EventMessageFromEventsChannel

type EventMessageFromEventsChannel struct {
	// Payload will be inserted in the message payload
	Payload EventSchema
}

EventMessageFromEventsChannel is the message expected for 'EventMessageFromEventsChannel' channel. NOTE: Unified message type representing all system events. The specific type is determined by the `type` field.

func NewEventMessageFromEventsChannel

func NewEventMessageFromEventsChannel() EventMessageFromEventsChannel

type EventMessageNewSchema

type EventMessageNewSchema struct {
	// Description: Message data
	Data MessageDataSchema `json:"data"`
	Type string            `json:"type" validate:"oneof='message_new'"`
}

EventMessageNewSchema is a schema from the AsyncAPI specification required in messages Description: New message event

type EventMessageRestoredSchema

type EventMessageRestoredSchema struct {
	// Description: Message data
	Data MessageDataSchema `json:"data"`
	Type string            `json:"type" validate:"oneof='message_restored'"`
}

EventMessageRestoredSchema is a schema from the AsyncAPI specification required in messages Description: Message restoration event

type EventMessageUpdatedSchema

type EventMessageUpdatedSchema struct {
	// Description: Message data
	Data MessageDataSchema `json:"data"`
	Type string            `json:"type" validate:"oneof='message_updated'"`
}

EventMessageUpdatedSchema is a schema from the AsyncAPI specification required in messages Description: Message update event

type EventSchema

type EventSchema struct {
	// Description: Data depending on the event type
	Data interface{} `json:"data"`

	// Description: Event metadata
	Meta MetaSchema `json:"meta"`

	// Description: Event type defining the structure of the data field
	Type EventTypeSchema `` /* 315-byte string literal not displayed */
}

EventSchema is a schema from the AsyncAPI specification required in messages Description: Event

func (*EventSchema) UnmarshalJSON

func (e *EventSchema) UnmarshalJSON(data []byte) error

type EventTypeSchema

type EventTypeSchema string

EventTypeSchema is a schema from the AsyncAPI specification required in messages Description: Event type defining the structure of the data field

type EventUserJoinedChatSchema

type EventUserJoinedChatSchema struct {
	// Description: User joined chat data
	Data UserJoinedChatDataSchema `json:"data"`
	Type string                   `json:"type" validate:"oneof='user_joined_chat'"`
}

EventUserJoinedChatSchema is a schema from the AsyncAPI specification required in messages Description: User joined chat event

type EventUserLeftChatSchema

type EventUserLeftChatSchema struct {
	// Description: User left chat data
	Data UserLeftChatDataSchema `json:"data"`
	Type string                 `json:"type" validate:"oneof='user_left_chat'"`
}

EventUserLeftChatSchema is a schema from the AsyncAPI specification required in messages Description: User left chat event

type EventUserOnlineUpdatedSchema

type EventUserOnlineUpdatedSchema struct {
	// Description: User status update data
	Data UserOnlineUpdatedDataSchema `json:"data"`
	Type string                      `json:"type" validate:"oneof='user_online_updated'"`
}

EventUserOnlineUpdatedSchema is a schema from the AsyncAPI specification required in messages Description: User status update event (online/offline)

type EventUserUpdatedSchema

type EventUserUpdatedSchema struct {
	// Description: User information update data
	Data UserUpdatedDataSchema `json:"data"`
	Type string                `json:"type" validate:"oneof='user_updated'"`
}

EventUserUpdatedSchema is a schema from the AsyncAPI specification required in messages Description: User data update event

type EventsChannelParameters

type EventsChannelParameters struct {
	// Events is a channel parameter: Comma-separated list of events to subscribe to
	Events string
	// Options is a channel parameter: Comma-separated list of additional options
	Options string
}

EventsChannelParameters represents EventsChannel channel parameters

type FileMessageSettingSchema

type FileMessageSettingSchema struct {
	// Description: Support for operations with messages of this type
	Creating *ChannelFeatureSchema `json:"creating,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Deleting *ChannelFeatureSchema `json:"deleting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Editing *ChannelFeatureSchema `json:"editing,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Maximum file size for sending
	MaxItemSize *int64 `json:"max_item_size,omitempty"`

	// Description: Maximum number of file attachments in a message
	MaxItemsCount *int `json:"max_items_count,omitempty"`

	// Description: Maximum number of characters in a file message annotation
	NoteMaxCharsCount *uint16 `json:"note_max_chars_count,omitempty"`

	// Description: Support for operations with messages of this type
	Quoting *ChannelFeatureSchema `json:"quoting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Reaction *ChannelFeatureSchema `json:"reaction,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

FileMessageSettingSchema is a schema from the AsyncAPI specification required in messages Description: File message support

type ImageMessageSettingSchema

type ImageMessageSettingSchema struct {
	// Description: Support for operations with messages of this type
	Creating *ChannelFeatureSchema `json:"creating,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Deleting *ChannelFeatureSchema `json:"deleting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Editing *ChannelFeatureSchema `json:"editing,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Maximum image size for sending
	MaxItemSize *int64 `json:"max_item_size,omitempty"`

	// Description: Maximum number of media attachments in a message
	MaxItemsCount *int `json:"max_items_count,omitempty"`

	// Description: Maximum number of characters in a media message annotation
	NoteMaxCharsCount *uint16 `json:"note_max_chars_count,omitempty"`

	// Description: Support for operations with messages of this type
	Quoting *ChannelFeatureSchema `json:"quoting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Reaction *ChannelFeatureSchema `json:"reaction,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

ImageMessageSettingSchema is a schema from the AsyncAPI specification required in messages Description: Media message support

type MemberSchema

type MemberSchema struct {
	// Description: Chat authorship flag
	IsAuthor bool `json:"is_author"`

	// Description: Chat participant state
	State MemberStateSchema `json:"state" validate:"oneof='active' 'kicked' 'leaved' 'undefined'"`
	User  *UserRefSchema    `json:"user,omitempty"`
}

MemberSchema is a schema from the AsyncAPI specification required in messages Description: Chat participant

type MemberStateSchema

type MemberStateSchema string

MemberStateSchema is a schema from the AsyncAPI specification required in messages Description: Chat participant state

type MessageActionSchema

type MessageActionSchema string

MessageActionSchema is a schema from the AsyncAPI specification required in messages Description: Message system action (only for system type messages)

type MessageAdditionalSchema

type MessageAdditionalSchema struct {
	Chat *ChatSchema `json:"chat,omitempty"`

	// Description: Message creation date
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Description: Message edit date
	EditedAt *time.Time `json:"edited_at,omitempty"`
}

MessageAdditionalSchema is a schema from the AsyncAPI specification required in messages

type MessageDataSchema

type MessageDataSchema struct {
	Message MessagePropertyFromMessageDataSchema `json:"message"`
}

MessageDataSchema is a schema from the AsyncAPI specification required in messages Description: Message data

type MessageDialogSchema

type MessageDialogSchema struct {
	// Description: Dialog ID
	Id *int64 `json:"id,omitempty"`
}

MessageDialogSchema is a schema from the AsyncAPI specification required in messages Description: Dialog data in message

type MessageErrorCodeSchema

type MessageErrorCodeSchema string

MessageErrorCodeSchema is a schema from the AsyncAPI specification required in messages Description: Error code

type MessageErrorSchema

type MessageErrorSchema struct {
	// Description: Error code
	Code *MessageErrorCodeSchema `` /* 203-byte string literal not displayed */

	// Description: Text description of the error
	Message *string `json:"message,omitempty"`
}

MessageErrorSchema is a schema from the AsyncAPI specification required in messages Description: Message error information

type MessageFileKindSchema

type MessageFileKindSchema string

MessageFileKindSchema is a schema from the AsyncAPI specification required in messages Description: File type

type MessageFileSchema

type MessageFileSchema struct {
	// Description: Text description of media attachment
	Caption *string `json:"caption,omitempty"`

	// Description: Audio recording duration (only for audio type messages)
	Duration *int `json:"duration,omitempty"`

	// Description: Image height in pixels (only for image type messages)
	Height *int `json:"height,omitempty"`

	// Description: Sound diagram (only for audio type messages)
	Histogram []int `json:"histogram,omitempty"`

	// Description: Attached file UUID
	Id UUID `json:"id"`

	// Description: File type
	Kind MessageFileKindSchema `json:"kind" validate:"oneof='none' 'image' 'video' 'file' 'audio'"`

	// Description: File URL for download
	PreviewUrl *string `json:"preview_url,omitempty"`

	// Description: Attachment size (in bytes)
	Size *int `json:"size,omitempty"`

	// Description: Uploaded file transcription
	Transcription *string `json:"transcription,omitempty"`

	// Description: Attachment type
	Type *string `json:"type,omitempty"`

	// Description: Image width in pixels (only for image type messages)
	Width *int `json:"width,omitempty"`
}

MessageFileSchema is a schema from the AsyncAPI specification required in messages Description: Message file information

type MessageIDSchema

type MessageIDSchema struct {
	// Description: Message ID
	Id int64 `json:"id"`
}

MessageIDSchema is a schema from the AsyncAPI specification required in messages Description: Object with message ID

type MessageOrderDeliverySchema

type MessageOrderDeliverySchema struct {
	// Description: Delivery address
	Address *string `json:"address,omitempty"`

	// Description: Delivery comment
	Comment *string `json:"comment,omitempty"`

	// Description: Delivery method name
	Name *string `json:"name,omitempty"`

	// Description: Cost information
	Price *CostSchema `json:"price,omitempty"`
}

MessageOrderDeliverySchema is a schema from the AsyncAPI specification required in messages Description: Order delivery data

type MessageOrderItemSchema

type MessageOrderItemSchema struct {
	// Description: External ID of the order product
	ExternalId *int64 `json:"external_id,omitempty"`

	// Description: Product image
	Img *string `json:"img,omitempty" validate:"omitempty,max=2048"`

	// Description: Product name
	Name *string `json:"name,omitempty" validate:"omitempty,max=255"`

	// Description: Cost information
	Price *CostSchema `json:"price,omitempty"`

	// Description: Quantity information
	Quantity *QuantitySchema `json:"quantity,omitempty"`

	// Description: Product URL
	Url *string `json:"url,omitempty" validate:"omitempty,max=2048"`
}

MessageOrderItemSchema is a schema from the AsyncAPI specification required in messages Description: Order product information

type MessageOrderPaymentSchema

type MessageOrderPaymentSchema struct {
	// Description: Cost information
	Amount *CostSchema `json:"amount,omitempty"`

	// Description: Payment method name
	Name *string `json:"name,omitempty"`

	// Description: Order payment status
	Status *MessageOrderPaymentStatusSchema `json:"status,omitempty"`
}

MessageOrderPaymentSchema is a schema from the AsyncAPI specification required in messages Description: Order payment data

type MessageOrderPaymentStatusSchema

type MessageOrderPaymentStatusSchema struct {
	// Description: Payment name
	Name *string `json:"name,omitempty"`

	// Description: Payment completion flag
	Payed *bool `json:"payed,omitempty"`
}

MessageOrderPaymentStatusSchema is a schema from the AsyncAPI specification required in messages Description: Order payment status

type MessageOrderSchema

type MessageOrderSchema struct {
	// Description: Cost information
	Cost *CostSchema `json:"cost,omitempty"`

	// Description: Order creation date
	Date *time.Time `json:"date,omitempty"`

	// Description: Order delivery data
	Delivery *MessageOrderDeliverySchema `json:"delivery,omitempty"`

	// Description: Cost information
	Discount *CostSchema `json:"discount,omitempty"`

	// Description: External order ID
	ExternalId *int64 `json:"external_id,omitempty"`

	// Description: Array of order products
	Items []MessageOrderItemSchema `json:"items,omitempty"`

	// Description: Order number
	Number *string `json:"number,omitempty" validate:"omitempty,max=255"`

	// Description: Array of payments
	Payments []MessageOrderPaymentSchema `json:"payments,omitempty"`

	// Description: Order status
	Status *MessageOrderStatusSchema `json:"status,omitempty"`

	// Description: Order URL
	Url *string `json:"url,omitempty" validate:"omitempty,max=2048"`
}

MessageOrderSchema is a schema from the AsyncAPI specification required in messages Description: Order information in message

type MessageOrderStatusCodeSchema

type MessageOrderStatusCodeSchema string

MessageOrderStatusCodeSchema is a schema from the AsyncAPI specification required in messages Description: Status code

type MessageOrderStatusSchema

type MessageOrderStatusSchema struct {
	// Description: Status code
	Code *MessageOrderStatusCodeSchema `json:"code,omitempty" validate:"omitempty,oneof='new' 'approval' 'assembling' 'delivery' 'complete' 'cancel'"`

	// Description: Status name
	Name *string `json:"name,omitempty" validate:"omitempty,max=255"`
}

MessageOrderStatusSchema is a schema from the AsyncAPI specification required in messages Description: Order status

type MessageProductSchema

type MessageProductSchema struct {
	// Description: Product description
	Article *string `json:"article,omitempty" validate:"omitempty,max=128"`

	// Description: Cost information
	Cost *CostSchema `json:"cost,omitempty"`

	// Description: Product ID
	Id uint64 `json:"id"`

	// Description: Product image URL
	Img *string `json:"img,omitempty" validate:"omitempty,max=2048"`

	// Description: Product name
	Name string `json:"name" validate:"min=1,max=255"`

	// Description: Registration revocation date/time
	RevokedAt *string `json:"revoked_at,omitempty"`

	// Description: Product units of measurement
	Unit *string `json:"unit,omitempty" validate:"omitempty,max=16"`

	// Description: Product URL
	Url *string `json:"url,omitempty" validate:"omitempty,max=2048"`
}

MessageProductSchema is a schema from the AsyncAPI specification required in messages

type MessagePropertyFromMessageDataSchema

type MessagePropertyFromMessageDataSchema struct {
	// Description: System action of the message
	Action *MessageActionSchema `` /* 182-byte string literal not displayed */

	// Description: Actions available for this message
	Actions []string    `json:"actions,omitempty"`
	Chat    *ChatSchema `json:"chat,omitempty"`

	// Description: Chat ID
	ChatId int64 `json:"chat_id"`

	// Description: Message text
	Content *string `json:"content,omitempty"`

	// Description: Message creation date
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Description: Dialog data in message
	Dialog *MessageDialogSchema `json:"dialog,omitempty"`

	// Description: Message edit date
	EditedAt *time.Time `json:"edited_at,omitempty"`

	// Description: Message error information
	Error *MessageErrorSchema `json:"error,omitempty"`
	From  *UserRefSchema      `json:"from,omitempty"`

	// Description: Message ID
	Id int64 `json:"id"`

	// Description: Message edited flag
	IsEdit bool `json:"is_edit"`

	// Description: Message read flag
	IsRead bool `json:"is_read"`

	// Description: Message attachments
	Items []MessageFileSchema `json:"items,omitempty"`

	// Description: Annotation to media data (for media messages)
	Note *string `json:"note,omitempty"`

	// Description: Order information in the message
	Order *MessageOrderSchema `json:"order,omitempty"`

	// Description: Product information in the message
	Product *MessageProductSchema `json:"product,omitempty"`

	// Description: Quoted message data
	Quote *MessageQuoteSchema `json:"quote,omitempty"`

	// Description: Information about the person responsible for the message
	Responsible *UserRefSchema `json:"responsible,omitempty"`

	// Description: Message visibility scope
	Scope MessageScopeSchema `json:"scope" validate:"oneof='undefined' 'public' 'private'"`

	// Description: Message status
	Status MessageStatusSchema `json:"status" validate:"oneof='undefined' 'received' 'sending' 'sent' 'failed' 'seen'"`

	// Description: Message creation time
	Time time.Time `json:"time"`

	// Description: Message transport attachments
	TransportAttachments *MessageTransportAttachmentsSchema `json:"transport_attachments,omitempty"`

	// Description: Message type
	Type MessageTypeSchema `json:"type" validate:"oneof='text' 'system' 'command' 'order' 'product' 'file' 'image' 'audio'"`
}

MessagePropertyFromMessageDataSchema is a schema from the AsyncAPI specification required in messages

type MessageQuoteSchema

type MessageQuoteSchema struct {
	// Description: Message text
	Content *string        `json:"content,omitempty"`
	From    *UserRefSchema `json:"from,omitempty"`

	// Description: Quoted message ID
	Id *int64 `json:"id,omitempty"`

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

	// Description: Message sending time
	Time *time.Time `json:"time,omitempty"`

	// Description: Message type
	Type *MessageTypeSchema `json:"type,omitempty" validate:"omitempty,oneof='text' 'system' 'command' 'order' 'product' 'file' 'image' 'audio'"`
}

MessageQuoteSchema is a schema from the AsyncAPI specification required in messages Description: Quoted message data

type MessageSchema

type MessageSchema struct {
	// Description: System action of the message
	Action *MessageActionSchema `` /* 182-byte string literal not displayed */

	// Description: Actions available for this message
	Actions []string `json:"actions,omitempty"`

	// Description: Chat ID
	ChatId int64 `json:"chat_id"`

	// Description: Message text
	Content *string `json:"content,omitempty"`

	// Description: Dialog data in message
	Dialog *MessageDialogSchema `json:"dialog,omitempty"`

	// Description: Message error information
	Error *MessageErrorSchema `json:"error,omitempty"`
	From  *UserRefSchema      `json:"from,omitempty"`

	// Description: Message ID
	Id int64 `json:"id"`

	// Description: Message edited flag
	IsEdit bool `json:"is_edit"`

	// Description: Message read flag
	IsRead bool `json:"is_read"`

	// Description: Message attachments
	Items []MessageFileSchema `json:"items,omitempty"`

	// Description: Annotation to media data (for media messages)
	Note *string `json:"note,omitempty"`

	// Description: Order information in the message
	Order *MessageOrderSchema `json:"order,omitempty"`

	// Description: Product information in the message
	Product *MessageProductSchema `json:"product,omitempty"`

	// Description: Quoted message data
	Quote *MessageQuoteSchema `json:"quote,omitempty"`

	// Description: Information about the person responsible for the message
	Responsible *UserRefSchema `json:"responsible,omitempty"`

	// Description: Message visibility scope
	Scope MessageScopeSchema `json:"scope" validate:"oneof='undefined' 'public' 'private'"`

	// Description: Message status
	Status MessageStatusSchema `json:"status" validate:"oneof='undefined' 'received' 'sending' 'sent' 'failed' 'seen'"`

	// Description: Message creation time
	Time time.Time `json:"time"`

	// Description: Message transport attachments
	TransportAttachments *MessageTransportAttachmentsSchema `json:"transport_attachments,omitempty"`

	// Description: Message type
	Type MessageTypeSchema `json:"type" validate:"oneof='text' 'system' 'command' 'order' 'product' 'file' 'image' 'audio'"`
}

MessageSchema is a schema from the AsyncAPI specification required in messages

type MessageScopeSchema

type MessageScopeSchema string

MessageScopeSchema is a schema from the AsyncAPI specification required in messages Description: Message visibility scope

type MessageStatusSchema

type MessageStatusSchema string

MessageStatusSchema is a schema from the AsyncAPI specification required in messages Description: Message status

type MessageTransportAttachmentsSchema

type MessageTransportAttachmentsSchema struct {
	// Description: Quick replies
	Suggestions []SuggestionSchema `json:"suggestions,omitempty"`
}

MessageTransportAttachmentsSchema is a schema from the AsyncAPI specification required in messages Description: Message transport attachments

type MessageTypeSchema

type MessageTypeSchema string

MessageTypeSchema is a schema from the AsyncAPI specification required in messages Description: Message type

type MessageWithCorrelationID

type MessageWithCorrelationID interface {
	CorrelationID() string
	SetCorrelationID(id string)
}

type MetaSchema

type MetaSchema struct {
	// Description: Unix-timestamp of the event occurrence time
	Timestamp int64 `json:"timestamp"`
}

MetaSchema is a schema from the AsyncAPI specification required in messages Description: Event metadata

type NoopAcknowledgementHandler

type NoopAcknowledgementHandler struct {
}

func (NoopAcknowledgementHandler) AckMessage

func (k NoopAcknowledgementHandler) AckMessage()

func (NoopAcknowledgementHandler) NakMessage

func (k NoopAcknowledgementHandler) NakMessage()

type Option

type Option func(controller *Controller) error

type OrderMessageSettingSchema

type OrderMessageSettingSchema struct {
	// Description: Support for operations with messages of this type
	Creating *ChannelFeatureSchema `json:"creating,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Deleting *ChannelFeatureSchema `json:"deleting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Editing *ChannelFeatureSchema `json:"editing,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Quoting *ChannelFeatureSchema `json:"quoting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Reaction *ChannelFeatureSchema `json:"reaction,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

OrderMessageSettingSchema is a schema from the AsyncAPI specification required in messages Description: Order message support

type ProductMessageSettingSchema

type ProductMessageSettingSchema struct {
	// Description: Support for operations with messages of this type
	Creating *ChannelFeatureSchema `json:"creating,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Deleting *ChannelFeatureSchema `json:"deleting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Editing *ChannelFeatureSchema `json:"editing,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Quoting *ChannelFeatureSchema `json:"quoting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Reaction *ChannelFeatureSchema `json:"reaction,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

ProductMessageSettingSchema is a schema from the AsyncAPI specification required in messages Description: Product message support

type QuantitySchema

type QuantitySchema struct {
	// Description: Units of measurement
	Unit *string `json:"unit,omitempty" validate:"omitempty,max=16"`

	// Description: Quantity value
	Value *float64 `json:"value,omitempty"`
}

QuantitySchema is a schema from the AsyncAPI specification required in messages Description: Quantity information

type ReactionsSchema

type ReactionsSchema struct {
	// Description: Dictionary of available reactions
	Dictionary []string `json:"dictionary" validate:"required"`

	// Description: Maximum number of reactions added from the system
	MaxCount int64 `json:"max_count"`
}

ReactionsSchema is a schema from the AsyncAPI specification required in messages Description: Support for working with message reactions

type ResponsibleSchema

type ResponsibleSchema struct {
	// Description: Assignment date/time
	AssignedAt *time.Time `json:"assigned_at,omitempty"`

	// Description: Responsible ID
	Id int64 `json:"id"`

	// Description: Responsible type
	Type ResponsibleTypeSchema `json:"type" validate:"oneof='user' 'bot'"`
}

ResponsibleSchema is a schema from the AsyncAPI specification required in messages Description: Information about the responsible person

type ResponsibleTypeSchema

type ResponsibleTypeSchema string

ResponsibleTypeSchema is a schema from the AsyncAPI specification required in messages Description: Responsible type

type SendingPolicyAfterReplyTimeoutSchema

type SendingPolicyAfterReplyTimeoutSchema string

SendingPolicyAfterReplyTimeoutSchema is a schema from the AsyncAPI specification required in messages Description: Message types for sending after reply timeout

type SendingPolicyNewCustomerSchema

type SendingPolicyNewCustomerSchema string

SendingPolicyNewCustomerSchema is a schema from the AsyncAPI specification required in messages Description: Message types for sending to a new customer

type SendingPolicyOutgoingSchema

type SendingPolicyOutgoingSchema string

SendingPolicyOutgoingSchema is a schema from the AsyncAPI specification required in messages Description: Outgoing messages support

type SendingPolicySchema

type SendingPolicySchema struct {
	// Description: Message types for sending after reply timeout
	AfterReplyTimeout *SendingPolicyAfterReplyTimeoutSchema `json:"after_reply_timeout,omitempty"`

	// Description: Message types for sending to a new customer
	NewCustomer *SendingPolicyNewCustomerSchema `json:"new_customer,omitempty"`

	// Description: Outgoing messages support
	Outgoing *SendingPolicyOutgoingSchema `json:"outgoing,omitempty" validate:"omitempty,oneof='allowed' 'restricted'"`
}

SendingPolicySchema is a schema from the AsyncAPI specification required in messages Description: Message sending policy

type StatusSettingSchema

type StatusSettingSchema struct {
	// Description: Support for operations with messages of this type
	Delivered *ChannelFeatureSchema `json:"delivered,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Read *ChannelFeatureSchema `json:"read,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

StatusSettingSchema is a schema from the AsyncAPI specification required in messages Description: Message status information transmission

type SuggestionSchema

type SuggestionSchema struct {
	// Description: Quick reply content
	Payload *string `json:"payload,omitempty"`

	// Description: Quick reply name
	Title *string `json:"title,omitempty"`

	// Description: Quick reply type
	Type *SuggestionTypeSchema `json:"type,omitempty" validate:"omitempty,oneof='text' 'email' 'phone' 'url'"`
}

SuggestionSchema is a schema from the AsyncAPI specification required in messages Description: Quick reply

type SuggestionTypeSchema

type SuggestionTypeSchema string

SuggestionTypeSchema is a schema from the AsyncAPI specification required in messages Description: Quick reply type

type SuggestionsSchema

type SuggestionsSchema struct {
	// Description: Support for operations with messages of this type
	Email *ChannelFeatureSchema `json:"email,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Phone *ChannelFeatureSchema `json:"phone,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Text *ChannelFeatureSchema `json:"text,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Url *ChannelFeatureSchema `json:"url,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

SuggestionsSchema is a schema from the AsyncAPI specification required in messages Description: Quick reply types support

type TemplateSettingSchema

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

TemplateSettingSchema is a schema from the AsyncAPI specification required in messages Description: Message templates support

type TextMessageSettingSchema

type TextMessageSettingSchema struct {
	// Description: Support for operations with messages of this type
	Creating *ChannelFeatureSchema `json:"creating,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Deleting *ChannelFeatureSchema `json:"deleting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Editing *ChannelFeatureSchema `json:"editing,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Maximum number of characters in a text message
	MaxCharsCount *uint16 `json:"max_chars_count,omitempty"`

	// Description: Support for operations with messages of this type
	Quoting *ChannelFeatureSchema `json:"quoting,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`

	// Description: Support for operations with messages of this type
	Reaction *ChannelFeatureSchema `json:"reaction,omitempty" validate:"omitempty,oneof='none' 'receive' 'send' 'both'"`
}

TextMessageSettingSchema is a schema from the AsyncAPI specification required in messages Description: Text message support

type UUID

type UUID = guuid.UUID

type UserIDSchema

type UserIDSchema struct {
	// Description: User ID
	Id int64 `json:"id"`
}

UserIDSchema is a schema from the AsyncAPI specification required in messages Description: Object with user ID

type UserJoinedChatDataSchema

type UserJoinedChatDataSchema struct {
	Chat ChatSchema    `json:"chat"`
	User UserRefSchema `json:"user"`
}

UserJoinedChatDataSchema is a schema from the AsyncAPI specification required in messages Description: User joined chat data

type UserLeftChatDataSchema

type UserLeftChatDataSchema struct {
	// Description: Object with chat ID
	Chat *ChatIDSchema `json:"chat,omitempty"`

	// Description: Reason for user leaving the chat
	Reason string `json:"reason"`

	// Description: Object with user ID
	User *UserIDSchema `json:"user,omitempty"`
}

UserLeftChatDataSchema is a schema from the AsyncAPI specification required in messages Description: User left chat data

type UserOnlineUpdatedDataSchema

type UserOnlineUpdatedDataSchema struct {
	// Description: Flag indicating that the user is connected
	Connected bool `json:"connected"`

	// Description: Flag indicating that the user is online
	Online bool          `json:"online"`
	User   UserRefSchema `json:"user"`
}

UserOnlineUpdatedDataSchema is a schema from the AsyncAPI specification required in messages Description: User status update data

type UserRefSchema

type UserRefSchema struct {
	// Description: Client availability status flag (only for user type)
	Available *bool `json:"available,omitempty"`

	// Description: User avatar
	Avatar *string `json:"avatar,omitempty"`

	// Description: User email (only for customer type)
	Email *string `json:"email,omitempty"`

	// Description: External user ID
	ExternalId string `json:"external_id"`

	// Description: User first name (only for customer and user types)
	FirstName *string `json:"first_name,omitempty"`

	// Description: User ID
	Id int64 `json:"id"`

	// Description: User blocked flag (only for customer type)
	IsBlocked *bool `json:"is_blocked,omitempty"`

	// Description: System user flag (only for bot type)
	IsSystem *bool `json:"is_system,omitempty"`

	// Description: Technical account flag (only for user type)
	IsTechnicalAccount *bool `json:"is_technical_account,omitempty"`

	// Description: User last name (only for customer and user types)
	LastName *string `json:"last_name,omitempty"`

	// Description: User nickname
	Name string `json:"name"`

	// Description: User phone number
	Phone *string `json:"phone,omitempty"`

	// Description: User type
	Type UserTypeSchema `json:"type" validate:"oneof='user' 'bot' 'customer' 'channel'"`

	// Description: Username (only for customer type)
	Username *string `json:"username,omitempty"`
}

UserRefSchema is a schema from the AsyncAPI specification required in messages

type UserTypeSchema

type UserTypeSchema string

UserTypeSchema is a schema from the AsyncAPI specification required in messages Description: User type

type UserUpdatedDataSchema

type UserUpdatedDataSchema struct {
	// Description: Client availability status flag (only for user type)
	Available *bool `json:"available,omitempty"`

	// Description: User avatar
	Avatar *string `json:"avatar,omitempty"`

	// Description: User email (only for customer type)
	Email *string `json:"email,omitempty"`

	// Description: External user ID
	ExternalId string `json:"external_id"`

	// Description: User first name (only for customer and user types)
	FirstName *string `json:"first_name,omitempty"`

	// Description: User ID
	Id int64 `json:"id"`

	// Description: User activity flag
	IsActive bool `json:"is_active"`

	// Description: User blocked flag (only for customer type)
	IsBlocked *bool `json:"is_blocked,omitempty"`

	// Description: System user flag (only for bot type)
	IsSystem *bool `json:"is_system,omitempty"`

	// Description: Technical account flag (only for user type)
	IsTechnicalAccount *bool `json:"is_technical_account,omitempty"`

	// Description: User last name (only for customer and user types)
	LastName *string `json:"last_name,omitempty"`

	// Description: User nickname
	Name string `json:"name"`

	// Description: User phone number
	Phone *string `json:"phone,omitempty"`

	// Description: User type
	Type UserTypeSchema `json:"type" validate:"oneof='user' 'bot' 'customer' 'channel'"`

	// Description: Username (only for customer type)
	Username *string `json:"username,omitempty"`
}

UserUpdatedDataSchema is a schema from the AsyncAPI specification required in messages Description: User information update data

type UtmSchema

type UtmSchema struct {
	// Description: Campaign
	Campaign *string `json:"campaign,omitempty" validate:"omitempty,min=1,max=255"`

	// Description: Campaign content
	Content *string `json:"content,omitempty" validate:"omitempty,min=1,max=255"`

	// Description: Medium
	Medium *string `json:"medium,omitempty" validate:"omitempty,min=1,max=255"`

	// Description: Source
	Source *string `json:"source,omitempty" validate:"omitempty,min=1,max=255"`

	// Description: Keyword
	Term *string `json:"term,omitempty" validate:"omitempty,min=1,max=255"`
}

UtmSchema is a schema from the AsyncAPI specification required in messages

type WAChannelPropertiesSchema

type WAChannelPropertiesSchema struct {
	// Description: WhatsApp channel quality
	ChannelQuality *WAChannelQualitySchema `json:"channel_quality,omitempty" validate:"omitempty,oneof='high' 'medium' 'low'"`

	// Description: WhatsApp channel status
	ChannelStatus *WAChannelStatusSchema `json:"channel_status,omitempty" validate:"omitempty,oneof='connected' 'flagged' 'offline' 'pending' 'restricted'"`
	Tier          *int                   `json:"tier,omitempty"`
}

WAChannelPropertiesSchema is a schema from the AsyncAPI specification required in messages Description: WhatsApp channel properties

type WAChannelQualitySchema

type WAChannelQualitySchema string

WAChannelQualitySchema is a schema from the AsyncAPI specification required in messages Description: WhatsApp channel quality

type WAChannelStatusSchema

type WAChannelStatusSchema string

WAChannelStatusSchema is a schema from the AsyncAPI specification required in messages Description: WhatsApp channel status

type WaitingLevelSchema

type WaitingLevelSchema string

WaitingLevelSchema is a schema from the AsyncAPI specification required in messages Description: Waiting level

Jump to

Keyboard shortcuts

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