// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.30.0

package dbgen

import (
	"context"
	"database/sql"
	"time"
)

type Querier interface {
	AddReaction(ctx context.Context, arg AddReactionParams) error
	AdminUpdateChannel(ctx context.Context, arg AdminUpdateChannelParams) error
	BanUser(ctx context.Context, arg BanUserParams) error
	BlockUser(ctx context.Context, arg BlockUserParams) error
	CleanupExpiredLockouts(ctx context.Context, expiresAt string) error
	ClearAllVoiceStates(ctx context.Context) error
	ClearVoiceState(ctx context.Context, userID int64) error
	CloseDM(ctx context.Context, arg CloseDMParams) error
	CountActiveCameras(ctx context.Context, channelID int64) (int64, error)
	CountActiveInvites(ctx context.Context) (int64, error)
	CountActiveMessages(ctx context.Context) (int64, error)
	CountChannels(ctx context.Context) (int64, error)
	CountUsers(ctx context.Context) (int64, error)
	CountUsersWithoutTOTP(ctx context.Context) (int64, error)
	CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (sql.Result, error)
	CreateAttachment(ctx context.Context, arg CreateAttachmentParams) error
	CreateChannel(ctx context.Context, arg CreateChannelParams) (sql.Result, error)
	CreateInvite(ctx context.Context, arg CreateInviteParams) error
	CreateMessage(ctx context.Context, arg CreateMessageParams) (sql.Result, error)
	CreateUser(ctx context.Context, arg CreateUserParams) (sql.Result, error)
	DeleteChannel(ctx context.Context, id int64) error
	DeleteChannelPermission(ctx context.Context, arg DeleteChannelPermissionParams) error
	DeleteExpiredSessions(ctx context.Context) error
	DeleteLockout(ctx context.Context, key string) error
	DeleteOrphanedAttachments(ctx context.Context, uploadedAt string) ([]string, error)
	DeleteOtherSessions(ctx context.Context, arg DeleteOtherSessionsParams) (sql.Result, error)
	DeleteSessionByID(ctx context.Context, arg DeleteSessionByIDParams) (sql.Result, error)
	DeleteSessionByToken(ctx context.Context, token string) error
	DisablePlugin(ctx context.Context, id int64) error
	EditMessageContent(ctx context.Context, arg EditMessageContentParams) error
	EnableCameraIfUnderLimit(ctx context.Context, arg EnableCameraIfUnderLimitParams) (sql.Result, error)
	EnablePlugin(ctx context.Context, id int64) error
	EvictOldestSessions(ctx context.Context, arg EvictOldestSessionsParams) error
	ForceLogoutUser(ctx context.Context, userID int64) error
	// Auth-hot lookup: returns the token only if it is neither revoked nor expired,
	// so a resolved row is always usable. Matches the sessions never-expiring
	// convention (expires_at IS NULL).
	GetActiveAPIToken(ctx context.Context, tokenHash string) (ApiToken, error)
	GetAllSettings(ctx context.Context) ([]Setting, error)
	GetAllVoiceStates(ctx context.Context) ([]GetAllVoiceStatesRow, error)
	GetAttachmentByID(ctx context.Context, id string) (GetAttachmentByIDRow, error)
	GetAttachmentWithChannel(ctx context.Context, id string) (GetAttachmentWithChannelRow, error)
	GetAuditLog(ctx context.Context, arg GetAuditLogParams) ([]GetAuditLogRow, error)
	GetChannel(ctx context.Context, id int64) (GetChannelRow, error)
	GetChannelPermission(ctx context.Context, arg GetChannelPermissionParams) (GetChannelPermissionRow, error)
	GetChannelUnreadCounts(ctx context.Context, userID int64) ([]GetChannelUnreadCountsRow, error)
	GetChannelVoiceStates(ctx context.Context, channelID int64) ([]GetChannelVoiceStatesRow, error)
	GetDMParticipantIDs(ctx context.Context, channelID int64) ([]int64, error)
	GetEventsSince(ctx context.Context, arg GetEventsSinceParams) ([]GetEventsSinceRow, error)
	GetInvite(ctx context.Context, code string) (GetInviteRow, error)
	GetLatestMessageID(ctx context.Context, channelID int64) (interface{}, error)
	GetMaxEventSeq(ctx context.Context) (int64, error)
	GetMessage(ctx context.Context, id int64) (Message, error)
	GetMessagesForAPI(ctx context.Context, arg GetMessagesForAPIParams) ([]GetMessagesForAPIRow, error)
	// The highest-privilege account (role with the greatest position), used as the
	// default identity for `token create`. FROM is users-only (role position is a
	// correlated subquery, not a join) so the row maps through userFromGen exactly
	// like GetUserByID, so keep this SELECT list identical to GetUserByID's.
	// A :one query already reads a single row via QueryRow, so no LIMIT is needed
	// (and an explicit LIMIT 1 is mis-emitted by sqlc here). ORDER BY puts the
	// highest-position role first, so that first row is the owner.
	GetOwnerUser(ctx context.Context) (User, error)
	GetReactionCounts(ctx context.Context, messageID int64) ([]GetReactionCountsRow, error)
	GetRoleByID(ctx context.Context, id int64) (Role, error)
	GetRoleChannelPermissions(ctx context.Context, roleID int64) ([]GetRoleChannelPermissionsRow, error)
	GetRoleForUser(ctx context.Context, id int64) (Role, error)
	GetSessionByTokenHash(ctx context.Context, token string) (Session, error)
	GetSessionWithBanStatus(ctx context.Context, token string) (GetSessionWithBanStatusRow, error)
	GetSetting(ctx context.Context, key string) (string, error)
	GetUserByID(ctx context.Context, id int64) (User, error)
	GetUserByUsername(ctx context.Context, username string) (User, error)
	GetUserDMChannels(ctx context.Context, arg GetUserDMChannelsParams) ([]GetUserDMChannelsRow, error)
	GetUserSessions(ctx context.Context, userID int64) ([]Session, error)
	GetUserVoiceState(ctx context.Context, userID int64) (GetUserVoiceStateRow, error)
	GetUserWithRole(ctx context.Context, id int64) (GetUserWithRoleRow, error)
	InsertSession(ctx context.Context, arg InsertSessionParams) (sql.Result, error)
	InstallPlugin(ctx context.Context, arg InstallPluginParams) (sql.Result, error)
	IsBlocked(ctx context.Context, arg IsBlockedParams) (int64, error)
	IsDMParticipant(ctx context.Context, arg IsDMParticipantParams) (int64, error)
	IsEitherBlocked(ctx context.Context, arg IsEitherBlockedParams) (int64, error)
	JoinVoiceChannel(ctx context.Context, arg JoinVoiceChannelParams) error
	JoinVoiceChannelIfCapacity(ctx context.Context, arg JoinVoiceChannelIfCapacityParams) (sql.Result, error)
	LeaveVoiceChannel(ctx context.Context, userID int64) error
	LeaveVoiceChannelIfMatch(ctx context.Context, arg LeaveVoiceChannelIfMatchParams) (sql.Result, error)
	// Admin/CLI listing. Never selects token_hash (unrecoverable; only the raw
	// token shown at creation is usable).
	ListAPITokens(ctx context.Context) ([]ListAPITokensRow, error)
	ListAllUsers(ctx context.Context, arg ListAllUsersParams) ([]ListAllUsersRow, error)
	ListBlockedUsers(ctx context.Context, blockerID int64) ([]int64, error)
	ListChannels(ctx context.Context) ([]ListChannelsRow, error)
	ListInvites(ctx context.Context) ([]ListInvitesRow, error)
	ListMembers(ctx context.Context) ([]ListMembersRow, error)
	ListPlugins(ctx context.Context) ([]Plugin, error)
	ListRoles(ctx context.Context) ([]Role, error)
	ListUserSessions(ctx context.Context, userID int64) ([]Session, error)
	LoadActiveLockouts(ctx context.Context, expiresAt string) ([]RateLockout, error)
	LogAudit(ctx context.Context, arg LogAuditParams) error
	OpenDM(ctx context.Context, arg OpenDMParams) error
	// seq is supplied by the hub so the row seq matches the wrapped-payload seq.
	PersistEvent(ctx context.Context, arg PersistEventParams) error
	PluginKVDelete(ctx context.Context, arg PluginKVDeleteParams) error
	PluginKVGet(ctx context.Context, arg PluginKVGetParams) ([]byte, error)
	PluginKVSet(ctx context.Context, arg PluginKVSetParams) error
	PruneEventsOlderThan(ctx context.Context, createdAt time.Time) (int64, error)
	RemoveReaction(ctx context.Context, arg RemoveReactionParams) (sql.Result, error)
	ResetAllUserStatuses(ctx context.Context) error
	RevokeAPIToken(ctx context.Context, id int64) (sql.Result, error)
	RevokeAPITokenByLabel(ctx context.Context, label string) (sql.Result, error)
	RevokeInvite(ctx context.Context, code string) error
	SetChannelSlowMode(ctx context.Context, arg SetChannelSlowModeParams) error
	SetChannelVoiceMaxUsers(ctx context.Context, arg SetChannelVoiceMaxUsersParams) error
	SetMessagePinned(ctx context.Context, arg SetMessagePinnedParams) (sql.Result, error)
	SetSetting(ctx context.Context, arg SetSettingParams) error
	SoftDeleteMessage(ctx context.Context, id int64) error
	TouchAPIToken(ctx context.Context, tokenHash string) error
	TouchSession(ctx context.Context, token string) error
	UnbanUser(ctx context.Context, id int64) error
	UnblockUser(ctx context.Context, arg UnblockUserParams) error
	UninstallPlugin(ctx context.Context, id int64) error
	UpdateChannel(ctx context.Context, arg UpdateChannelParams) error
	UpdateReadState(ctx context.Context, arg UpdateReadStateParams) error
	UpdateUserIdentityKey(ctx context.Context, arg UpdateUserIdentityKeyParams) error
	UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
	UpdateUserProfile(ctx context.Context, arg UpdateUserProfileParams) (sql.Result, error)
	UpdateUserRole(ctx context.Context, arg UpdateUserRoleParams) error
	UpdateUserStatus(ctx context.Context, arg UpdateUserStatusParams) error
	UpdateUserTOTPSecret(ctx context.Context, arg UpdateUserTOTPSecretParams) error
	UpdateVoiceCamera(ctx context.Context, arg UpdateVoiceCameraParams) error
	UpdateVoiceDeafen(ctx context.Context, arg UpdateVoiceDeafenParams) error
	UpdateVoiceMute(ctx context.Context, arg UpdateVoiceMuteParams) error
	UpdateVoiceScreenshare(ctx context.Context, arg UpdateVoiceScreenshareParams) error
	UpsertChannelPermission(ctx context.Context, arg UpsertChannelPermissionParams) error
	UpsertLockout(ctx context.Context, arg UpsertLockoutParams) error
	UseInviteAtomic(ctx context.Context, code string) (sql.Result, error)
	UserCount(ctx context.Context) (int64, error)
}

var _ Querier = (*Queries)(nil)
