sqlc

package
v0.1.0-beta.7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddChatParticipantParams

type AddChatParticipantParams struct {
	ChatID pgtype.UUID `json:"chat_id"`
	UserID pgtype.UUID `json:"user_id"`
	Role   string      `json:"role"`
}

type AddChatParticipantRow

type AddChatParticipantRow struct {
	ChatID   pgtype.UUID        `json:"chat_id"`
	UserID   pgtype.UUID        `json:"user_id"`
	Role     string             `json:"role"`
	JoinedAt pgtype.Timestamptz `json:"joined_at"`
}

type Bot

type Bot struct {
	ID                 pgtype.UUID        `json:"id"`
	OwnerUserID        pgtype.UUID        `json:"owner_user_id"`
	Type               string             `json:"type"`
	DisplayName        pgtype.Text        `json:"display_name"`
	AvatarUrl          pgtype.Text        `json:"avatar_url"`
	IsActive           bool               `json:"is_active"`
	Status             string             `json:"status"`
	MaxContextLoadTime int32              `json:"max_context_load_time"`
	MaxContextTokens   int32              `json:"max_context_tokens"`
	Language           string             `json:"language"`
	AllowGuest         bool               `json:"allow_guest"`
	ReasoningEnabled   bool               `json:"reasoning_enabled"`
	ReasoningEffort    string             `json:"reasoning_effort"`
	MaxInboxItems      int32              `json:"max_inbox_items"`
	ChatModelID        pgtype.UUID        `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID        `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID        `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID        `json:"search_provider_id"`
	Metadata           []byte             `json:"metadata"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
}

type BotChannelConfig

type BotChannelConfig struct {
	ID               pgtype.UUID        `json:"id"`
	BotID            pgtype.UUID        `json:"bot_id"`
	ChannelType      string             `json:"channel_type"`
	Credentials      []byte             `json:"credentials"`
	ExternalIdentity pgtype.Text        `json:"external_identity"`
	SelfIdentity     []byte             `json:"self_identity"`
	Routing          []byte             `json:"routing"`
	Capabilities     []byte             `json:"capabilities"`
	Disabled         bool               `json:"disabled"`
	VerifiedAt       pgtype.Timestamptz `json:"verified_at"`
	CreatedAt        pgtype.Timestamptz `json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `json:"updated_at"`
}

type BotChannelRoute

type BotChannelRoute struct {
	ID                     pgtype.UUID        `json:"id"`
	BotID                  pgtype.UUID        `json:"bot_id"`
	ChannelType            string             `json:"channel_type"`
	ChannelConfigID        pgtype.UUID        `json:"channel_config_id"`
	ExternalConversationID string             `json:"external_conversation_id"`
	ExternalThreadID       pgtype.Text        `json:"external_thread_id"`
	ConversationType       pgtype.Text        `json:"conversation_type"`
	DefaultReplyTarget     pgtype.Text        `json:"default_reply_target"`
	Metadata               []byte             `json:"metadata"`
	CreatedAt              pgtype.Timestamptz `json:"created_at"`
	UpdatedAt              pgtype.Timestamptz `json:"updated_at"`
}

type BotHistoryMessage

type BotHistoryMessage struct {
	ID                      pgtype.UUID        `json:"id"`
	BotID                   pgtype.UUID        `json:"bot_id"`
	RouteID                 pgtype.UUID        `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID        `json:"sender_channel_identity_id"`
	SenderAccountUserID     pgtype.UUID        `json:"sender_account_user_id"`
	ChannelType             pgtype.Text        `json:"channel_type"`
	SourceMessageID         pgtype.Text        `json:"source_message_id"`
	SourceReplyToMessageID  pgtype.Text        `json:"source_reply_to_message_id"`
	Role                    string             `json:"role"`
	Content                 []byte             `json:"content"`
	Metadata                []byte             `json:"metadata"`
	Usage                   []byte             `json:"usage"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
}

type BotHistoryMessageAsset

type BotHistoryMessageAsset struct {
	ID          pgtype.UUID        `json:"id"`
	MessageID   pgtype.UUID        `json:"message_id"`
	Role        string             `json:"role"`
	Ordinal     int32              `json:"ordinal"`
	ContentHash string             `json:"content_hash"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
}

type BotInbox

type BotInbox struct {
	ID        pgtype.UUID        `json:"id"`
	BotID     pgtype.UUID        `json:"bot_id"`
	Source    string             `json:"source"`
	Content   []byte             `json:"content"`
	IsRead    bool               `json:"is_read"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	ReadAt    pgtype.Timestamptz `json:"read_at"`
}

type BotMember

type BotMember struct {
	BotID     pgtype.UUID        `json:"bot_id"`
	UserID    pgtype.UUID        `json:"user_id"`
	Role      string             `json:"role"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type BotPreauthKey

type BotPreauthKey struct {
	ID             pgtype.UUID        `json:"id"`
	BotID          pgtype.UUID        `json:"bot_id"`
	Token          string             `json:"token"`
	IssuedByUserID pgtype.UUID        `json:"issued_by_user_id"`
	ExpiresAt      pgtype.Timestamptz `json:"expires_at"`
	UsedAt         pgtype.Timestamptz `json:"used_at"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
}

type BotStorageBinding

type BotStorageBinding struct {
	ID                pgtype.UUID        `json:"id"`
	BotID             pgtype.UUID        `json:"bot_id"`
	StorageProviderID pgtype.UUID        `json:"storage_provider_id"`
	BasePath          string             `json:"base_path"`
	CreatedAt         pgtype.Timestamptz `json:"created_at"`
	UpdatedAt         pgtype.Timestamptz `json:"updated_at"`
}

type ChannelIdentity

type ChannelIdentity struct {
	ID               pgtype.UUID        `json:"id"`
	UserID           pgtype.UUID        `json:"user_id"`
	ChannelType      string             `json:"channel_type"`
	ChannelSubjectID string             `json:"channel_subject_id"`
	DisplayName      pgtype.Text        `json:"display_name"`
	AvatarUrl        pgtype.Text        `json:"avatar_url"`
	Metadata         []byte             `json:"metadata"`
	CreatedAt        pgtype.Timestamptz `json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `json:"updated_at"`
}

type ChannelIdentityBindCode

type ChannelIdentityBindCode struct {
	ID                      pgtype.UUID        `json:"id"`
	Token                   string             `json:"token"`
	IssuedByUserID          pgtype.UUID        `json:"issued_by_user_id"`
	ChannelType             pgtype.Text        `json:"channel_type"`
	ExpiresAt               pgtype.Timestamptz `json:"expires_at"`
	UsedAt                  pgtype.Timestamptz `json:"used_at"`
	UsedByChannelIdentityID pgtype.UUID        `json:"used_by_channel_identity_id"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
}

type Container

type Container struct {
	ID            pgtype.UUID        `json:"id"`
	BotID         pgtype.UUID        `json:"bot_id"`
	ContainerID   string             `json:"container_id"`
	ContainerName string             `json:"container_name"`
	Image         string             `json:"image"`
	Status        string             `json:"status"`
	Namespace     string             `json:"namespace"`
	AutoStart     bool               `json:"auto_start"`
	HostPath      pgtype.Text        `json:"host_path"`
	ContainerPath string             `json:"container_path"`
	CreatedAt     pgtype.Timestamptz `json:"created_at"`
	UpdatedAt     pgtype.Timestamptz `json:"updated_at"`
	LastStartedAt pgtype.Timestamptz `json:"last_started_at"`
	LastStoppedAt pgtype.Timestamptz `json:"last_stopped_at"`
}

type ContainerVersion

type ContainerVersion struct {
	ID          pgtype.UUID        `json:"id"`
	ContainerID string             `json:"container_id"`
	SnapshotID  pgtype.UUID        `json:"snapshot_id"`
	Version     int32              `json:"version"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
}

type CopyParticipantsToChatParams

type CopyParticipantsToChatParams struct {
	ChatID2 pgtype.UUID `json:"chat_id_2"`
	ChatID  pgtype.UUID `json:"chat_id"`
}

type CreateAccountParams

type CreateAccountParams struct {
	Username     pgtype.Text `json:"username"`
	Email        pgtype.Text `json:"email"`
	PasswordHash pgtype.Text `json:"password_hash"`
	Role         string      `json:"role"`
	DisplayName  pgtype.Text `json:"display_name"`
	AvatarUrl    pgtype.Text `json:"avatar_url"`
	IsActive     bool        `json:"is_active"`
	DataRoot     pgtype.Text `json:"data_root"`
	UserID       pgtype.UUID `json:"user_id"`
}

type CreateBindCodeParams

type CreateBindCodeParams struct {
	Token          string             `json:"token"`
	IssuedByUserID pgtype.UUID        `json:"issued_by_user_id"`
	ChannelType    pgtype.Text        `json:"channel_type"`
	ExpiresAt      pgtype.Timestamptz `json:"expires_at"`
}

type CreateBotParams

type CreateBotParams struct {
	OwnerUserID pgtype.UUID `json:"owner_user_id"`
	Type        string      `json:"type"`
	DisplayName pgtype.Text `json:"display_name"`
	AvatarUrl   pgtype.Text `json:"avatar_url"`
	IsActive    bool        `json:"is_active"`
	Metadata    []byte      `json:"metadata"`
	Status      string      `json:"status"`
}

type CreateBotPreauthKeyParams

type CreateBotPreauthKeyParams struct {
	BotID          pgtype.UUID        `json:"bot_id"`
	Token          string             `json:"token"`
	IssuedByUserID pgtype.UUID        `json:"issued_by_user_id"`
	ExpiresAt      pgtype.Timestamptz `json:"expires_at"`
}

type CreateBotRow

type CreateBotRow struct {
	ID                 pgtype.UUID        `json:"id"`
	OwnerUserID        pgtype.UUID        `json:"owner_user_id"`
	Type               string             `json:"type"`
	DisplayName        pgtype.Text        `json:"display_name"`
	AvatarUrl          pgtype.Text        `json:"avatar_url"`
	IsActive           bool               `json:"is_active"`
	Status             string             `json:"status"`
	MaxContextLoadTime int32              `json:"max_context_load_time"`
	MaxContextTokens   int32              `json:"max_context_tokens"`
	MaxInboxItems      int32              `json:"max_inbox_items"`
	Language           string             `json:"language"`
	AllowGuest         bool               `json:"allow_guest"`
	ReasoningEnabled   bool               `json:"reasoning_enabled"`
	ReasoningEffort    string             `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID        `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID        `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID        `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID        `json:"search_provider_id"`
	Metadata           []byte             `json:"metadata"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
}

type CreateChannelIdentityParams

type CreateChannelIdentityParams struct {
	UserID           pgtype.UUID `json:"user_id"`
	ChannelType      string      `json:"channel_type"`
	ChannelSubjectID string      `json:"channel_subject_id"`
	DisplayName      pgtype.Text `json:"display_name"`
	AvatarUrl        pgtype.Text `json:"avatar_url"`
	Metadata         []byte      `json:"metadata"`
}

type CreateChatParams

type CreateChatParams struct {
	Kind            string      `json:"kind"`
	ParentChatID    pgtype.UUID `json:"parent_chat_id"`
	Title           string      `json:"title"`
	CreatedByUserID pgtype.UUID `json:"created_by_user_id"`
	Metadata        []byte      `json:"metadata"`
	BotID           pgtype.UUID `json:"bot_id"`
}

type CreateChatRouteParams

type CreateChatRouteParams struct {
	BotID            pgtype.UUID `json:"bot_id"`
	Platform         string      `json:"platform"`
	ChannelConfigID  pgtype.UUID `json:"channel_config_id"`
	ConversationID   string      `json:"conversation_id"`
	ThreadID         pgtype.Text `json:"thread_id"`
	ConversationType pgtype.Text `json:"conversation_type"`
	ReplyTarget      pgtype.Text `json:"reply_target"`
	Metadata         []byte      `json:"metadata"`
	ChatID           pgtype.UUID `json:"chat_id"`
}

type CreateChatRouteRow

type CreateChatRouteRow struct {
	ID               pgtype.UUID        `json:"id"`
	ChatID           pgtype.UUID        `json:"chat_id"`
	BotID            pgtype.UUID        `json:"bot_id"`
	Platform         string             `json:"platform"`
	ChannelConfigID  pgtype.UUID        `json:"channel_config_id"`
	ConversationID   string             `json:"conversation_id"`
	ThreadID         pgtype.Text        `json:"thread_id"`
	ConversationType pgtype.Text        `json:"conversation_type"`
	ReplyTarget      pgtype.Text        `json:"reply_target"`
	Metadata         []byte             `json:"metadata"`
	CreatedAt        pgtype.Timestamptz `json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `json:"updated_at"`
}

type CreateChatRow

type CreateChatRow struct {
	ID              pgtype.UUID        `json:"id"`
	BotID           pgtype.UUID        `json:"bot_id"`
	Kind            string             `json:"kind"`
	ParentChatID    pgtype.UUID        `json:"parent_chat_id"`
	Title           pgtype.Text        `json:"title"`
	CreatedByUserID pgtype.UUID        `json:"created_by_user_id"`
	Metadata        []byte             `json:"metadata"`
	ModelID         pgtype.Text        `json:"model_id"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `json:"updated_at"`
}

type CreateInboxItemParams

type CreateInboxItemParams struct {
	BotID   pgtype.UUID `json:"bot_id"`
	Source  string      `json:"source"`
	Content []byte      `json:"content"`
}

type CreateLlmProviderParams

type CreateLlmProviderParams struct {
	Name     string `json:"name"`
	BaseUrl  string `json:"base_url"`
	ApiKey   string `json:"api_key"`
	Metadata []byte `json:"metadata"`
}

type CreateMCPConnectionParams

type CreateMCPConnectionParams struct {
	BotID    pgtype.UUID `json:"bot_id"`
	Name     string      `json:"name"`
	Type     string      `json:"type"`
	Config   []byte      `json:"config"`
	IsActive bool        `json:"is_active"`
}

type CreateMessageAssetParams

type CreateMessageAssetParams struct {
	MessageID   pgtype.UUID `json:"message_id"`
	Role        string      `json:"role"`
	Ordinal     int32       `json:"ordinal"`
	ContentHash string      `json:"content_hash"`
}

type CreateMessageParams

type CreateMessageParams struct {
	BotID                   pgtype.UUID `json:"bot_id"`
	RouteID                 pgtype.UUID `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID `json:"sender_channel_identity_id"`
	SenderUserID            pgtype.UUID `json:"sender_user_id"`
	Platform                pgtype.Text `json:"platform"`
	ExternalMessageID       pgtype.Text `json:"external_message_id"`
	SourceReplyToMessageID  pgtype.Text `json:"source_reply_to_message_id"`
	Role                    string      `json:"role"`
	Content                 []byte      `json:"content"`
	Metadata                []byte      `json:"metadata"`
	Usage                   []byte      `json:"usage"`
}

type CreateMessageRow

type CreateMessageRow struct {
	ID                      pgtype.UUID        `json:"id"`
	BotID                   pgtype.UUID        `json:"bot_id"`
	RouteID                 pgtype.UUID        `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID        `json:"sender_channel_identity_id"`
	SenderUserID            pgtype.UUID        `json:"sender_user_id"`
	Platform                pgtype.Text        `json:"platform"`
	ExternalMessageID       pgtype.Text        `json:"external_message_id"`
	SourceReplyToMessageID  pgtype.Text        `json:"source_reply_to_message_id"`
	Role                    string             `json:"role"`
	Content                 []byte             `json:"content"`
	Metadata                []byte             `json:"metadata"`
	Usage                   []byte             `json:"usage"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
}

type CreateModelParams

type CreateModelParams struct {
	ModelID           string      `json:"model_id"`
	Name              pgtype.Text `json:"name"`
	LlmProviderID     pgtype.UUID `json:"llm_provider_id"`
	ClientType        pgtype.Text `json:"client_type"`
	Dimensions        pgtype.Int4 `json:"dimensions"`
	InputModalities   []string    `json:"input_modalities"`
	SupportsReasoning bool        `json:"supports_reasoning"`
	Type              string      `json:"type"`
}

type CreateModelVariantParams

type CreateModelVariantParams struct {
	ModelUuid pgtype.UUID `json:"model_uuid"`
	VariantID string      `json:"variant_id"`
	Weight    int32       `json:"weight"`
	Metadata  []byte      `json:"metadata"`
}

type CreateScheduleParams

type CreateScheduleParams struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Pattern     string      `json:"pattern"`
	MaxCalls    pgtype.Int4 `json:"max_calls"`
	Enabled     bool        `json:"enabled"`
	Command     string      `json:"command"`
	BotID       pgtype.UUID `json:"bot_id"`
}

type CreateSearchProviderParams

type CreateSearchProviderParams struct {
	Name     string `json:"name"`
	Provider string `json:"provider"`
	Config   []byte `json:"config"`
}

type CreateStorageProviderParams

type CreateStorageProviderParams struct {
	Name     string `json:"name"`
	Provider string `json:"provider"`
	Config   []byte `json:"config"`
}

type CreateSubagentParams

type CreateSubagentParams struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	BotID       pgtype.UUID `json:"bot_id"`
	Messages    []byte      `json:"messages"`
	Metadata    []byte      `json:"metadata"`
	Skills      []byte      `json:"skills"`
}

type CreateUserParams

type CreateUserParams struct {
	IsActive bool   `json:"is_active"`
	Metadata []byte `json:"metadata"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type DeleteBotChannelConfigParams

type DeleteBotChannelConfigParams struct {
	BotID       pgtype.UUID `json:"bot_id"`
	ChannelType string      `json:"channel_type"`
}

type DeleteBotMemberParams

type DeleteBotMemberParams struct {
	BotID  pgtype.UUID `json:"bot_id"`
	UserID pgtype.UUID `json:"user_id"`
}

type DeleteInboxItemParams

type DeleteInboxItemParams struct {
	ID    pgtype.UUID `json:"id"`
	BotID pgtype.UUID `json:"bot_id"`
}

type DeleteMCPConnectionParams

type DeleteMCPConnectionParams struct {
	BotID pgtype.UUID `json:"bot_id"`
	ID    pgtype.UUID `json:"id"`
}

type FindChatRouteParams

type FindChatRouteParams struct {
	BotID          pgtype.UUID `json:"bot_id"`
	Platform       string      `json:"platform"`
	ConversationID string      `json:"conversation_id"`
	ThreadID       pgtype.Text `json:"thread_id"`
}

type FindChatRouteRow

type FindChatRouteRow struct {
	ID               pgtype.UUID        `json:"id"`
	ChatID           pgtype.UUID        `json:"chat_id"`
	BotID            pgtype.UUID        `json:"bot_id"`
	Platform         string             `json:"platform"`
	ChannelConfigID  pgtype.UUID        `json:"channel_config_id"`
	ConversationID   string             `json:"conversation_id"`
	ThreadID         pgtype.Text        `json:"thread_id"`
	ConversationType pgtype.Text        `json:"conversation_type"`
	ReplyTarget      pgtype.Text        `json:"reply_target"`
	Metadata         []byte             `json:"metadata"`
	CreatedAt        pgtype.Timestamptz `json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `json:"updated_at"`
}

type GetBotByIDRow

type GetBotByIDRow struct {
	ID                 pgtype.UUID        `json:"id"`
	OwnerUserID        pgtype.UUID        `json:"owner_user_id"`
	Type               string             `json:"type"`
	DisplayName        pgtype.Text        `json:"display_name"`
	AvatarUrl          pgtype.Text        `json:"avatar_url"`
	IsActive           bool               `json:"is_active"`
	Status             string             `json:"status"`
	MaxContextLoadTime int32              `json:"max_context_load_time"`
	MaxContextTokens   int32              `json:"max_context_tokens"`
	MaxInboxItems      int32              `json:"max_inbox_items"`
	Language           string             `json:"language"`
	AllowGuest         bool               `json:"allow_guest"`
	ReasoningEnabled   bool               `json:"reasoning_enabled"`
	ReasoningEffort    string             `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID        `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID        `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID        `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID        `json:"search_provider_id"`
	Metadata           []byte             `json:"metadata"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
}

type GetBotChannelConfigByExternalIdentityParams

type GetBotChannelConfigByExternalIdentityParams struct {
	ChannelType      string      `json:"channel_type"`
	ExternalIdentity pgtype.Text `json:"external_identity"`
}

type GetBotChannelConfigParams

type GetBotChannelConfigParams struct {
	BotID       pgtype.UUID `json:"bot_id"`
	ChannelType string      `json:"channel_type"`
}

type GetBotMemberParams

type GetBotMemberParams struct {
	BotID  pgtype.UUID `json:"bot_id"`
	UserID pgtype.UUID `json:"user_id"`
}

type GetChannelIdentityByChannelSubjectParams

type GetChannelIdentityByChannelSubjectParams struct {
	ChannelType      string `json:"channel_type"`
	ChannelSubjectID string `json:"channel_subject_id"`
}

type GetChatByIDRow

type GetChatByIDRow struct {
	ID              pgtype.UUID        `json:"id"`
	BotID           pgtype.UUID        `json:"bot_id"`
	Kind            string             `json:"kind"`
	ParentChatID    pgtype.UUID        `json:"parent_chat_id"`
	Title           pgtype.Text        `json:"title"`
	CreatedByUserID pgtype.UUID        `json:"created_by_user_id"`
	Metadata        []byte             `json:"metadata"`
	ModelID         pgtype.Text        `json:"model_id"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `json:"updated_at"`
}

type GetChatParticipantParams

type GetChatParticipantParams struct {
	ChatID pgtype.UUID `json:"chat_id"`
	UserID pgtype.UUID `json:"user_id"`
}

type GetChatParticipantRow

type GetChatParticipantRow struct {
	ChatID   pgtype.UUID        `json:"chat_id"`
	UserID   pgtype.UUID        `json:"user_id"`
	Role     string             `json:"role"`
	JoinedAt pgtype.Timestamptz `json:"joined_at"`
}

type GetChatReadAccessByUserParams

type GetChatReadAccessByUserParams struct {
	UserID pgtype.UUID `json:"user_id"`
	ChatID pgtype.UUID `json:"chat_id"`
}

type GetChatReadAccessByUserRow

type GetChatReadAccessByUserRow struct {
	AccessMode      string             `json:"access_mode"`
	ParticipantRole string             `json:"participant_role"`
	LastObservedAt  pgtype.Timestamptz `json:"last_observed_at"`
}

type GetChatRouteByIDRow

type GetChatRouteByIDRow struct {
	ID               pgtype.UUID        `json:"id"`
	ChatID           pgtype.UUID        `json:"chat_id"`
	BotID            pgtype.UUID        `json:"bot_id"`
	Platform         string             `json:"platform"`
	ChannelConfigID  pgtype.UUID        `json:"channel_config_id"`
	ConversationID   string             `json:"conversation_id"`
	ThreadID         pgtype.Text        `json:"thread_id"`
	ConversationType pgtype.Text        `json:"conversation_type"`
	ReplyTarget      pgtype.Text        `json:"reply_target"`
	Metadata         []byte             `json:"metadata"`
	CreatedAt        pgtype.Timestamptz `json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `json:"updated_at"`
}

type GetChatSettingsRow

type GetChatSettingsRow struct {
	ChatID    pgtype.UUID        `json:"chat_id"`
	ModelID   pgtype.UUID        `json:"model_id"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type GetInboxItemByIDParams

type GetInboxItemByIDParams struct {
	ID    pgtype.UUID `json:"id"`
	BotID pgtype.UUID `json:"bot_id"`
}

type GetMCPConnectionByIDParams

type GetMCPConnectionByIDParams struct {
	BotID pgtype.UUID `json:"bot_id"`
	ID    pgtype.UUID `json:"id"`
}

type GetSettingsByBotIDRow

type GetSettingsByBotIDRow struct {
	BotID              pgtype.UUID `json:"bot_id"`
	MaxContextLoadTime int32       `json:"max_context_load_time"`
	MaxContextTokens   int32       `json:"max_context_tokens"`
	MaxInboxItems      int32       `json:"max_inbox_items"`
	Language           string      `json:"language"`
	AllowGuest         bool        `json:"allow_guest"`
	ReasoningEnabled   bool        `json:"reasoning_enabled"`
	ReasoningEffort    string      `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID `json:"search_provider_id"`
}

type GetSnapshotByContainerAndRuntimeNameParams

type GetSnapshotByContainerAndRuntimeNameParams struct {
	ContainerID         string `json:"container_id"`
	RuntimeSnapshotName string `json:"runtime_snapshot_name"`
}

type GetSubagentByBotAndNameParams

type GetSubagentByBotAndNameParams struct {
	BotID pgtype.UUID `json:"bot_id"`
	Name  string      `json:"name"`
}

type GetUserChannelBindingParams

type GetUserChannelBindingParams struct {
	UserID      pgtype.UUID `json:"user_id"`
	ChannelType string      `json:"channel_type"`
}

type GetVersionSnapshotRuntimeNameParams

type GetVersionSnapshotRuntimeNameParams struct {
	ContainerID string `json:"container_id"`
	Version     int32  `json:"version"`
}

type InsertLifecycleEventParams

type InsertLifecycleEventParams struct {
	ID          string `json:"id"`
	ContainerID string `json:"container_id"`
	EventType   string `json:"event_type"`
	Payload     []byte `json:"payload"`
}

type InsertVersionParams

type InsertVersionParams struct {
	ContainerID string      `json:"container_id"`
	SnapshotID  pgtype.UUID `json:"snapshot_id"`
	Version     int32       `json:"version"`
}

type LifecycleEvent

type LifecycleEvent struct {
	ID          string             `json:"id"`
	ContainerID string             `json:"container_id"`
	EventType   string             `json:"event_type"`
	Payload     []byte             `json:"payload"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
}

type ListActiveMessagesSinceParams

type ListActiveMessagesSinceParams struct {
	BotID     pgtype.UUID        `json:"bot_id"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type ListActiveMessagesSinceRow

type ListActiveMessagesSinceRow struct {
	ID                      pgtype.UUID        `json:"id"`
	BotID                   pgtype.UUID        `json:"bot_id"`
	RouteID                 pgtype.UUID        `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID        `json:"sender_channel_identity_id"`
	SenderUserID            pgtype.UUID        `json:"sender_user_id"`
	Platform                pgtype.Text        `json:"platform"`
	ExternalMessageID       pgtype.Text        `json:"external_message_id"`
	SourceReplyToMessageID  pgtype.Text        `json:"source_reply_to_message_id"`
	Role                    string             `json:"role"`
	Content                 []byte             `json:"content"`
	Metadata                []byte             `json:"metadata"`
	Usage                   []byte             `json:"usage"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
	SenderDisplayName       pgtype.Text        `json:"sender_display_name"`
	SenderAvatarUrl         pgtype.Text        `json:"sender_avatar_url"`
}

type ListBotsByMemberRow

type ListBotsByMemberRow struct {
	ID                 pgtype.UUID        `json:"id"`
	OwnerUserID        pgtype.UUID        `json:"owner_user_id"`
	Type               string             `json:"type"`
	DisplayName        pgtype.Text        `json:"display_name"`
	AvatarUrl          pgtype.Text        `json:"avatar_url"`
	IsActive           bool               `json:"is_active"`
	Status             string             `json:"status"`
	MaxContextLoadTime int32              `json:"max_context_load_time"`
	MaxContextTokens   int32              `json:"max_context_tokens"`
	MaxInboxItems      int32              `json:"max_inbox_items"`
	Language           string             `json:"language"`
	AllowGuest         bool               `json:"allow_guest"`
	ReasoningEnabled   bool               `json:"reasoning_enabled"`
	ReasoningEffort    string             `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID        `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID        `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID        `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID        `json:"search_provider_id"`
	Metadata           []byte             `json:"metadata"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
}

type ListBotsByOwnerRow

type ListBotsByOwnerRow struct {
	ID                 pgtype.UUID        `json:"id"`
	OwnerUserID        pgtype.UUID        `json:"owner_user_id"`
	Type               string             `json:"type"`
	DisplayName        pgtype.Text        `json:"display_name"`
	AvatarUrl          pgtype.Text        `json:"avatar_url"`
	IsActive           bool               `json:"is_active"`
	Status             string             `json:"status"`
	MaxContextLoadTime int32              `json:"max_context_load_time"`
	MaxContextTokens   int32              `json:"max_context_tokens"`
	MaxInboxItems      int32              `json:"max_inbox_items"`
	Language           string             `json:"language"`
	AllowGuest         bool               `json:"allow_guest"`
	ReasoningEnabled   bool               `json:"reasoning_enabled"`
	ReasoningEffort    string             `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID        `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID        `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID        `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID        `json:"search_provider_id"`
	Metadata           []byte             `json:"metadata"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
}

type ListChatParticipantsRow

type ListChatParticipantsRow struct {
	ChatID   pgtype.UUID        `json:"chat_id"`
	UserID   pgtype.UUID        `json:"user_id"`
	Role     string             `json:"role"`
	JoinedAt pgtype.Timestamptz `json:"joined_at"`
}

type ListChatRoutesRow

type ListChatRoutesRow struct {
	ID               pgtype.UUID        `json:"id"`
	ChatID           pgtype.UUID        `json:"chat_id"`
	BotID            pgtype.UUID        `json:"bot_id"`
	Platform         string             `json:"platform"`
	ChannelConfigID  pgtype.UUID        `json:"channel_config_id"`
	ConversationID   string             `json:"conversation_id"`
	ThreadID         pgtype.Text        `json:"thread_id"`
	ConversationType pgtype.Text        `json:"conversation_type"`
	ReplyTarget      pgtype.Text        `json:"reply_target"`
	Metadata         []byte             `json:"metadata"`
	CreatedAt        pgtype.Timestamptz `json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `json:"updated_at"`
}

type ListChatsByBotAndUserParams

type ListChatsByBotAndUserParams struct {
	UserID pgtype.UUID `json:"user_id"`
	BotID  pgtype.UUID `json:"bot_id"`
}

type ListChatsByBotAndUserRow

type ListChatsByBotAndUserRow struct {
	ID              pgtype.UUID        `json:"id"`
	BotID           pgtype.UUID        `json:"bot_id"`
	Kind            string             `json:"kind"`
	ParentChatID    pgtype.UUID        `json:"parent_chat_id"`
	Title           pgtype.Text        `json:"title"`
	CreatedByUserID pgtype.UUID        `json:"created_by_user_id"`
	Metadata        []byte             `json:"metadata"`
	ModelID         pgtype.Text        `json:"model_id"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `json:"updated_at"`
}

type ListInboxItemsParams

type ListInboxItemsParams struct {
	BotID      pgtype.UUID `json:"bot_id"`
	IsRead     pgtype.Bool `json:"is_read"`
	Source     pgtype.Text `json:"source"`
	ItemOffset int32       `json:"item_offset"`
	MaxCount   int32       `json:"max_count"`
}

type ListMessageAssetsBatchRow

type ListMessageAssetsBatchRow struct {
	RelID       pgtype.UUID `json:"rel_id"`
	MessageID   pgtype.UUID `json:"message_id"`
	Role        string      `json:"role"`
	Ordinal     int32       `json:"ordinal"`
	ContentHash string      `json:"content_hash"`
}

type ListMessageAssetsRow

type ListMessageAssetsRow struct {
	RelID       pgtype.UUID `json:"rel_id"`
	MessageID   pgtype.UUID `json:"message_id"`
	Role        string      `json:"role"`
	Ordinal     int32       `json:"ordinal"`
	ContentHash string      `json:"content_hash"`
}

type ListMessagesBeforeParams

type ListMessagesBeforeParams struct {
	BotID     pgtype.UUID        `json:"bot_id"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	MaxCount  int32              `json:"max_count"`
}

type ListMessagesBeforeRow

type ListMessagesBeforeRow struct {
	ID                      pgtype.UUID        `json:"id"`
	BotID                   pgtype.UUID        `json:"bot_id"`
	RouteID                 pgtype.UUID        `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID        `json:"sender_channel_identity_id"`
	SenderUserID            pgtype.UUID        `json:"sender_user_id"`
	Platform                pgtype.Text        `json:"platform"`
	ExternalMessageID       pgtype.Text        `json:"external_message_id"`
	SourceReplyToMessageID  pgtype.Text        `json:"source_reply_to_message_id"`
	Role                    string             `json:"role"`
	Content                 []byte             `json:"content"`
	Metadata                []byte             `json:"metadata"`
	Usage                   []byte             `json:"usage"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
	SenderDisplayName       pgtype.Text        `json:"sender_display_name"`
	SenderAvatarUrl         pgtype.Text        `json:"sender_avatar_url"`
}

type ListMessagesLatestParams

type ListMessagesLatestParams struct {
	BotID    pgtype.UUID `json:"bot_id"`
	MaxCount int32       `json:"max_count"`
}

type ListMessagesLatestRow

type ListMessagesLatestRow struct {
	ID                      pgtype.UUID        `json:"id"`
	BotID                   pgtype.UUID        `json:"bot_id"`
	RouteID                 pgtype.UUID        `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID        `json:"sender_channel_identity_id"`
	SenderUserID            pgtype.UUID        `json:"sender_user_id"`
	Platform                pgtype.Text        `json:"platform"`
	ExternalMessageID       pgtype.Text        `json:"external_message_id"`
	SourceReplyToMessageID  pgtype.Text        `json:"source_reply_to_message_id"`
	Role                    string             `json:"role"`
	Content                 []byte             `json:"content"`
	Metadata                []byte             `json:"metadata"`
	Usage                   []byte             `json:"usage"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
	SenderDisplayName       pgtype.Text        `json:"sender_display_name"`
	SenderAvatarUrl         pgtype.Text        `json:"sender_avatar_url"`
}

type ListMessagesRow

type ListMessagesRow struct {
	ID                      pgtype.UUID        `json:"id"`
	BotID                   pgtype.UUID        `json:"bot_id"`
	RouteID                 pgtype.UUID        `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID        `json:"sender_channel_identity_id"`
	SenderUserID            pgtype.UUID        `json:"sender_user_id"`
	Platform                pgtype.Text        `json:"platform"`
	ExternalMessageID       pgtype.Text        `json:"external_message_id"`
	SourceReplyToMessageID  pgtype.Text        `json:"source_reply_to_message_id"`
	Role                    string             `json:"role"`
	Content                 []byte             `json:"content"`
	Metadata                []byte             `json:"metadata"`
	Usage                   []byte             `json:"usage"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
	SenderDisplayName       pgtype.Text        `json:"sender_display_name"`
	SenderAvatarUrl         pgtype.Text        `json:"sender_avatar_url"`
}

type ListMessagesSinceParams

type ListMessagesSinceParams struct {
	BotID     pgtype.UUID        `json:"bot_id"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type ListMessagesSinceRow

type ListMessagesSinceRow struct {
	ID                      pgtype.UUID        `json:"id"`
	BotID                   pgtype.UUID        `json:"bot_id"`
	RouteID                 pgtype.UUID        `json:"route_id"`
	SenderChannelIdentityID pgtype.UUID        `json:"sender_channel_identity_id"`
	SenderUserID            pgtype.UUID        `json:"sender_user_id"`
	Platform                pgtype.Text        `json:"platform"`
	ExternalMessageID       pgtype.Text        `json:"external_message_id"`
	SourceReplyToMessageID  pgtype.Text        `json:"source_reply_to_message_id"`
	Role                    string             `json:"role"`
	Content                 []byte             `json:"content"`
	Metadata                []byte             `json:"metadata"`
	Usage                   []byte             `json:"usage"`
	CreatedAt               pgtype.Timestamptz `json:"created_at"`
	SenderDisplayName       pgtype.Text        `json:"sender_display_name"`
	SenderAvatarUrl         pgtype.Text        `json:"sender_avatar_url"`
}

type ListModelsByProviderIDAndTypeParams

type ListModelsByProviderIDAndTypeParams struct {
	LlmProviderID pgtype.UUID `json:"llm_provider_id"`
	Type          string      `json:"type"`
}

type ListSnapshotsWithVersionByContainerIDRow

type ListSnapshotsWithVersionByContainerIDRow struct {
	ID                        pgtype.UUID        `json:"id"`
	ContainerID               string             `json:"container_id"`
	RuntimeSnapshotName       string             `json:"runtime_snapshot_name"`
	ParentRuntimeSnapshotName pgtype.Text        `json:"parent_runtime_snapshot_name"`
	Snapshotter               string             `json:"snapshotter"`
	Source                    string             `json:"source"`
	CreatedAt                 pgtype.Timestamptz `json:"created_at"`
	Version                   pgtype.Int4        `json:"version"`
}

type ListThreadsByParentRow

type ListThreadsByParentRow struct {
	ID              pgtype.UUID        `json:"id"`
	BotID           pgtype.UUID        `json:"bot_id"`
	Kind            string             `json:"kind"`
	ParentChatID    pgtype.UUID        `json:"parent_chat_id"`
	Title           pgtype.Text        `json:"title"`
	CreatedByUserID pgtype.UUID        `json:"created_by_user_id"`
	Metadata        []byte             `json:"metadata"`
	ModelID         pgtype.Text        `json:"model_id"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `json:"updated_at"`
}

type ListUnreadInboxItemsParams

type ListUnreadInboxItemsParams struct {
	BotID    pgtype.UUID `json:"bot_id"`
	MaxCount int32       `json:"max_count"`
}

type ListVersionsByContainerIDRow

type ListVersionsByContainerIDRow struct {
	ID                  pgtype.UUID        `json:"id"`
	ContainerID         string             `json:"container_id"`
	SnapshotID          pgtype.UUID        `json:"snapshot_id"`
	Version             int32              `json:"version"`
	CreatedAt           pgtype.Timestamptz `json:"created_at"`
	RuntimeSnapshotName string             `json:"runtime_snapshot_name"`
}

type ListVisibleChatsByBotAndUserParams

type ListVisibleChatsByBotAndUserParams struct {
	UserID pgtype.UUID `json:"user_id"`
	BotID  pgtype.UUID `json:"bot_id"`
}

type ListVisibleChatsByBotAndUserRow

type ListVisibleChatsByBotAndUserRow struct {
	ID              pgtype.UUID        `json:"id"`
	BotID           pgtype.UUID        `json:"bot_id"`
	Kind            string             `json:"kind"`
	ParentChatID    pgtype.UUID        `json:"parent_chat_id"`
	Title           pgtype.Text        `json:"title"`
	CreatedByUserID pgtype.UUID        `json:"created_by_user_id"`
	Metadata        []byte             `json:"metadata"`
	ModelID         pgtype.Text        `json:"model_id"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `json:"updated_at"`
	AccessMode      string             `json:"access_mode"`
	ParticipantRole string             `json:"participant_role"`
	LastObservedAt  pgtype.Timestamptz `json:"last_observed_at"`
}

type LlmProvider

type LlmProvider struct {
	ID        pgtype.UUID        `json:"id"`
	Name      string             `json:"name"`
	BaseUrl   string             `json:"base_url"`
	ApiKey    string             `json:"api_key"`
	Metadata  []byte             `json:"metadata"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type MarkBindCodeUsedParams

type MarkBindCodeUsedParams struct {
	ID                      pgtype.UUID `json:"id"`
	UsedByChannelIdentityID pgtype.UUID `json:"used_by_channel_identity_id"`
}

type MarkInboxItemsReadParams

type MarkInboxItemsReadParams struct {
	BotID pgtype.UUID   `json:"bot_id"`
	Ids   []pgtype.UUID `json:"ids"`
}

type McpConnection

type McpConnection struct {
	ID        pgtype.UUID        `json:"id"`
	BotID     pgtype.UUID        `json:"bot_id"`
	Name      string             `json:"name"`
	Type      string             `json:"type"`
	Config    []byte             `json:"config"`
	IsActive  bool               `json:"is_active"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type MediaAsset

type MediaAsset struct {
	ID                pgtype.UUID        `json:"id"`
	BotID             pgtype.UUID        `json:"bot_id"`
	StorageProviderID pgtype.UUID        `json:"storage_provider_id"`
	ContentHash       string             `json:"content_hash"`
	MediaType         string             `json:"media_type"`
	Mime              string             `json:"mime"`
	SizeBytes         int64              `json:"size_bytes"`
	StorageKey        string             `json:"storage_key"`
	OriginalName      pgtype.Text        `json:"original_name"`
	Width             pgtype.Int4        `json:"width"`
	Height            pgtype.Int4        `json:"height"`
	DurationMs        pgtype.Int8        `json:"duration_ms"`
	Metadata          []byte             `json:"metadata"`
	CreatedAt         pgtype.Timestamptz `json:"created_at"`
}

type Model

type Model struct {
	ID                pgtype.UUID        `json:"id"`
	ModelID           string             `json:"model_id"`
	Name              pgtype.Text        `json:"name"`
	LlmProviderID     pgtype.UUID        `json:"llm_provider_id"`
	ClientType        pgtype.Text        `json:"client_type"`
	Dimensions        pgtype.Int4        `json:"dimensions"`
	InputModalities   []string           `json:"input_modalities"`
	SupportsReasoning bool               `json:"supports_reasoning"`
	Type              string             `json:"type"`
	CreatedAt         pgtype.Timestamptz `json:"created_at"`
	UpdatedAt         pgtype.Timestamptz `json:"updated_at"`
}

type ModelVariant

type ModelVariant struct {
	ID        pgtype.UUID        `json:"id"`
	ModelUuid pgtype.UUID        `json:"model_uuid"`
	VariantID string             `json:"variant_id"`
	Weight    int32              `json:"weight"`
	Metadata  []byte             `json:"metadata"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddChatParticipant

func (q *Queries) AddChatParticipant(ctx context.Context, arg AddChatParticipantParams) (AddChatParticipantRow, error)

chat_participants

func (*Queries) CopyParticipantsToChat

func (q *Queries) CopyParticipantsToChat(ctx context.Context, arg CopyParticipantsToChatParams) error

func (*Queries) CountAccounts

func (q *Queries) CountAccounts(ctx context.Context) (int64, error)

func (*Queries) CountInboxItems

func (q *Queries) CountInboxItems(ctx context.Context, botID pgtype.UUID) (int64, error)

func (*Queries) CountLlmProviders

func (q *Queries) CountLlmProviders(ctx context.Context) (int64, error)

func (*Queries) CountModels

func (q *Queries) CountModels(ctx context.Context) (int64, error)

func (*Queries) CountModelsByType

func (q *Queries) CountModelsByType(ctx context.Context, type_ string) (int64, error)

func (*Queries) CountUnreadInboxItems

func (q *Queries) CountUnreadInboxItems(ctx context.Context, botID pgtype.UUID) (int64, error)

func (*Queries) CreateAccount

func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (User, error)

func (*Queries) CreateBindCode

func (*Queries) CreateBot

func (q *Queries) CreateBot(ctx context.Context, arg CreateBotParams) (CreateBotRow, error)

func (*Queries) CreateBotPreauthKey

func (q *Queries) CreateBotPreauthKey(ctx context.Context, arg CreateBotPreauthKeyParams) (BotPreauthKey, error)

func (*Queries) CreateChannelIdentity

func (q *Queries) CreateChannelIdentity(ctx context.Context, arg CreateChannelIdentityParams) (ChannelIdentity, error)

func (*Queries) CreateChat

func (q *Queries) CreateChat(ctx context.Context, arg CreateChatParams) (CreateChatRow, error)

func (*Queries) CreateChatRoute

func (q *Queries) CreateChatRoute(ctx context.Context, arg CreateChatRouteParams) (CreateChatRouteRow, error)

func (*Queries) CreateInboxItem

func (q *Queries) CreateInboxItem(ctx context.Context, arg CreateInboxItemParams) (BotInbox, error)

func (*Queries) CreateLlmProvider

func (q *Queries) CreateLlmProvider(ctx context.Context, arg CreateLlmProviderParams) (LlmProvider, error)

func (*Queries) CreateMCPConnection

func (q *Queries) CreateMCPConnection(ctx context.Context, arg CreateMCPConnectionParams) (McpConnection, error)

func (*Queries) CreateMessage

func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) (CreateMessageRow, error)

func (*Queries) CreateMessageAsset

func (q *Queries) CreateMessageAsset(ctx context.Context, arg CreateMessageAssetParams) (BotHistoryMessageAsset, error)

func (*Queries) CreateModel

func (q *Queries) CreateModel(ctx context.Context, arg CreateModelParams) (Model, error)

func (*Queries) CreateModelVariant

func (q *Queries) CreateModelVariant(ctx context.Context, arg CreateModelVariantParams) (ModelVariant, error)

func (*Queries) CreateSchedule

func (q *Queries) CreateSchedule(ctx context.Context, arg CreateScheduleParams) (Schedule, error)

func (*Queries) CreateSearchProvider

func (q *Queries) CreateSearchProvider(ctx context.Context, arg CreateSearchProviderParams) (SearchProvider, error)

func (*Queries) CreateStorageProvider

func (q *Queries) CreateStorageProvider(ctx context.Context, arg CreateStorageProviderParams) (StorageProvider, error)

func (*Queries) CreateSubagent

func (q *Queries) CreateSubagent(ctx context.Context, arg CreateSubagentParams) (Subagent, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)

func (*Queries) DeleteBotByID

func (q *Queries) DeleteBotByID(ctx context.Context, id pgtype.UUID) error

func (*Queries) DeleteBotChannelConfig

func (q *Queries) DeleteBotChannelConfig(ctx context.Context, arg DeleteBotChannelConfigParams) error

func (*Queries) DeleteBotMember

func (q *Queries) DeleteBotMember(ctx context.Context, arg DeleteBotMemberParams) error

func (*Queries) DeleteChat

func (q *Queries) DeleteChat(ctx context.Context, chatID pgtype.UUID) error

func (*Queries) DeleteChatRoute

func (q *Queries) DeleteChatRoute(ctx context.Context, id pgtype.UUID) error

func (*Queries) DeleteContainerByBotID

func (q *Queries) DeleteContainerByBotID(ctx context.Context, botID pgtype.UUID) error

func (*Queries) DeleteInboxItem

func (q *Queries) DeleteInboxItem(ctx context.Context, arg DeleteInboxItemParams) error

func (*Queries) DeleteInboxItemsByBot

func (q *Queries) DeleteInboxItemsByBot(ctx context.Context, botID pgtype.UUID) error

func (*Queries) DeleteLlmProvider

func (q *Queries) DeleteLlmProvider(ctx context.Context, id pgtype.UUID) error

func (*Queries) DeleteMCPConnection

func (q *Queries) DeleteMCPConnection(ctx context.Context, arg DeleteMCPConnectionParams) error

func (*Queries) DeleteMessageAssets

func (q *Queries) DeleteMessageAssets(ctx context.Context, messageID pgtype.UUID) error

func (*Queries) DeleteMessagesByBot

func (q *Queries) DeleteMessagesByBot(ctx context.Context, botID pgtype.UUID) error

func (*Queries) DeleteModel

func (q *Queries) DeleteModel(ctx context.Context, id pgtype.UUID) error

func (*Queries) DeleteModelByModelID

func (q *Queries) DeleteModelByModelID(ctx context.Context, modelID string) error

func (*Queries) DeleteSchedule

func (q *Queries) DeleteSchedule(ctx context.Context, id pgtype.UUID) error

func (*Queries) DeleteSearchProvider

func (q *Queries) DeleteSearchProvider(ctx context.Context, id pgtype.UUID) error

func (*Queries) DeleteSettingsByBotID

func (q *Queries) DeleteSettingsByBotID(ctx context.Context, id pgtype.UUID) error

func (*Queries) FindChatRoute

func (q *Queries) FindChatRoute(ctx context.Context, arg FindChatRouteParams) (FindChatRouteRow, error)

func (*Queries) GetAccountByIdentity

func (q *Queries) GetAccountByIdentity(ctx context.Context, identity pgtype.Text) (User, error)

func (*Queries) GetAccountByUserID

func (q *Queries) GetAccountByUserID(ctx context.Context, userID pgtype.UUID) (User, error)

func (*Queries) GetBindCode

func (q *Queries) GetBindCode(ctx context.Context, token string) (ChannelIdentityBindCode, error)

func (*Queries) GetBindCodeForUpdate

func (q *Queries) GetBindCodeForUpdate(ctx context.Context, token string) (ChannelIdentityBindCode, error)

func (*Queries) GetBotByID

func (q *Queries) GetBotByID(ctx context.Context, id pgtype.UUID) (GetBotByIDRow, error)

func (*Queries) GetBotChannelConfig

func (q *Queries) GetBotChannelConfig(ctx context.Context, arg GetBotChannelConfigParams) (BotChannelConfig, error)

func (*Queries) GetBotChannelConfigByExternalIdentity

func (q *Queries) GetBotChannelConfigByExternalIdentity(ctx context.Context, arg GetBotChannelConfigByExternalIdentityParams) (BotChannelConfig, error)

func (*Queries) GetBotMember

func (q *Queries) GetBotMember(ctx context.Context, arg GetBotMemberParams) (BotMember, error)

func (*Queries) GetBotPreauthKey

func (q *Queries) GetBotPreauthKey(ctx context.Context, token string) (BotPreauthKey, error)

func (*Queries) GetBotStorageBinding

func (q *Queries) GetBotStorageBinding(ctx context.Context, botID pgtype.UUID) (BotStorageBinding, error)

func (*Queries) GetChannelIdentityByChannelSubject

func (q *Queries) GetChannelIdentityByChannelSubject(ctx context.Context, arg GetChannelIdentityByChannelSubjectParams) (ChannelIdentity, error)

func (*Queries) GetChannelIdentityByID

func (q *Queries) GetChannelIdentityByID(ctx context.Context, id pgtype.UUID) (ChannelIdentity, error)

func (*Queries) GetChannelIdentityByIDForUpdate

func (q *Queries) GetChannelIdentityByIDForUpdate(ctx context.Context, id pgtype.UUID) (ChannelIdentity, error)

func (*Queries) GetChatByID

func (q *Queries) GetChatByID(ctx context.Context, id pgtype.UUID) (GetChatByIDRow, error)

func (*Queries) GetChatParticipant

func (q *Queries) GetChatParticipant(ctx context.Context, arg GetChatParticipantParams) (GetChatParticipantRow, error)

func (*Queries) GetChatReadAccessByUser

func (q *Queries) GetChatReadAccessByUser(ctx context.Context, arg GetChatReadAccessByUserParams) (GetChatReadAccessByUserRow, error)

func (*Queries) GetChatRouteByID

func (q *Queries) GetChatRouteByID(ctx context.Context, id pgtype.UUID) (GetChatRouteByIDRow, error)

func (*Queries) GetChatSettings

func (q *Queries) GetChatSettings(ctx context.Context, id pgtype.UUID) (GetChatSettingsRow, error)

func (*Queries) GetContainerByBotID

func (q *Queries) GetContainerByBotID(ctx context.Context, botID pgtype.UUID) (Container, error)

func (*Queries) GetInboxItemByID

func (q *Queries) GetInboxItemByID(ctx context.Context, arg GetInboxItemByIDParams) (BotInbox, error)

func (*Queries) GetLlmProviderByID

func (q *Queries) GetLlmProviderByID(ctx context.Context, id pgtype.UUID) (LlmProvider, error)

func (*Queries) GetLlmProviderByName

func (q *Queries) GetLlmProviderByName(ctx context.Context, name string) (LlmProvider, error)

func (*Queries) GetMCPConnectionByID

func (q *Queries) GetMCPConnectionByID(ctx context.Context, arg GetMCPConnectionByIDParams) (McpConnection, error)

func (*Queries) GetModelByID

func (q *Queries) GetModelByID(ctx context.Context, id pgtype.UUID) (Model, error)

func (*Queries) GetModelByModelID

func (q *Queries) GetModelByModelID(ctx context.Context, modelID string) (Model, error)

func (*Queries) GetScheduleByID

func (q *Queries) GetScheduleByID(ctx context.Context, id pgtype.UUID) (Schedule, error)

func (*Queries) GetSearchProviderByID

func (q *Queries) GetSearchProviderByID(ctx context.Context, id pgtype.UUID) (SearchProvider, error)

func (*Queries) GetSearchProviderByName

func (q *Queries) GetSearchProviderByName(ctx context.Context, name string) (SearchProvider, error)

func (*Queries) GetSettingsByBotID

func (q *Queries) GetSettingsByBotID(ctx context.Context, id pgtype.UUID) (GetSettingsByBotIDRow, error)

func (*Queries) GetSnapshotByContainerAndRuntimeName

func (q *Queries) GetSnapshotByContainerAndRuntimeName(ctx context.Context, arg GetSnapshotByContainerAndRuntimeNameParams) (Snapshot, error)

func (*Queries) GetStorageProviderByID

func (q *Queries) GetStorageProviderByID(ctx context.Context, id pgtype.UUID) (StorageProvider, error)

func (*Queries) GetStorageProviderByName

func (q *Queries) GetStorageProviderByName(ctx context.Context, name string) (StorageProvider, error)

func (*Queries) GetSubagentByBotAndName

func (q *Queries) GetSubagentByBotAndName(ctx context.Context, arg GetSubagentByBotAndNameParams) (Subagent, error)

func (*Queries) GetSubagentByID

func (q *Queries) GetSubagentByID(ctx context.Context, id pgtype.UUID) (Subagent, error)

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, id pgtype.UUID) (User, error)

func (*Queries) GetUserChannelBinding

func (q *Queries) GetUserChannelBinding(ctx context.Context, arg GetUserChannelBindingParams) (UserChannelBinding, error)

func (*Queries) GetVersionSnapshotRuntimeName

func (q *Queries) GetVersionSnapshotRuntimeName(ctx context.Context, arg GetVersionSnapshotRuntimeNameParams) (string, error)

func (*Queries) IncrementScheduleCalls

func (q *Queries) IncrementScheduleCalls(ctx context.Context, id pgtype.UUID) (Schedule, error)

func (*Queries) InsertLifecycleEvent

func (q *Queries) InsertLifecycleEvent(ctx context.Context, arg InsertLifecycleEventParams) error

func (*Queries) InsertVersion

func (q *Queries) InsertVersion(ctx context.Context, arg InsertVersionParams) (ContainerVersion, error)

func (*Queries) ListAccounts

func (q *Queries) ListAccounts(ctx context.Context) ([]User, error)

func (*Queries) ListActiveMessagesSince

func (q *Queries) ListActiveMessagesSince(ctx context.Context, arg ListActiveMessagesSinceParams) ([]ListActiveMessagesSinceRow, error)

func (*Queries) ListAutoStartContainers

func (q *Queries) ListAutoStartContainers(ctx context.Context) ([]Container, error)

func (*Queries) ListBotChannelConfigsByType

func (q *Queries) ListBotChannelConfigsByType(ctx context.Context, channelType string) ([]BotChannelConfig, error)

func (*Queries) ListBotMembers

func (q *Queries) ListBotMembers(ctx context.Context, botID pgtype.UUID) ([]BotMember, error)

func (*Queries) ListBotsByMember

func (q *Queries) ListBotsByMember(ctx context.Context, userID pgtype.UUID) ([]ListBotsByMemberRow, error)

func (*Queries) ListBotsByOwner

func (q *Queries) ListBotsByOwner(ctx context.Context, ownerUserID pgtype.UUID) ([]ListBotsByOwnerRow, error)

func (*Queries) ListChannelIdentitiesByUserID

func (q *Queries) ListChannelIdentitiesByUserID(ctx context.Context, userID pgtype.UUID) ([]ChannelIdentity, error)

func (*Queries) ListChatParticipants

func (q *Queries) ListChatParticipants(ctx context.Context, chatID pgtype.UUID) ([]ListChatParticipantsRow, error)

func (*Queries) ListChatRoutes

func (q *Queries) ListChatRoutes(ctx context.Context, chatID pgtype.UUID) ([]ListChatRoutesRow, error)

func (*Queries) ListChatsByBotAndUser

func (q *Queries) ListChatsByBotAndUser(ctx context.Context, arg ListChatsByBotAndUserParams) ([]ListChatsByBotAndUserRow, error)

func (*Queries) ListEnabledSchedules

func (q *Queries) ListEnabledSchedules(ctx context.Context) ([]Schedule, error)

func (*Queries) ListInboxItems

func (q *Queries) ListInboxItems(ctx context.Context, arg ListInboxItemsParams) ([]BotInbox, error)

func (*Queries) ListLlmProviders

func (q *Queries) ListLlmProviders(ctx context.Context) ([]LlmProvider, error)

func (*Queries) ListMCPConnectionsByBotID

func (q *Queries) ListMCPConnectionsByBotID(ctx context.Context, botID pgtype.UUID) ([]McpConnection, error)

func (*Queries) ListMessageAssets

func (q *Queries) ListMessageAssets(ctx context.Context, messageID pgtype.UUID) ([]ListMessageAssetsRow, error)

func (*Queries) ListMessageAssetsBatch

func (q *Queries) ListMessageAssetsBatch(ctx context.Context, messageIds []pgtype.UUID) ([]ListMessageAssetsBatchRow, error)

func (*Queries) ListMessages

func (q *Queries) ListMessages(ctx context.Context, botID pgtype.UUID) ([]ListMessagesRow, error)

func (*Queries) ListMessagesBefore

func (q *Queries) ListMessagesBefore(ctx context.Context, arg ListMessagesBeforeParams) ([]ListMessagesBeforeRow, error)

func (*Queries) ListMessagesLatest

func (q *Queries) ListMessagesLatest(ctx context.Context, arg ListMessagesLatestParams) ([]ListMessagesLatestRow, error)

func (*Queries) ListMessagesSince

func (q *Queries) ListMessagesSince(ctx context.Context, arg ListMessagesSinceParams) ([]ListMessagesSinceRow, error)

func (*Queries) ListModelVariantsByModelUUID

func (q *Queries) ListModelVariantsByModelUUID(ctx context.Context, modelUuid pgtype.UUID) ([]ModelVariant, error)

func (*Queries) ListModels

func (q *Queries) ListModels(ctx context.Context) ([]Model, error)

func (*Queries) ListModelsByClientType

func (q *Queries) ListModelsByClientType(ctx context.Context, clientType pgtype.Text) ([]Model, error)

func (*Queries) ListModelsByModelID

func (q *Queries) ListModelsByModelID(ctx context.Context, modelID string) ([]Model, error)

func (*Queries) ListModelsByProviderID

func (q *Queries) ListModelsByProviderID(ctx context.Context, llmProviderID pgtype.UUID) ([]Model, error)

func (*Queries) ListModelsByProviderIDAndType

func (q *Queries) ListModelsByProviderIDAndType(ctx context.Context, arg ListModelsByProviderIDAndTypeParams) ([]Model, error)

func (*Queries) ListModelsByType

func (q *Queries) ListModelsByType(ctx context.Context, type_ string) ([]Model, error)

func (*Queries) ListSchedulesByBot

func (q *Queries) ListSchedulesByBot(ctx context.Context, botID pgtype.UUID) ([]Schedule, error)

func (*Queries) ListSearchProviders

func (q *Queries) ListSearchProviders(ctx context.Context) ([]SearchProvider, error)

func (*Queries) ListSearchProvidersByProvider

func (q *Queries) ListSearchProvidersByProvider(ctx context.Context, provider string) ([]SearchProvider, error)

func (*Queries) ListSnapshotsByContainerID

func (q *Queries) ListSnapshotsByContainerID(ctx context.Context, containerID string) ([]Snapshot, error)

func (*Queries) ListSnapshotsWithVersionByContainerID

func (q *Queries) ListSnapshotsWithVersionByContainerID(ctx context.Context, containerID string) ([]ListSnapshotsWithVersionByContainerIDRow, error)

func (*Queries) ListStorageProviders

func (q *Queries) ListStorageProviders(ctx context.Context) ([]StorageProvider, error)

func (*Queries) ListSubagentsByBot

func (q *Queries) ListSubagentsByBot(ctx context.Context, botID pgtype.UUID) ([]Subagent, error)

func (*Queries) ListThreadsByParent

func (q *Queries) ListThreadsByParent(ctx context.Context, id pgtype.UUID) ([]ListThreadsByParentRow, error)

func (*Queries) ListUnreadInboxItems

func (q *Queries) ListUnreadInboxItems(ctx context.Context, arg ListUnreadInboxItemsParams) ([]BotInbox, error)

func (*Queries) ListUserChannelBindingsByPlatform

func (q *Queries) ListUserChannelBindingsByPlatform(ctx context.Context, channelType string) ([]UserChannelBinding, error)

func (*Queries) ListVersionsByContainerID

func (q *Queries) ListVersionsByContainerID(ctx context.Context, containerID string) ([]ListVersionsByContainerIDRow, error)

func (*Queries) MarkBindCodeUsed

func (*Queries) MarkBotPreauthKeyUsed

func (q *Queries) MarkBotPreauthKeyUsed(ctx context.Context, id pgtype.UUID) (BotPreauthKey, error)

func (*Queries) MarkInboxItemsRead

func (q *Queries) MarkInboxItemsRead(ctx context.Context, arg MarkInboxItemsReadParams) error

func (*Queries) NextVersion

func (q *Queries) NextVersion(ctx context.Context, containerID string) (int32, error)

func (*Queries) RemoveChatParticipant

func (q *Queries) RemoveChatParticipant(ctx context.Context, arg RemoveChatParticipantParams) error

func (*Queries) SearchInboxItems

func (q *Queries) SearchInboxItems(ctx context.Context, arg SearchInboxItemsParams) ([]BotInbox, error)

func (*Queries) SetChannelIdentityLinkedUser

func (q *Queries) SetChannelIdentityLinkedUser(ctx context.Context, arg SetChannelIdentityLinkedUserParams) (ChannelIdentity, error)

func (*Queries) SoftDeleteSubagent

func (q *Queries) SoftDeleteSubagent(ctx context.Context, id pgtype.UUID) error

func (*Queries) TouchChat

func (q *Queries) TouchChat(ctx context.Context, chatID pgtype.UUID) error

func (*Queries) UpdateAccountAdmin

func (q *Queries) UpdateAccountAdmin(ctx context.Context, arg UpdateAccountAdminParams) (User, error)

func (*Queries) UpdateAccountLastLogin

func (q *Queries) UpdateAccountLastLogin(ctx context.Context, id pgtype.UUID) (User, error)

func (*Queries) UpdateAccountPassword

func (q *Queries) UpdateAccountPassword(ctx context.Context, arg UpdateAccountPasswordParams) (User, error)

func (*Queries) UpdateAccountProfile

func (q *Queries) UpdateAccountProfile(ctx context.Context, arg UpdateAccountProfileParams) (User, error)

func (*Queries) UpdateBotChannelConfigDisabled

func (q *Queries) UpdateBotChannelConfigDisabled(ctx context.Context, arg UpdateBotChannelConfigDisabledParams) (BotChannelConfig, error)

func (*Queries) UpdateBotOwner

func (q *Queries) UpdateBotOwner(ctx context.Context, arg UpdateBotOwnerParams) (UpdateBotOwnerRow, error)

func (*Queries) UpdateBotProfile

func (q *Queries) UpdateBotProfile(ctx context.Context, arg UpdateBotProfileParams) (UpdateBotProfileRow, error)

func (*Queries) UpdateBotStatus

func (q *Queries) UpdateBotStatus(ctx context.Context, arg UpdateBotStatusParams) error

func (*Queries) UpdateChatRouteMetadata

func (q *Queries) UpdateChatRouteMetadata(ctx context.Context, arg UpdateChatRouteMetadataParams) error

func (*Queries) UpdateChatRouteReplyTarget

func (q *Queries) UpdateChatRouteReplyTarget(ctx context.Context, arg UpdateChatRouteReplyTargetParams) error

func (*Queries) UpdateChatTitle

func (q *Queries) UpdateChatTitle(ctx context.Context, arg UpdateChatTitleParams) (UpdateChatTitleRow, error)

func (*Queries) UpdateContainerStarted

func (q *Queries) UpdateContainerStarted(ctx context.Context, botID pgtype.UUID) error

func (*Queries) UpdateContainerStatus

func (q *Queries) UpdateContainerStatus(ctx context.Context, arg UpdateContainerStatusParams) error

func (*Queries) UpdateContainerStopped

func (q *Queries) UpdateContainerStopped(ctx context.Context, botID pgtype.UUID) error

func (*Queries) UpdateLlmProvider

func (q *Queries) UpdateLlmProvider(ctx context.Context, arg UpdateLlmProviderParams) (LlmProvider, error)

func (*Queries) UpdateMCPConnection

func (q *Queries) UpdateMCPConnection(ctx context.Context, arg UpdateMCPConnectionParams) (McpConnection, error)

func (*Queries) UpdateModel

func (q *Queries) UpdateModel(ctx context.Context, arg UpdateModelParams) (Model, error)

func (*Queries) UpdateModelByModelID

func (q *Queries) UpdateModelByModelID(ctx context.Context, arg UpdateModelByModelIDParams) (Model, error)

func (*Queries) UpdateSchedule

func (q *Queries) UpdateSchedule(ctx context.Context, arg UpdateScheduleParams) (Schedule, error)

func (*Queries) UpdateSearchProvider

func (q *Queries) UpdateSearchProvider(ctx context.Context, arg UpdateSearchProviderParams) (SearchProvider, error)

func (*Queries) UpdateSubagent

func (q *Queries) UpdateSubagent(ctx context.Context, arg UpdateSubagentParams) (Subagent, error)

func (*Queries) UpdateSubagentMessages

func (q *Queries) UpdateSubagentMessages(ctx context.Context, arg UpdateSubagentMessagesParams) (Subagent, error)

func (*Queries) UpdateSubagentMessagesAndUsage

func (q *Queries) UpdateSubagentMessagesAndUsage(ctx context.Context, arg UpdateSubagentMessagesAndUsageParams) (Subagent, error)

func (*Queries) UpdateSubagentSkills

func (q *Queries) UpdateSubagentSkills(ctx context.Context, arg UpdateSubagentSkillsParams) (Subagent, error)

func (*Queries) UpsertAccountByUsername

func (q *Queries) UpsertAccountByUsername(ctx context.Context, arg UpsertAccountByUsernameParams) (User, error)

func (*Queries) UpsertBotChannelConfig

func (q *Queries) UpsertBotChannelConfig(ctx context.Context, arg UpsertBotChannelConfigParams) (BotChannelConfig, error)

func (*Queries) UpsertBotMember

func (q *Queries) UpsertBotMember(ctx context.Context, arg UpsertBotMemberParams) (BotMember, error)

func (*Queries) UpsertBotSettings

func (q *Queries) UpsertBotSettings(ctx context.Context, arg UpsertBotSettingsParams) (UpsertBotSettingsRow, error)

func (*Queries) UpsertBotStorageBinding

func (q *Queries) UpsertBotStorageBinding(ctx context.Context, arg UpsertBotStorageBindingParams) (BotStorageBinding, error)

func (*Queries) UpsertChannelIdentityByChannelSubject

func (q *Queries) UpsertChannelIdentityByChannelSubject(ctx context.Context, arg UpsertChannelIdentityByChannelSubjectParams) (ChannelIdentity, error)

func (*Queries) UpsertChatSettings

func (q *Queries) UpsertChatSettings(ctx context.Context, arg UpsertChatSettingsParams) (UpsertChatSettingsRow, error)

chat_settings

func (*Queries) UpsertContainer

func (q *Queries) UpsertContainer(ctx context.Context, arg UpsertContainerParams) error

func (*Queries) UpsertMCPConnectionByName

func (q *Queries) UpsertMCPConnectionByName(ctx context.Context, arg UpsertMCPConnectionByNameParams) (McpConnection, error)

func (*Queries) UpsertSnapshot

func (q *Queries) UpsertSnapshot(ctx context.Context, arg UpsertSnapshotParams) (Snapshot, error)

func (*Queries) UpsertUserChannelBinding

func (q *Queries) UpsertUserChannelBinding(ctx context.Context, arg UpsertUserChannelBindingParams) (UserChannelBinding, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RemoveChatParticipantParams

type RemoveChatParticipantParams struct {
	ChatID pgtype.UUID `json:"chat_id"`
	UserID pgtype.UUID `json:"user_id"`
}

type Schedule

type Schedule struct {
	ID           pgtype.UUID        `json:"id"`
	Name         string             `json:"name"`
	Description  string             `json:"description"`
	Pattern      string             `json:"pattern"`
	MaxCalls     pgtype.Int4        `json:"max_calls"`
	CurrentCalls int32              `json:"current_calls"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
	UpdatedAt    pgtype.Timestamptz `json:"updated_at"`
	Enabled      bool               `json:"enabled"`
	Command      string             `json:"command"`
	BotID        pgtype.UUID        `json:"bot_id"`
}

type SearchInboxItemsParams

type SearchInboxItemsParams struct {
	BotID       pgtype.UUID        `json:"bot_id"`
	Query       pgtype.Text        `json:"query"`
	StartTime   pgtype.Timestamptz `json:"start_time"`
	EndTime     pgtype.Timestamptz `json:"end_time"`
	IncludeRead pgtype.Bool        `json:"include_read"`
	MaxCount    int32              `json:"max_count"`
}

type SearchProvider

type SearchProvider struct {
	ID        pgtype.UUID        `json:"id"`
	Name      string             `json:"name"`
	Provider  string             `json:"provider"`
	Config    []byte             `json:"config"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type SetChannelIdentityLinkedUserParams

type SetChannelIdentityLinkedUserParams struct {
	ID     pgtype.UUID `json:"id"`
	UserID pgtype.UUID `json:"user_id"`
}

type Snapshot

type Snapshot struct {
	ID                        pgtype.UUID        `json:"id"`
	ContainerID               string             `json:"container_id"`
	RuntimeSnapshotName       string             `json:"runtime_snapshot_name"`
	ParentRuntimeSnapshotName pgtype.Text        `json:"parent_runtime_snapshot_name"`
	Snapshotter               string             `json:"snapshotter"`
	Source                    string             `json:"source"`
	CreatedAt                 pgtype.Timestamptz `json:"created_at"`
}

type StorageProvider

type StorageProvider struct {
	ID        pgtype.UUID        `json:"id"`
	Name      string             `json:"name"`
	Provider  string             `json:"provider"`
	Config    []byte             `json:"config"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type Subagent

type Subagent struct {
	ID          pgtype.UUID        `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
	UpdatedAt   pgtype.Timestamptz `json:"updated_at"`
	Deleted     bool               `json:"deleted"`
	DeletedAt   pgtype.Timestamptz `json:"deleted_at"`
	BotID       pgtype.UUID        `json:"bot_id"`
	Messages    []byte             `json:"messages"`
	Metadata    []byte             `json:"metadata"`
	Skills      []byte             `json:"skills"`
	Usage       []byte             `json:"usage"`
}

type UpdateAccountAdminParams

type UpdateAccountAdminParams struct {
	Role        string      `json:"role"`
	DisplayName pgtype.Text `json:"display_name"`
	AvatarUrl   pgtype.Text `json:"avatar_url"`
	IsActive    bool        `json:"is_active"`
	UserID      pgtype.UUID `json:"user_id"`
}

type UpdateAccountPasswordParams

type UpdateAccountPasswordParams struct {
	ID           pgtype.UUID `json:"id"`
	PasswordHash pgtype.Text `json:"password_hash"`
}

type UpdateAccountProfileParams

type UpdateAccountProfileParams struct {
	ID          pgtype.UUID `json:"id"`
	DisplayName pgtype.Text `json:"display_name"`
	AvatarUrl   pgtype.Text `json:"avatar_url"`
	IsActive    bool        `json:"is_active"`
}

type UpdateBotChannelConfigDisabledParams

type UpdateBotChannelConfigDisabledParams struct {
	BotID       pgtype.UUID `json:"bot_id"`
	ChannelType string      `json:"channel_type"`
	Disabled    bool        `json:"disabled"`
}

type UpdateBotOwnerParams

type UpdateBotOwnerParams struct {
	ID          pgtype.UUID `json:"id"`
	OwnerUserID pgtype.UUID `json:"owner_user_id"`
}

type UpdateBotOwnerRow

type UpdateBotOwnerRow struct {
	ID                 pgtype.UUID        `json:"id"`
	OwnerUserID        pgtype.UUID        `json:"owner_user_id"`
	Type               string             `json:"type"`
	DisplayName        pgtype.Text        `json:"display_name"`
	AvatarUrl          pgtype.Text        `json:"avatar_url"`
	IsActive           bool               `json:"is_active"`
	Status             string             `json:"status"`
	MaxContextLoadTime int32              `json:"max_context_load_time"`
	MaxContextTokens   int32              `json:"max_context_tokens"`
	MaxInboxItems      int32              `json:"max_inbox_items"`
	Language           string             `json:"language"`
	AllowGuest         bool               `json:"allow_guest"`
	ReasoningEnabled   bool               `json:"reasoning_enabled"`
	ReasoningEffort    string             `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID        `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID        `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID        `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID        `json:"search_provider_id"`
	Metadata           []byte             `json:"metadata"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
}

type UpdateBotProfileParams

type UpdateBotProfileParams struct {
	ID          pgtype.UUID `json:"id"`
	DisplayName pgtype.Text `json:"display_name"`
	AvatarUrl   pgtype.Text `json:"avatar_url"`
	IsActive    bool        `json:"is_active"`
	Metadata    []byte      `json:"metadata"`
}

type UpdateBotProfileRow

type UpdateBotProfileRow struct {
	ID                 pgtype.UUID        `json:"id"`
	OwnerUserID        pgtype.UUID        `json:"owner_user_id"`
	Type               string             `json:"type"`
	DisplayName        pgtype.Text        `json:"display_name"`
	AvatarUrl          pgtype.Text        `json:"avatar_url"`
	IsActive           bool               `json:"is_active"`
	Status             string             `json:"status"`
	MaxContextLoadTime int32              `json:"max_context_load_time"`
	MaxContextTokens   int32              `json:"max_context_tokens"`
	MaxInboxItems      int32              `json:"max_inbox_items"`
	Language           string             `json:"language"`
	AllowGuest         bool               `json:"allow_guest"`
	ReasoningEnabled   bool               `json:"reasoning_enabled"`
	ReasoningEffort    string             `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID        `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID        `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID        `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID        `json:"search_provider_id"`
	Metadata           []byte             `json:"metadata"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
}

type UpdateBotStatusParams

type UpdateBotStatusParams struct {
	ID     pgtype.UUID `json:"id"`
	Status string      `json:"status"`
}

type UpdateChatRouteMetadataParams

type UpdateChatRouteMetadataParams struct {
	Metadata []byte      `json:"metadata"`
	ID       pgtype.UUID `json:"id"`
}

type UpdateChatRouteReplyTargetParams

type UpdateChatRouteReplyTargetParams struct {
	ReplyTarget pgtype.Text `json:"reply_target"`
	ID          pgtype.UUID `json:"id"`
}

type UpdateChatTitleParams

type UpdateChatTitleParams struct {
	Title pgtype.Text `json:"title"`
	BotID pgtype.UUID `json:"bot_id"`
}

type UpdateChatTitleRow

type UpdateChatTitleRow struct {
	ID              pgtype.UUID        `json:"id"`
	BotID           pgtype.UUID        `json:"bot_id"`
	Kind            string             `json:"kind"`
	ParentChatID    pgtype.UUID        `json:"parent_chat_id"`
	Title           pgtype.Text        `json:"title"`
	CreatedByUserID pgtype.UUID        `json:"created_by_user_id"`
	Metadata        []byte             `json:"metadata"`
	ModelID         pgtype.Text        `json:"model_id"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `json:"updated_at"`
}

type UpdateContainerStatusParams

type UpdateContainerStatusParams struct {
	Status string      `json:"status"`
	BotID  pgtype.UUID `json:"bot_id"`
}

type UpdateLlmProviderParams

type UpdateLlmProviderParams struct {
	Name     string      `json:"name"`
	BaseUrl  string      `json:"base_url"`
	ApiKey   string      `json:"api_key"`
	Metadata []byte      `json:"metadata"`
	ID       pgtype.UUID `json:"id"`
}

type UpdateMCPConnectionParams

type UpdateMCPConnectionParams struct {
	BotID    pgtype.UUID `json:"bot_id"`
	ID       pgtype.UUID `json:"id"`
	Name     string      `json:"name"`
	Type     string      `json:"type"`
	Config   []byte      `json:"config"`
	IsActive bool        `json:"is_active"`
}

type UpdateModelByModelIDParams

type UpdateModelByModelIDParams struct {
	NewModelID        string      `json:"new_model_id"`
	Name              pgtype.Text `json:"name"`
	LlmProviderID     pgtype.UUID `json:"llm_provider_id"`
	ClientType        pgtype.Text `json:"client_type"`
	Dimensions        pgtype.Int4 `json:"dimensions"`
	InputModalities   []string    `json:"input_modalities"`
	SupportsReasoning bool        `json:"supports_reasoning"`
	Type              string      `json:"type"`
	ModelID           string      `json:"model_id"`
}

type UpdateModelParams

type UpdateModelParams struct {
	ModelID           string      `json:"model_id"`
	Name              pgtype.Text `json:"name"`
	LlmProviderID     pgtype.UUID `json:"llm_provider_id"`
	ClientType        pgtype.Text `json:"client_type"`
	Dimensions        pgtype.Int4 `json:"dimensions"`
	InputModalities   []string    `json:"input_modalities"`
	SupportsReasoning bool        `json:"supports_reasoning"`
	Type              string      `json:"type"`
	ID                pgtype.UUID `json:"id"`
}

type UpdateScheduleParams

type UpdateScheduleParams struct {
	ID          pgtype.UUID `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Pattern     string      `json:"pattern"`
	MaxCalls    pgtype.Int4 `json:"max_calls"`
	Enabled     bool        `json:"enabled"`
	Command     string      `json:"command"`
}

type UpdateSearchProviderParams

type UpdateSearchProviderParams struct {
	Name     string      `json:"name"`
	Provider string      `json:"provider"`
	Config   []byte      `json:"config"`
	ID       pgtype.UUID `json:"id"`
}

type UpdateSubagentMessagesAndUsageParams

type UpdateSubagentMessagesAndUsageParams struct {
	ID       pgtype.UUID `json:"id"`
	Messages []byte      `json:"messages"`
	Usage    []byte      `json:"usage"`
}

type UpdateSubagentMessagesParams

type UpdateSubagentMessagesParams struct {
	ID       pgtype.UUID `json:"id"`
	Messages []byte      `json:"messages"`
}

type UpdateSubagentParams

type UpdateSubagentParams struct {
	ID          pgtype.UUID `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Metadata    []byte      `json:"metadata"`
}

type UpdateSubagentSkillsParams

type UpdateSubagentSkillsParams struct {
	ID     pgtype.UUID `json:"id"`
	Skills []byte      `json:"skills"`
}

type UpsertAccountByUsernameParams

type UpsertAccountByUsernameParams struct {
	UserID       pgtype.UUID `json:"user_id"`
	Username     pgtype.Text `json:"username"`
	Email        pgtype.Text `json:"email"`
	PasswordHash pgtype.Text `json:"password_hash"`
	Role         string      `json:"role"`
	DisplayName  pgtype.Text `json:"display_name"`
	AvatarUrl    pgtype.Text `json:"avatar_url"`
	IsActive     bool        `json:"is_active"`
	DataRoot     pgtype.Text `json:"data_root"`
}

type UpsertBotChannelConfigParams

type UpsertBotChannelConfigParams struct {
	BotID            pgtype.UUID        `json:"bot_id"`
	ChannelType      string             `json:"channel_type"`
	Credentials      []byte             `json:"credentials"`
	ExternalIdentity pgtype.Text        `json:"external_identity"`
	SelfIdentity     []byte             `json:"self_identity"`
	Routing          []byte             `json:"routing"`
	Capabilities     []byte             `json:"capabilities"`
	Disabled         bool               `json:"disabled"`
	VerifiedAt       pgtype.Timestamptz `json:"verified_at"`
}

type UpsertBotMemberParams

type UpsertBotMemberParams struct {
	BotID  pgtype.UUID `json:"bot_id"`
	UserID pgtype.UUID `json:"user_id"`
	Role   string      `json:"role"`
}

type UpsertBotSettingsParams

type UpsertBotSettingsParams struct {
	MaxContextLoadTime int32       `json:"max_context_load_time"`
	MaxContextTokens   int32       `json:"max_context_tokens"`
	MaxInboxItems      int32       `json:"max_inbox_items"`
	Language           string      `json:"language"`
	AllowGuest         bool        `json:"allow_guest"`
	ReasoningEnabled   bool        `json:"reasoning_enabled"`
	ReasoningEffort    string      `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID `json:"search_provider_id"`
	ID                 pgtype.UUID `json:"id"`
}

type UpsertBotSettingsRow

type UpsertBotSettingsRow struct {
	BotID              pgtype.UUID `json:"bot_id"`
	MaxContextLoadTime int32       `json:"max_context_load_time"`
	MaxContextTokens   int32       `json:"max_context_tokens"`
	MaxInboxItems      int32       `json:"max_inbox_items"`
	Language           string      `json:"language"`
	AllowGuest         bool        `json:"allow_guest"`
	ReasoningEnabled   bool        `json:"reasoning_enabled"`
	ReasoningEffort    string      `json:"reasoning_effort"`
	ChatModelID        pgtype.UUID `json:"chat_model_id"`
	MemoryModelID      pgtype.UUID `json:"memory_model_id"`
	EmbeddingModelID   pgtype.UUID `json:"embedding_model_id"`
	SearchProviderID   pgtype.UUID `json:"search_provider_id"`
}

type UpsertBotStorageBindingParams

type UpsertBotStorageBindingParams struct {
	BotID             pgtype.UUID `json:"bot_id"`
	StorageProviderID pgtype.UUID `json:"storage_provider_id"`
	BasePath          string      `json:"base_path"`
}

type UpsertChannelIdentityByChannelSubjectParams

type UpsertChannelIdentityByChannelSubjectParams struct {
	UserID           pgtype.UUID `json:"user_id"`
	ChannelType      string      `json:"channel_type"`
	ChannelSubjectID string      `json:"channel_subject_id"`
	DisplayName      pgtype.Text `json:"display_name"`
	AvatarUrl        pgtype.Text `json:"avatar_url"`
	Metadata         []byte      `json:"metadata"`
}

type UpsertChatSettingsParams

type UpsertChatSettingsParams struct {
	ChatModelID pgtype.UUID `json:"chat_model_id"`
	ID          pgtype.UUID `json:"id"`
}

type UpsertChatSettingsRow

type UpsertChatSettingsRow struct {
	ChatID    pgtype.UUID        `json:"chat_id"`
	ModelID   pgtype.UUID        `json:"model_id"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type UpsertContainerParams

type UpsertContainerParams struct {
	BotID         pgtype.UUID        `json:"bot_id"`
	ContainerID   string             `json:"container_id"`
	ContainerName string             `json:"container_name"`
	Image         string             `json:"image"`
	Status        string             `json:"status"`
	Namespace     string             `json:"namespace"`
	AutoStart     bool               `json:"auto_start"`
	HostPath      pgtype.Text        `json:"host_path"`
	ContainerPath string             `json:"container_path"`
	LastStartedAt pgtype.Timestamptz `json:"last_started_at"`
	LastStoppedAt pgtype.Timestamptz `json:"last_stopped_at"`
}

type UpsertMCPConnectionByNameParams

type UpsertMCPConnectionByNameParams struct {
	BotID  pgtype.UUID `json:"bot_id"`
	Name   string      `json:"name"`
	Type   string      `json:"type"`
	Config []byte      `json:"config"`
}

type UpsertSnapshotParams

type UpsertSnapshotParams struct {
	ContainerID               string      `json:"container_id"`
	RuntimeSnapshotName       string      `json:"runtime_snapshot_name"`
	ParentRuntimeSnapshotName pgtype.Text `json:"parent_runtime_snapshot_name"`
	Snapshotter               string      `json:"snapshotter"`
	Source                    string      `json:"source"`
}

type UpsertUserChannelBindingParams

type UpsertUserChannelBindingParams struct {
	UserID      pgtype.UUID `json:"user_id"`
	ChannelType string      `json:"channel_type"`
	Config      []byte      `json:"config"`
}

type User

type User struct {
	ID           pgtype.UUID        `json:"id"`
	Username     pgtype.Text        `json:"username"`
	Email        pgtype.Text        `json:"email"`
	PasswordHash pgtype.Text        `json:"password_hash"`
	Role         string             `json:"role"`
	DisplayName  pgtype.Text        `json:"display_name"`
	AvatarUrl    pgtype.Text        `json:"avatar_url"`
	DataRoot     pgtype.Text        `json:"data_root"`
	LastLoginAt  pgtype.Timestamptz `json:"last_login_at"`
	IsActive     bool               `json:"is_active"`
	Metadata     []byte             `json:"metadata"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
	UpdatedAt    pgtype.Timestamptz `json:"updated_at"`
}

type UserChannelBinding

type UserChannelBinding struct {
	ID          pgtype.UUID        `json:"id"`
	UserID      pgtype.UUID        `json:"user_id"`
	ChannelType string             `json:"channel_type"`
	Config      []byte             `json:"config"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
	UpdatedAt   pgtype.Timestamptz `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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