store

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAdminEmail    = "admin@example.com"
	DefaultAdminPassword = "changeme1234" // Must be at least 12 characters
	DefaultAdminName     = "Administrator"
)

Default admin credentials

View Source
const (
	DemoAdminEmail    = "demo@example.com"
	DemoAdminPassword = "demo1234demo"
	DemoAdminName     = "Demo Admin"

	DemoEditorEmail    = "editor@example.com"
	DemoEditorPassword = "demo1234demo"
	DemoEditorName     = "Demo Editor"
)

Demo mode credentials

Variables

View Source
var DefaultConfig = []struct {
	Key         string
	Value       string
	Type        string
	Description string
}{
	{Key: model.ConfigKeySiteName, Value: "Opossum CMS", Type: model.ConfigTypeString, Description: "The name of your site"},
	{Key: model.ConfigKeySiteDescription, Value: "", Type: model.ConfigTypeString, Description: "A short description of your site"},
	{Key: model.ConfigKeyAdminEmail, Value: "admin@example.com", Type: model.ConfigTypeString, Description: "Administrator email address"},
	{Key: model.ConfigKeyPostsPerPage, Value: "10", Type: model.ConfigTypeInt, Description: "Number of posts to display per page"},
	{Key: model.ConfigKeyPoweredBy, Value: "Powered by oCMS", Type: model.ConfigTypeString, Description: "Footer powered by text"},
	{Key: model.ConfigKeyCopyright, Value: "", Type: model.ConfigTypeString, Description: "Footer copyright text (leave empty for automatic)"},
}

DefaultConfig holds default configuration values.

View Source
var DefaultMenus = []struct {
	Name string
	Slug string
}{
	{Name: "Main Menu", Slug: model.MenuMain},
	{Name: "Footer Menu", Slug: model.MenuFooter},
}

DefaultMenus holds default menu definitions.

Functions

func HasDefaultAdminCredentials added in v0.9.0

func HasDefaultAdminCredentials(ctx context.Context, queries *Queries) (bool, error)

HasDefaultAdminCredentials returns true when the seeded default admin credentials are still valid for the default admin account.

func IsMissingAPIKeySourceStateTableError added in v0.9.0

func IsMissingAPIKeySourceStateTableError(err error) bool

IsMissingAPIKeySourceStateTableError reports whether err indicates the api_key_source_state table is missing in the database.

func IsSQLiteBusy added in v0.32.0

func IsSQLiteBusy(err error) bool

IsSQLiteBusy matches SQLite BUSY and LOCKED, including extended codes.

func Migrate

func Migrate(db *sql.DB) error

Migrate runs all pending database migrations.

func NewDB

func NewDB(path string) (*sql.DB, error)

NewDB opens a SQLite database connection and configures it for optimal performance.

func NewDBWithConfig

func NewDBWithConfig(path string, cfg DBConfig) (*sql.DB, error)

NewDBWithConfig opens a SQLite database connection with custom configuration.

func RotateDefaultAdminPassword added in v0.21.0

func RotateDefaultAdminPassword(ctx context.Context, db *sql.DB) (string, error)

RotateDefaultAdminPassword rotates the seeded default admin password and returns the new password. Rotation only occurs when OCMS_DEMO_MODE=true, the default admin account exists, and its stored hash still authenticates DefaultAdminPassword — so an operator who has rotated the account to a real credential is never silently overwritten on restart.

The production startup audit refuses to boot when default admin credentials are still active; demo deploys seed those credentials on every boot, so this rotation runs ahead of the audit to clear them in place. The returned password is intentionally not logged — the demo's public credentials are DemoAdminEmail / DemoEditorEmail.

func RotateDemoAdminPassword added in v0.18.1

func RotateDemoAdminPassword(ctx context.Context, db *sql.DB) (string, error)

RotateDemoAdminPassword rotates the demo admin password and returns the new password. Rotation only occurs when OCMS_DEMO_MODE=true and the demo admin account exists.

func RunMigrationCommand added in v0.29.0

func RunMigrationCommand(ctx context.Context, db *sql.DB, command string, args ...string) error

RunMigrationCommand runs a goose command (up, down, status, version) over the embedded SQL migrations and the Go migrations registered by this package, which goose's own CLI does not know.

func Seed

func Seed(ctx context.Context, db *sql.DB, doSeed bool) error

Seed creates initial data in the database if doSeed is true, with the documented default admin password. When doSeed is false, seeding is skipped to prevent automatic recreation of deleted data (e.g., default admin user) on application restart.

func SeedDemo added in v0.6.0

func SeedDemo(ctx context.Context, db *sql.DB) error

SeedDemo creates demo content for showcasing oCMS functionality. This is called after the regular Seed() when OCMS_DEMO_MODE=true.

func SeedDemoInformerSettings added in v0.7.0

func SeedDemoInformerSettings(db *sql.DB) error

SeedDemoInformerSettings enables the informer bar with demo credentials. Must be called after module initialization (informer module creates the table).

The password is NOT baked into the banner HTML. The banner's JS fetches the current password from /api/informer/demo-credentials at page-view time so it always matches the live DB hash, even after cold-start rotations.

func SeedWithAdminPassword added in v0.32.0

func SeedWithAdminPassword(ctx context.Context, db *sql.DB, doSeed bool, adminPassword string) error

SeedWithAdminPassword is Seed with the password of the created admin; an empty password means DefaultAdminPassword.

Types

type APIKeySourceState added in v0.9.0

type APIKeySourceState struct {
	APIKeyID   int64
	LastIP     string
	LastSeenAt time.Time
	UpdatedAt  time.Time
}

APIKeySourceState stores persisted API key source observation state.

type AddCategoryToPageParams

type AddCategoryToPageParams struct {
	PageID     int64 `json:"page_id"`
	CategoryID int64 `json:"category_id"`
}

type AddTagToPageParams

type AddTagToPageParams struct {
	PageID int64 `json:"page_id"`
	TagID  int64 `json:"tag_id"`
}

type AdvancePageRevisionParams added in v0.32.0

type AdvancePageRevisionParams struct {
	ID       int64 `json:"id"`
	Revision int64 `json:"revision"`
}

type AdvanceUserTOTPStepParams added in v0.30.0

type AdvanceUserTOTPStepParams struct {
	Step   int64        `json:"step"`
	UsedAt sql.NullTime `json:"used_at"`
	UserID int64        `json:"user_id"`
}

type AliasExistsExcludingPageParams

type AliasExistsExcludingPageParams struct {
	Alias  string `json:"alias"`
	PageID int64  `json:"page_id"`
}

type ApiKey

type ApiKey struct {
	ID          int64          `json:"id"`
	Name        string         `json:"name"`
	KeyHash     string         `json:"key_hash"`
	KeyPrefix   string         `json:"key_prefix"`
	Permissions string         `json:"permissions"`
	LastUsedAt  sql.NullTime   `json:"last_used_at"`
	ExpiresAt   sql.NullTime   `json:"expires_at"`
	IsActive    bool           `json:"is_active"`
	CreatedBy   int64          `json:"created_by"`
	CreatedAt   time.Time      `json:"created_at"`
	UpdatedAt   time.Time      `json:"updated_at"`
	KeyLookup   sql.NullString `json:"key_lookup"`
}

type ApiKeySourceCidr added in v0.11.0

type ApiKeySourceCidr struct {
	ID        int64     `json:"id"`
	ApiKeyID  int64     `json:"api_key_id"`
	Cidr      string    `json:"cidr"`
	CreatedAt time.Time `json:"created_at"`
}

type ApiKeySourceState added in v0.11.0

type ApiKeySourceState struct {
	ApiKeyID   int64     `json:"api_key_id"`
	LastIp     string    `json:"last_ip"`
	LastSeenAt time.Time `json:"last_seen_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type BumpUserSessionVersionParams added in v0.30.0

type BumpUserSessionVersionParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type CanExchangeCodeForDCRClientParams added in v0.32.0

type CanExchangeCodeForDCRClientParams struct {
	ClientID string `json:"client_id"`
	Now      int64  `json:"now"`
	CodeHash string `json:"code_hash"`
}

type Category

type Category struct {
	ID           int64          `json:"id"`
	Name         string         `json:"name"`
	Slug         string         `json:"slug"`
	Description  sql.NullString `json:"description"`
	ParentID     sql.NullInt64  `json:"parent_id"`
	Position     int64          `json:"position"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
	LanguageCode string         `json:"language_code"`
}

type CategorySlugExistsExcludingForLanguageParams

type CategorySlugExistsExcludingForLanguageParams struct {
	Slug         string `json:"slug"`
	ID           int64  `json:"id"`
	LanguageCode string `json:"language_code"`
}

type CategorySlugExistsExcludingParams

type CategorySlugExistsExcludingParams struct {
	Slug string `json:"slug"`
	ID   int64  `json:"id"`
}

type CategorySlugExistsForLanguageParams

type CategorySlugExistsForLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type CheckClaimParams added in v0.32.0

type CheckClaimParams struct {
	ProvenanceID int64         `json:"provenance_id"`
	ClaimIndex   int64         `json:"claim_index"`
	CheckedBy    sql.NullInt64 `json:"checked_by"`
	CheckedAt    int64         `json:"checked_at"`
}

type ClaimsCheck added in v0.32.0

type ClaimsCheck struct {
	ProvenanceID int64         `json:"provenance_id"`
	ClaimIndex   int64         `json:"claim_index"`
	CheckedBy    sql.NullInt64 `json:"checked_by"`
	CheckedAt    int64         `json:"checked_at"`
}

type CleanupStaleLoginProtectionParams added in v0.20.0

type CleanupStaleLoginProtectionParams struct {
	LockedUntil   sql.NullTime `json:"locked_until"`
	FirstFailedAt time.Time    `json:"first_failed_at"`
}

type ClearPageFeaturedImageParams

type ClearPageFeaturedImageParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type ClearPageScheduledAtParams

type ClearPageScheduledAtParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type CompactPrunedRevisionReplaysParams added in v0.32.0

type CompactPrunedRevisionReplaysParams struct {
	EntityID       int64 `json:"entity_id"`
	EntityRevision int64 `json:"entity_revision"`
}

type Config

type Config struct {
	Key          string        `json:"key"`
	Value        string        `json:"value"`
	Type         string        `json:"type"`
	Description  string        `json:"description"`
	UpdatedAt    time.Time     `json:"updated_at"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
	LanguageCode string        `json:"language_code"`
}

type ConfigTranslation

type ConfigTranslation struct {
	ID         int64         `json:"id"`
	ConfigKey  string        `json:"config_key"`
	LanguageID int64         `json:"language_id"`
	Value      string        `json:"value"`
	UpdatedAt  time.Time     `json:"updated_at"`
	UpdatedBy  sql.NullInt64 `json:"updated_by"`
}

type ConsumeOAuthCodeParams added in v0.32.0

type ConsumeOAuthCodeParams struct {
	ConsumedAt int64  `json:"consumed_at"`
	CodeHash   string `json:"code_hash"`
}

type ConsumeOAuthRefreshParams added in v0.32.0

type ConsumeOAuthRefreshParams struct {
	RefreshUsedAt   int64  `json:"refresh_used_at"`
	AccessRevokedAt int64  `json:"access_revoked_at"`
	ID              string `json:"id"`
}

type ContentProvenance added in v0.32.0

type ContentProvenance struct {
	ID            int64         `json:"id"`
	PageID        int64         `json:"page_id"`
	Revision      int64         `json:"revision"`
	UserID        sql.NullInt64 `json:"user_id"`
	Source        string        `json:"source"`
	ApiKeyID      sql.NullInt64 `json:"api_key_id"`
	OauthGrantID  string        `json:"oauth_grant_id"`
	OauthClientID string        `json:"oauth_client_id"`
	Transport     string        `json:"transport"`
	ValidatedJson string        `json:"validated_json"`
	ReportedJson  string        `json:"reported_json"`
	CreatedAt     time.Time     `json:"created_at"`
}

type ConvertMenuItemToURLParams added in v0.23.0

type ConvertMenuItemToURLParams struct {
	Url       sql.NullString `json:"url"`
	UpdatedAt time.Time      `json:"updated_at"`
	ID        int64          `json:"id"`
}

type CountActivePreviewLinksParams added in v0.32.0

type CountActivePreviewLinksParams struct {
	CreatedBy   int64 `json:"created_by"`
	ExpiresAt   int64 `json:"expires_at"`
	AgentIssued bool  `json:"agent_issued"`
}

type CountDeliveriesByStatusParams

type CountDeliveriesByStatusParams struct {
	WebhookID int64  `json:"webhook_id"`
	Status    string `json:"status"`
}

type CountEventsByLevelAndCategoryParams

type CountEventsByLevelAndCategoryParams struct {
	Level    string `json:"level"`
	Category string `json:"category"`
}

type CountExpiredEventsParams added in v0.32.0

type CountExpiredEventsParams struct {
	Messages   string `json:"messages"`
	Category   string `json:"category"`
	Cutoff     string `json:"cutoff"`
	CountLimit int64  `json:"count_limit"`
}

type CountIssuedPreviewLinksParams added in v0.32.0

type CountIssuedPreviewLinksParams struct {
	CreatedBy   int64 `json:"created_by"`
	CreatedAt   int64 `json:"created_at"`
	AgentIssued bool  `json:"agent_issued"`
}

type CountOwnAIDraftsParams added in v0.32.0

type CountOwnAIDraftsParams struct {
	UserID       int64       `json:"user_id"`
	LanguageCode interface{} `json:"language_code"`
}

type CountPagesByLanguageAndStatusParams

type CountPagesByLanguageAndStatusParams struct {
	LanguageCode string `json:"language_code"`
	Status       string `json:"status"`
}

type CountPagesEmbeddingMediaUUIDParams added in v0.23.0

type CountPagesEmbeddingMediaUUIDParams struct {
	StorageDir sql.NullString `json:"storage_dir"`
	MediaUuid  sql.NullString `json:"media_uuid"`
}

type CountPagesInLanguageParams added in v0.32.0

type CountPagesInLanguageParams struct {
	LanguageCode string      `json:"language_code"`
	Status       interface{} `json:"status"`
	CategoryID   interface{} `json:"category_id"`
	TagID        interface{} `json:"tag_id"`
}

type CountPagesUsingMediaParams added in v0.23.0

type CountPagesUsingMediaParams struct {
	FeaturedImageID sql.NullInt64 `json:"featured_image_id"`
	OgImageID       sql.NullInt64 `json:"og_image_id"`
}

type CountPublishedPagesByCategoryAndLanguageParams

type CountPublishedPagesByCategoryAndLanguageParams struct {
	CategoryID   int64  `json:"category_id"`
	LanguageCode string `json:"language_code"`
}

type CountPublishedPagesForTagAndLanguageParams

type CountPublishedPagesForTagAndLanguageParams struct {
	TagID        int64  `json:"tag_id"`
	LanguageCode string `json:"language_code"`
}

type CountRecentDraftMutationsParams added in v0.32.0

type CountRecentDraftMutationsParams struct {
	UserID int64     `json:"user_id"`
	Since  time.Time `json:"since"`
}

type CountSearchMediaParams added in v0.25.0

type CountSearchMediaParams struct {
	Filename string         `json:"filename"`
	Alt      sql.NullString `json:"alt"`
}

type CountSearchPagesByLanguageParams

type CountSearchPagesByLanguageParams struct {
	LanguageCode string `json:"language_code"`
	Title        string `json:"title"`
	Body         string `json:"body"`
	Slug         string `json:"slug"`
}

type CountSearchPagesByStatusParams

type CountSearchPagesByStatusParams struct {
	Status string `json:"status"`
	Title  string `json:"title"`
	Body   string `json:"body"`
	Slug   string `json:"slug"`
}

type CountSearchPagesParams

type CountSearchPagesParams struct {
	Title string `json:"title"`
	Body  string `json:"body"`
	Slug  string `json:"slug"`
}

type CountTranslationsForEntityParams

type CountTranslationsForEntityParams struct {
	EntityType string `json:"entity_type"`
	EntityID   int64  `json:"entity_id"`
}

type CreateAPIKeyParams

type CreateAPIKeyParams struct {
	Name        string         `json:"name"`
	KeyHash     string         `json:"key_hash"`
	KeyPrefix   string         `json:"key_prefix"`
	KeyLookup   sql.NullString `json:"key_lookup"`
	Permissions string         `json:"permissions"`
	ExpiresAt   sql.NullTime   `json:"expires_at"`
	IsActive    bool           `json:"is_active"`
	CreatedBy   int64          `json:"created_by"`
	CreatedAt   time.Time      `json:"created_at"`
	UpdatedAt   time.Time      `json:"updated_at"`
}

type CreateCategoryParams

type CreateCategoryParams struct {
	Name         string         `json:"name"`
	Slug         string         `json:"slug"`
	Description  sql.NullString `json:"description"`
	ParentID     sql.NullInt64  `json:"parent_id"`
	Position     int64          `json:"position"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

type CreateCompletePageVersionParams added in v0.32.0

type CreateCompletePageVersionParams struct {
	PageID       int64          `json:"page_id"`
	Title        string         `json:"title"`
	Body         string         `json:"body"`
	ChangedBy    int64          `json:"changed_by"`
	CreatedAt    time.Time      `json:"created_at"`
	Revision     sql.NullInt64  `json:"revision"`
	SnapshotJson sql.NullString `json:"snapshot_json"`
}

type CreateContentProvenanceParams added in v0.32.0

type CreateContentProvenanceParams struct {
	PageID        int64         `json:"page_id"`
	Revision      int64         `json:"revision"`
	UserID        sql.NullInt64 `json:"user_id"`
	Source        string        `json:"source"`
	ApiKeyID      sql.NullInt64 `json:"api_key_id"`
	OauthGrantID  string        `json:"oauth_grant_id"`
	OauthClientID string        `json:"oauth_client_id"`
	Transport     string        `json:"transport"`
	ValidatedJson string        `json:"validated_json"`
	ReportedJson  string        `json:"reported_json"`
	CreatedAt     time.Time     `json:"created_at"`
}

type CreateEventParams

type CreateEventParams struct {
	Level      string        `json:"level"`
	Category   string        `json:"category"`
	Message    string        `json:"message"`
	UserID     sql.NullInt64 `json:"user_id"`
	Metadata   string        `json:"metadata"`
	IpAddress  string        `json:"ip_address"`
	RequestUrl string        `json:"request_url"`
	CreatedAt  time.Time     `json:"created_at"`
}

type CreateFormFieldParams

type CreateFormFieldParams struct {
	FormID       int64          `json:"form_id"`
	Type         string         `json:"type"`
	Name         string         `json:"name"`
	Label        string         `json:"label"`
	Placeholder  sql.NullString `json:"placeholder"`
	HelpText     sql.NullString `json:"help_text"`
	Options      sql.NullString `json:"options"`
	Validation   sql.NullString `json:"validation"`
	IsRequired   bool           `json:"is_required"`
	Position     int64          `json:"position"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

type CreateFormParams

type CreateFormParams struct {
	Name           string         `json:"name"`
	Slug           string         `json:"slug"`
	Title          string         `json:"title"`
	Description    sql.NullString `json:"description"`
	SuccessMessage sql.NullString `json:"success_message"`
	EmailTo        sql.NullString `json:"email_to"`
	IsActive       bool           `json:"is_active"`
	LanguageCode   string         `json:"language_code"`
	CreatedAt      time.Time      `json:"created_at"`
	UpdatedAt      time.Time      `json:"updated_at"`
}

type CreateFormSubmissionParams

type CreateFormSubmissionParams struct {
	FormID       int64          `json:"form_id"`
	Data         string         `json:"data"`
	IpAddress    sql.NullString `json:"ip_address"`
	UserAgent    sql.NullString `json:"user_agent"`
	IsRead       bool           `json:"is_read"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
}

type CreateIdempotencyKeyParams added in v0.32.0

type CreateIdempotencyKeyParams struct {
	UserID         int64          `json:"user_id"`
	Tool           string         `json:"tool"`
	RequestID      string         `json:"request_id"`
	RequestHash    string         `json:"request_hash"`
	ResultJson     sql.NullString `json:"result_json"`
	EntityType     string         `json:"entity_type"`
	EntityID       int64          `json:"entity_id"`
	EntityRevision int64          `json:"entity_revision"`
	CreatedAt      time.Time      `json:"created_at"`
}

type CreateLanguageParams

type CreateLanguageParams struct {
	Code       string    `json:"code"`
	Name       string    `json:"name"`
	NativeName string    `json:"native_name"`
	IsDefault  bool      `json:"is_default"`
	IsActive   bool      `json:"is_active"`
	Direction  string    `json:"direction"`
	Position   int64     `json:"position"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type CreateMediaFolderParams

type CreateMediaFolderParams struct {
	Name      string        `json:"name"`
	ParentID  sql.NullInt64 `json:"parent_id"`
	Position  int64         `json:"position"`
	CreatedAt time.Time     `json:"created_at"`
}

type CreateMediaParams

type CreateMediaParams struct {
	Uuid         string         `json:"uuid"`
	Filename     string         `json:"filename"`
	MimeType     string         `json:"mime_type"`
	Size         int64          `json:"size"`
	Width        sql.NullInt64  `json:"width"`
	Height       sql.NullInt64  `json:"height"`
	Alt          sql.NullString `json:"alt"`
	Caption      sql.NullString `json:"caption"`
	FolderID     sql.NullInt64  `json:"folder_id"`
	UploadedBy   int64          `json:"uploaded_by"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

type CreateMediaVariantParams

type CreateMediaVariantParams struct {
	MediaID   int64     `json:"media_id"`
	Type      string    `json:"type"`
	Width     int64     `json:"width"`
	Height    int64     `json:"height"`
	Size      int64     `json:"size"`
	CreatedAt time.Time `json:"created_at"`
}

type CreateMenuItemParams

type CreateMenuItemParams struct {
	MenuID    int64          `json:"menu_id"`
	ParentID  sql.NullInt64  `json:"parent_id"`
	Title     string         `json:"title"`
	Url       sql.NullString `json:"url"`
	Target    sql.NullString `json:"target"`
	PageID    sql.NullInt64  `json:"page_id"`
	Position  int64          `json:"position"`
	CssClass  sql.NullString `json:"css_class"`
	IsActive  bool           `json:"is_active"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
}

type CreateMenuParams

type CreateMenuParams struct {
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	LanguageCode string    `json:"language_code"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type CreateOAuthCodeParams added in v0.32.0

type CreateOAuthCodeParams struct {
	CodeHash    string `json:"code_hash"`
	GrantID     string `json:"grant_id"`
	RedirectUri string `json:"redirect_uri"`
	Challenge   string `json:"challenge"`
	CreatedAt   int64  `json:"created_at"`
	ExpiresAt   int64  `json:"expires_at"`
}

type CreateOAuthGrantParams added in v0.32.0

type CreateOAuthGrantParams struct {
	ID             string `json:"id"`
	UserID         int64  `json:"user_id"`
	ClientID       string `json:"client_id"`
	Scopes         string `json:"scopes"`
	Resource       string `json:"resource"`
	SessionVersion int64  `json:"session_version"`
	CreatedAt      int64  `json:"created_at"`
	ExpiresAt      int64  `json:"expires_at"`
}

type CreateOAuthTokenParams added in v0.32.0

type CreateOAuthTokenParams struct {
	ID              string `json:"id"`
	GrantID         string `json:"grant_id"`
	AccessHash      string `json:"access_hash"`
	RefreshHash     string `json:"refresh_hash"`
	Scopes          string `json:"scopes"`
	CreatedAt       int64  `json:"created_at"`
	AccessExpiresAt int64  `json:"access_expires_at"`
}

type CreatePageAliasParams

type CreatePageAliasParams struct {
	PageID    int64     `json:"page_id"`
	Alias     string    `json:"alias"`
	CreatedAt time.Time `json:"created_at"`
}

type CreatePageParams

type CreatePageParams struct {
	Title             string        `json:"title"`
	Slug              string        `json:"slug"`
	Body              string        `json:"body"`
	Summary           string        `json:"summary"`
	Status            string        `json:"status"`
	AuthorID          int64         `json:"author_id"`
	FeaturedImageID   sql.NullInt64 `json:"featured_image_id"`
	MetaTitle         string        `json:"meta_title"`
	MetaDescription   string        `json:"meta_description"`
	MetaKeywords      string        `json:"meta_keywords"`
	OgImageID         sql.NullInt64 `json:"og_image_id"`
	NoIndex           int64         `json:"no_index"`
	NoFollow          int64         `json:"no_follow"`
	CanonicalUrl      string        `json:"canonical_url"`
	ScheduledAt       sql.NullTime  `json:"scheduled_at"`
	LanguageCode      string        `json:"language_code"`
	HideFeaturedImage int64         `json:"hide_featured_image"`
	PageType          string        `json:"page_type"`
	ExcludeFromLists  int64         `json:"exclude_from_lists"`
	PublishedAt       sql.NullTime  `json:"published_at"`
	CreatedAt         time.Time     `json:"created_at"`
	UpdatedAt         time.Time     `json:"updated_at"`
	VideoUrl          string        `json:"video_url"`
	VideoTitle        string        `json:"video_title"`
}

type CreatePageVersionParams

type CreatePageVersionParams struct {
	PageID    int64     `json:"page_id"`
	Title     string    `json:"title"`
	Body      string    `json:"body"`
	ChangedBy int64     `json:"changed_by"`
	CreatedAt time.Time `json:"created_at"`
}

type CreatePreviewLinkParams added in v0.32.0

type CreatePreviewLinkParams struct {
	TokenHash      string         `json:"token_hash"`
	PageID         int64          `json:"page_id"`
	Revision       int64          `json:"revision"`
	CreatedBy      int64          `json:"created_by"`
	SessionVersion int64          `json:"session_version"`
	IssuingGrantID sql.NullString `json:"issuing_grant_id"`
	IssuingKeyID   sql.NullInt64  `json:"issuing_key_id"`
	CreatedAt      int64          `json:"created_at"`
	ExpiresAt      int64          `json:"expires_at"`
}

type CreateRecoveryCodeParams added in v0.30.0

type CreateRecoveryCodeParams struct {
	UserID    int64     `json:"user_id"`
	CodeHash  string    `json:"code_hash"`
	CreatedAt time.Time `json:"created_at"`
}

type CreateRedirectParams added in v0.5.0

type CreateRedirectParams struct {
	SourcePath string    `json:"source_path"`
	TargetUrl  string    `json:"target_url"`
	StatusCode int64     `json:"status_code"`
	IsWildcard bool      `json:"is_wildcard"`
	TargetType string    `json:"target_type"`
	Enabled    bool      `json:"enabled"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type CreateScheduledTaskParams added in v0.8.0

type CreateScheduledTaskParams struct {
	Name           string        `json:"name"`
	Url            string        `json:"url"`
	Schedule       string        `json:"schedule"`
	IsActive       int64         `json:"is_active"`
	TimeoutSeconds int64         `json:"timeout_seconds"`
	CreatedBy      sql.NullInt64 `json:"created_by"`
	CreatedAt      time.Time     `json:"created_at"`
	UpdatedAt      time.Time     `json:"updated_at"`
}

type CreateScheduledTaskRunParams added in v0.8.0

type CreateScheduledTaskRunParams struct {
	TaskID    int64     `json:"task_id"`
	StartedAt time.Time `json:"started_at"`
}

type CreateTagParams

type CreateTagParams struct {
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	LanguageCode string    `json:"language_code"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type CreateTranslationParams

type CreateTranslationParams struct {
	EntityType    string    `json:"entity_type"`
	EntityID      int64     `json:"entity_id"`
	LanguageID    int64     `json:"language_id"`
	TranslationID int64     `json:"translation_id"`
	CreatedAt     time.Time `json:"created_at"`
}

type CreateUserParams

type CreateUserParams struct {
	Email        string    `json:"email"`
	PasswordHash string    `json:"password_hash"`
	Role         string    `json:"role"`
	Name         string    `json:"name"`
	Avatar       string    `json:"avatar"`
	Bio          string    `json:"bio"`
	WebsiteUrl   string    `json:"website_url"`
	LinkedinUrl  string    `json:"linkedin_url"`
	GithubUrl    string    `json:"github_url"`
	TelegramUrl  string    `json:"telegram_url"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type CreateWebhookDeliveryParams

type CreateWebhookDeliveryParams struct {
	WebhookID int64     `json:"webhook_id"`
	Event     string    `json:"event"`
	Payload   string    `json:"payload"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type CreateWebhookParams

type CreateWebhookParams struct {
	Name      string    `json:"name"`
	Url       string    `json:"url"`
	Secret    string    `json:"secret"`
	Events    string    `json:"events"`
	IsActive  bool      `json:"is_active"`
	Headers   string    `json:"headers"`
	CreatedBy int64     `json:"created_by"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type CreateWidgetParams

type CreateWidgetParams struct {
	Theme        string         `json:"theme"`
	Area         string         `json:"area"`
	WidgetType   string         `json:"widget_type"`
	Title        sql.NullString `json:"title"`
	Content      sql.NullString `json:"content"`
	Settings     sql.NullString `json:"settings"`
	Position     int64          `json:"position"`
	IsActive     int64          `json:"is_active"`
	LanguageCode string         `json:"language_code"`
}

type DBConfig

type DBConfig struct {
	// MaxOpenConns is the maximum number of open connections to the database.
	// For SQLite, this is typically 1 for writes but can be higher for reads with WAL mode.
	MaxOpenConns int
	// MaxIdleConns is the maximum number of connections in the idle connection pool.
	MaxIdleConns int
	// ConnMaxLifetime is the maximum amount of time a connection may be reused.
	ConnMaxLifetime time.Duration
	// ConnMaxIdleTime is the maximum amount of time a connection may be idle.
	ConnMaxIdleTime time.Duration
}

DBConfig holds database configuration options.

func DefaultDBConfig

func DefaultDBConfig() DBConfig

DefaultDBConfig returns sensible defaults for SQLite.

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeactivateAPIKeyParams

type DeactivateAPIKeyParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type DeleteConfigTranslationParams

type DeleteConfigTranslationParams struct {
	ConfigKey  string `json:"config_key"`
	LanguageID int64  `json:"language_id"`
}

type DeleteEditorialPresetOverrideParams added in v0.32.0

type DeleteEditorialPresetOverrideParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type DeleteExpiredEventsParams added in v0.32.0

type DeleteExpiredEventsParams struct {
	Messages   string `json:"messages"`
	Category   string `json:"category"`
	Cutoff     string `json:"cutoff"`
	BatchLimit int64  `json:"batch_limit"`
}

type DeleteMediaTranslationParams

type DeleteMediaTranslationParams struct {
	MediaID    int64 `json:"media_id"`
	LanguageID int64 `json:"language_id"`
}

type DeleteOldTaskRunsParams added in v0.8.0

type DeleteOldTaskRunsParams struct {
	TaskID    int64     `json:"task_id"`
	StartedAt time.Time `json:"started_at"`
}

type DeletePrunedContentProvenanceParams added in v0.32.0

type DeletePrunedContentProvenanceParams struct {
	PageID   int64 `json:"page_id"`
	Revision int64 `json:"revision"`
}

type DeleteRetainedOAuthClientsParams added in v0.32.0

type DeleteRetainedOAuthClientsParams struct {
	Cutoff     int64 `json:"cutoff"`
	BatchLimit int64 `json:"batch_limit"`
}

type DeleteRetainedOAuthCodesParams added in v0.32.0

type DeleteRetainedOAuthCodesParams struct {
	Cutoff     int64 `json:"cutoff"`
	BatchLimit int64 `json:"batch_limit"`
}

type DeleteRetiredOAuthGrantsParams added in v0.32.0

type DeleteRetiredOAuthGrantsParams struct {
	Cutoff     int64 `json:"cutoff"`
	BatchLimit int64 `json:"batch_limit"`
}

type DeleteRetiredOAuthPreviewsParams added in v0.32.0

type DeleteRetiredOAuthPreviewsParams struct {
	Cutoff     int64 `json:"cutoff"`
	BatchLimit int64 `json:"batch_limit"`
}

type DeleteRetiredOAuthTokensParams added in v0.32.0

type DeleteRetiredOAuthTokensParams struct {
	Cutoff     int64 `json:"cutoff"`
	BatchLimit int64 `json:"batch_limit"`
}

type DeleteSchedulerOverrideParams added in v0.9.0

type DeleteSchedulerOverrideParams struct {
	Source string `json:"source"`
	Name   string `json:"name"`
}

type DeleteTranslationsForEntityAndLanguageParams

type DeleteTranslationsForEntityAndLanguageParams struct {
	EntityType string `json:"entity_type"`
	EntityID   int64  `json:"entity_id"`
	LanguageID int64  `json:"language_id"`
}

type DeleteTranslationsForEntityParams

type DeleteTranslationsForEntityParams struct {
	EntityType string `json:"entity_type"`
	EntityID   int64  `json:"entity_id"`
}

type DeleteTranslationsRelatedToEntityParams added in v0.23.0

type DeleteTranslationsRelatedToEntityParams struct {
	EntityType    string `json:"entity_type"`
	EntityID      int64  `json:"entity_id"`
	TranslationID int64  `json:"translation_id"`
}

type DeleteUnredeemedOAuthGrantsParams added in v0.32.0

type DeleteUnredeemedOAuthGrantsParams struct {
	Cutoff     int64 `json:"cutoff"`
	BatchLimit int64 `json:"batch_limit"`
}

type EarliestRecentDraftMutationParams added in v0.32.0

type EarliestRecentDraftMutationParams struct {
	UserID int64     `json:"user_id"`
	Since  time.Time `json:"since"`
}

type EditorialPreset added in v0.32.0

type EditorialPreset struct {
	Slug         string        `json:"slug"`
	LanguageCode string        `json:"language_code"`
	Name         string        `json:"name"`
	Instructions string        `json:"instructions"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
	UpdatedAt    time.Time     `json:"updated_at"`
}

type EditorialStyleGuide added in v0.32.0

type EditorialStyleGuide struct {
	LanguageCode string        `json:"language_code"`
	Body         string        `json:"body"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
	UpdatedAt    time.Time     `json:"updated_at"`
}

type Event

type Event struct {
	ID         int64         `json:"id"`
	Level      string        `json:"level"`
	Category   string        `json:"category"`
	Message    string        `json:"message"`
	UserID     sql.NullInt64 `json:"user_id"`
	Metadata   string        `json:"metadata"`
	CreatedAt  time.Time     `json:"created_at"`
	IpAddress  string        `json:"ip_address"`
	RequestUrl string        `json:"request_url"`
}

type EvictOAuthDCRClientParams added in v0.32.0

type EvictOAuthDCRClientParams struct {
	SourceKey      string `json:"source_key"`
	GraceCutoff    int64  `json:"grace_cutoff"`
	PressureCutoff int64  `json:"pressure_cutoff"`
	SourceCutoff   int64  `json:"source_cutoff"`
}

type ExtendDCROAuthClientParams added in v0.32.0

type ExtendDCROAuthClientParams struct {
	ExpiresAt int64  `json:"expires_at"`
	ID        string `json:"id"`
}

type Form

type Form struct {
	ID             int64          `json:"id"`
	Name           string         `json:"name"`
	Slug           string         `json:"slug"`
	Title          string         `json:"title"`
	Description    sql.NullString `json:"description"`
	SuccessMessage sql.NullString `json:"success_message"`
	EmailTo        sql.NullString `json:"email_to"`
	IsActive       bool           `json:"is_active"`
	LanguageCode   string         `json:"language_code"`
	CreatedAt      time.Time      `json:"created_at"`
	UpdatedAt      time.Time      `json:"updated_at"`
}

type FormField

type FormField struct {
	ID           int64          `json:"id"`
	FormID       int64          `json:"form_id"`
	Type         string         `json:"type"`
	Name         string         `json:"name"`
	Label        string         `json:"label"`
	Placeholder  sql.NullString `json:"placeholder"`
	HelpText     sql.NullString `json:"help_text"`
	Options      sql.NullString `json:"options"`
	Validation   sql.NullString `json:"validation"`
	IsRequired   bool           `json:"is_required"`
	Position     int64          `json:"position"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

type FormSlugExistsExcludingForLanguageParams

type FormSlugExistsExcludingForLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
	ID           int64  `json:"id"`
}

type FormSlugExistsForLanguageParams

type FormSlugExistsForLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type FormSubmission

type FormSubmission struct {
	ID           int64          `json:"id"`
	FormID       int64          `json:"form_id"`
	Data         string         `json:"data"`
	IpAddress    sql.NullString `json:"ip_address"`
	UserAgent    sql.NullString `json:"user_agent"`
	IsRead       bool           `json:"is_read"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
}

type GetAllTranslationsOfEntityParams

type GetAllTranslationsOfEntityParams struct {
	EntityType    string `json:"entity_type"`
	EntityID      int64  `json:"entity_id"`
	TranslationID int64  `json:"translation_id"`
}

type GetAllTranslationsOfEntityRow

type GetAllTranslationsOfEntityRow struct {
	ID                 int64     `json:"id"`
	EntityType         string    `json:"entity_type"`
	EntityID           int64     `json:"entity_id"`
	LanguageID         int64     `json:"language_id"`
	TranslationID      int64     `json:"translation_id"`
	CreatedAt          time.Time `json:"created_at"`
	LanguageCode       string    `json:"language_code"`
	LanguageName       string    `json:"language_name"`
	LanguageNativeName string    `json:"language_native_name"`
}

type GetAllWidgetsByThemeAndLanguageParams

type GetAllWidgetsByThemeAndLanguageParams struct {
	Theme        string `json:"theme"`
	LanguageCode string `json:"language_code"`
}

type GetCategoryAvailableTranslationsRow

type GetCategoryAvailableTranslationsRow struct {
	LanguageID         int64  `json:"language_id"`
	LanguageCode       string `json:"language_code"`
	LanguageName       string `json:"language_name"`
	LanguageNativeName string `json:"language_native_name"`
	LanguageDirection  string `json:"language_direction"`
	IsDefault          bool   `json:"is_default"`
	CategoryID         int64  `json:"category_id"`
	CategorySlug       string `json:"category_slug"`
	CategoryName       string `json:"category_name"`
}

type GetCategoryNamesForAllPagesRow added in v0.15.0

type GetCategoryNamesForAllPagesRow struct {
	PageID int64  `json:"page_id"`
	Name   string `json:"name"`
}

type GetCategoryNamesForPublishedPagesRow added in v0.16.0

type GetCategoryNamesForPublishedPagesRow struct {
	PageID int64  `json:"page_id"`
	Name   string `json:"name"`
}

type GetCategoryPathRow

type GetCategoryPathRow struct {
	ID       int64         `json:"id"`
	Name     string        `json:"name"`
	Slug     string        `json:"slug"`
	ParentID sql.NullInt64 `json:"parent_id"`
	Depth    int64         `json:"depth"`
}

type GetCategoryUsageCountsByLanguageRow

type GetCategoryUsageCountsByLanguageRow struct {
	ID           int64          `json:"id"`
	Name         string         `json:"name"`
	Slug         string         `json:"slug"`
	Description  sql.NullString `json:"description"`
	ParentID     sql.NullInt64  `json:"parent_id"`
	Position     int64          `json:"position"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
	LanguageCode string         `json:"language_code"`
	UsageCount   int64          `json:"usage_count"`
}

type GetCategoryUsageCountsRow

type GetCategoryUsageCountsRow struct {
	ID           int64          `json:"id"`
	Name         string         `json:"name"`
	Slug         string         `json:"slug"`
	Description  sql.NullString `json:"description"`
	ParentID     sql.NullInt64  `json:"parent_id"`
	Position     int64          `json:"position"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
	LanguageCode string         `json:"language_code"`
	UsageCount   int64          `json:"usage_count"`
}

type GetConfigTranslationByKeyAndLangCodeParams

type GetConfigTranslationByKeyAndLangCodeParams struct {
	ConfigKey string `json:"config_key"`
	Code      string `json:"code"`
}

type GetConfigTranslationByKeyAndLangCodeRow

type GetConfigTranslationByKeyAndLangCodeRow struct {
	ID           int64         `json:"id"`
	ConfigKey    string        `json:"config_key"`
	LanguageID   int64         `json:"language_id"`
	Value        string        `json:"value"`
	UpdatedAt    time.Time     `json:"updated_at"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
	LanguageCode string        `json:"language_code"`
	LanguageName string        `json:"language_name"`
}

type GetConfigTranslationParams

type GetConfigTranslationParams struct {
	ConfigKey  string `json:"config_key"`
	LanguageID int64  `json:"language_id"`
}

type GetConfigTranslationRow

type GetConfigTranslationRow struct {
	ID           int64         `json:"id"`
	ConfigKey    string        `json:"config_key"`
	LanguageID   int64         `json:"language_id"`
	Value        string        `json:"value"`
	UpdatedAt    time.Time     `json:"updated_at"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
	LanguageCode string        `json:"language_code"`
	LanguageName string        `json:"language_name"`
}

type GetContentProvenanceParams added in v0.32.0

type GetContentProvenanceParams struct {
	PageID   int64 `json:"page_id"`
	Revision int64 `json:"revision"`
}

type GetDeliveryStatsLast24hParams

type GetDeliveryStatsLast24hParams struct {
	WebhookID int64     `json:"webhook_id"`
	CreatedAt time.Time `json:"created_at"`
}

type GetDeliveryStatsLast24hRow

type GetDeliveryStatsLast24hRow struct {
	Total     int64           `json:"total"`
	Delivered sql.NullFloat64 `json:"delivered"`
	Pending   sql.NullFloat64 `json:"pending"`
	Dead      sql.NullFloat64 `json:"dead"`
}

type GetDeliveryStatsRow

type GetDeliveryStatsRow struct {
	Total     int64           `json:"total"`
	Delivered sql.NullFloat64 `json:"delivered"`
	Pending   sql.NullFloat64 `json:"pending"`
	Dead      sql.NullFloat64 `json:"dead"`
}

type GetFormAvailableTranslationsRow added in v0.1.0

type GetFormAvailableTranslationsRow struct {
	LanguageID         int64  `json:"language_id"`
	LanguageCode       string `json:"language_code"`
	LanguageName       string `json:"language_name"`
	LanguageNativeName string `json:"language_native_name"`
	LanguageDirection  string `json:"language_direction"`
	IsDefault          bool   `json:"is_default"`
	FormID             int64  `json:"form_id"`
	FormSlug           string `json:"form_slug"`
	FormName           string `json:"form_name"`
}

type GetFormBySlugAndLanguageParams

type GetFormBySlugAndLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type GetFormSubmissionsParams

type GetFormSubmissionsParams struct {
	FormID int64 `json:"form_id"`
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type GetFormSubmissionsSortedParams added in v0.10.0

type GetFormSubmissionsSortedParams struct {
	FormID    int64  `json:"form_id"`
	Limit     int64  `json:"limit"`
	Offset    int64  `json:"offset"`
	SortField string `json:"sort_field"`
	SortDir   string `json:"sort_dir"`
}

type GetIdempotencyKeyParams added in v0.32.0

type GetIdempotencyKeyParams struct {
	UserID    int64  `json:"user_id"`
	Tool      string `json:"tool"`
	RequestID string `json:"request_id"`
}

type GetLatestAuthoringProvenanceParams added in v0.32.0

type GetLatestAuthoringProvenanceParams struct {
	PageID   int64 `json:"page_id"`
	Revision int64 `json:"revision"`
}

type GetLatestTranslationProvenanceParams added in v0.32.0

type GetLatestTranslationProvenanceParams struct {
	PageID   int64 `json:"page_id"`
	Revision int64 `json:"revision"`
}

type GetMaxMenuItemPositionParams

type GetMaxMenuItemPositionParams struct {
	MenuID   int64         `json:"menu_id"`
	ParentID sql.NullInt64 `json:"parent_id"`
}

type GetMaxWidgetPositionParams

type GetMaxWidgetPositionParams struct {
	Theme string `json:"theme"`
	Area  string `json:"area"`
}

type GetMediaTranslationAltParams added in v0.9.0

type GetMediaTranslationAltParams struct {
	MediaID int64  `json:"media_id"`
	Code    string `json:"code"`
}

type GetMediaTranslationCaptionParams added in v0.9.0

type GetMediaTranslationCaptionParams struct {
	MediaID int64  `json:"media_id"`
	Code    string `json:"code"`
}

type GetMediaTranslationParams

type GetMediaTranslationParams struct {
	MediaID    int64 `json:"media_id"`
	LanguageID int64 `json:"language_id"`
}

type GetMediaTranslationsRow

type GetMediaTranslationsRow struct {
	ID           int64        `json:"id"`
	MediaID      int64        `json:"media_id"`
	LanguageID   int64        `json:"language_id"`
	Alt          string       `json:"alt"`
	Caption      string       `json:"caption"`
	CreatedAt    sql.NullTime `json:"created_at"`
	UpdatedAt    sql.NullTime `json:"updated_at"`
	LanguageCode string       `json:"language_code"`
	LanguageName string       `json:"language_name"`
}

type GetMediaVariantParams

type GetMediaVariantParams struct {
	MediaID int64  `json:"media_id"`
	Type    string `json:"type"`
}

type GetMenuBySlugAndLanguageParams

type GetMenuBySlugAndLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type GetMenuForLanguageOrDefaultParams

type GetMenuForLanguageOrDefaultParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type GetOAuthAccountRefreshBudgetParams added in v0.32.0

type GetOAuthAccountRefreshBudgetParams struct {
	UserID       int64 `json:"user_id"`
	Cutoff       int64 `json:"cutoff"`
	BudgetOffset int64 `json:"budget_offset"`
}

type GetOAuthDCRRegistrationBudgetParams added in v0.32.0

type GetOAuthDCRRegistrationBudgetParams struct {
	GlobalCutoff  int64  `json:"global_cutoff"`
	SourceKey     string `json:"source_key"`
	SourceCutoff  int64  `json:"source_cutoff"`
	NetworkMin    string `json:"network_min"`
	NetworkEnd    string `json:"network_end"`
	ZeroSubnet    string `json:"zero_subnet"`
	NetworkOffset int64  `json:"network_offset"`
}

type GetOAuthDCRRegistrationBudgetRow added in v0.32.0

type GetOAuthDCRRegistrationBudgetRow struct {
	Total          int64 `json:"total"`
	Oldest         int64 `json:"oldest"`
	SourceTotal    int64 `json:"source_total"`
	SourceOldest   int64 `json:"source_oldest"`
	NetworkRetryNs int64 `json:"network_retry_ns"`
}

type GetOAuthGrantRefreshBudgetParams added in v0.32.0

type GetOAuthGrantRefreshBudgetParams struct {
	GrantID      string `json:"grant_id"`
	Cutoff       int64  `json:"cutoff"`
	BudgetOffset int64  `json:"budget_offset"`
}

type GetPageAuthorRow

type GetPageAuthorRow struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	Email       string `json:"email"`
	Avatar      string `json:"avatar"`
	Bio         string `json:"bio"`
	WebsiteUrl  string `json:"website_url"`
	LinkedinUrl string `json:"linkedin_url"`
	GithubUrl   string `json:"github_url"`
	TelegramUrl string `json:"telegram_url"`
}

type GetPageAvailableTranslationsRow

type GetPageAvailableTranslationsRow struct {
	LanguageID         int64  `json:"language_id"`
	LanguageCode       string `json:"language_code"`
	LanguageName       string `json:"language_name"`
	LanguageNativeName string `json:"language_native_name"`
	LanguageDirection  string `json:"language_direction"`
	IsDefault          bool   `json:"is_default"`
	PageID             int64  `json:"page_id"`
	PageSlug           string `json:"page_slug"`
	PageTitle          string `json:"page_title"`
}

type GetPageByLanguageFromTranslationParams

type GetPageByLanguageFromTranslationParams struct {
	EntityID   int64 `json:"entity_id"`
	LanguageID int64 `json:"language_id"`
}

type GetPageReviewStateRow added in v0.32.0

type GetPageReviewStateRow struct {
	ID              int64 `json:"id"`
	AiEditable      bool  `json:"ai_editable"`
	UncheckedClaims int64 `json:"unchecked_claims"`
}

type GetPageTranslationBySlugParams

type GetPageTranslationBySlugParams struct {
	Slug       string `json:"slug"`
	LanguageID int64  `json:"language_id"`
}

type GetPageTranslationLinksRow

type GetPageTranslationLinksRow struct {
	LanguageID   int64  `json:"language_id"`
	LanguageCode string `json:"language_code"`
	LanguageName string `json:"language_name"`
	NativeName   string `json:"native_name"`
	EntityID     int64  `json:"entity_id"`
}

type GetPageVersionByRevisionParams added in v0.32.0

type GetPageVersionByRevisionParams struct {
	PageID   int64         `json:"page_id"`
	Revision sql.NullInt64 `json:"revision"`
}

type GetPageVersionWithUserRow

type GetPageVersionWithUserRow struct {
	ID             int64         `json:"id"`
	PageID         int64         `json:"page_id"`
	Title          string        `json:"title"`
	Body           string        `json:"body"`
	Revision       sql.NullInt64 `json:"revision"`
	Legacy         bool          `json:"legacy"`
	ChangedBy      int64         `json:"changed_by"`
	CreatedAt      time.Time     `json:"created_at"`
	ChangedByName  string        `json:"changed_by_name"`
	ChangedByEmail string        `json:"changed_by_email"`
}

type GetPageWithLanguageRow

type GetPageWithLanguageRow struct {
	ID                 int64         `json:"id"`
	Title              string        `json:"title"`
	Slug               string        `json:"slug"`
	Body               string        `json:"body"`
	Status             string        `json:"status"`
	AuthorID           int64         `json:"author_id"`
	CreatedAt          time.Time     `json:"created_at"`
	UpdatedAt          time.Time     `json:"updated_at"`
	PublishedAt        sql.NullTime  `json:"published_at"`
	FeaturedImageID    sql.NullInt64 `json:"featured_image_id"`
	MetaTitle          string        `json:"meta_title"`
	MetaDescription    string        `json:"meta_description"`
	MetaKeywords       string        `json:"meta_keywords"`
	OgImageID          sql.NullInt64 `json:"og_image_id"`
	NoIndex            int64         `json:"no_index"`
	NoFollow           int64         `json:"no_follow"`
	CanonicalUrl       string        `json:"canonical_url"`
	ScheduledAt        sql.NullTime  `json:"scheduled_at"`
	LanguageCode       string        `json:"language_code"`
	HideFeaturedImage  int64         `json:"hide_featured_image"`
	PageType           string        `json:"page_type"`
	ExcludeFromLists   int64         `json:"exclude_from_lists"`
	Summary            string        `json:"summary"`
	VideoUrl           string        `json:"video_url"`
	VideoTitle         string        `json:"video_title"`
	Revision           int64         `json:"revision"`
	LanguageName       string        `json:"language_name"`
	LanguageNativeName string        `json:"language_native_name"`
	LanguageDirection  string        `json:"language_direction"`
}

type GetPagesForTagParams

type GetPagesForTagParams struct {
	TagID  int64 `json:"tag_id"`
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type GetPendingDeliveriesParams

type GetPendingDeliveriesParams struct {
	NextRetryAt sql.NullTime `json:"next_retry_at"`
	Limit       int64        `json:"limit"`
}

type GetPreviewIssuanceCutoffParams added in v0.32.0

type GetPreviewIssuanceCutoffParams struct {
	CreatedBy      int64 `json:"created_by"`
	Since          int64 `json:"since"`
	AgentIssued    bool  `json:"agent_issued"`
	IssuanceOffset int64 `json:"issuance_offset"`
}

type GetPreviewLinkByHashParams added in v0.32.0

type GetPreviewLinkByHashParams struct {
	TokenHash string `json:"token_hash"`
	ExpiresAt int64  `json:"expires_at"`
}

type GetPreviousPageVersionParams added in v0.32.0

type GetPreviousPageVersionParams struct {
	PageID int64 `json:"page_id"`
	ID     int64 `json:"id"`
}

type GetPublishedCategoryUsageCountsRow added in v0.16.0

type GetPublishedCategoryUsageCountsRow struct {
	ID           int64          `json:"id"`
	Name         string         `json:"name"`
	Slug         string         `json:"slug"`
	Description  sql.NullString `json:"description"`
	ParentID     sql.NullInt64  `json:"parent_id"`
	Position     int64          `json:"position"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
	LanguageCode string         `json:"language_code"`
	UsageCount   int64          `json:"usage_count"`
}

type GetPublishedPageBySlugAndLanguageParams

type GetPublishedPageBySlugAndLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type GetPublishedPageWithLanguageBySlugRow

type GetPublishedPageWithLanguageBySlugRow struct {
	ID                 int64         `json:"id"`
	Title              string        `json:"title"`
	Slug               string        `json:"slug"`
	Body               string        `json:"body"`
	Status             string        `json:"status"`
	AuthorID           int64         `json:"author_id"`
	CreatedAt          time.Time     `json:"created_at"`
	UpdatedAt          time.Time     `json:"updated_at"`
	PublishedAt        sql.NullTime  `json:"published_at"`
	FeaturedImageID    sql.NullInt64 `json:"featured_image_id"`
	MetaTitle          string        `json:"meta_title"`
	MetaDescription    string        `json:"meta_description"`
	MetaKeywords       string        `json:"meta_keywords"`
	OgImageID          sql.NullInt64 `json:"og_image_id"`
	NoIndex            int64         `json:"no_index"`
	NoFollow           int64         `json:"no_follow"`
	CanonicalUrl       string        `json:"canonical_url"`
	ScheduledAt        sql.NullTime  `json:"scheduled_at"`
	LanguageCode       string        `json:"language_code"`
	HideFeaturedImage  int64         `json:"hide_featured_image"`
	PageType           string        `json:"page_type"`
	ExcludeFromLists   int64         `json:"exclude_from_lists"`
	Summary            string        `json:"summary"`
	VideoUrl           string        `json:"video_url"`
	VideoTitle         string        `json:"video_title"`
	Revision           int64         `json:"revision"`
	LanguageName       string        `json:"language_name"`
	LanguageNativeName string        `json:"language_native_name"`
	LanguageDirection  string        `json:"language_direction"`
	LanguageIsDefault  bool          `json:"language_is_default"`
}

type GetPublishedTagUsageCountsParams added in v0.16.0

type GetPublishedTagUsageCountsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type GetPublishedTagUsageCountsRow added in v0.16.0

type GetPublishedTagUsageCountsRow struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	LanguageCode string    `json:"language_code"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	UsageCount   int64     `json:"usage_count"`
}

type GetRecentFailedDeliveriesWithWebhookRow

type GetRecentFailedDeliveriesWithWebhookRow struct {
	ID           int64          `json:"id"`
	WebhookID    int64          `json:"webhook_id"`
	Event        string         `json:"event"`
	Payload      string         `json:"payload"`
	ResponseCode sql.NullInt64  `json:"response_code"`
	ResponseBody sql.NullString `json:"response_body"`
	Attempts     int64          `json:"attempts"`
	NextRetryAt  sql.NullTime   `json:"next_retry_at"`
	DeliveredAt  sql.NullTime   `json:"delivered_at"`
	Status       string         `json:"status"`
	ErrorMessage sql.NullString `json:"error_message"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
	WebhookName  string         `json:"webhook_name"`
}

type GetRecentSubmissionsWithFormRow

type GetRecentSubmissionsWithFormRow struct {
	ID           int64          `json:"id"`
	FormID       int64          `json:"form_id"`
	Data         string         `json:"data"`
	IpAddress    sql.NullString `json:"ip_address"`
	UserAgent    sql.NullString `json:"user_agent"`
	IsRead       bool           `json:"is_read"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
	FormName     string         `json:"form_name"`
	FormSlug     string         `json:"form_slug"`
}

type GetRelatedTranslationsParams

type GetRelatedTranslationsParams struct {
	EntityType    string `json:"entity_type"`
	EntityID      int64  `json:"entity_id"`
	TranslationID int64  `json:"translation_id"`
}

type GetRelatedTranslationsRow

type GetRelatedTranslationsRow struct {
	ID                 int64     `json:"id"`
	EntityType         string    `json:"entity_type"`
	EntityID           int64     `json:"entity_id"`
	LanguageID         int64     `json:"language_id"`
	TranslationID      int64     `json:"translation_id"`
	CreatedAt          time.Time `json:"created_at"`
	LanguageCode       string    `json:"language_code"`
	LanguageName       string    `json:"language_name"`
	LanguageNativeName string    `json:"language_native_name"`
}

type GetSchedulerOverrideParams added in v0.9.0

type GetSchedulerOverrideParams struct {
	Source string `json:"source"`
	Name   string `json:"name"`
}

type GetTagAvailableTranslationsRow

type GetTagAvailableTranslationsRow struct {
	LanguageID         int64  `json:"language_id"`
	LanguageCode       string `json:"language_code"`
	LanguageName       string `json:"language_name"`
	LanguageNativeName string `json:"language_native_name"`
	LanguageDirection  string `json:"language_direction"`
	IsDefault          bool   `json:"is_default"`
	TagID              int64  `json:"tag_id"`
	TagSlug            string `json:"tag_slug"`
	TagName            string `json:"tag_name"`
}

type GetTagNamesForAllPagesRow added in v0.15.0

type GetTagNamesForAllPagesRow struct {
	PageID int64  `json:"page_id"`
	Name   string `json:"name"`
}

type GetTagNamesForPublishedPagesRow added in v0.16.0

type GetTagNamesForPublishedPagesRow struct {
	PageID int64  `json:"page_id"`
	Name   string `json:"name"`
}

type GetTagUsageCountsByLanguageParams

type GetTagUsageCountsByLanguageParams struct {
	LanguageCode   string `json:"language_code"`
	LanguageCode_2 string `json:"language_code_2"`
	Limit          int64  `json:"limit"`
	Offset         int64  `json:"offset"`
}

type GetTagUsageCountsByLanguageRow

type GetTagUsageCountsByLanguageRow struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	LanguageCode string    `json:"language_code"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	UsageCount   int64     `json:"usage_count"`
}

type GetTagUsageCountsParams

type GetTagUsageCountsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type GetTagUsageCountsRow

type GetTagUsageCountsRow struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	LanguageCode string    `json:"language_code"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	UsageCount   int64     `json:"usage_count"`
}

type GetTagUsageCountsSortedParams added in v0.10.0

type GetTagUsageCountsSortedParams struct {
	Limit         int64          `json:"limit"`
	Offset        int64          `json:"offset"`
	SortField     string         `json:"sort_field"`
	SortDir       string         `json:"sort_dir"`
	SearchPattern sql.NullString `json:"search_pattern"`
	LanguageCode  sql.NullString `json:"language_code"`
}

type GetTranslatedEntityIDParams

type GetTranslatedEntityIDParams struct {
	EntityType string `json:"entity_type"`
	EntityID   int64  `json:"entity_id"`
	LanguageID int64  `json:"language_id"`
}

type GetTranslationComponentEntityByLanguageParams added in v0.23.0

type GetTranslationComponentEntityByLanguageParams struct {
	EntityType   interface{} `json:"entity_type"`
	LanguageCode string      `json:"language_code"`
	EntityID     int64       `json:"entity_id"`
}

type GetTranslationCountsBatchRow

type GetTranslationCountsBatchRow struct {
	EntityID         int64 `json:"entity_id"`
	TranslationCount int64 `json:"translation_count"`
}

type GetTranslationCoverageRow

type GetTranslationCoverageRow struct {
	LanguageID   int64  `json:"language_id"`
	LanguageCode string `json:"language_code"`
	LanguageName string `json:"language_name"`
	IsDefault    bool   `json:"is_default"`
	PageCount    int64  `json:"page_count"`
}

type GetTranslationParams

type GetTranslationParams struct {
	EntityType string `json:"entity_type"`
	EntityID   int64  `json:"entity_id"`
	LanguageID int64  `json:"language_id"`
}

type GetTranslationStatsRow

type GetTranslationStatsRow struct {
	TotalEntities        int64 `json:"total_entities"`
	TotalTranslations    int64 `json:"total_translations"`
	PageTranslations     int64 `json:"page_translations"`
	CategoryTranslations int64 `json:"category_translations"`
	TagTranslations      int64 `json:"tag_translations"`
}

type GetTranslationsForEntityParams

type GetTranslationsForEntityParams struct {
	EntityType string `json:"entity_type"`
	EntityID   int64  `json:"entity_id"`
}

type GetTranslationsForEntityRow

type GetTranslationsForEntityRow struct {
	ID                 int64     `json:"id"`
	EntityType         string    `json:"entity_type"`
	EntityID           int64     `json:"entity_id"`
	LanguageID         int64     `json:"language_id"`
	TranslationID      int64     `json:"translation_id"`
	CreatedAt          time.Time `json:"created_at"`
	LanguageCode       string    `json:"language_code"`
	LanguageName       string    `json:"language_name"`
	LanguageNativeName string    `json:"language_native_name"`
}

type GetTranslationsForPagesBatchRow

type GetTranslationsForPagesBatchRow struct {
	EntityID      int64  `json:"entity_id"`
	LanguageID    int64  `json:"language_id"`
	TranslationID int64  `json:"translation_id"`
	LanguageCode  string `json:"language_code"`
	LanguageName  string `json:"language_name"`
}

type GetWebhookHealthSummaryRow

type GetWebhookHealthSummaryRow struct {
	ID              int64           `json:"id"`
	Name            string          `json:"name"`
	IsActive        bool            `json:"is_active"`
	TotalDeliveries int64           `json:"total_deliveries"`
	DeliveredCount  sql.NullFloat64 `json:"delivered_count"`
	PendingCount    sql.NullFloat64 `json:"pending_count"`
	DeadCount       sql.NullFloat64 `json:"dead_count"`
}

type GetWidgetsByThemeAndAreaParams

type GetWidgetsByThemeAndAreaParams struct {
	Theme        string `json:"theme"`
	Area         string `json:"area"`
	LanguageCode string `json:"language_code"`
}

type IdempotencyKey added in v0.32.0

type IdempotencyKey struct {
	UserID         int64          `json:"user_id"`
	Tool           string         `json:"tool"`
	RequestID      string         `json:"request_id"`
	RequestHash    string         `json:"request_hash"`
	ResultJson     sql.NullString `json:"result_json"`
	EntityType     string         `json:"entity_type"`
	EntityID       int64          `json:"entity_id"`
	EntityRevision int64          `json:"entity_revision"`
	CreatedAt      time.Time      `json:"created_at"`
}

type IsModuleMigrationAppliedParams added in v0.9.0

type IsModuleMigrationAppliedParams struct {
	Module  string `json:"module"`
	Version int64  `json:"version"`
}

type Language

type Language struct {
	ID         int64     `json:"id"`
	Code       string    `json:"code"`
	Name       string    `json:"name"`
	NativeName string    `json:"native_name"`
	IsDefault  bool      `json:"is_default"`
	IsActive   bool      `json:"is_active"`
	Direction  string    `json:"direction"`
	Position   int64     `json:"position"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type LanguageCodeExistsExcludingParams

type LanguageCodeExistsExcludingParams struct {
	Code string `json:"code"`
	ID   int64  `json:"id"`
}

type ListAPIKeysByUserParams

type ListAPIKeysByUserParams struct {
	CreatedBy int64 `json:"created_by"`
	Limit     int64 `json:"limit"`
	Offset    int64 `json:"offset"`
}

type ListAPIKeysParams

type ListAPIKeysParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListAPIKeysSortedParams added in v0.10.0

type ListAPIKeysSortedParams struct {
	Limit     int64  `json:"limit"`
	Offset    int64  `json:"offset"`
	SortField string `json:"sort_field"`
	SortDir   string `json:"sort_dir"`
}

type ListActiveAgentPreviewLinksRow added in v0.32.0

type ListActiveAgentPreviewLinksRow struct {
	ID           int64  `json:"id"`
	PageID       int64  `json:"page_id"`
	Revision     int64  `json:"revision"`
	CreatedAt    int64  `json:"created_at"`
	ExpiresAt    int64  `json:"expires_at"`
	ViaOauth     int64  `json:"via_oauth"`
	PageTitle    string `json:"page_title"`
	CreatorName  string `json:"creator_name"`
	CreatorEmail string `json:"creator_email"`
}

type ListAllConfigTranslationsRow

type ListAllConfigTranslationsRow struct {
	ID           int64         `json:"id"`
	ConfigKey    string        `json:"config_key"`
	LanguageID   int64         `json:"language_id"`
	Value        string        `json:"value"`
	UpdatedAt    time.Time     `json:"updated_at"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
	LanguageCode string        `json:"language_code"`
	LanguageName string        `json:"language_name"`
}

type ListCategoriesForSitemapRow

type ListCategoriesForSitemapRow struct {
	ID           int64     `json:"id"`
	Slug         string    `json:"slug"`
	UpdatedAt    time.Time `json:"updated_at"`
	LanguageCode string    `json:"language_code"`
	IsDefault    bool      `json:"is_default"`
}

type ListClaimChecksRow added in v0.32.0

type ListClaimChecksRow struct {
	ProvenanceID  int64         `json:"provenance_id"`
	ClaimIndex    int64         `json:"claim_index"`
	CheckedBy     sql.NullInt64 `json:"checked_by"`
	CheckedAt     int64         `json:"checked_at"`
	CheckedByName string        `json:"checked_by_name"`
}

type ListConfigTranslationsRow

type ListConfigTranslationsRow struct {
	ID           int64         `json:"id"`
	ConfigKey    string        `json:"config_key"`
	LanguageID   int64         `json:"language_id"`
	Value        string        `json:"value"`
	UpdatedAt    time.Time     `json:"updated_at"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
	LanguageCode string        `json:"language_code"`
	LanguageName string        `json:"language_name"`
}

type ListConnectedAPIKeysParams added in v0.32.0

type ListConnectedAPIKeysParams struct {
	AllUsers   interface{} `json:"all_users"`
	UserID     int64       `json:"user_id"`
	PageOffset int64       `json:"page_offset"`
	PageLimit  int64       `json:"page_limit"`
}

type ListConnectedAPIKeysRow added in v0.32.0

type ListConnectedAPIKeysRow struct {
	ID          int64        `json:"id"`
	Name        string       `json:"name"`
	Permissions string       `json:"permissions"`
	LastUsedAt  sql.NullTime `json:"last_used_at"`
	ExpiresAt   sql.NullTime `json:"expires_at"`
	IsActive    bool         `json:"is_active"`
	CreatedBy   int64        `json:"created_by"`
	CreatedAt   time.Time    `json:"created_at"`
	OwnerName   string       `json:"owner_name"`
	OwnerRole   string       `json:"owner_role"`
}

type ListConnectedOAuthGrantsParams added in v0.32.0

type ListConnectedOAuthGrantsParams struct {
	AllUsers   interface{} `json:"all_users"`
	UserID     int64       `json:"user_id"`
	PageOffset int64       `json:"page_offset"`
	PageLimit  int64       `json:"page_limit"`
}

type ListConnectedOAuthGrantsRow added in v0.32.0

type ListConnectedOAuthGrantsRow struct {
	ID                  string `json:"id"`
	UserID              int64  `json:"user_id"`
	OwnerName           string `json:"owner_name"`
	OwnerRole           string `json:"owner_role"`
	OwnerSessionVersion int64  `json:"owner_session_version"`
	ClientName          string `json:"client_name"`
	ClientID            string `json:"client_id"`
	Scopes              string `json:"scopes"`
	SessionVersion      int64  `json:"session_version"`
	CreatedAt           int64  `json:"created_at"`
	ExpiresAt           int64  `json:"expires_at"`
	RevokedAt           int64  `json:"revoked_at"`
	LastUsedAt          int64  `json:"last_used_at"`
}

type ListEventsByCategoryParams

type ListEventsByCategoryParams struct {
	Category string `json:"category"`
	Limit    int64  `json:"limit"`
	Offset   int64  `json:"offset"`
}

type ListEventsByLevelAndCategoryParams

type ListEventsByLevelAndCategoryParams struct {
	Level    string `json:"level"`
	Category string `json:"category"`
	Limit    int64  `json:"limit"`
	Offset   int64  `json:"offset"`
}

type ListEventsByLevelParams

type ListEventsByLevelParams struct {
	Level  string `json:"level"`
	Limit  int64  `json:"limit"`
	Offset int64  `json:"offset"`
}

type ListEventsParams

type ListEventsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListEventsWithUserByCategoryParams

type ListEventsWithUserByCategoryParams struct {
	Category string `json:"category"`
	Limit    int64  `json:"limit"`
	Offset   int64  `json:"offset"`
}

type ListEventsWithUserByCategoryRow

type ListEventsWithUserByCategoryRow struct {
	ID         int64          `json:"id"`
	Level      string         `json:"level"`
	Category   string         `json:"category"`
	Message    string         `json:"message"`
	UserID     sql.NullInt64  `json:"user_id"`
	Metadata   string         `json:"metadata"`
	IpAddress  string         `json:"ip_address"`
	RequestUrl string         `json:"request_url"`
	CreatedAt  time.Time      `json:"created_at"`
	UserName   sql.NullString `json:"user_name"`
	UserEmail  sql.NullString `json:"user_email"`
}

type ListEventsWithUserByLevelAndCategoryParams

type ListEventsWithUserByLevelAndCategoryParams struct {
	Level    string `json:"level"`
	Category string `json:"category"`
	Limit    int64  `json:"limit"`
	Offset   int64  `json:"offset"`
}

type ListEventsWithUserByLevelAndCategoryRow

type ListEventsWithUserByLevelAndCategoryRow struct {
	ID         int64          `json:"id"`
	Level      string         `json:"level"`
	Category   string         `json:"category"`
	Message    string         `json:"message"`
	UserID     sql.NullInt64  `json:"user_id"`
	Metadata   string         `json:"metadata"`
	IpAddress  string         `json:"ip_address"`
	RequestUrl string         `json:"request_url"`
	CreatedAt  time.Time      `json:"created_at"`
	UserName   sql.NullString `json:"user_name"`
	UserEmail  sql.NullString `json:"user_email"`
}

type ListEventsWithUserByLevelParams

type ListEventsWithUserByLevelParams struct {
	Level  string `json:"level"`
	Limit  int64  `json:"limit"`
	Offset int64  `json:"offset"`
}

type ListEventsWithUserByLevelRow

type ListEventsWithUserByLevelRow struct {
	ID         int64          `json:"id"`
	Level      string         `json:"level"`
	Category   string         `json:"category"`
	Message    string         `json:"message"`
	UserID     sql.NullInt64  `json:"user_id"`
	Metadata   string         `json:"metadata"`
	IpAddress  string         `json:"ip_address"`
	RequestUrl string         `json:"request_url"`
	CreatedAt  time.Time      `json:"created_at"`
	UserName   sql.NullString `json:"user_name"`
	UserEmail  sql.NullString `json:"user_email"`
}

type ListEventsWithUserParams

type ListEventsWithUserParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListEventsWithUserRow

type ListEventsWithUserRow struct {
	ID         int64          `json:"id"`
	Level      string         `json:"level"`
	Category   string         `json:"category"`
	Message    string         `json:"message"`
	UserID     sql.NullInt64  `json:"user_id"`
	Metadata   string         `json:"metadata"`
	IpAddress  string         `json:"ip_address"`
	RequestUrl string         `json:"request_url"`
	CreatedAt  time.Time      `json:"created_at"`
	UserName   sql.NullString `json:"user_name"`
	UserEmail  sql.NullString `json:"user_email"`
}

type ListFeedPostsParams added in v0.26.0

type ListFeedPostsParams struct {
	LanguageCode string `json:"language_code"`
	CategoryID   int64  `json:"category_id"`
	TagID        int64  `json:"tag_id"`
}

type ListFeedPostsRow added in v0.26.0

type ListFeedPostsRow struct {
	ID          int64        `json:"id"`
	Title       string       `json:"title"`
	Slug        string       `json:"slug"`
	Body        string       `json:"body"`
	Summary     string       `json:"summary"`
	PublishedAt sql.NullTime `json:"published_at"`
	CreatedAt   time.Time    `json:"created_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
	AuthorName  string       `json:"author_name"`
}

type ListFormsByLanguageParams

type ListFormsByLanguageParams struct {
	LanguageCode string `json:"language_code"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type ListFormsParams

type ListFormsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListGroundingCategoriesParams added in v0.32.0

type ListGroundingCategoriesParams struct {
	LanguageCode string `json:"language_code"`
	ResultOffset int64  `json:"result_offset"`
	ResultLimit  int64  `json:"result_limit"`
}

type ListGroundingImagesParams added in v0.32.0

type ListGroundingImagesParams struct {
	Search        interface{} `json:"search"`
	SearchPattern string      `json:"search_pattern"`
	ResultOffset  int64       `json:"result_offset"`
	ResultLimit   int64       `json:"result_limit"`
}

type ListGroundingLanguagesParams added in v0.32.0

type ListGroundingLanguagesParams struct {
	ResultOffset int64 `json:"result_offset"`
	ResultLimit  int64 `json:"result_limit"`
}

type ListGroundingPagesParams added in v0.32.0

type ListGroundingPagesParams struct {
	LanguageCode interface{} `json:"language_code"`
	AllDrafts    interface{} `json:"all_drafts"`
	OwnDrafts    interface{} `json:"own_drafts"`
	UserID       int64       `json:"user_id"`
	ResultOffset int64       `json:"result_offset"`
	ResultLimit  int64       `json:"result_limit"`
}

type ListGroundingTagsParams added in v0.32.0

type ListGroundingTagsParams struct {
	LanguageCode string `json:"language_code"`
	ResultOffset int64  `json:"result_offset"`
	ResultLimit  int64  `json:"result_limit"`
}

type ListMediaByTypeParams

type ListMediaByTypeParams struct {
	MimeType string `json:"mime_type"`
	Limit    int64  `json:"limit"`
	Offset   int64  `json:"offset"`
}

type ListMediaInFolderParams

type ListMediaInFolderParams struct {
	FolderID sql.NullInt64 `json:"folder_id"`
	Limit    int64         `json:"limit"`
	Offset   int64         `json:"offset"`
}

type ListMediaInRootFolderParams

type ListMediaInRootFolderParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListMediaParams

type ListMediaParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListMediaSortedParams added in v0.10.0

type ListMediaSortedParams struct {
	SearchPattern sql.NullString `json:"search_pattern"`
	MimeType      sql.NullString `json:"mime_type"`
	FolderID      sql.NullInt64  `json:"folder_id"`
	Limit         int64          `json:"limit"`
	Offset        int64          `json:"offset"`
	SortField     string         `json:"sort_field"`
	SortDir       string         `json:"sort_dir"`
}

type ListMenuItemsWithPageRow

type ListMenuItemsWithPageRow struct {
	ID                    int64          `json:"id"`
	MenuID                int64          `json:"menu_id"`
	ParentID              sql.NullInt64  `json:"parent_id"`
	Title                 string         `json:"title"`
	Url                   sql.NullString `json:"url"`
	Target                sql.NullString `json:"target"`
	PageID                sql.NullInt64  `json:"page_id"`
	Position              int64          `json:"position"`
	CssClass              sql.NullString `json:"css_class"`
	IsActive              bool           `json:"is_active"`
	CreatedAt             time.Time      `json:"created_at"`
	UpdatedAt             time.Time      `json:"updated_at"`
	PageTitle             sql.NullString `json:"page_title"`
	PageSlug              sql.NullString `json:"page_slug"`
	PageLanguageCode      sql.NullString `json:"page_language_code"`
	PageLanguageIsActive  sql.NullBool   `json:"page_language_is_active"`
	PageLanguageIsDefault sql.NullBool   `json:"page_language_is_default"`
}

type ListMenuItemsWithPublishedPageRow added in v0.16.0

type ListMenuItemsWithPublishedPageRow struct {
	ID               int64          `json:"id"`
	MenuID           int64          `json:"menu_id"`
	ParentID         sql.NullInt64  `json:"parent_id"`
	Title            string         `json:"title"`
	Url              sql.NullString `json:"url"`
	Target           sql.NullString `json:"target"`
	PageID           sql.NullInt64  `json:"page_id"`
	Position         int64          `json:"position"`
	CssClass         sql.NullString `json:"css_class"`
	IsActive         bool           `json:"is_active"`
	CreatedAt        time.Time      `json:"created_at"`
	UpdatedAt        time.Time      `json:"updated_at"`
	PageTitle        sql.NullString `json:"page_title"`
	PageSlug         sql.NullString `json:"page_slug"`
	PageLanguageCode sql.NullString `json:"page_language_code"`
}

type ListOAuthGrantsForUserParams added in v0.32.0

type ListOAuthGrantsForUserParams struct {
	UserID    int64 `json:"user_id"`
	ExpiresAt int64 `json:"expires_at"`
}

type ListOAuthGrantsForUserRow added in v0.32.0

type ListOAuthGrantsForUserRow struct {
	ID             string `json:"id"`
	UserID         int64  `json:"user_id"`
	ClientID       string `json:"client_id"`
	Scopes         string `json:"scopes"`
	Resource       string `json:"resource"`
	SessionVersion int64  `json:"session_version"`
	CreatedAt      int64  `json:"created_at"`
	ExpiresAt      int64  `json:"expires_at"`
	RevokedAt      int64  `json:"revoked_at"`
	LastUsedAt     int64  `json:"last_used_at"`
	ClientName     string `json:"client_name"`
}

type ListOwnAIDraftsParams added in v0.32.0

type ListOwnAIDraftsParams struct {
	UserID       int64       `json:"user_id"`
	LanguageCode interface{} `json:"language_code"`
	ResultOffset int64       `json:"result_offset"`
	ResultLimit  int64       `json:"result_limit"`
}

type ListPageIDsForMediaParams added in v0.32.0

type ListPageIDsForMediaParams struct {
	FeaturedImageID sql.NullInt64 `json:"featured_image_id"`
	OgImageID       sql.NullInt64 `json:"og_image_id"`
}

type ListPagePreviewLinksParams added in v0.32.0

type ListPagePreviewLinksParams struct {
	PageID    int64 `json:"page_id"`
	ExpiresAt int64 `json:"expires_at"`
}

type ListPagePreviewLinksRow added in v0.32.0

type ListPagePreviewLinksRow struct {
	ID        int64 `json:"id"`
	PageID    int64 `json:"page_id"`
	Revision  int64 `json:"revision"`
	CreatedBy int64 `json:"created_by"`
	CreatedAt int64 `json:"created_at"`
	ExpiresAt int64 `json:"expires_at"`
	RevokedAt int64 `json:"revoked_at"`
}

type ListPageVersionsParams

type ListPageVersionsParams struct {
	PageID int64 `json:"page_id"`
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListPageVersionsWithUserParams

type ListPageVersionsWithUserParams struct {
	PageID int64 `json:"page_id"`
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListPageVersionsWithUserRow

type ListPageVersionsWithUserRow struct {
	ID             int64         `json:"id"`
	PageID         int64         `json:"page_id"`
	Title          string        `json:"title"`
	Body           string        `json:"body"`
	Revision       sql.NullInt64 `json:"revision"`
	Legacy         bool          `json:"legacy"`
	ChangedBy      int64         `json:"changed_by"`
	CreatedAt      time.Time     `json:"created_at"`
	ChangedByName  string        `json:"changed_by_name"`
	ChangedByEmail string        `json:"changed_by_email"`
}

type ListPagesByCategoryParams

type ListPagesByCategoryParams struct {
	CategoryID int64 `json:"category_id"`
	Limit      int64 `json:"limit"`
	Offset     int64 `json:"offset"`
}

type ListPagesByLanguageAndStatusParams

type ListPagesByLanguageAndStatusParams struct {
	LanguageCode string `json:"language_code"`
	Status       string `json:"status"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type ListPagesByLanguageParams

type ListPagesByLanguageParams struct {
	LanguageCode string `json:"language_code"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type ListPagesByStatusParams

type ListPagesByStatusParams struct {
	Status string `json:"status"`
	Limit  int64  `json:"limit"`
	Offset int64  `json:"offset"`
}

type ListPagesInLanguageParams added in v0.32.0

type ListPagesInLanguageParams struct {
	LanguageCode string      `json:"language_code"`
	Status       interface{} `json:"status"`
	CategoryID   interface{} `json:"category_id"`
	TagID        interface{} `json:"tag_id"`
	ResultOffset int64       `json:"result_offset"`
	ResultLimit  int64       `json:"result_limit"`
}

type ListPagesParams

type ListPagesParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListPagesSortedParams added in v0.10.0

type ListPagesSortedParams struct {
	AIReview      bool           `json:"ai_review"`
	Status        sql.NullString `json:"status"`
	PageType      sql.NullString `json:"page_type"`
	LanguageCode  sql.NullString `json:"language_code"`
	CategoryID    sql.NullInt64  `json:"category_id"`
	SearchPattern sql.NullString `json:"search_pattern"`
	ScheduledOnly bool           `json:"scheduled_only"`
	Limit         int64          `json:"limit"`
	Offset        int64          `json:"offset"`
	SortField     string         `json:"sort_field"`
	SortDir       string         `json:"sort_dir"`
}

type ListPrunableAIDraftRevisionsParams added in v0.32.0

type ListPrunableAIDraftRevisionsParams struct {
	Keep       int64 `json:"keep"`
	BatchLimit int64 `json:"batch_limit"`
	UnixNow    int64 `json:"unix_now"`
}

type ListPrunableAIDraftRevisionsRow added in v0.32.0

type ListPrunableAIDraftRevisionsRow struct {
	VersionID int64         `json:"version_id"`
	PageID    int64         `json:"page_id"`
	Revision  sql.NullInt64 `json:"revision"`
}

type ListPublishedPagesByCategoryAndLanguageParams

type ListPublishedPagesByCategoryAndLanguageParams struct {
	CategoryID   int64  `json:"category_id"`
	LanguageCode string `json:"language_code"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type ListPublishedPagesByCategoryParams

type ListPublishedPagesByCategoryParams struct {
	CategoryID int64 `json:"category_id"`
	Limit      int64 `json:"limit"`
	Offset     int64 `json:"offset"`
}

type ListPublishedPagesByLanguageParams

type ListPublishedPagesByLanguageParams struct {
	LanguageCode string `json:"language_code"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type ListPublishedPagesForSitemapRow

type ListPublishedPagesForSitemapRow struct {
	ID           int64     `json:"id"`
	Slug         string    `json:"slug"`
	UpdatedAt    time.Time `json:"updated_at"`
	NoIndex      int64     `json:"no_index"`
	LanguageCode string    `json:"language_code"`
	IsDefault    bool      `json:"is_default"`
}

type ListPublishedPagesForTagAndLanguageParams

type ListPublishedPagesForTagAndLanguageParams struct {
	TagID        int64  `json:"tag_id"`
	LanguageCode string `json:"language_code"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type ListPublishedPagesForTagParams

type ListPublishedPagesForTagParams struct {
	TagID  int64 `json:"tag_id"`
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListPublishedPagesParams

type ListPublishedPagesParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListPublishedPostsByLanguageParams added in v0.3.0

type ListPublishedPostsByLanguageParams struct {
	LanguageCode string `json:"language_code"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type ListPublishedPostsParams added in v0.3.0

type ListPublishedPostsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListRedirectsPaginatedParams added in v0.5.0

type ListRedirectsPaginatedParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListScheduledPagesParams

type ListScheduledPagesParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListScheduledTaskRunsParams added in v0.8.0

type ListScheduledTaskRunsParams struct {
	TaskID int64 `json:"task_id"`
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListTagsForSitemapRow

type ListTagsForSitemapRow struct {
	ID           int64     `json:"id"`
	Slug         string    `json:"slug"`
	UpdatedAt    time.Time `json:"updated_at"`
	LanguageCode string    `json:"language_code"`
	IsDefault    bool      `json:"is_default"`
}

type ListTagsParams

type ListTagsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListTranslationComponentMembersParams added in v0.23.0

type ListTranslationComponentMembersParams struct {
	SourceEntityID int64  `json:"source_entity_id"`
	EntityType     string `json:"entity_type"`
}

type ListTranslationComponentMembersRow added in v0.23.0

type ListTranslationComponentMembersRow struct {
	EntityID     int64  `json:"entity_id"`
	LanguageID   int64  `json:"language_id"`
	LanguageCode string `json:"language_code"`
}

type ListUsersParams

type ListUsersParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListUsersSortedParams added in v0.10.0

type ListUsersSortedParams struct {
	Limit     int64  `json:"limit"`
	Offset    int64  `json:"offset"`
	SortField string `json:"sort_field"`
	SortDir   string `json:"sort_dir"`
}

type ListWebhookDeliveriesParams

type ListWebhookDeliveriesParams struct {
	WebhookID int64 `json:"webhook_id"`
	Limit     int64 `json:"limit"`
	Offset    int64 `json:"offset"`
}

type ListWebhooksPaginatedParams

type ListWebhooksPaginatedParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type LoginProtection added in v0.20.0

type LoginProtection struct {
	Email         string       `json:"email"`
	AttemptCount  int64        `json:"attempt_count"`
	FirstFailedAt time.Time    `json:"first_failed_at"`
	LockedUntil   sql.NullTime `json:"locked_until"`
	LockoutCount  int64        `json:"lockout_count"`
	UpdatedAt     time.Time    `json:"updated_at"`
}

type MediaFolder

type MediaFolder struct {
	ID        int64         `json:"id"`
	Name      string        `json:"name"`
	ParentID  sql.NullInt64 `json:"parent_id"`
	Position  int64         `json:"position"`
	CreatedAt time.Time     `json:"created_at"`
}

type MediaTranslation

type MediaTranslation struct {
	ID         int64        `json:"id"`
	MediaID    int64        `json:"media_id"`
	LanguageID int64        `json:"language_id"`
	Alt        string       `json:"alt"`
	Caption    string       `json:"caption"`
	CreatedAt  sql.NullTime `json:"created_at"`
	UpdatedAt  sql.NullTime `json:"updated_at"`
}

type MediaVariant

type MediaVariant struct {
	ID        int64     `json:"id"`
	MediaID   int64     `json:"media_id"`
	Type      string    `json:"type"`
	Width     int64     `json:"width"`
	Height    int64     `json:"height"`
	Size      int64     `json:"size"`
	CreatedAt time.Time `json:"created_at"`
}

type Medium

type Medium struct {
	ID           int64          `json:"id"`
	Uuid         string         `json:"uuid"`
	Filename     string         `json:"filename"`
	MimeType     string         `json:"mime_type"`
	Size         int64          `json:"size"`
	Width        sql.NullInt64  `json:"width"`
	Height       sql.NullInt64  `json:"height"`
	Alt          sql.NullString `json:"alt"`
	Caption      sql.NullString `json:"caption"`
	FolderID     sql.NullInt64  `json:"folder_id"`
	UploadedBy   int64          `json:"uploaded_by"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}
type Menu struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	LanguageCode string    `json:"language_code"`
}
type MenuItem struct {
	ID        int64          `json:"id"`
	MenuID    int64          `json:"menu_id"`
	ParentID  sql.NullInt64  `json:"parent_id"`
	Title     string         `json:"title"`
	Url       sql.NullString `json:"url"`
	Target    sql.NullString `json:"target"`
	PageID    sql.NullInt64  `json:"page_id"`
	Position  int64          `json:"position"`
	CssClass  sql.NullString `json:"css_class"`
	IsActive  bool           `json:"is_active"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
}
type MenuSlugExistsExcludingParams struct {
	Slug string `json:"slug"`
	ID   int64  `json:"id"`
}
type MenuSlugExistsForLanguageExcludingParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
	ID           int64  `json:"id"`
}
type MenuSlugExistsForLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type Module

type Module struct {
	Name          string    `json:"name"`
	IsActive      bool      `json:"is_active"`
	UpdatedAt     time.Time `json:"updated_at"`
	ShowInSidebar bool      `json:"show_in_sidebar"`
}

type ModuleMigration added in v0.9.0

type ModuleMigration struct {
	Module    string    `json:"module"`
	Version   int64     `json:"version"`
	AppliedAt time.Time `json:"applied_at"`
}

type MoveMediaToFolderParams

type MoveMediaToFolderParams struct {
	FolderID  sql.NullInt64 `json:"folder_id"`
	UpdatedAt time.Time     `json:"updated_at"`
	ID        int64         `json:"id"`
}

type OauthClient added in v0.32.0

type OauthClient struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	RedirectUris string `json:"redirect_uris"`
	Source       string `json:"source"`
	ExpiresAt    int64  `json:"expires_at"`
}

type OauthCode added in v0.32.0

type OauthCode struct {
	CodeHash    string `json:"code_hash"`
	GrantID     string `json:"grant_id"`
	RedirectUri string `json:"redirect_uri"`
	Challenge   string `json:"challenge"`
	CreatedAt   int64  `json:"created_at"`
	ExpiresAt   int64  `json:"expires_at"`
	ConsumedAt  int64  `json:"consumed_at"`
}

type OauthDcrPending added in v0.32.0

type OauthDcrPending struct {
	ClientID     string `json:"client_id"`
	SourceKey    string `json:"source_key"`
	RegisteredAt int64  `json:"registered_at"`
}

type OauthDcrRegistration added in v0.32.0

type OauthDcrRegistration struct {
	ClientID     string `json:"client_id"`
	SourceKey    string `json:"source_key"`
	RegisteredAt int64  `json:"registered_at"`
	Provisional  int64  `json:"provisional"`
}

type OauthGrant added in v0.32.0

type OauthGrant struct {
	ID             string `json:"id"`
	UserID         int64  `json:"user_id"`
	ClientID       string `json:"client_id"`
	Scopes         string `json:"scopes"`
	Resource       string `json:"resource"`
	SessionVersion int64  `json:"session_version"`
	CreatedAt      int64  `json:"created_at"`
	ExpiresAt      int64  `json:"expires_at"`
	RevokedAt      int64  `json:"revoked_at"`
	LastUsedAt     int64  `json:"last_used_at"`
}

type OauthGrantRefreshActivity added in v0.32.0

type OauthGrantRefreshActivity struct {
	GrantID       string `json:"grant_id"`
	UserID        int64  `json:"user_id"`
	LastRefreshAt int64  `json:"last_refresh_at"`
}

type OauthToken added in v0.32.0

type OauthToken struct {
	ID              string `json:"id"`
	GrantID         string `json:"grant_id"`
	AccessHash      string `json:"access_hash"`
	RefreshHash     string `json:"refresh_hash"`
	Scopes          string `json:"scopes"`
	CreatedAt       int64  `json:"created_at"`
	AccessExpiresAt int64  `json:"access_expires_at"`
	RefreshUsedAt   int64  `json:"refresh_used_at"`
	AccessRevokedAt int64  `json:"access_revoked_at"`
}

type Page

type Page struct {
	ID                int64         `json:"id"`
	Title             string        `json:"title"`
	Slug              string        `json:"slug"`
	Body              string        `json:"body"`
	Status            string        `json:"status"`
	AuthorID          int64         `json:"author_id"`
	CreatedAt         time.Time     `json:"created_at"`
	UpdatedAt         time.Time     `json:"updated_at"`
	PublishedAt       sql.NullTime  `json:"published_at"`
	FeaturedImageID   sql.NullInt64 `json:"featured_image_id"`
	MetaTitle         string        `json:"meta_title"`
	MetaDescription   string        `json:"meta_description"`
	MetaKeywords      string        `json:"meta_keywords"`
	OgImageID         sql.NullInt64 `json:"og_image_id"`
	NoIndex           int64         `json:"no_index"`
	NoFollow          int64         `json:"no_follow"`
	CanonicalUrl      string        `json:"canonical_url"`
	ScheduledAt       sql.NullTime  `json:"scheduled_at"`
	LanguageCode      string        `json:"language_code"`
	HideFeaturedImage int64         `json:"hide_featured_image"`
	PageType          string        `json:"page_type"`
	ExcludeFromLists  int64         `json:"exclude_from_lists"`
	Summary           string        `json:"summary"`
	VideoUrl          string        `json:"video_url"`
	VideoTitle        string        `json:"video_title"`
	Revision          int64         `json:"revision"`
}

type PageAiAccess added in v0.32.0

type PageAiAccess struct {
	PageID     int64     `json:"page_id"`
	AiEditable bool      `json:"ai_editable"`
	SetBy      int64     `json:"set_by"`
	SetAt      time.Time `json:"set_at"`
}

type PageAlias

type PageAlias struct {
	ID        int64     `json:"id"`
	PageID    int64     `json:"page_id"`
	Alias     string    `json:"alias"`
	CreatedAt time.Time `json:"created_at"`
}

type PageCategory

type PageCategory struct {
	PageID     int64 `json:"page_id"`
	CategoryID int64 `json:"category_id"`
}

type PageSearch added in v0.31.0

type PageSearch struct {
	Title           string `json:"title"`
	Body            string `json:"body"`
	MetaTitle       string `json:"meta_title"`
	MetaDescription string `json:"meta_description"`
	MetaKeywords    string `json:"meta_keywords"`
}

type PageSearchQueue added in v0.31.0

type PageSearchQueue struct {
	PageID int64 `json:"page_id"`
}

type PageTag

type PageTag struct {
	PageID int64 `json:"page_id"`
	TagID  int64 `json:"tag_id"`
}

type PageVersion

type PageVersion struct {
	ID           int64          `json:"id"`
	PageID       int64          `json:"page_id"`
	Title        string         `json:"title"`
	Body         string         `json:"body"`
	ChangedBy    int64          `json:"changed_by"`
	CreatedAt    time.Time      `json:"created_at"`
	Revision     sql.NullInt64  `json:"revision"`
	SnapshotJson sql.NullString `json:"snapshot_json"`
	Legacy       bool           `json:"legacy"`
}

type PagesFt

type PagesFt struct {
	Title           string `json:"title"`
	Body            string `json:"body"`
	MetaTitle       string `json:"meta_title"`
	MetaDescription string `json:"meta_description"`
	MetaKeywords    string `json:"meta_keywords"`
}
type PreviewLink struct {
	ID             int64          `json:"id"`
	TokenHash      string         `json:"token_hash"`
	PageID         int64          `json:"page_id"`
	Revision       int64          `json:"revision"`
	CreatedBy      int64          `json:"created_by"`
	SessionVersion int64          `json:"session_version"`
	IssuingGrantID sql.NullString `json:"issuing_grant_id"`
	IssuingKeyID   sql.NullInt64  `json:"issuing_key_id"`
	CreatedAt      int64          `json:"created_at"`
	ExpiresAt      int64          `json:"expires_at"`
	RevokedAt      int64          `json:"revoked_at"`
}

type PublishPageParams

type PublishPageParams struct {
	PublishedAt sql.NullTime `json:"published_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
	ID          int64        `json:"id"`
}

type PublishScheduledPageParams

type PublishScheduledPageParams struct {
	PublishedAt sql.NullTime `json:"published_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
	ID          int64        `json:"id"`
	ScheduledAt sql.NullTime `json:"scheduled_at"`
}

type PublishUnpublishedPageParams added in v0.29.0

type PublishUnpublishedPageParams struct {
	PublishedAt sql.NullTime `json:"published_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
	ID          int64        `json:"id"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddCategoryToPage

func (q *Queries) AddCategoryToPage(ctx context.Context, arg AddCategoryToPageParams) error

func (*Queries) AddTagToPage

func (q *Queries) AddTagToPage(ctx context.Context, arg AddTagToPageParams) error

Page-Tag association queries

func (*Queries) AdvancePageRevision added in v0.32.0

func (q *Queries) AdvancePageRevision(ctx context.Context, arg AdvancePageRevisionParams) (Page, error)

func (*Queries) AdvanceUserTOTPStep added in v0.30.0

func (q *Queries) AdvanceUserTOTPStep(ctx context.Context, arg AdvanceUserTOTPStepParams) (int64, error)

Records an accepted time step. The guard makes a code single-use even when two requests verify it at once: only the first moves last_step past it.

func (*Queries) AliasExists

func (q *Queries) AliasExists(ctx context.Context, alias string) (int64, error)

func (*Queries) AliasExistsExcludingPage

func (q *Queries) AliasExistsExcludingPage(ctx context.Context, arg AliasExistsExcludingPageParams) (int64, error)

func (*Queries) BumpUserSessionVersion added in v0.30.0

func (q *Queries) BumpUserSessionVersion(ctx context.Context, arg BumpUserSessionVersionParams) (int64, error)

Invalidates every existing session for the user. Use it when the user's second factor changes, the way UpdateUserPassword does for the password.

func (*Queries) CanExchangeCodeForDCRClient added in v0.32.0

func (q *Queries) CanExchangeCodeForDCRClient(ctx context.Context, arg CanExchangeCodeForDCRClientParams) (bool, error)

Check both states together so concurrent redemption cannot hide a replay.

func (*Queries) CategorySlugExists

func (q *Queries) CategorySlugExists(ctx context.Context, slug string) (int64, error)

func (*Queries) CategorySlugExistsExcluding

func (q *Queries) CategorySlugExistsExcluding(ctx context.Context, arg CategorySlugExistsExcludingParams) (int64, error)

func (*Queries) CategorySlugExistsExcludingForLanguage

func (q *Queries) CategorySlugExistsExcludingForLanguage(ctx context.Context, arg CategorySlugExistsExcludingForLanguageParams) (int64, error)

func (*Queries) CategorySlugExistsForLanguage

func (q *Queries) CategorySlugExistsForLanguage(ctx context.Context, arg CategorySlugExistsForLanguageParams) (int64, error)

func (*Queries) CheckClaim added in v0.32.0

func (q *Queries) CheckClaim(ctx context.Context, arg CheckClaimParams) error

func (*Queries) CleanupStaleLoginProtection added in v0.20.0

func (q *Queries) CleanupStaleLoginProtection(ctx context.Context, arg CleanupStaleLoginProtectionParams) error

Remove rows whose lockout has expired (or was never set) and whose attempt window has also passed. Called periodically by the cleanup goroutine.

func (*Queries) ClearDefaultLanguage

func (q *Queries) ClearDefaultLanguage(ctx context.Context) error

func (*Queries) ClearPageAliases

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

func (*Queries) ClearPageCategories

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

func (*Queries) ClearPageFeaturedImage

func (q *Queries) ClearPageFeaturedImage(ctx context.Context, arg ClearPageFeaturedImageParams) error

func (*Queries) ClearPageScheduledAt

func (q *Queries) ClearPageScheduledAt(ctx context.Context, arg ClearPageScheduledAtParams) error

func (*Queries) ClearPageTags

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

func (*Queries) CompactIdempotencyKeys added in v0.32.0

func (q *Queries) CompactIdempotencyKeys(ctx context.Context, createdAt time.Time) error

func (*Queries) CompactPageIdempotencyKeys added in v0.32.0

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

func (*Queries) CompactPrunedRevisionReplays added in v0.32.0

func (q *Queries) CompactPrunedRevisionReplays(ctx context.Context, arg CompactPrunedRevisionReplaysParams) (int64, error)

A retained replay receipt of a pruned revision becomes a tombstone, as when its seven days pass: the key, hash and entity stay, so the request is never re-executed and still counts toward the hourly quota.

func (*Queries) ConsumeOAuthCode added in v0.32.0

func (q *Queries) ConsumeOAuthCode(ctx context.Context, arg ConsumeOAuthCodeParams) (int64, error)

func (*Queries) ConsumeOAuthRefresh added in v0.32.0

func (q *Queries) ConsumeOAuthRefresh(ctx context.Context, arg ConsumeOAuthRefreshParams) (int64, error)

func (*Queries) ConvertMenuItemToURL added in v0.23.0

func (q *Queries) ConvertMenuItemToURL(ctx context.Context, arg ConvertMenuItemToURLParams) error

func (*Queries) CountAPIKeys

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

func (*Queries) CountActiveAPIKeys

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

func (*Queries) CountActiveLanguages

func (q *Queries) CountActiveLanguages(ctx context.Context) (int64, error)
func (q *Queries) CountActivePreviewLinks(ctx context.Context, arg CountActivePreviewLinksParams) (int64, error)

func (*Queries) CountActiveWebhooks

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

func (*Queries) CountAllUnreadSubmissions

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

func (*Queries) CountCategories

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

func (*Queries) CountConfig

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

func (*Queries) CountContentReferencingMediaPath added in v0.23.0

func (q *Queries) CountContentReferencingMediaPath(ctx context.Context, mediaPath string) (int64, error)

Counts every content record still pointing at a media storage path.

Media URLs are plain text with no foreign key, so nothing in the schema stops a file being deleted while a menu item, category description, form, widget or config value still links to it. Public form submissions are not trusted references because unauthenticated visitors control their data. The caller passes the full '/uploads/<dir>/<uuid>/' prefix; matching the prefix rather than a whole URL keeps filenames, variants and query strings out of the comparison.

func (*Queries) CountDeliveriesByStatus

func (q *Queries) CountDeliveriesByStatus(ctx context.Context, arg CountDeliveriesByStatusParams) (int64, error)

func (*Queries) CountEvents

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

func (*Queries) CountEventsByCategory

func (q *Queries) CountEventsByCategory(ctx context.Context, category string) (int64, error)

func (*Queries) CountEventsByLevel

func (q *Queries) CountEventsByLevel(ctx context.Context, level string) (int64, error)

func (*Queries) CountEventsByLevelAndCategory

func (q *Queries) CountEventsByLevelAndCategory(ctx context.Context, arg CountEventsByLevelAndCategoryParams) (int64, error)

func (*Queries) CountExpiredEvents added in v0.32.0

func (q *Queries) CountExpiredEvents(ctx context.Context, arg CountExpiredEventsParams) (int64, error)

func (*Queries) CountFormSubmissions

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

func (*Queries) CountForms

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

func (*Queries) CountFormsByLanguage

func (q *Queries) CountFormsByLanguage(ctx context.Context, languageCode string) (int64, error)
func (q *Queries) CountIssuedPreviewLinks(ctx context.Context, arg CountIssuedPreviewLinksParams) (int64, error)

func (*Queries) CountLanguages

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

func (*Queries) CountMedia

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

func (*Queries) CountMediaByType

func (q *Queries) CountMediaByType(ctx context.Context, mimeType string) (int64, error)

func (*Queries) CountMediaFolders

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

func (*Queries) CountMediaInFolder

func (q *Queries) CountMediaInFolder(ctx context.Context, folderID sql.NullInt64) (int64, error)

func (*Queries) CountMediaInRootFolder

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

func (*Queries) CountMenuItems

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

func (*Queries) CountMenus

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

func (*Queries) CountOAuthClients added in v0.32.0

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

func (*Queries) CountOAuthClientsBySource added in v0.32.0

func (q *Queries) CountOAuthClientsBySource(ctx context.Context, source string) (int64, error)

func (*Queries) CountOwnAIDrafts added in v0.32.0

func (q *Queries) CountOwnAIDrafts(ctx context.Context, arg CountOwnAIDraftsParams) (int64, error)

func (*Queries) CountPageVersions

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

func (*Queries) CountPages

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

func (*Queries) CountPagesByCategory

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

func (*Queries) CountPagesByLanguage

func (q *Queries) CountPagesByLanguage(ctx context.Context, languageCode string) (int64, error)

Count pages for a specific language

func (*Queries) CountPagesByLanguageAndStatus

func (q *Queries) CountPagesByLanguageAndStatus(ctx context.Context, arg CountPagesByLanguageAndStatusParams) (int64, error)

func (*Queries) CountPagesByLanguageCode

func (q *Queries) CountPagesByLanguageCode(ctx context.Context, languageCode string) (int64, error)

func (*Queries) CountPagesByStatus

func (q *Queries) CountPagesByStatus(ctx context.Context, status string) (int64, error)

func (*Queries) CountPagesEmbeddingMediaUUID added in v0.23.0

func (q *Queries) CountPagesEmbeddingMediaUUID(ctx context.Context, arg CountPagesEmbeddingMediaUUIDParams) (int64, error)

func (*Queries) CountPagesForTag

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

func (*Queries) CountPagesInLanguage added in v0.32.0

func (q *Queries) CountPagesInLanguage(ctx context.Context, arg CountPagesInLanguageParams) (int64, error)

func (*Queries) CountPagesSorted added in v0.16.0

func (q *Queries) CountPagesSorted(ctx context.Context, arg ListPagesSortedParams) (int64, error)

CountPagesSorted counts pages with the same filter logic as ListPagesSorted.

func (*Queries) CountPagesUsingMedia added in v0.23.0

func (q *Queries) CountPagesUsingMedia(ctx context.Context, arg CountPagesUsingMediaParams) (int64, error)

func (*Queries) CountPublishedPages

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

func (*Queries) CountPublishedPagesByCategory

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

func (*Queries) CountPublishedPagesByCategoryAndLanguage

func (q *Queries) CountPublishedPagesByCategoryAndLanguage(ctx context.Context, arg CountPublishedPagesByCategoryAndLanguageParams) (int64, error)

func (*Queries) CountPublishedPagesByLanguage

func (q *Queries) CountPublishedPagesByLanguage(ctx context.Context, languageCode string) (int64, error)

Count published pages for a specific language

func (*Queries) CountPublishedPagesForTag

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

func (*Queries) CountPublishedPagesForTagAndLanguage

func (q *Queries) CountPublishedPagesForTagAndLanguage(ctx context.Context, arg CountPublishedPagesForTagAndLanguageParams) (int64, error)

func (*Queries) CountPublishedPosts added in v0.3.0

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

func (*Queries) CountPublishedPostsByLanguage added in v0.3.0

func (q *Queries) CountPublishedPostsByLanguage(ctx context.Context, languageCode string) (int64, error)

Count published posts for a specific language

func (*Queries) CountRecentDraftMutations added in v0.32.0

func (q *Queries) CountRecentDraftMutations(ctx context.Context, arg CountRecentDraftMutationsParams) (int64, error)

func (*Queries) CountRedirects added in v0.5.0

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

func (*Queries) CountScheduledPages

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

func (*Queries) CountScheduledTaskRuns added in v0.8.0

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

func (*Queries) CountSearchMedia added in v0.25.0

func (q *Queries) CountSearchMedia(ctx context.Context, arg CountSearchMediaParams) (int64, error)

func (*Queries) CountSearchPages

func (q *Queries) CountSearchPages(ctx context.Context, arg CountSearchPagesParams) (int64, error)

func (*Queries) CountSearchPagesByLanguage

func (q *Queries) CountSearchPagesByLanguage(ctx context.Context, arg CountSearchPagesByLanguageParams) (int64, error)

func (*Queries) CountSearchPagesByStatus

func (q *Queries) CountSearchPagesByStatus(ctx context.Context, arg CountSearchPagesByStatusParams) (int64, error)

func (*Queries) CountTags

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

func (*Queries) CountTagsFiltered added in v0.10.0

func (q *Queries) CountTagsFiltered(ctx context.Context, searchPattern, languageCode sql.NullString) (int64, error)

CountTagsFiltered counts tags with optional search and language filters.

func (*Queries) CountTranslationsForEntity

func (q *Queries) CountTranslationsForEntity(ctx context.Context, arg CountTranslationsForEntityParams) (int64, error)

Count translations for an entity

func (*Queries) CountUnreadSubmissions

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

func (*Queries) CountUnusedRecoveryCodes added in v0.30.0

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

func (*Queries) CountUserOwnedContent added in v0.23.0

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

Everything that blocks or would be silently re-attributed by deleting a user. pages.author_id and page_versions.changed_by are ON DELETE RESTRICT, and media.uploaded_by has no action clause, which enforces the same way. page_ai_access.set_by is ON DELETE RESTRICT too: the user who last changed a page's AI access cannot be deleted while that row names them. One named parameter serves every count, so a count added here needs no change from callers; TestEveryRestrictingUserForeignKeyIsCountedAsOwnedContent lists the columns that must appear.

func (*Queries) CountUsers

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

func (*Queries) CountUsersByRole

func (q *Queries) CountUsersByRole(ctx context.Context, role string) (int64, error)

func (*Queries) CountWebhookDeliveries

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

func (*Queries) CountWebhooks

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

func (*Queries) CreateAPIKey

func (q *Queries) CreateAPIKey(ctx context.Context, arg CreateAPIKeyParams) (ApiKey, error)

func (*Queries) CreateCategory

func (q *Queries) CreateCategory(ctx context.Context, arg CreateCategoryParams) (Category, error)

func (*Queries) CreateCompletePageVersion added in v0.32.0

func (q *Queries) CreateCompletePageVersion(ctx context.Context, arg CreateCompletePageVersionParams) (PageVersion, error)

func (*Queries) CreateContentProvenance added in v0.32.0

func (q *Queries) CreateContentProvenance(ctx context.Context, arg CreateContentProvenanceParams) error

func (*Queries) CreateEvent

func (q *Queries) CreateEvent(ctx context.Context, arg CreateEventParams) (Event, error)

func (*Queries) CreateForm

func (q *Queries) CreateForm(ctx context.Context, arg CreateFormParams) (Form, error)

func (*Queries) CreateFormField

func (q *Queries) CreateFormField(ctx context.Context, arg CreateFormFieldParams) (FormField, error)

func (*Queries) CreateFormSubmission

func (q *Queries) CreateFormSubmission(ctx context.Context, arg CreateFormSubmissionParams) (FormSubmission, error)

func (*Queries) CreateIdempotencyKey added in v0.32.0

func (q *Queries) CreateIdempotencyKey(ctx context.Context, arg CreateIdempotencyKeyParams) error

func (*Queries) CreateLanguage

func (q *Queries) CreateLanguage(ctx context.Context, arg CreateLanguageParams) (Language, error)

func (*Queries) CreateMedia

func (q *Queries) CreateMedia(ctx context.Context, arg CreateMediaParams) (Medium, error)

func (*Queries) CreateMediaFolder

func (q *Queries) CreateMediaFolder(ctx context.Context, arg CreateMediaFolderParams) (MediaFolder, error)

func (*Queries) CreateMediaVariant

func (q *Queries) CreateMediaVariant(ctx context.Context, arg CreateMediaVariantParams) (MediaVariant, error)

func (*Queries) CreateMenu

func (q *Queries) CreateMenu(ctx context.Context, arg CreateMenuParams) (Menu, error)

func (*Queries) CreateMenuItem

func (q *Queries) CreateMenuItem(ctx context.Context, arg CreateMenuItemParams) (MenuItem, error)

Menu Item queries

func (*Queries) CreateOAuthCode added in v0.32.0

func (q *Queries) CreateOAuthCode(ctx context.Context, arg CreateOAuthCodeParams) error

func (*Queries) CreateOAuthGrant added in v0.32.0

func (q *Queries) CreateOAuthGrant(ctx context.Context, arg CreateOAuthGrantParams) (OauthGrant, error)

func (*Queries) CreateOAuthToken added in v0.32.0

func (q *Queries) CreateOAuthToken(ctx context.Context, arg CreateOAuthTokenParams) error

func (*Queries) CreatePage

func (q *Queries) CreatePage(ctx context.Context, arg CreatePageParams) (Page, error)

func (*Queries) CreatePageAlias

func (q *Queries) CreatePageAlias(ctx context.Context, arg CreatePageAliasParams) (PageAlias, error)

Page Alias queries

func (*Queries) CreatePageVersion

func (q *Queries) CreatePageVersion(ctx context.Context, arg CreatePageVersionParams) (PageVersion, error)

Page Version queries

func (q *Queries) CreatePreviewLink(ctx context.Context, arg CreatePreviewLinkParams) (PreviewLink, error)

func (*Queries) CreateRecoveryCode added in v0.30.0

func (q *Queries) CreateRecoveryCode(ctx context.Context, arg CreateRecoveryCodeParams) error

func (*Queries) CreateRedirect added in v0.5.0

func (q *Queries) CreateRedirect(ctx context.Context, arg CreateRedirectParams) (Redirect, error)

func (*Queries) CreateScheduledTask added in v0.8.0

func (q *Queries) CreateScheduledTask(ctx context.Context, arg CreateScheduledTaskParams) (ScheduledTask, error)

Scheduled Tasks

func (*Queries) CreateScheduledTaskRun added in v0.8.0

func (q *Queries) CreateScheduledTaskRun(ctx context.Context, arg CreateScheduledTaskRunParams) (ScheduledTaskRun, error)

Scheduled Task Runs

func (*Queries) CreateTag

func (q *Queries) CreateTag(ctx context.Context, arg CreateTagParams) (Tag, error)

func (*Queries) CreateTranslation

func (q *Queries) CreateTranslation(ctx context.Context, arg CreateTranslationParams) (Translation, error)

func (*Queries) CreateUser

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

func (*Queries) CreateWebhook

func (q *Queries) CreateWebhook(ctx context.Context, arg CreateWebhookParams) (Webhook, error)

func (*Queries) CreateWebhookDelivery

func (q *Queries) CreateWebhookDelivery(ctx context.Context, arg CreateWebhookDeliveryParams) (WebhookDelivery, error)

Webhook Deliveries

func (*Queries) CreateWidget

func (q *Queries) CreateWidget(ctx context.Context, arg CreateWidgetParams) (Widget, error)

func (*Queries) DBHandle added in v0.32.0

func (q *Queries) DBHandle() DBTX

DBHandle exposes the existing database/transaction to the shared page-write boundary. Callers continue to execute statements through generated queries.

func (*Queries) DeactivateAPIKey

func (q *Queries) DeactivateAPIKey(ctx context.Context, arg DeactivateAPIKeyParams) error

func (*Queries) DeleteAPIKey

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

func (*Queries) DeleteAllMediaTranslations

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

func (*Queries) DeleteAllOldTaskRuns added in v0.8.0

func (q *Queries) DeleteAllOldTaskRuns(ctx context.Context, startedAt time.Time) error

func (*Queries) DeleteCategory

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

func (*Queries) DeleteConfig

func (q *Queries) DeleteConfig(ctx context.Context, key string) error

func (*Queries) DeleteConfigTranslation

func (q *Queries) DeleteConfigTranslation(ctx context.Context, arg DeleteConfigTranslationParams) error

func (*Queries) DeleteConfigTranslationsForKey

func (q *Queries) DeleteConfigTranslationsForKey(ctx context.Context, configKey string) error

func (*Queries) DeleteEditorialGuide added in v0.32.0

func (q *Queries) DeleteEditorialGuide(ctx context.Context, languageCode string) error

func (*Queries) DeleteEditorialPresetOverride added in v0.32.0

func (q *Queries) DeleteEditorialPresetOverride(ctx context.Context, arg DeleteEditorialPresetOverrideParams) error

func (*Queries) DeleteExpiredEvents added in v0.32.0

func (q *Queries) DeleteExpiredEvents(ctx context.Context, arg DeleteExpiredEventsParams) (int64, error)

func (*Queries) DeleteExpiredUnusedOAuthClients added in v0.32.0

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

func (*Queries) DeleteForm

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

func (*Queries) DeleteFormField

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

func (*Queries) DeleteFormFields

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

func (*Queries) DeleteFormSubmission

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

func (*Queries) DeleteLanguage

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

func (*Queries) DeleteLoginProtection added in v0.20.0

func (q *Queries) DeleteLoginProtection(ctx context.Context, email string) error

func (*Queries) DeleteMedia

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

func (*Queries) DeleteMediaFolder

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

func (*Queries) DeleteMediaTranslation

func (q *Queries) DeleteMediaTranslation(ctx context.Context, arg DeleteMediaTranslationParams) error

func (*Queries) DeleteMediaVariants

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

func (*Queries) DeleteMenu

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

func (*Queries) DeleteMenuItem

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

func (*Queries) DeleteMenuItems

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

func (*Queries) DeleteOldDeliveries

func (q *Queries) DeleteOldDeliveries(ctx context.Context, createdAt time.Time) error

func (*Queries) DeleteOldOAuthDCRRegistrations added in v0.32.0

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

func (*Queries) DeleteOldTaskRuns added in v0.8.0

func (q *Queries) DeleteOldTaskRuns(ctx context.Context, arg DeleteOldTaskRunsParams) error

func (*Queries) DeletePage

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

func (*Queries) DeletePageAlias added in v0.23.0

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

func (*Queries) DeletePageVersions

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

func (*Queries) DeletePrunedContentProvenance added in v0.32.0

func (q *Queries) DeletePrunedContentProvenance(ctx context.Context, arg DeletePrunedContentProvenanceParams) (int64, error)

Claim acknowledgments of the revision go with it (claims_checks cascades).

func (*Queries) DeletePrunedPageVersion added in v0.32.0

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

func (*Queries) DeleteRecoveryCodes added in v0.30.0

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

func (*Queries) DeleteRedirect added in v0.5.0

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

func (*Queries) DeleteRetainedOAuthClients added in v0.32.0

func (q *Queries) DeleteRetainedOAuthClients(ctx context.Context, arg DeleteRetainedOAuthClientsParams) (int64, error)

func (*Queries) DeleteRetainedOAuthCodes added in v0.32.0

func (q *Queries) DeleteRetainedOAuthCodes(ctx context.Context, arg DeleteRetainedOAuthCodesParams) (int64, error)

func (*Queries) DeleteRetiredOAuthGrants added in v0.32.0

func (q *Queries) DeleteRetiredOAuthGrants(ctx context.Context, arg DeleteRetiredOAuthGrantsParams) (int64, error)

func (*Queries) DeleteRetiredOAuthPreviews added in v0.32.0

func (q *Queries) DeleteRetiredOAuthPreviews(ctx context.Context, arg DeleteRetiredOAuthPreviewsParams) (int64, error)

Drain dependent previews explicitly so family deletion cannot cascade through an unbounded number of historical share records.

func (*Queries) DeleteRetiredOAuthTokens added in v0.32.0

func (q *Queries) DeleteRetiredOAuthTokens(ctx context.Context, arg DeleteRetiredOAuthTokensParams) (int64, error)

Never prune a token from an active family, even if its access has expired or its refresh was spent: that hash is still required for replay detection.

func (*Queries) DeleteScheduledTask added in v0.8.0

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

func (*Queries) DeleteSchedulerOverride added in v0.9.0

func (q *Queries) DeleteSchedulerOverride(ctx context.Context, arg DeleteSchedulerOverrideParams) error

func (*Queries) DeleteStaleAPIKeySourceState added in v0.9.0

func (q *Queries) DeleteStaleAPIKeySourceState(ctx context.Context, before time.Time) error

DeleteStaleAPIKeySourceState removes stale source observation rows.

func (*Queries) DeleteTag

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

func (*Queries) DeleteTranslation

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

func (*Queries) DeleteTranslationsForEntity

func (q *Queries) DeleteTranslationsForEntity(ctx context.Context, arg DeleteTranslationsForEntityParams) error

func (*Queries) DeleteTranslationsForEntityAndLanguage

func (q *Queries) DeleteTranslationsForEntityAndLanguage(ctx context.Context, arg DeleteTranslationsForEntityAndLanguageParams) error

func (*Queries) DeleteTranslationsRelatedToEntity added in v0.23.0

func (q *Queries) DeleteTranslationsRelatedToEntity(ctx context.Context, arg DeleteTranslationsRelatedToEntityParams) error

func (*Queries) DeleteUnredeemedOAuthGrants added in v0.32.0

func (q *Queries) DeleteUnredeemedOAuthGrants(ctx context.Context, arg DeleteUnredeemedOAuthGrantsParams) (int64, error)

A grant is created at consent, before any token exists. One that never issued a token and is older than the cutoff will never be redeemed (its code lived 60 seconds), so it goes. Its single code row follows by cascade, which is why the batch limit still bounds the work. A grant with a token, or one that issued a preview link, is never touched here.

func (*Queries) DeleteUser

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

func (*Queries) DeleteUserTOTP added in v0.30.0

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

func (*Queries) DeleteWebhook

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

func (*Queries) DeleteWidget

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

func (*Queries) DeleteWidgetsByTheme

func (q *Queries) DeleteWidgetsByTheme(ctx context.Context, theme string) error

func (*Queries) EarliestRecentDraftMutation added in v0.32.0

func (q *Queries) EarliestRecentDraftMutation(ctx context.Context, arg EarliestRecentDraftMutationParams) (time.Time, error)

func (*Queries) EvictOAuthDCRClient added in v0.32.0

func (q *Queries) EvictOAuthDCRClient(ctx context.Context, arg EvictOAuthDCRClientParams) (int64, error)

Prefer the oldest provisional client from a source holding more slots than the requester. Give a source's only provisional client the normal grace period, with a shorter minimum age at capacity for a source with no recent successful registration. The pending view excludes clients with grants.

func (*Queries) ExtendDCROAuthClient added in v0.32.0

func (q *Queries) ExtendDCROAuthClient(ctx context.Context, arg ExtendDCROAuthClientParams) error

Successful authorization-code exchange gives a DCR client the full lifetime. Consent alone leaves the registration short-lived.

func (*Queries) FormSlugExists added in v0.1.0

func (q *Queries) FormSlugExists(ctx context.Context, slug string) (int64, error)

func (*Queries) FormSlugExistsExcludingForLanguage

func (q *Queries) FormSlugExistsExcludingForLanguage(ctx context.Context, arg FormSlugExistsExcludingForLanguageParams) (int64, error)

func (*Queries) FormSlugExistsForLanguage

func (q *Queries) FormSlugExistsForLanguage(ctx context.Context, arg FormSlugExistsForLanguageParams) (int64, error)

func (*Queries) GetAPIKeyByHash

func (q *Queries) GetAPIKeyByHash(ctx context.Context, keyHash string) (ApiKey, error)

func (*Queries) GetAPIKeyByID

func (q *Queries) GetAPIKeyByID(ctx context.Context, id int64) (ApiKey, error)

func (*Queries) GetAPIKeyByLookup added in v0.28.0

func (q *Queries) GetAPIKeyByLookup(ctx context.Context, keyLookup sql.NullString) (ApiKey, error)

func (*Queries) GetAPIKeyByPrefix

func (q *Queries) GetAPIKeyByPrefix(ctx context.Context, keyPrefix string) (ApiKey, error)

func (*Queries) GetAPIKeySourceState added in v0.9.0

func (q *Queries) GetAPIKeySourceState(ctx context.Context, apiKeyID int64) (APIKeySourceState, error)

GetAPIKeySourceState returns persisted source observation state for a key.

func (*Queries) GetAPIKeysByPrefix added in v0.1.0

func (q *Queries) GetAPIKeysByPrefix(ctx context.Context, keyPrefix string) ([]ApiKey, error)

func (*Queries) GetAliasesForPage

func (q *Queries) GetAliasesForPage(ctx context.Context, pageID int64) ([]PageAlias, error)

func (*Queries) GetAllTranslationsOfEntity

func (q *Queries) GetAllTranslationsOfEntity(ctx context.Context, arg GetAllTranslationsOfEntityParams) ([]GetAllTranslationsOfEntityRow, error)

func (*Queries) GetAllWidgets

func (q *Queries) GetAllWidgets(ctx context.Context) ([]Widget, error)

func (*Queries) GetAllWidgetsByTheme

func (q *Queries) GetAllWidgetsByTheme(ctx context.Context, theme string) ([]Widget, error)

func (*Queries) GetAllWidgetsByThemeAndLanguage

func (q *Queries) GetAllWidgetsByThemeAndLanguage(ctx context.Context, arg GetAllWidgetsByThemeAndLanguageParams) ([]Widget, error)

func (*Queries) GetCategoriesForPage

func (q *Queries) GetCategoriesForPage(ctx context.Context, pageID int64) ([]Category, error)

func (*Queries) GetCategoryAvailableTranslations

func (q *Queries) GetCategoryAvailableTranslations(ctx context.Context, entityID int64) ([]GetCategoryAvailableTranslationsRow, error)

Get all available translations for a category (for language switcher) Translation edges are traversed as an undirected connected component so a sibling remains visible even when it is more than one hop from this category.

func (*Queries) GetCategoryByID

func (q *Queries) GetCategoryByID(ctx context.Context, id int64) (Category, error)

func (*Queries) GetCategoryBySlug

func (q *Queries) GetCategoryBySlug(ctx context.Context, slug string) (Category, error)

func (*Queries) GetCategoryNamesForAllPages added in v0.15.0

func (q *Queries) GetCategoryNamesForAllPages(ctx context.Context) ([]GetCategoryNamesForAllPagesRow, error)

func (*Queries) GetCategoryNamesForPublishedPages added in v0.16.0

func (q *Queries) GetCategoryNamesForPublishedPages(ctx context.Context) ([]GetCategoryNamesForPublishedPagesRow, error)

func (*Queries) GetCategoryPath

func (q *Queries) GetCategoryPath(ctx context.Context, id int64) ([]GetCategoryPathRow, error)

func (*Queries) GetCategoryUsageCounts

func (q *Queries) GetCategoryUsageCounts(ctx context.Context) ([]GetCategoryUsageCountsRow, error)

func (*Queries) GetCategoryUsageCountsByLanguage

func (q *Queries) GetCategoryUsageCountsByLanguage(ctx context.Context, languageCode string) ([]GetCategoryUsageCountsByLanguageRow, error)

Category usage counts filtered by both page and category language (for frontend sidebar)

func (*Queries) GetConfig

func (q *Queries) GetConfig(ctx context.Context, key string) (Config, error)

func (*Queries) GetConfigByKey

func (q *Queries) GetConfigByKey(ctx context.Context, key string) (Config, error)

func (*Queries) GetConfigTranslation

func (q *Queries) GetConfigTranslation(ctx context.Context, arg GetConfigTranslationParams) (GetConfigTranslationRow, error)

Config Translations (uses language_id as FK to languages table)

func (*Queries) GetContentProvenance added in v0.32.0

func (q *Queries) GetContentProvenance(ctx context.Context, arg GetContentProvenanceParams) (ContentProvenance, error)

func (*Queries) GetDefaultLanguage

func (q *Queries) GetDefaultLanguage(ctx context.Context) (Language, error)

func (*Queries) GetDeliveryStats

func (q *Queries) GetDeliveryStats(ctx context.Context, webhookID int64) (GetDeliveryStatsRow, error)

func (*Queries) GetDeliveryStatsLast24h

func (q *Queries) GetDeliveryStatsLast24h(ctx context.Context, arg GetDeliveryStatsLast24hParams) (GetDeliveryStatsLast24hRow, error)

func (*Queries) GetDescendantIDs

func (q *Queries) GetDescendantIDs(ctx context.Context, parentID sql.NullInt64) ([]int64, error)

func (*Queries) GetEditorialGuide added in v0.32.0

func (q *Queries) GetEditorialGuide(ctx context.Context, languageCode string) (EditorialStyleGuide, error)

func (*Queries) GetEvent

func (q *Queries) GetEvent(ctx context.Context, id int64) (Event, error)

func (*Queries) GetFeaturedImageForPage

func (q *Queries) GetFeaturedImageForPage(ctx context.Context, id int64) (Medium, error)

Featured image queries

func (*Queries) GetFormAvailableTranslations added in v0.1.0

func (q *Queries) GetFormAvailableTranslations(ctx context.Context, entityID int64) ([]GetFormAvailableTranslationsRow, error)

Get all available translations for a form (for language switcher) Translation edges are traversed as an undirected connected component so a sibling remains visible even when it is more than one hop from this form.

func (*Queries) GetFormByID

func (q *Queries) GetFormByID(ctx context.Context, id int64) (Form, error)

func (*Queries) GetFormBySlug

func (q *Queries) GetFormBySlug(ctx context.Context, slug string) (Form, error)

func (*Queries) GetFormBySlugAndLanguage

func (q *Queries) GetFormBySlugAndLanguage(ctx context.Context, arg GetFormBySlugAndLanguageParams) (Form, error)

func (*Queries) GetFormFieldByID

func (q *Queries) GetFormFieldByID(ctx context.Context, id int64) (FormField, error)

func (*Queries) GetFormFields

func (q *Queries) GetFormFields(ctx context.Context, formID int64) ([]FormField, error)

func (*Queries) GetFormSubmissionByID

func (q *Queries) GetFormSubmissionByID(ctx context.Context, id int64) (FormSubmission, error)

func (*Queries) GetFormSubmissions

func (q *Queries) GetFormSubmissions(ctx context.Context, arg GetFormSubmissionsParams) ([]FormSubmission, error)

func (*Queries) GetFormSubmissionsSorted added in v0.10.0

func (q *Queries) GetFormSubmissionsSorted(ctx context.Context, arg GetFormSubmissionsSortedParams) ([]FormSubmission, error)

GetFormSubmissionsSorted lists form submissions with safe whitelist sorting.

func (*Queries) GetIdempotencyKey added in v0.32.0

func (q *Queries) GetIdempotencyKey(ctx context.Context, arg GetIdempotencyKeyParams) (IdempotencyKey, error)

func (*Queries) GetLanguageByCode

func (q *Queries) GetLanguageByCode(ctx context.Context, code string) (Language, error)

func (*Queries) GetLanguageByID

func (q *Queries) GetLanguageByID(ctx context.Context, id int64) (Language, error)

func (*Queries) GetLastSuccessfulDelivery

func (q *Queries) GetLastSuccessfulDelivery(ctx context.Context, webhookID int64) (WebhookDelivery, error)

func (*Queries) GetLatestAuthoringProvenance added in v0.32.0

func (q *Queries) GetLatestAuthoringProvenance(ctx context.Context, arg GetLatestAuthoringProvenanceParams) (ContentProvenance, error)

func (*Queries) GetLatestPageVersion

func (q *Queries) GetLatestPageVersion(ctx context.Context, pageID int64) (PageVersion, error)

func (*Queries) GetLatestTranslationProvenance added in v0.32.0

func (q *Queries) GetLatestTranslationProvenance(ctx context.Context, arg GetLatestTranslationProvenanceParams) (ContentProvenance, error)

func (*Queries) GetLoginProtection added in v0.20.0

func (q *Queries) GetLoginProtection(ctx context.Context, email string) (LoginProtection, error)

func (*Queries) GetMaxLanguagePosition

func (q *Queries) GetMaxLanguagePosition(ctx context.Context) (interface{}, error)

func (*Queries) GetMaxMenuItemPosition

func (q *Queries) GetMaxMenuItemPosition(ctx context.Context, arg GetMaxMenuItemPositionParams) (interface{}, error)

func (*Queries) GetMaxWidgetPosition

func (q *Queries) GetMaxWidgetPosition(ctx context.Context, arg GetMaxWidgetPositionParams) (interface{}, error)

func (*Queries) GetMediaByID

func (q *Queries) GetMediaByID(ctx context.Context, id int64) (Medium, error)

func (*Queries) GetMediaByUUID

func (q *Queries) GetMediaByUUID(ctx context.Context, uuid string) (Medium, error)

func (*Queries) GetMediaFolderByID

func (q *Queries) GetMediaFolderByID(ctx context.Context, id int64) (MediaFolder, error)

func (*Queries) GetMediaTranslation

func (q *Queries) GetMediaTranslation(ctx context.Context, arg GetMediaTranslationParams) (MediaTranslation, error)

Media Translations (uses language_id as FK to languages table)

func (*Queries) GetMediaTranslationAlt added in v0.9.0

func (q *Queries) GetMediaTranslationAlt(ctx context.Context, arg GetMediaTranslationAltParams) (string, error)

func (*Queries) GetMediaTranslationCaption added in v0.9.0

func (q *Queries) GetMediaTranslationCaption(ctx context.Context, arg GetMediaTranslationCaptionParams) (string, error)

func (*Queries) GetMediaTranslations

func (q *Queries) GetMediaTranslations(ctx context.Context, mediaID int64) ([]GetMediaTranslationsRow, error)

func (*Queries) GetMediaVariant

func (q *Queries) GetMediaVariant(ctx context.Context, arg GetMediaVariantParams) (MediaVariant, error)

func (*Queries) GetMediaVariants

func (q *Queries) GetMediaVariants(ctx context.Context, mediaID int64) ([]MediaVariant, error)

func (*Queries) GetMenuByID

func (q *Queries) GetMenuByID(ctx context.Context, id int64) (Menu, error)

func (*Queries) GetMenuBySlug

func (q *Queries) GetMenuBySlug(ctx context.Context, slug string) (Menu, error)

func (*Queries) GetMenuBySlugAndLanguage

func (q *Queries) GetMenuBySlugAndLanguage(ctx context.Context, arg GetMenuBySlugAndLanguageParams) (Menu, error)

func (*Queries) GetMenuForLanguageOrDefault

func (q *Queries) GetMenuForLanguageOrDefault(ctx context.Context, arg GetMenuForLanguageOrDefaultParams) (Menu, error)

Get menu by slug, preferring specified language, falling back to default

func (*Queries) GetMenuItemByID

func (q *Queries) GetMenuItemByID(ctx context.Context, id int64) (MenuItem, error)

func (*Queries) GetModule

func (q *Queries) GetModule(ctx context.Context, name string) (Module, error)

func (*Queries) GetOAuthAccountRefreshBudget added in v0.32.0

func (q *Queries) GetOAuthAccountRefreshBudget(ctx context.Context, arg GetOAuthAccountRefreshBudgetParams) (int64, error)

Include recent rotations from all grants of the account, even revoked ones.

func (*Queries) GetOAuthClient added in v0.32.0

func (q *Queries) GetOAuthClient(ctx context.Context, id string) (OauthClient, error)

func (*Queries) GetOAuthCode added in v0.32.0

func (q *Queries) GetOAuthCode(ctx context.Context, codeHash string) (OauthCode, error)

func (*Queries) GetOAuthDCRRegistrationBudget added in v0.32.0

Read all budgets in one snapshot. The /48 check reads the limit-th newest row so legacy entries above the limit yield the actual recovery time.

func (*Queries) GetOAuthGrant added in v0.32.0

func (q *Queries) GetOAuthGrant(ctx context.Context, id string) (OauthGrant, error)

func (*Queries) GetOAuthGrantRefreshBudget added in v0.32.0

func (q *Queries) GetOAuthGrantRefreshBudget(ctx context.Context, arg GetOAuthGrantRefreshBudgetParams) (int64, error)

The limit-th newest successful rotation determines when the budget frees a slot, including when an existing family was already above the limit.

func (*Queries) GetOAuthTokenByAccess added in v0.32.0

func (q *Queries) GetOAuthTokenByAccess(ctx context.Context, accessHash string) (OauthToken, error)

func (*Queries) GetOAuthTokenByID added in v0.32.0

func (q *Queries) GetOAuthTokenByID(ctx context.Context, id string) (OauthToken, error)

func (*Queries) GetOAuthTokenByRefresh added in v0.32.0

func (q *Queries) GetOAuthTokenByRefresh(ctx context.Context, refreshHash string) (OauthToken, error)

func (*Queries) GetOGImageForPage

func (q *Queries) GetOGImageForPage(ctx context.Context, id int64) (Medium, error)

SEO OG image query

func (*Queries) GetPageAIAccess added in v0.32.0

func (q *Queries) GetPageAIAccess(ctx context.Context, pageID int64) (PageAiAccess, error)

func (*Queries) GetPageAliasByID added in v0.32.0

func (q *Queries) GetPageAliasByID(ctx context.Context, id int64) (PageAlias, error)

func (*Queries) GetPageAuthor

func (q *Queries) GetPageAuthor(ctx context.Context, id int64) (GetPageAuthorRow, error)

func (*Queries) GetPageAvailableTranslations

func (q *Queries) GetPageAvailableTranslations(ctx context.Context, entityID int64) ([]GetPageAvailableTranslationsRow, error)

Get all available translations for a page (for language switcher) Returns every published page in the current translation component. Translation rows form an undirected graph: an entity may be the source or target of an edge, and siblings can be more than one hop away from the current page.

func (*Queries) GetPageByAlias added in v0.23.0

func (q *Queries) GetPageByAlias(ctx context.Context, alias string) (Page, error)

func (*Queries) GetPageByID

func (q *Queries) GetPageByID(ctx context.Context, id int64) (Page, error)

func (*Queries) GetPageByLanguageFromTranslation

func (q *Queries) GetPageByLanguageFromTranslation(ctx context.Context, arg GetPageByLanguageFromTranslationParams) (Page, error)

Page-specific translation queries

func (*Queries) GetPageBySlug

func (q *Queries) GetPageBySlug(ctx context.Context, slug string) (Page, error)

func (*Queries) GetPageReviewState added in v0.32.0

func (q *Queries) GetPageReviewState(ctx context.Context, id int64) (GetPageReviewStateRow, error)

func (*Queries) GetPageSnapshot added in v0.32.0

func (q *Queries) GetPageSnapshot(ctx context.Context, pageID int64) (string, error)

func (*Queries) GetPageTranslationBySlug

func (q *Queries) GetPageTranslationBySlug(ctx context.Context, arg GetPageTranslationBySlugParams) (Page, error)

Get the translation of a page in a specific language (by slug for frontend)

func (q *Queries) GetPageTranslationLinks(ctx context.Context, entityID int64) ([]GetPageTranslationLinksRow, error)

Get all translation links for a page (for language switcher)

func (*Queries) GetPageVersion

func (q *Queries) GetPageVersion(ctx context.Context, id int64) (PageVersion, error)

func (*Queries) GetPageVersionByRevision added in v0.32.0

func (q *Queries) GetPageVersionByRevision(ctx context.Context, arg GetPageVersionByRevisionParams) (PageVersion, error)

func (*Queries) GetPageVersionWithUser

func (q *Queries) GetPageVersionWithUser(ctx context.Context, id int64) (GetPageVersionWithUserRow, error)

func (*Queries) GetPageWithLanguage

func (q *Queries) GetPageWithLanguage(ctx context.Context, id int64) (GetPageWithLanguageRow, error)

Get page with its language information (no JOIN needed - language_code is on pages)

func (*Queries) GetPagesForTag

func (q *Queries) GetPagesForTag(ctx context.Context, arg GetPagesForTagParams) ([]Page, error)

func (*Queries) GetPendingDeliveries

func (q *Queries) GetPendingDeliveries(ctx context.Context, arg GetPendingDeliveriesParams) ([]WebhookDelivery, error)

func (*Queries) GetPreviewIssuanceCutoff added in v0.32.0

func (q *Queries) GetPreviewIssuanceCutoff(ctx context.Context, arg GetPreviewIssuanceCutoffParams) (int64, error)

func (*Queries) GetPreviewLinkByHash added in v0.32.0

func (q *Queries) GetPreviewLinkByHash(ctx context.Context, arg GetPreviewLinkByHashParams) (PreviewLink, error)

func (*Queries) GetPreviousPageVersion added in v0.32.0

func (q *Queries) GetPreviousPageVersion(ctx context.Context, arg GetPreviousPageVersionParams) (PageVersion, error)

func (*Queries) GetPublishedCategoryUsageCounts added in v0.16.0

func (q *Queries) GetPublishedCategoryUsageCounts(ctx context.Context) ([]GetPublishedCategoryUsageCountsRow, error)

func (*Queries) GetPublishedPageByAlias

func (q *Queries) GetPublishedPageByAlias(ctx context.Context, alias string) (Page, error)

func (*Queries) GetPublishedPageByID

func (q *Queries) GetPublishedPageByID(ctx context.Context, id int64) (Page, error)

func (*Queries) GetPublishedPageBySlug

func (q *Queries) GetPublishedPageBySlug(ctx context.Context, slug string) (Page, error)

func (*Queries) GetPublishedPageBySlugAndLanguage

func (q *Queries) GetPublishedPageBySlugAndLanguage(ctx context.Context, arg GetPublishedPageBySlugAndLanguageParams) (Page, error)

func (*Queries) GetPublishedPageWithLanguageBySlug

func (q *Queries) GetPublishedPageWithLanguageBySlug(ctx context.Context, slug string) (GetPublishedPageWithLanguageBySlugRow, error)

Get page with language info by slug (no JOIN needed - language_code is on pages)

func (*Queries) GetPublishedTagUsageCounts added in v0.16.0

func (q *Queries) GetPublishedTagUsageCounts(ctx context.Context, arg GetPublishedTagUsageCountsParams) ([]GetPublishedTagUsageCountsRow, error)

func (*Queries) GetRecentDeliveries

func (q *Queries) GetRecentDeliveries(ctx context.Context, limit int64) ([]WebhookDelivery, error)

func (*Queries) GetRecentFailedDeliveries

func (q *Queries) GetRecentFailedDeliveries(ctx context.Context, limit int64) ([]WebhookDelivery, error)

func (*Queries) GetRecentFailedDeliveriesWithWebhook

func (q *Queries) GetRecentFailedDeliveriesWithWebhook(ctx context.Context, limit int64) ([]GetRecentFailedDeliveriesWithWebhookRow, error)

func (*Queries) GetRecentMedia

func (q *Queries) GetRecentMedia(ctx context.Context, limit int64) ([]Medium, error)

func (*Queries) GetRecentSubmissionsWithForm

func (q *Queries) GetRecentSubmissionsWithForm(ctx context.Context, limit int64) ([]GetRecentSubmissionsWithFormRow, error)

func (*Queries) GetRedirectByID added in v0.5.0

func (q *Queries) GetRedirectByID(ctx context.Context, id int64) (Redirect, error)

func (*Queries) GetRedirectBySourcePath added in v0.5.0

func (q *Queries) GetRedirectBySourcePath(ctx context.Context, sourcePath string) (Redirect, error)

func (*Queries) GetRelatedTranslations

func (q *Queries) GetRelatedTranslations(ctx context.Context, arg GetRelatedTranslationsParams) ([]GetRelatedTranslationsRow, error)

Get all translations related to an entity (where entity is either source or target)

func (*Queries) GetScheduledPagesForPublishing

func (q *Queries) GetScheduledPagesForPublishing(ctx context.Context, scheduledAt sql.NullTime) ([]Page, error)

Scheduled publishing queries

func (*Queries) GetScheduledTask added in v0.8.0

func (q *Queries) GetScheduledTask(ctx context.Context, id int64) (ScheduledTask, error)

func (*Queries) GetSchedulerOverride added in v0.9.0

func (q *Queries) GetSchedulerOverride(ctx context.Context, arg GetSchedulerOverrideParams) (string, error)

func (*Queries) GetTagAvailableTranslations

func (q *Queries) GetTagAvailableTranslations(ctx context.Context, entityID int64) ([]GetTagAvailableTranslationsRow, error)

Get all available translations for a tag (for language switcher) Translation edges are traversed as an undirected connected component so a sibling remains visible even when it is more than one hop from this tag.

func (*Queries) GetTagByID

func (q *Queries) GetTagByID(ctx context.Context, id int64) (Tag, error)

func (*Queries) GetTagBySlug

func (q *Queries) GetTagBySlug(ctx context.Context, slug string) (Tag, error)

func (*Queries) GetTagNamesForAllPages added in v0.15.0

func (q *Queries) GetTagNamesForAllPages(ctx context.Context) ([]GetTagNamesForAllPagesRow, error)

func (*Queries) GetTagNamesForPublishedPages added in v0.16.0

func (q *Queries) GetTagNamesForPublishedPages(ctx context.Context) ([]GetTagNamesForPublishedPagesRow, error)

func (*Queries) GetTagUsageCounts

func (q *Queries) GetTagUsageCounts(ctx context.Context, arg GetTagUsageCountsParams) ([]GetTagUsageCountsRow, error)

func (*Queries) GetTagUsageCountsByLanguage

func (q *Queries) GetTagUsageCountsByLanguage(ctx context.Context, arg GetTagUsageCountsByLanguageParams) ([]GetTagUsageCountsByLanguageRow, error)

Tag usage counts filtered by both page and tag language (for frontend sidebar)

func (*Queries) GetTagUsageCountsSorted added in v0.10.0

func (q *Queries) GetTagUsageCountsSorted(ctx context.Context, arg GetTagUsageCountsSortedParams) ([]GetTagUsageCountsRow, error)

GetTagUsageCountsSorted lists tags with usage counts, optional filters, and safe whitelist sorting.

func (*Queries) GetTagsForPage

func (q *Queries) GetTagsForPage(ctx context.Context, pageID int64) ([]Tag, error)

func (*Queries) GetTranslatedEntityID

func (q *Queries) GetTranslatedEntityID(ctx context.Context, arg GetTranslatedEntityIDParams) (int64, error)

Get the translated entity ID for a given entity and target language

func (*Queries) GetTranslation

func (q *Queries) GetTranslation(ctx context.Context, arg GetTranslationParams) (Translation, error)

func (*Queries) GetTranslationByID

func (q *Queries) GetTranslationByID(ctx context.Context, id int64) (Translation, error)

func (*Queries) GetTranslationComponentEntityByLanguage added in v0.23.0

func (q *Queries) GetTranslationComponentEntityByLanguage(ctx context.Context, arg GetTranslationComponentEntityByLanguageParams) (int64, error)

Return an entity in the same translation component that already owns the requested language. This keeps Translate actions from creating a second entity for a language when the existing entity is connected through a sibling rather than a direct outgoing edge.

func (*Queries) GetTranslationCountsBatch

func (q *Queries) GetTranslationCountsBatch(ctx context.Context, entityType string) ([]GetTranslationCountsBatchRow, error)

Batch get translation counts for multiple entities (for page lists) Returns translation count per entity

func (*Queries) GetTranslationCoverage

func (q *Queries) GetTranslationCoverage(ctx context.Context) ([]GetTranslationCoverageRow, error)

Get page count per active language for translation coverage dashboard widget

func (*Queries) GetTranslationStats

func (q *Queries) GetTranslationStats(ctx context.Context) (GetTranslationStatsRow, error)

Get total translation statistics

func (*Queries) GetTranslationsForEntity

func (q *Queries) GetTranslationsForEntity(ctx context.Context, arg GetTranslationsForEntityParams) ([]GetTranslationsForEntityRow, error)

func (*Queries) GetTranslationsForPagesBatch

func (q *Queries) GetTranslationsForPagesBatch(ctx context.Context) ([]GetTranslationsForPagesBatchRow, error)

Batch get translations for multiple page IDs (for page list with translations indicator)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)

func (*Queries) GetUserByID

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

func (*Queries) GetUserTOTP added in v0.30.0

func (q *Queries) GetUserTOTP(ctx context.Context, userID int64) (UserTotp, error)

func (*Queries) GetWebhookByID

func (q *Queries) GetWebhookByID(ctx context.Context, id int64) (Webhook, error)

func (*Queries) GetWebhookDelivery

func (q *Queries) GetWebhookDelivery(ctx context.Context, id int64) (WebhookDelivery, error)

func (*Queries) GetWebhookHealthSummary

func (q *Queries) GetWebhookHealthSummary(ctx context.Context, createdAt time.Time) ([]GetWebhookHealthSummaryRow, error)

func (*Queries) GetWidget

func (q *Queries) GetWidget(ctx context.Context, id int64) (Widget, error)

func (*Queries) GetWidgetsByThemeAndArea

func (q *Queries) GetWidgetsByThemeAndArea(ctx context.Context, arg GetWidgetsByThemeAndAreaParams) ([]Widget, error)

func (*Queries) IsModuleActive

func (q *Queries) IsModuleActive(ctx context.Context, name string) (bool, error)

func (*Queries) IsModuleMigrationApplied added in v0.9.0

func (q *Queries) IsModuleMigrationApplied(ctx context.Context, arg IsModuleMigrationAppliedParams) (int64, error)

func (*Queries) LanguageCodeExists

func (q *Queries) LanguageCodeExists(ctx context.Context, code string) (int64, error)

func (*Queries) LanguageCodeExistsExcluding

func (q *Queries) LanguageCodeExistsExcluding(ctx context.Context, arg LanguageCodeExistsExcludingParams) (int64, error)

func (*Queries) ListAPIKeySourceCIDRs added in v0.9.0

func (q *Queries) ListAPIKeySourceCIDRs(ctx context.Context, apiKeyID int64) ([]string, error)

ListAPIKeySourceCIDRs returns all CIDR/IP allowlist entries for an API key.

func (*Queries) ListAPIKeys

func (q *Queries) ListAPIKeys(ctx context.Context, arg ListAPIKeysParams) ([]ApiKey, error)

func (*Queries) ListAPIKeysByUser

func (q *Queries) ListAPIKeysByUser(ctx context.Context, arg ListAPIKeysByUserParams) ([]ApiKey, error)

func (*Queries) ListAPIKeysSorted added in v0.10.0

func (q *Queries) ListAPIKeysSorted(ctx context.Context, arg ListAPIKeysSortedParams) ([]ApiKey, error)

ListAPIKeysSorted lists API keys with safe whitelist sorting.

func (q *Queries) ListActiveAgentPreviewLinks(ctx context.Context, expiresAt int64) ([]ListActiveAgentPreviewLinksRow, error)

Share links an AI client issued (through an OAuth grant or API key) that are still usable, for the MCP admin page.

func (*Queries) ListActiveLanguages

func (q *Queries) ListActiveLanguages(ctx context.Context) ([]Language, error)

func (*Queries) ListActiveModules

func (q *Queries) ListActiveModules(ctx context.Context) ([]string, error)

func (*Queries) ListActiveScheduledTasks added in v0.8.0

func (q *Queries) ListActiveScheduledTasks(ctx context.Context) ([]ScheduledTask, error)

func (*Queries) ListActiveWebhooks

func (q *Queries) ListActiveWebhooks(ctx context.Context) ([]Webhook, error)

func (*Queries) ListAllConfigTranslations

func (q *Queries) ListAllConfigTranslations(ctx context.Context) ([]ListAllConfigTranslationsRow, error)

func (*Queries) ListAllTags

func (q *Queries) ListAllTags(ctx context.Context) ([]Tag, error)

func (*Queries) ListCategories

func (q *Queries) ListCategories(ctx context.Context) ([]Category, error)

func (*Queries) ListCategoriesByLanguage

func (q *Queries) ListCategoriesByLanguage(ctx context.Context, languageCode string) ([]Category, error)

Language-specific category queries (no JOINs needed - language_code is directly on the table)

func (*Queries) ListCategoriesForSitemap

func (q *Queries) ListCategoriesForSitemap(ctx context.Context) ([]ListCategoriesForSitemapRow, error)

func (*Queries) ListChildCategories

func (q *Queries) ListChildCategories(ctx context.Context, parentID sql.NullInt64) ([]Category, error)

func (*Queries) ListChildMediaFolders

func (q *Queries) ListChildMediaFolders(ctx context.Context, parentID sql.NullInt64) ([]MediaFolder, error)

func (*Queries) ListChildMenuItemIDs added in v0.23.0

func (q *Queries) ListChildMenuItemIDs(ctx context.Context, parentID sql.NullInt64) ([]int64, error)

func (*Queries) ListChildMenuItems

func (q *Queries) ListChildMenuItems(ctx context.Context, parentID sql.NullInt64) ([]MenuItem, error)

func (*Queries) ListClaimChecks added in v0.32.0

func (q *Queries) ListClaimChecks(ctx context.Context, provenanceID int64) ([]ListClaimChecksRow, error)

func (*Queries) ListConfig

func (q *Queries) ListConfig(ctx context.Context) ([]Config, error)

func (*Queries) ListConfigTranslations

func (q *Queries) ListConfigTranslations(ctx context.Context, configKey string) ([]ListConfigTranslationsRow, error)

func (*Queries) ListConnectedAPIKeys added in v0.32.0

func (q *Queries) ListConnectedAPIKeys(ctx context.Context, arg ListConnectedAPIKeysParams) ([]ListConnectedAPIKeysRow, error)

func (*Queries) ListConnectedOAuthGrants added in v0.32.0

func (q *Queries) ListConnectedOAuthGrants(ctx context.Context, arg ListConnectedOAuthGrantsParams) ([]ListConnectedOAuthGrantsRow, error)

These projections deliberately omit credential hashes, lookups and prefixes. all_users is set only after checking the current actor's admin role. A grant exists from consent, before any token does. One that never issued a token is not a connection yet (it may never become one), so it is not listed; revocation by ID still reaches it, and the retention job removes it.

func (*Queries) ListEditorialPresets added in v0.32.0

func (q *Queries) ListEditorialPresets(ctx context.Context, languageCode string) ([]EditorialPreset, error)

func (*Queries) ListEnabledRedirects added in v0.5.0

func (q *Queries) ListEnabledRedirects(ctx context.Context) ([]Redirect, error)

func (*Queries) ListEvents

func (q *Queries) ListEvents(ctx context.Context, arg ListEventsParams) ([]Event, error)

func (*Queries) ListEventsByCategory

func (q *Queries) ListEventsByCategory(ctx context.Context, arg ListEventsByCategoryParams) ([]Event, error)

func (*Queries) ListEventsByLevel

func (q *Queries) ListEventsByLevel(ctx context.Context, arg ListEventsByLevelParams) ([]Event, error)

func (*Queries) ListEventsByLevelAndCategory

func (q *Queries) ListEventsByLevelAndCategory(ctx context.Context, arg ListEventsByLevelAndCategoryParams) ([]Event, error)

func (*Queries) ListEventsWithUser

func (q *Queries) ListEventsWithUser(ctx context.Context, arg ListEventsWithUserParams) ([]ListEventsWithUserRow, error)

func (*Queries) ListEventsWithUserByLevel

func (q *Queries) ListEventsWithUserByLevel(ctx context.Context, arg ListEventsWithUserByLevelParams) ([]ListEventsWithUserByLevelRow, error)

func (*Queries) ListFeedPosts added in v0.26.0

func (q *Queries) ListFeedPosts(ctx context.Context, arg ListFeedPostsParams) ([]ListFeedPostsRow, error)

Apply all visibility and taxonomy filters before the fixed feed limit. Compare seconds and fractions separately; SQLite dates round to milliseconds.

func (*Queries) ListForms

func (q *Queries) ListForms(ctx context.Context, arg ListFormsParams) ([]Form, error)

func (*Queries) ListFormsByLanguage

func (q *Queries) ListFormsByLanguage(ctx context.Context, arg ListFormsByLanguageParams) ([]Form, error)

func (*Queries) ListGroundingCategories added in v0.32.0

func (q *Queries) ListGroundingCategories(ctx context.Context, arg ListGroundingCategoriesParams) ([]Category, error)

func (*Queries) ListGroundingImages added in v0.32.0

func (q *Queries) ListGroundingImages(ctx context.Context, arg ListGroundingImagesParams) ([]Medium, error)

func (*Queries) ListGroundingLanguages added in v0.32.0

func (q *Queries) ListGroundingLanguages(ctx context.Context, arg ListGroundingLanguagesParams) ([]Language, error)

func (*Queries) ListGroundingPages added in v0.32.0

func (q *Queries) ListGroundingPages(ctx context.Context, arg ListGroundingPagesParams) ([]Page, error)

func (*Queries) ListGroundingTags added in v0.32.0

func (q *Queries) ListGroundingTags(ctx context.Context, arg ListGroundingTagsParams) ([]Tag, error)

func (*Queries) ListLanguages

func (q *Queries) ListLanguages(ctx context.Context) ([]Language, error)

func (*Queries) ListMedia

func (q *Queries) ListMedia(ctx context.Context, arg ListMediaParams) ([]Medium, error)

func (*Queries) ListMediaByType

func (q *Queries) ListMediaByType(ctx context.Context, arg ListMediaByTypeParams) ([]Medium, error)

func (*Queries) ListMediaFolders

func (q *Queries) ListMediaFolders(ctx context.Context) ([]MediaFolder, error)

func (*Queries) ListMediaInFolder

func (q *Queries) ListMediaInFolder(ctx context.Context, arg ListMediaInFolderParams) ([]Medium, error)

func (*Queries) ListMediaInRootFolder

func (q *Queries) ListMediaInRootFolder(ctx context.Context, arg ListMediaInRootFolderParams) ([]Medium, error)

func (*Queries) ListMediaSorted added in v0.10.0

func (q *Queries) ListMediaSorted(ctx context.Context, arg ListMediaSortedParams) ([]Medium, error)

ListMediaSorted lists media with optional filters and safe whitelist sorting.

func (*Queries) ListMenuItemIDsForPage added in v0.23.0

func (q *Queries) ListMenuItemIDsForPage(ctx context.Context, pageID sql.NullInt64) ([]int64, error)

func (*Queries) ListMenuItems

func (q *Queries) ListMenuItems(ctx context.Context, menuID int64) ([]MenuItem, error)

func (*Queries) ListMenuItemsWithPage

func (q *Queries) ListMenuItemsWithPage(ctx context.Context, menuID int64) ([]ListMenuItemsWithPageRow, error)

Menu item with page info

func (*Queries) ListMenuItemsWithPublishedPage added in v0.16.0

func (q *Queries) ListMenuItemsWithPublishedPage(ctx context.Context, menuID int64) ([]ListMenuItemsWithPublishedPageRow, error)

func (*Queries) ListMenus

func (q *Queries) ListMenus(ctx context.Context) ([]Menu, error)

func (*Queries) ListMenusByLanguage

func (q *Queries) ListMenusByLanguage(ctx context.Context, languageCode string) ([]Menu, error)

Language-specific menu queries (no JOINs needed for most - language_code is directly on the table)

func (*Queries) ListModules

func (q *Queries) ListModules(ctx context.Context) ([]Module, error)

func (*Queries) ListOAuthGrantsForUser added in v0.32.0

func (q *Queries) ListOAuthGrantsForUser(ctx context.Context, arg ListOAuthGrantsForUserParams) ([]ListOAuthGrantsForUserRow, error)

func (*Queries) ListOwnAIDrafts added in v0.32.0

func (q *Queries) ListOwnAIDrafts(ctx context.Context, arg ListOwnAIDraftsParams) ([]Page, error)

func (*Queries) ListPageIDsByLanguage added in v0.32.0

func (q *Queries) ListPageIDsByLanguage(ctx context.Context, languageCode string) ([]int64, error)

func (*Queries) ListPageIDsForCategory added in v0.32.0

func (q *Queries) ListPageIDsForCategory(ctx context.Context, categoryID int64) ([]int64, error)

func (*Queries) ListPageIDsForMedia added in v0.32.0

func (q *Queries) ListPageIDsForMedia(ctx context.Context, arg ListPageIDsForMediaParams) ([]int64, error)

func (*Queries) ListPageIDsForTag added in v0.32.0

func (q *Queries) ListPageIDsForTag(ctx context.Context, tagID int64) ([]int64, error)
func (q *Queries) ListPagePreviewLinks(ctx context.Context, arg ListPagePreviewLinksParams) ([]ListPagePreviewLinksRow, error)

func (*Queries) ListPageVersions

func (q *Queries) ListPageVersions(ctx context.Context, arg ListPageVersionsParams) ([]PageVersion, error)

func (*Queries) ListPageVersionsWithUser

func (q *Queries) ListPageVersionsWithUser(ctx context.Context, arg ListPageVersionsWithUserParams) ([]ListPageVersionsWithUserRow, error)

func (*Queries) ListPages

func (q *Queries) ListPages(ctx context.Context, arg ListPagesParams) ([]Page, error)

func (*Queries) ListPagesByCategory

func (q *Queries) ListPagesByCategory(ctx context.Context, arg ListPagesByCategoryParams) ([]Page, error)

func (*Queries) ListPagesByLanguage

func (q *Queries) ListPagesByLanguage(ctx context.Context, arg ListPagesByLanguageParams) ([]Page, error)

List all pages for a specific language

func (*Queries) ListPagesByLanguageAndStatus

func (q *Queries) ListPagesByLanguageAndStatus(ctx context.Context, arg ListPagesByLanguageAndStatusParams) ([]Page, error)

Language-related page queries (no JOINs needed - language_code is directly on the table)

func (*Queries) ListPagesByStatus

func (q *Queries) ListPagesByStatus(ctx context.Context, arg ListPagesByStatusParams) ([]Page, error)

func (*Queries) ListPagesInLanguage added in v0.32.0

func (q *Queries) ListPagesInLanguage(ctx context.Context, arg ListPagesInLanguageParams) ([]Page, error)

func (*Queries) ListPagesSorted added in v0.10.0

func (q *Queries) ListPagesSorted(ctx context.Context, arg ListPagesSortedParams) ([]Page, error)

ListPagesSorted lists pages with optional filters and safe whitelist sorting.

func (*Queries) ListPrunableAIDraftRevisions added in v0.32.0

func (q *Queries) ListPrunableAIDraftRevisions(ctx context.Context, arg ListPrunableAIDraftRevisionsParams) ([]ListPrunableAIDraftRevisionsRow, error)

Revision retention for AI drafts. An AI draft is exactly what ListOwnAIDrafts selects, for any owner: AI access on, status draft, not scheduled. Published, scheduled and non-AI pages are never listed here.

Eligible: complete revisions older than the newest `keep` revision numbers, except revisions that something still reads:

  • the current revision (covered by the age rule; the join keeps it explicit);
  • a revision pinned by an unrevoked, unexpired preview link;
  • the newest revision whose evidence carries a prompt contract version, or a translation basis: the lookups behind publication validation and the translation status read "the latest such revision at or before current";
  • a revision recorded as a reference by the current evidence of an AI draft, because inheriting references re-reads that revision's body.

Legacy title/body rows have no revision number and are never selected. Only revisions an agent or API key wrote (provenance source api or oauth) are removed: an editor's saves and system revisions (a scheduled or manual publication, a translation link) are history the site owns, also on a page whose AI access was switched on later or that went back to draft.

func (*Queries) ListPublishedPages

func (q *Queries) ListPublishedPages(ctx context.Context, arg ListPublishedPagesParams) ([]Page, error)

Frontend queries for public pages

func (*Queries) ListPublishedPagesByCategory

func (q *Queries) ListPublishedPagesByCategory(ctx context.Context, arg ListPublishedPagesByCategoryParams) ([]Page, error)

func (*Queries) ListPublishedPagesByCategoryAndLanguage

func (q *Queries) ListPublishedPagesByCategoryAndLanguage(ctx context.Context, arg ListPublishedPagesByCategoryAndLanguageParams) ([]Page, error)

Frontend queries filtered by language (for showing pages in current language only)

func (*Queries) ListPublishedPagesByLanguage

func (q *Queries) ListPublishedPagesByLanguage(ctx context.Context, arg ListPublishedPagesByLanguageParams) ([]Page, error)

List published pages for a specific language

func (*Queries) ListPublishedPagesForSitemap

func (q *Queries) ListPublishedPagesForSitemap(ctx context.Context) ([]ListPublishedPagesForSitemapRow, error)

func (*Queries) ListPublishedPagesForTag

func (q *Queries) ListPublishedPagesForTag(ctx context.Context, arg ListPublishedPagesForTagParams) ([]Page, error)

func (*Queries) ListPublishedPagesForTagAndLanguage

func (q *Queries) ListPublishedPagesForTagAndLanguage(ctx context.Context, arg ListPublishedPagesForTagAndLanguageParams) ([]Page, error)

func (*Queries) ListPublishedPosts added in v0.3.0

func (q *Queries) ListPublishedPosts(ctx context.Context, arg ListPublishedPostsParams) ([]Page, error)

Posts only (for recent posts, blog feeds - excludes static pages)

func (*Queries) ListPublishedPostsByLanguage added in v0.3.0

func (q *Queries) ListPublishedPostsByLanguage(ctx context.Context, arg ListPublishedPostsByLanguageParams) ([]Page, error)

Posts only for a specific language (for recent posts, blog feeds - excludes static pages)

func (*Queries) ListRedirects added in v0.5.0

func (q *Queries) ListRedirects(ctx context.Context) ([]Redirect, error)

func (*Queries) ListRedirectsPaginated added in v0.5.0

func (q *Queries) ListRedirectsPaginated(ctx context.Context, arg ListRedirectsPaginatedParams) ([]Redirect, error)

func (*Queries) ListRootCategories

func (q *Queries) ListRootCategories(ctx context.Context) ([]Category, error)

func (*Queries) ListRootMediaFolders

func (q *Queries) ListRootMediaFolders(ctx context.Context) ([]MediaFolder, error)

func (*Queries) ListScheduledPages

func (q *Queries) ListScheduledPages(ctx context.Context, arg ListScheduledPagesParams) ([]Page, error)

func (*Queries) ListScheduledTaskRuns added in v0.8.0

func (q *Queries) ListScheduledTaskRuns(ctx context.Context, arg ListScheduledTaskRunsParams) ([]ScheduledTaskRun, error)

func (*Queries) ListScheduledTasks added in v0.8.0

func (q *Queries) ListScheduledTasks(ctx context.Context) ([]ScheduledTask, error)

func (*Queries) ListSidebarModules

func (q *Queries) ListSidebarModules(ctx context.Context) ([]Module, error)

func (*Queries) ListTags

func (q *Queries) ListTags(ctx context.Context, arg ListTagsParams) ([]Tag, error)

func (*Queries) ListTagsByLanguage

func (q *Queries) ListTagsByLanguage(ctx context.Context, languageCode string) ([]Tag, error)

Language-specific tag queries (no JOINs needed - language_code is directly on the table)

func (*Queries) ListTagsForSitemap

func (q *Queries) ListTagsForSitemap(ctx context.Context) ([]ListTagsForSitemapRow, error)

func (*Queries) ListTopLevelMenuItems

func (q *Queries) ListTopLevelMenuItems(ctx context.Context, menuID int64) ([]MenuItem, error)

func (*Queries) ListTranslationComponentMembers added in v0.23.0

List every other entity in the same undirected translation component with its actual language. Admin editors use this to show complete translation state even when the current entity is a translated child of a star graph.

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)

func (*Queries) ListUsersSorted added in v0.10.0

func (q *Queries) ListUsersSorted(ctx context.Context, arg ListUsersSortedParams) ([]User, error)

ListUsersSorted lists users with safe whitelist sorting.

func (*Queries) ListWebhookDeliveries

func (q *Queries) ListWebhookDeliveries(ctx context.Context, arg ListWebhookDeliveriesParams) ([]WebhookDelivery, error)

func (*Queries) ListWebhooks

func (q *Queries) ListWebhooks(ctx context.Context) ([]Webhook, error)

func (*Queries) ListWebhooksForEvent

func (q *Queries) ListWebhooksForEvent(ctx context.Context, dollar_1 sql.NullString) ([]Webhook, error)

func (*Queries) ListWebhooksPaginated

func (q *Queries) ListWebhooksPaginated(ctx context.Context, arg ListWebhooksPaginatedParams) ([]Webhook, error)

func (*Queries) MarkSubmissionRead

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

func (*Queries) MenuSlugExists

func (q *Queries) MenuSlugExists(ctx context.Context, slug string) (int64, error)

func (*Queries) MenuSlugExistsExcluding

func (q *Queries) MenuSlugExistsExcluding(ctx context.Context, arg MenuSlugExistsExcludingParams) (int64, error)

func (*Queries) MenuSlugExistsForLanguage

func (q *Queries) MenuSlugExistsForLanguage(ctx context.Context, arg MenuSlugExistsForLanguageParams) (int64, error)

func (*Queries) MenuSlugExistsForLanguageExcluding

func (q *Queries) MenuSlugExistsForLanguageExcluding(ctx context.Context, arg MenuSlugExistsForLanguageExcludingParams) (int64, error)

func (*Queries) MoveMediaToFolder

func (q *Queries) MoveMediaToFolder(ctx context.Context, arg MoveMediaToFolderParams) error

func (*Queries) PageRouteExistsUnderPrefix added in v0.23.0

func (q *Queries) PageRouteExistsUnderPrefix(ctx context.Context, prefix string) (int64, error)

Reports whether any page route lives at a first path segment, either as a page slug, as an alias, or as an alias nested under it. A language whose code equals that segment would swallow all three: the language middleware strips the segment before the frontend router ever sees it. The LIKE pattern needs no escaping because language codes are restricted to lowercase letters, digits and hyphens, none of which are LIKE wildcards.

func (*Queries) PublishPage

func (q *Queries) PublishPage(ctx context.Context, arg PublishPageParams) (Page, error)

func (*Queries) PublishScheduledPage

func (q *Queries) PublishScheduledPage(ctx context.Context, arg PublishScheduledPageParams) (Page, error)

Publishes the page only while it is still a draft scheduled by the given time, so a page published, unscheduled or rescheduled to a later time after the scheduler listed it is left alone.

func (*Queries) PublishUnpublishedPage added in v0.29.0

func (q *Queries) PublishUnpublishedPage(ctx context.Context, arg PublishUnpublishedPageParams) (Page, error)

Publishes the page only while it is not published, so a request that read it as a draft cannot publish it a second time after the scheduler did.

func (*Queries) RecordModuleMigration added in v0.9.0

func (q *Queries) RecordModuleMigration(ctx context.Context, arg RecordModuleMigrationParams) error

func (*Queries) RecordOAuthDCRRegistration added in v0.32.0

func (q *Queries) RecordOAuthDCRRegistration(ctx context.Context, arg RecordOAuthDCRRegistrationParams) error

func (*Queries) RedirectSourcePathExists added in v0.5.0

func (q *Queries) RedirectSourcePathExists(ctx context.Context, sourcePath string) (int64, error)

func (*Queries) RedirectSourcePathExistsExcluding added in v0.5.0

func (q *Queries) RedirectSourcePathExistsExcluding(ctx context.Context, arg RedirectSourcePathExistsExcludingParams) (int64, error)

func (*Queries) RemoveCategoryFromPage

func (q *Queries) RemoveCategoryFromPage(ctx context.Context, arg RemoveCategoryFromPageParams) error

func (*Queries) RemoveTagFromPage

func (q *Queries) RemoveTagFromPage(ctx context.Context, arg RemoveTagFromPageParams) error

func (*Queries) ReparentMenuItemChildren added in v0.23.0

func (q *Queries) ReparentMenuItemChildren(ctx context.Context, arg ReparentMenuItemChildrenParams) error

func (*Queries) ReplaceAPIKeySourceCIDRs added in v0.9.0

func (q *Queries) ReplaceAPIKeySourceCIDRs(ctx context.Context, apiKeyID int64, cidrs []string) error

ReplaceAPIKeySourceCIDRs replaces source CIDR allowlist entries for an API key.

func (*Queries) ResetDeliveryForRetry

func (q *Queries) ResetDeliveryForRetry(ctx context.Context, arg ResetDeliveryForRetryParams) error
func (q *Queries) RevokeAgentPreviewLink(ctx context.Context, arg RevokeAgentPreviewLinkParams) (int64, error)

func (*Queries) RevokeConnectedAPIKey added in v0.32.0

func (q *Queries) RevokeConnectedAPIKey(ctx context.Context, arg RevokeConnectedAPIKeyParams) (int64, error)

func (*Queries) RevokeConnectedOAuthGrant added in v0.32.0

func (q *Queries) RevokeConnectedOAuthGrant(ctx context.Context, arg RevokeConnectedOAuthGrantParams) (int64, error)

func (*Queries) RevokeOAuthGrant added in v0.32.0

func (q *Queries) RevokeOAuthGrant(ctx context.Context, arg RevokeOAuthGrantParams) error

func (*Queries) RevokeOAuthGrantByAccess added in v0.32.0

func (q *Queries) RevokeOAuthGrantByAccess(ctx context.Context, arg RevokeOAuthGrantByAccessParams) (int64, error)

func (*Queries) RevokeOwnedOAuthGrant added in v0.32.0

func (q *Queries) RevokeOwnedOAuthGrant(ctx context.Context, arg RevokeOwnedOAuthGrantParams) (int64, error)
func (q *Queries) RevokePagePreviewLink(ctx context.Context, arg RevokePagePreviewLinkParams) (int64, error)

func (*Queries) SearchCategories

func (q *Queries) SearchCategories(ctx context.Context, dollar_1 sql.NullString) ([]Category, error)

func (*Queries) SearchMedia

func (q *Queries) SearchMedia(ctx context.Context, arg SearchMediaParams) ([]Medium, error)

func (*Queries) SearchPages

func (q *Queries) SearchPages(ctx context.Context, arg SearchPagesParams) ([]Page, error)

Admin search queries (using LIKE for searching all pages regardless of status)

func (*Queries) SearchPagesByLanguage

func (q *Queries) SearchPagesByLanguage(ctx context.Context, arg SearchPagesByLanguageParams) ([]Page, error)

func (*Queries) SearchPagesByStatus

func (q *Queries) SearchPagesByStatus(ctx context.Context, arg SearchPagesByStatusParams) ([]Page, error)

func (*Queries) SearchTags

func (q *Queries) SearchTags(ctx context.Context, arg SearchTagsParams) ([]Tag, error)

func (*Queries) SetAPIKeyLookup added in v0.28.0

func (q *Queries) SetAPIKeyLookup(ctx context.Context, arg SetAPIKeyLookupParams) error

func (*Queries) SetDefaultLanguage

func (q *Queries) SetDefaultLanguage(ctx context.Context, arg SetDefaultLanguageParams) error

func (*Queries) SetModuleShowInSidebar

func (q *Queries) SetModuleShowInSidebar(ctx context.Context, arg SetModuleShowInSidebarParams) (Module, error)

func (*Queries) SetPageAIAccess added in v0.32.0

func (q *Queries) SetPageAIAccess(ctx context.Context, arg SetPageAIAccessParams) error

func (*Queries) SlugExists

func (q *Queries) SlugExists(ctx context.Context, slug string) (int64, error)

func (*Queries) SlugExistsExcluding

func (q *Queries) SlugExistsExcluding(ctx context.Context, arg SlugExistsExcludingParams) (int64, error)

func (*Queries) SlugOrAliasExists

func (q *Queries) SlugOrAliasExists(ctx context.Context, arg SlugOrAliasExistsParams) (int64, error)

Cross-table uniqueness checks (slug vs page_aliases)

func (*Queries) SlugOrAliasExistsExcluding

func (q *Queries) SlugOrAliasExistsExcluding(ctx context.Context, arg SlugOrAliasExistsExcludingParams) (int64, error)

func (*Queries) TagSlugExists

func (q *Queries) TagSlugExists(ctx context.Context, slug string) (int64, error)

func (*Queries) TagSlugExistsExcluding

func (q *Queries) TagSlugExistsExcluding(ctx context.Context, arg TagSlugExistsExcludingParams) (int64, error)

func (*Queries) TagSlugExistsExcludingForLanguage

func (q *Queries) TagSlugExistsExcludingForLanguage(ctx context.Context, arg TagSlugExistsExcludingForLanguageParams) (int64, error)

func (*Queries) TagSlugExistsForLanguage

func (q *Queries) TagSlugExistsForLanguage(ctx context.Context, arg TagSlugExistsForLanguageParams) (int64, error)

func (*Queries) ToggleRedirectEnabled added in v0.5.0

func (q *Queries) ToggleRedirectEnabled(ctx context.Context, arg ToggleRedirectEnabledParams) error

func (*Queries) ToggleScheduledTask added in v0.8.0

func (q *Queries) ToggleScheduledTask(ctx context.Context, arg ToggleScheduledTaskParams) (ScheduledTask, error)

func (*Queries) TouchOAuthGrant added in v0.32.0

func (q *Queries) TouchOAuthGrant(ctx context.Context, arg TouchOAuthGrantParams) error

func (*Queries) TouchOAuthGrantIfDue added in v0.32.0

func (q *Queries) TouchOAuthGrantIfDue(ctx context.Context, arg TouchOAuthGrantIfDueParams) error

func (*Queries) TranslationExists

func (q *Queries) TranslationExists(ctx context.Context, arg TranslationExistsParams) (int64, error)

Check if translation exists

func (*Queries) UncheckClaim added in v0.32.0

func (q *Queries) UncheckClaim(ctx context.Context, arg UncheckClaimParams) error

func (*Queries) UnpublishPage

func (q *Queries) UnpublishPage(ctx context.Context, arg UnpublishPageParams) (Page, error)

Unpublishes the page only while it is published.

func (*Queries) UpdateAPIKey

func (q *Queries) UpdateAPIKey(ctx context.Context, arg UpdateAPIKeyParams) (ApiKey, error)

func (*Queries) UpdateAPIKeyLastUsed

func (q *Queries) UpdateAPIKeyLastUsed(ctx context.Context, arg UpdateAPIKeyLastUsedParams) error

func (*Queries) UpdateCategory

func (q *Queries) UpdateCategory(ctx context.Context, arg UpdateCategoryParams) (Category, error)

func (*Queries) UpdateCategoryLanguage

func (q *Queries) UpdateCategoryLanguage(ctx context.Context, arg UpdateCategoryLanguageParams) error

func (*Queries) UpdateCategoryPosition

func (q *Queries) UpdateCategoryPosition(ctx context.Context, arg UpdateCategoryPositionParams) error

func (*Queries) UpdateConfigValue

func (q *Queries) UpdateConfigValue(ctx context.Context, arg UpdateConfigValueParams) (Config, error)

func (*Queries) UpdateDeliveryDead

func (q *Queries) UpdateDeliveryDead(ctx context.Context, arg UpdateDeliveryDeadParams) error

func (*Queries) UpdateDeliveryRetry

func (q *Queries) UpdateDeliveryRetry(ctx context.Context, arg UpdateDeliveryRetryParams) error

func (*Queries) UpdateDeliverySuccess

func (q *Queries) UpdateDeliverySuccess(ctx context.Context, arg UpdateDeliverySuccessParams) error

func (*Queries) UpdateForm

func (q *Queries) UpdateForm(ctx context.Context, arg UpdateFormParams) (Form, error)

func (*Queries) UpdateFormField

func (q *Queries) UpdateFormField(ctx context.Context, arg UpdateFormFieldParams) (FormField, error)

func (*Queries) UpdateLanguage

func (q *Queries) UpdateLanguage(ctx context.Context, arg UpdateLanguageParams) (Language, error)

func (*Queries) UpdateLanguagePosition

func (q *Queries) UpdateLanguagePosition(ctx context.Context, arg UpdateLanguagePositionParams) error

func (*Queries) UpdateMedia

func (q *Queries) UpdateMedia(ctx context.Context, arg UpdateMediaParams) (Medium, error)

func (*Queries) UpdateMediaFolder

func (q *Queries) UpdateMediaFolder(ctx context.Context, arg UpdateMediaFolderParams) (MediaFolder, error)

func (*Queries) UpdateMediaForImport added in v0.23.0

func (q *Queries) UpdateMediaForImport(ctx context.Context, arg UpdateMediaForImportParams) (Medium, error)

func (*Queries) UpdateMenu

func (q *Queries) UpdateMenu(ctx context.Context, arg UpdateMenuParams) (Menu, error)

func (*Queries) UpdateMenuItem

func (q *Queries) UpdateMenuItem(ctx context.Context, arg UpdateMenuItemParams) (MenuItem, error)

func (*Queries) UpdateMenuItemPosition

func (q *Queries) UpdateMenuItemPosition(ctx context.Context, arg UpdateMenuItemPositionParams) error

func (*Queries) UpdatePage

func (q *Queries) UpdatePage(ctx context.Context, arg UpdatePageParams) (Page, error)

func (*Queries) UpdatePageCreatedAt added in v0.16.0

func (q *Queries) UpdatePageCreatedAt(ctx context.Context, arg UpdatePageCreatedAtParams) error

func (*Queries) UpdatePageFeaturedImage

func (q *Queries) UpdatePageFeaturedImage(ctx context.Context, arg UpdatePageFeaturedImageParams) error

func (*Queries) UpdatePageLanguage

func (q *Queries) UpdatePageLanguage(ctx context.Context, arg UpdatePageLanguageParams) error

Update page language

func (*Queries) UpdateRedirect added in v0.5.0

func (q *Queries) UpdateRedirect(ctx context.Context, arg UpdateRedirectParams) (Redirect, error)

func (*Queries) UpdateScheduledTask added in v0.8.0

func (q *Queries) UpdateScheduledTask(ctx context.Context, arg UpdateScheduledTaskParams) (ScheduledTask, error)

func (*Queries) UpdateScheduledTaskRunFailed added in v0.8.0

func (q *Queries) UpdateScheduledTaskRunFailed(ctx context.Context, arg UpdateScheduledTaskRunFailedParams) error

func (*Queries) UpdateScheduledTaskRunSuccess added in v0.8.0

func (q *Queries) UpdateScheduledTaskRunSuccess(ctx context.Context, arg UpdateScheduledTaskRunSuccessParams) error

func (*Queries) UpdateTag

func (q *Queries) UpdateTag(ctx context.Context, arg UpdateTagParams) (Tag, error)

func (*Queries) UpdateTagLanguage

func (q *Queries) UpdateTagLanguage(ctx context.Context, arg UpdateTagLanguageParams) error

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)

func (*Queries) UpdateUserLastLogin

func (q *Queries) UpdateUserLastLogin(ctx context.Context, arg UpdateUserLastLoginParams) error

func (*Queries) UpdateUserPassword

func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error

Updates the user's password hash and bumps session_version, invalidating every existing session for this user. Use this for any actual credential change. For rehash-on-login (parameter migration of an unchanged password) use UpdateUserPasswordHash instead so the user is not logged out by their own login.

func (*Queries) UpdateUserPasswordHash added in v0.21.0

func (q *Queries) UpdateUserPasswordHash(ctx context.Context, arg UpdateUserPasswordHashParams) error

Updates only the password hash representation (e.g., re-hashing with updated Argon2 parameters when the user logs in with their existing password). Does not bump session_version because the credential itself has not changed.

func (*Queries) UpdateWebhook

func (q *Queries) UpdateWebhook(ctx context.Context, arg UpdateWebhookParams) (Webhook, error)

func (*Queries) UpdateWidget

func (q *Queries) UpdateWidget(ctx context.Context, arg UpdateWidgetParams) (Widget, error)

func (*Queries) UpdateWidgetPosition

func (q *Queries) UpdateWidgetPosition(ctx context.Context, arg UpdateWidgetPositionParams) error

func (*Queries) UpsertAPIKeySourceState added in v0.9.0

func (q *Queries) UpsertAPIKeySourceState(ctx context.Context, apiKeyID int64, ip string, seenAt time.Time) error

UpsertAPIKeySourceState persists source observation state for a key.

func (*Queries) UpsertConfig

func (q *Queries) UpsertConfig(ctx context.Context, arg UpsertConfigParams) (Config, error)

func (*Queries) UpsertConfigTranslation

func (q *Queries) UpsertConfigTranslation(ctx context.Context, arg UpsertConfigTranslationParams) (ConfigTranslation, error)

func (*Queries) UpsertEditorialGuide added in v0.32.0

func (q *Queries) UpsertEditorialGuide(ctx context.Context, arg UpsertEditorialGuideParams) error

func (*Queries) UpsertEditorialPreset added in v0.32.0

func (q *Queries) UpsertEditorialPreset(ctx context.Context, arg UpsertEditorialPresetParams) error

func (*Queries) UpsertLoginProtection added in v0.20.0

func (q *Queries) UpsertLoginProtection(ctx context.Context, arg UpsertLoginProtectionParams) error

func (*Queries) UpsertMediaTranslation

func (q *Queries) UpsertMediaTranslation(ctx context.Context, arg UpsertMediaTranslationParams) (MediaTranslation, error)

func (*Queries) UpsertModule

func (q *Queries) UpsertModule(ctx context.Context, arg UpsertModuleParams) (Module, error)

func (*Queries) UpsertOAuthClient added in v0.32.0

func (q *Queries) UpsertOAuthClient(ctx context.Context, arg UpsertOAuthClientParams) error

func (*Queries) UpsertSchedulerOverride added in v0.9.0

func (q *Queries) UpsertSchedulerOverride(ctx context.Context, arg UpsertSchedulerOverrideParams) error

func (*Queries) UpsertUserTOTP added in v0.30.0

func (q *Queries) UpsertUserTOTP(ctx context.Context, arg UpsertUserTOTPParams) error

func (*Queries) UseRecoveryCode added in v0.30.0

func (q *Queries) UseRecoveryCode(ctx context.Context, arg UseRecoveryCodeParams) (int64, error)

func (*Queries) WithTx

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

type RecordModuleMigrationParams added in v0.9.0

type RecordModuleMigrationParams struct {
	Module    string    `json:"module"`
	Version   int64     `json:"version"`
	AppliedAt time.Time `json:"applied_at"`
}

type RecordOAuthDCRRegistrationParams added in v0.32.0

type RecordOAuthDCRRegistrationParams struct {
	ClientID     string `json:"client_id"`
	SourceKey    string `json:"source_key"`
	RegisteredAt int64  `json:"registered_at"`
}

type Redirect added in v0.5.0

type Redirect struct {
	ID         int64     `json:"id"`
	SourcePath string    `json:"source_path"`
	TargetUrl  string    `json:"target_url"`
	StatusCode int64     `json:"status_code"`
	IsWildcard bool      `json:"is_wildcard"`
	TargetType string    `json:"target_type"`
	Enabled    bool      `json:"enabled"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type RedirectSourcePathExistsExcludingParams added in v0.5.0

type RedirectSourcePathExistsExcludingParams struct {
	SourcePath string `json:"source_path"`
	ID         int64  `json:"id"`
}

type RemoveCategoryFromPageParams

type RemoveCategoryFromPageParams struct {
	PageID     int64 `json:"page_id"`
	CategoryID int64 `json:"category_id"`
}

type RemoveTagFromPageParams

type RemoveTagFromPageParams struct {
	PageID int64 `json:"page_id"`
	TagID  int64 `json:"tag_id"`
}

type ReparentMenuItemChildrenParams added in v0.23.0

type ReparentMenuItemChildrenParams struct {
	ParentID   sql.NullInt64 `json:"parent_id"`
	UpdatedAt  time.Time     `json:"updated_at"`
	ParentID_2 sql.NullInt64 `json:"parent_id_2"`
}

type ResetDeliveryForRetryParams

type ResetDeliveryForRetryParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type RevokeAgentPreviewLinkParams added in v0.32.0

type RevokeAgentPreviewLinkParams struct {
	RevokedAt int64 `json:"revoked_at"`
	ID        int64 `json:"id"`
}

type RevokeConnectedAPIKeyParams added in v0.32.0

type RevokeConnectedAPIKeyParams struct {
	UpdatedAt time.Time   `json:"updated_at"`
	ID        int64       `json:"id"`
	AllUsers  interface{} `json:"all_users"`
	UserID    int64       `json:"user_id"`
}

type RevokeConnectedOAuthGrantParams added in v0.32.0

type RevokeConnectedOAuthGrantParams struct {
	RevokedAt int64       `json:"revoked_at"`
	ID        string      `json:"id"`
	AllUsers  interface{} `json:"all_users"`
	UserID    int64       `json:"user_id"`
}

type RevokeOAuthGrantByAccessParams added in v0.32.0

type RevokeOAuthGrantByAccessParams struct {
	GrantID string `json:"grant_id"`
	TokenID string `json:"token_id"`
}

type RevokeOAuthGrantParams added in v0.32.0

type RevokeOAuthGrantParams struct {
	RevokedAt int64  `json:"revoked_at"`
	ID        string `json:"id"`
}

type RevokeOwnedOAuthGrantParams added in v0.32.0

type RevokeOwnedOAuthGrantParams struct {
	RevokedAt int64  `json:"revoked_at"`
	ID        string `json:"id"`
	UserID    int64  `json:"user_id"`
}

type RevokePagePreviewLinkParams added in v0.32.0

type RevokePagePreviewLinkParams struct {
	RevokedAt int64 `json:"revoked_at"`
	ID        int64 `json:"id"`
	PageID    int64 `json:"page_id"`
}

type ScheduledTask added in v0.8.0

type ScheduledTask struct {
	ID             int64         `json:"id"`
	Name           string        `json:"name"`
	Url            string        `json:"url"`
	Schedule       string        `json:"schedule"`
	IsActive       int64         `json:"is_active"`
	TimeoutSeconds int64         `json:"timeout_seconds"`
	CreatedBy      sql.NullInt64 `json:"created_by"`
	CreatedAt      time.Time     `json:"created_at"`
	UpdatedAt      time.Time     `json:"updated_at"`
}

type ScheduledTaskRun added in v0.8.0

type ScheduledTaskRun struct {
	ID           int64          `json:"id"`
	TaskID       int64          `json:"task_id"`
	Status       string         `json:"status"`
	StatusCode   sql.NullInt64  `json:"status_code"`
	ResponseBody sql.NullString `json:"response_body"`
	ErrorMessage sql.NullString `json:"error_message"`
	DurationMs   sql.NullInt64  `json:"duration_ms"`
	StartedAt    time.Time      `json:"started_at"`
	CompletedAt  sql.NullTime   `json:"completed_at"`
}

type SchedulerOverride added in v0.9.0

type SchedulerOverride struct {
	Source           string       `json:"source"`
	Name             string       `json:"name"`
	OverrideSchedule string       `json:"override_schedule"`
	UpdatedAt        sql.NullTime `json:"updated_at"`
}

type SearchMediaParams

type SearchMediaParams struct {
	Filename string         `json:"filename"`
	Alt      sql.NullString `json:"alt"`
	Limit    int64          `json:"limit"`
	Offset   int64          `json:"offset"`
}

type SearchPagesByLanguageParams

type SearchPagesByLanguageParams struct {
	LanguageCode string `json:"language_code"`
	Title        string `json:"title"`
	Body         string `json:"body"`
	Slug         string `json:"slug"`
	Limit        int64  `json:"limit"`
	Offset       int64  `json:"offset"`
}

type SearchPagesByStatusParams

type SearchPagesByStatusParams struct {
	Status string `json:"status"`
	Title  string `json:"title"`
	Body   string `json:"body"`
	Slug   string `json:"slug"`
	Limit  int64  `json:"limit"`
	Offset int64  `json:"offset"`
}

type SearchPagesParams

type SearchPagesParams struct {
	Title  string `json:"title"`
	Body   string `json:"body"`
	Slug   string `json:"slug"`
	Limit  int64  `json:"limit"`
	Offset int64  `json:"offset"`
}

type SearchTagsParams

type SearchTagsParams struct {
	Name  string `json:"name"`
	Limit int64  `json:"limit"`
}

type Session

type Session struct {
	Token  string    `json:"token"`
	Data   []byte    `json:"data"`
	Expiry time.Time `json:"expiry"`
}

type SetAPIKeyLookupParams added in v0.28.0

type SetAPIKeyLookupParams struct {
	KeyLookup sql.NullString `json:"key_lookup"`
	ID        int64          `json:"id"`
}

type SetDefaultLanguageParams

type SetDefaultLanguageParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type SetModuleShowInSidebarParams

type SetModuleShowInSidebarParams struct {
	ShowInSidebar bool   `json:"show_in_sidebar"`
	Name          string `json:"name"`
}

type SetPageAIAccessParams added in v0.32.0

type SetPageAIAccessParams struct {
	PageID     int64     `json:"page_id"`
	AiEditable bool      `json:"ai_editable"`
	SetBy      int64     `json:"set_by"`
	SetAt      time.Time `json:"set_at"`
}

type SlugExistsExcludingParams

type SlugExistsExcludingParams struct {
	Slug string `json:"slug"`
	ID   int64  `json:"id"`
}

type SlugOrAliasExistsExcludingParams

type SlugOrAliasExistsExcludingParams struct {
	Slug   string `json:"slug"`
	ID     int64  `json:"id"`
	Alias  string `json:"alias"`
	PageID int64  `json:"page_id"`
}

type SlugOrAliasExistsParams

type SlugOrAliasExistsParams struct {
	Slug  string `json:"slug"`
	Alias string `json:"alias"`
}

type Tag

type Tag struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	LanguageCode string    `json:"language_code"`
}

type TagSlugExistsExcludingForLanguageParams

type TagSlugExistsExcludingForLanguageParams struct {
	Slug         string `json:"slug"`
	ID           int64  `json:"id"`
	LanguageCode string `json:"language_code"`
}

type TagSlugExistsExcludingParams

type TagSlugExistsExcludingParams struct {
	Slug string `json:"slug"`
	ID   int64  `json:"id"`
}

type TagSlugExistsForLanguageParams

type TagSlugExistsForLanguageParams struct {
	Slug         string `json:"slug"`
	LanguageCode string `json:"language_code"`
}

type ToggleRedirectEnabledParams added in v0.5.0

type ToggleRedirectEnabledParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type ToggleScheduledTaskParams added in v0.8.0

type ToggleScheduledTaskParams struct {
	IsActive  int64     `json:"is_active"`
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type TouchOAuthGrantIfDueParams added in v0.32.0

type TouchOAuthGrantIfDueParams struct {
	LastUsedAt int64  `json:"last_used_at"`
	ID         string `json:"id"`
	BeforeTime int64  `json:"before_time"`
}

type TouchOAuthGrantParams added in v0.32.0

type TouchOAuthGrantParams struct {
	LastUsedAt int64  `json:"last_used_at"`
	ID         string `json:"id"`
}

type Translation

type Translation struct {
	ID            int64     `json:"id"`
	EntityType    string    `json:"entity_type"`
	EntityID      int64     `json:"entity_id"`
	LanguageID    int64     `json:"language_id"`
	TranslationID int64     `json:"translation_id"`
	CreatedAt     time.Time `json:"created_at"`
}

type TranslationExistsParams

type TranslationExistsParams struct {
	EntityType string `json:"entity_type"`
	EntityID   int64  `json:"entity_id"`
	LanguageID int64  `json:"language_id"`
}

type UncheckClaimParams added in v0.32.0

type UncheckClaimParams struct {
	ProvenanceID int64 `json:"provenance_id"`
	ClaimIndex   int64 `json:"claim_index"`
}

type UnpublishPageParams

type UnpublishPageParams struct {
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type UpdateAPIKeyLastUsedParams

type UpdateAPIKeyLastUsedParams struct {
	LastUsedAt sql.NullTime `json:"last_used_at"`
	ID         int64        `json:"id"`
}

type UpdateAPIKeyParams

type UpdateAPIKeyParams struct {
	Name        string       `json:"name"`
	Permissions string       `json:"permissions"`
	ExpiresAt   sql.NullTime `json:"expires_at"`
	IsActive    bool         `json:"is_active"`
	UpdatedAt   time.Time    `json:"updated_at"`
	ID          int64        `json:"id"`
}

type UpdateCategoryLanguageParams

type UpdateCategoryLanguageParams struct {
	LanguageCode string    `json:"language_code"`
	UpdatedAt    time.Time `json:"updated_at"`
	ID           int64     `json:"id"`
}

type UpdateCategoryParams

type UpdateCategoryParams struct {
	Name         string         `json:"name"`
	Slug         string         `json:"slug"`
	Description  sql.NullString `json:"description"`
	ParentID     sql.NullInt64  `json:"parent_id"`
	Position     int64          `json:"position"`
	LanguageCode string         `json:"language_code"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ID           int64          `json:"id"`
}

type UpdateCategoryPositionParams

type UpdateCategoryPositionParams struct {
	Position  int64     `json:"position"`
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type UpdateConfigValueParams

type UpdateConfigValueParams struct {
	Value     string        `json:"value"`
	UpdatedAt time.Time     `json:"updated_at"`
	UpdatedBy sql.NullInt64 `json:"updated_by"`
	Key       string        `json:"key"`
}

type UpdateDeliveryDeadParams

type UpdateDeliveryDeadParams struct {
	ErrorMessage sql.NullString `json:"error_message"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ID           int64          `json:"id"`
}

type UpdateDeliveryRetryParams

type UpdateDeliveryRetryParams struct {
	ResponseCode sql.NullInt64  `json:"response_code"`
	ResponseBody sql.NullString `json:"response_body"`
	ErrorMessage sql.NullString `json:"error_message"`
	NextRetryAt  sql.NullTime   `json:"next_retry_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ID           int64          `json:"id"`
}

type UpdateDeliverySuccessParams

type UpdateDeliverySuccessParams struct {
	ResponseCode sql.NullInt64  `json:"response_code"`
	ResponseBody sql.NullString `json:"response_body"`
	DeliveredAt  sql.NullTime   `json:"delivered_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ID           int64          `json:"id"`
}

type UpdateFormFieldParams

type UpdateFormFieldParams struct {
	Type         string         `json:"type"`
	Name         string         `json:"name"`
	Label        string         `json:"label"`
	Placeholder  sql.NullString `json:"placeholder"`
	HelpText     sql.NullString `json:"help_text"`
	Options      sql.NullString `json:"options"`
	Validation   sql.NullString `json:"validation"`
	IsRequired   bool           `json:"is_required"`
	Position     int64          `json:"position"`
	LanguageCode string         `json:"language_code"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ID           int64          `json:"id"`
}

type UpdateFormParams

type UpdateFormParams struct {
	Name           string         `json:"name"`
	Slug           string         `json:"slug"`
	Title          string         `json:"title"`
	Description    sql.NullString `json:"description"`
	SuccessMessage sql.NullString `json:"success_message"`
	EmailTo        sql.NullString `json:"email_to"`
	IsActive       bool           `json:"is_active"`
	LanguageCode   string         `json:"language_code"`
	UpdatedAt      time.Time      `json:"updated_at"`
	ID             int64          `json:"id"`
}

type UpdateLanguageParams

type UpdateLanguageParams struct {
	Code       string    `json:"code"`
	Name       string    `json:"name"`
	NativeName string    `json:"native_name"`
	IsDefault  bool      `json:"is_default"`
	IsActive   bool      `json:"is_active"`
	Direction  string    `json:"direction"`
	Position   int64     `json:"position"`
	UpdatedAt  time.Time `json:"updated_at"`
	ID         int64     `json:"id"`
}

type UpdateLanguagePositionParams

type UpdateLanguagePositionParams struct {
	Position  int64     `json:"position"`
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type UpdateMediaFolderParams

type UpdateMediaFolderParams struct {
	Name     string        `json:"name"`
	ParentID sql.NullInt64 `json:"parent_id"`
	Position int64         `json:"position"`
	ID       int64         `json:"id"`
}

type UpdateMediaForImportParams added in v0.23.0

type UpdateMediaForImportParams struct {
	Filename     string         `json:"filename"`
	MimeType     string         `json:"mime_type"`
	Size         int64          `json:"size"`
	Width        sql.NullInt64  `json:"width"`
	Height       sql.NullInt64  `json:"height"`
	Alt          sql.NullString `json:"alt"`
	Caption      sql.NullString `json:"caption"`
	FolderID     sql.NullInt64  `json:"folder_id"`
	UploadedBy   int64          `json:"uploaded_by"`
	LanguageCode string         `json:"language_code"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ID           int64          `json:"id"`
}

type UpdateMediaParams

type UpdateMediaParams struct {
	Filename     string         `json:"filename"`
	Alt          sql.NullString `json:"alt"`
	Caption      sql.NullString `json:"caption"`
	FolderID     sql.NullInt64  `json:"folder_id"`
	LanguageCode string         `json:"language_code"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ID           int64          `json:"id"`
}

type UpdateMenuItemParams

type UpdateMenuItemParams struct {
	ParentID  sql.NullInt64  `json:"parent_id"`
	Title     string         `json:"title"`
	Url       sql.NullString `json:"url"`
	Target    sql.NullString `json:"target"`
	PageID    sql.NullInt64  `json:"page_id"`
	Position  int64          `json:"position"`
	CssClass  sql.NullString `json:"css_class"`
	IsActive  bool           `json:"is_active"`
	UpdatedAt time.Time      `json:"updated_at"`
	ID        int64          `json:"id"`
}

type UpdateMenuItemPositionParams

type UpdateMenuItemPositionParams struct {
	ParentID  sql.NullInt64 `json:"parent_id"`
	Position  int64         `json:"position"`
	UpdatedAt time.Time     `json:"updated_at"`
	ID        int64         `json:"id"`
}

type UpdateMenuParams

type UpdateMenuParams struct {
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	LanguageCode string    `json:"language_code"`
	UpdatedAt    time.Time `json:"updated_at"`
	ID           int64     `json:"id"`
}

type UpdatePageCreatedAtParams added in v0.16.0

type UpdatePageCreatedAtParams struct {
	CreatedAt time.Time `json:"created_at"`
	ID        int64     `json:"id"`
}

type UpdatePageFeaturedImageParams

type UpdatePageFeaturedImageParams struct {
	FeaturedImageID sql.NullInt64 `json:"featured_image_id"`
	UpdatedAt       time.Time     `json:"updated_at"`
	ID              int64         `json:"id"`
}

type UpdatePageLanguageParams

type UpdatePageLanguageParams struct {
	LanguageCode string    `json:"language_code"`
	UpdatedAt    time.Time `json:"updated_at"`
	ID           int64     `json:"id"`
}

type UpdatePageParams

type UpdatePageParams struct {
	Title             string        `json:"title"`
	Slug              string        `json:"slug"`
	Body              string        `json:"body"`
	Summary           string        `json:"summary"`
	Status            string        `json:"status"`
	FeaturedImageID   sql.NullInt64 `json:"featured_image_id"`
	MetaTitle         string        `json:"meta_title"`
	MetaDescription   string        `json:"meta_description"`
	MetaKeywords      string        `json:"meta_keywords"`
	OgImageID         sql.NullInt64 `json:"og_image_id"`
	NoIndex           int64         `json:"no_index"`
	NoFollow          int64         `json:"no_follow"`
	CanonicalUrl      string        `json:"canonical_url"`
	ScheduledAt       sql.NullTime  `json:"scheduled_at"`
	LanguageCode      string        `json:"language_code"`
	HideFeaturedImage int64         `json:"hide_featured_image"`
	PageType          string        `json:"page_type"`
	ExcludeFromLists  int64         `json:"exclude_from_lists"`
	PublishedAt       sql.NullTime  `json:"published_at"`
	UpdatedAt         time.Time     `json:"updated_at"`
	VideoUrl          string        `json:"video_url"`
	VideoTitle        string        `json:"video_title"`
	ID                int64         `json:"id"`
}

type UpdateRedirectParams added in v0.5.0

type UpdateRedirectParams struct {
	SourcePath string    `json:"source_path"`
	TargetUrl  string    `json:"target_url"`
	StatusCode int64     `json:"status_code"`
	IsWildcard bool      `json:"is_wildcard"`
	TargetType string    `json:"target_type"`
	Enabled    bool      `json:"enabled"`
	UpdatedAt  time.Time `json:"updated_at"`
	ID         int64     `json:"id"`
}

type UpdateScheduledTaskParams added in v0.8.0

type UpdateScheduledTaskParams struct {
	Name           string    `json:"name"`
	Url            string    `json:"url"`
	Schedule       string    `json:"schedule"`
	TimeoutSeconds int64     `json:"timeout_seconds"`
	UpdatedAt      time.Time `json:"updated_at"`
	ID             int64     `json:"id"`
}

type UpdateScheduledTaskRunFailedParams added in v0.8.0

type UpdateScheduledTaskRunFailedParams struct {
	ErrorMessage sql.NullString `json:"error_message"`
	DurationMs   sql.NullInt64  `json:"duration_ms"`
	CompletedAt  sql.NullTime   `json:"completed_at"`
	ID           int64          `json:"id"`
}

type UpdateScheduledTaskRunSuccessParams added in v0.8.0

type UpdateScheduledTaskRunSuccessParams struct {
	StatusCode   sql.NullInt64  `json:"status_code"`
	ResponseBody sql.NullString `json:"response_body"`
	DurationMs   sql.NullInt64  `json:"duration_ms"`
	CompletedAt  sql.NullTime   `json:"completed_at"`
	ID           int64          `json:"id"`
}

type UpdateTagLanguageParams

type UpdateTagLanguageParams struct {
	LanguageCode string    `json:"language_code"`
	UpdatedAt    time.Time `json:"updated_at"`
	ID           int64     `json:"id"`
}

type UpdateTagParams

type UpdateTagParams struct {
	Name         string    `json:"name"`
	Slug         string    `json:"slug"`
	LanguageCode string    `json:"language_code"`
	UpdatedAt    time.Time `json:"updated_at"`
	ID           int64     `json:"id"`
}

type UpdateUserLastLoginParams

type UpdateUserLastLoginParams struct {
	LastLoginAt sql.NullTime `json:"last_login_at"`
	ID          int64        `json:"id"`
}

type UpdateUserParams

type UpdateUserParams struct {
	Email       string    `json:"email"`
	Role        string    `json:"role"`
	Name        string    `json:"name"`
	Avatar      string    `json:"avatar"`
	Bio         string    `json:"bio"`
	WebsiteUrl  string    `json:"website_url"`
	LinkedinUrl string    `json:"linkedin_url"`
	GithubUrl   string    `json:"github_url"`
	TelegramUrl string    `json:"telegram_url"`
	UpdatedAt   time.Time `json:"updated_at"`
	ID          int64     `json:"id"`
}

type UpdateUserPasswordHashParams added in v0.21.0

type UpdateUserPasswordHashParams struct {
	PasswordHash string    `json:"password_hash"`
	UpdatedAt    time.Time `json:"updated_at"`
	ID           int64     `json:"id"`
}

type UpdateUserPasswordParams

type UpdateUserPasswordParams struct {
	PasswordHash string    `json:"password_hash"`
	UpdatedAt    time.Time `json:"updated_at"`
	ID           int64     `json:"id"`
}

type UpdateWebhookParams

type UpdateWebhookParams struct {
	Name      string    `json:"name"`
	Url       string    `json:"url"`
	Secret    string    `json:"secret"`
	Events    string    `json:"events"`
	IsActive  bool      `json:"is_active"`
	Headers   string    `json:"headers"`
	UpdatedAt time.Time `json:"updated_at"`
	ID        int64     `json:"id"`
}

type UpdateWidgetParams

type UpdateWidgetParams struct {
	WidgetType   string         `json:"widget_type"`
	Title        sql.NullString `json:"title"`
	Content      sql.NullString `json:"content"`
	Settings     sql.NullString `json:"settings"`
	Position     int64          `json:"position"`
	IsActive     int64          `json:"is_active"`
	LanguageCode string         `json:"language_code"`
	ID           int64          `json:"id"`
}

type UpdateWidgetPositionParams

type UpdateWidgetPositionParams struct {
	Position int64 `json:"position"`
	ID       int64 `json:"id"`
}

type UpsertConfigParams

type UpsertConfigParams struct {
	Key          string        `json:"key"`
	Value        string        `json:"value"`
	Type         string        `json:"type"`
	Description  string        `json:"description"`
	LanguageCode string        `json:"language_code"`
	UpdatedAt    time.Time     `json:"updated_at"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
}

type UpsertConfigTranslationParams

type UpsertConfigTranslationParams struct {
	ConfigKey  string        `json:"config_key"`
	LanguageID int64         `json:"language_id"`
	Value      string        `json:"value"`
	UpdatedAt  time.Time     `json:"updated_at"`
	UpdatedBy  sql.NullInt64 `json:"updated_by"`
}

type UpsertEditorialGuideParams added in v0.32.0

type UpsertEditorialGuideParams struct {
	LanguageCode string        `json:"language_code"`
	Body         string        `json:"body"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
}

type UpsertEditorialPresetParams added in v0.32.0

type UpsertEditorialPresetParams struct {
	Slug         string        `json:"slug"`
	LanguageCode string        `json:"language_code"`
	Name         string        `json:"name"`
	Instructions string        `json:"instructions"`
	UpdatedBy    sql.NullInt64 `json:"updated_by"`
}

type UpsertLoginProtectionParams added in v0.20.0

type UpsertLoginProtectionParams struct {
	Email         string       `json:"email"`
	AttemptCount  int64        `json:"attempt_count"`
	FirstFailedAt time.Time    `json:"first_failed_at"`
	LockedUntil   sql.NullTime `json:"locked_until"`
	LockoutCount  int64        `json:"lockout_count"`
	UpdatedAt     time.Time    `json:"updated_at"`
}

type UpsertMediaTranslationParams

type UpsertMediaTranslationParams struct {
	MediaID    int64  `json:"media_id"`
	LanguageID int64  `json:"language_id"`
	Alt        string `json:"alt"`
	Caption    string `json:"caption"`
}

type UpsertModuleParams

type UpsertModuleParams struct {
	Name          string `json:"name"`
	IsActive      bool   `json:"is_active"`
	ShowInSidebar bool   `json:"show_in_sidebar"`
}

type UpsertOAuthClientParams added in v0.32.0

type UpsertOAuthClientParams struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	RedirectUris string `json:"redirect_uris"`
	Source       string `json:"source"`
	ExpiresAt    int64  `json:"expires_at"`
}

type UpsertSchedulerOverrideParams added in v0.9.0

type UpsertSchedulerOverrideParams struct {
	Source           string `json:"source"`
	Name             string `json:"name"`
	OverrideSchedule string `json:"override_schedule"`
}

type UpsertUserTOTPParams added in v0.30.0

type UpsertUserTOTPParams struct {
	UserID     int64     `json:"user_id"`
	SecretEnc  []byte    `json:"secret_enc"`
	LastStep   int64     `json:"last_step"`
	EnrolledAt time.Time `json:"enrolled_at"`
}

type UseRecoveryCodeParams added in v0.30.0

type UseRecoveryCodeParams struct {
	UsedAt   sql.NullTime `json:"used_at"`
	UserID   int64        `json:"user_id"`
	CodeHash string       `json:"code_hash"`
}

type User

type User struct {
	ID             int64        `json:"id"`
	Email          string       `json:"email"`
	PasswordHash   string       `json:"password_hash"`
	Role           string       `json:"role"`
	Name           string       `json:"name"`
	CreatedAt      time.Time    `json:"created_at"`
	UpdatedAt      time.Time    `json:"updated_at"`
	LastLoginAt    sql.NullTime `json:"last_login_at"`
	Avatar         string       `json:"avatar"`
	Bio            string       `json:"bio"`
	WebsiteUrl     string       `json:"website_url"`
	LinkedinUrl    string       `json:"linkedin_url"`
	GithubUrl      string       `json:"github_url"`
	TelegramUrl    string       `json:"telegram_url"`
	SessionVersion int64        `json:"session_version"`
}

type UserRecoveryCode added in v0.30.0

type UserRecoveryCode struct {
	ID        int64        `json:"id"`
	UserID    int64        `json:"user_id"`
	CodeHash  string       `json:"code_hash"`
	CreatedAt time.Time    `json:"created_at"`
	UsedAt    sql.NullTime `json:"used_at"`
}

type UserTotp added in v0.30.0

type UserTotp struct {
	UserID     int64        `json:"user_id"`
	SecretEnc  []byte       `json:"secret_enc"`
	LastStep   int64        `json:"last_step"`
	EnrolledAt time.Time    `json:"enrolled_at"`
	LastUsedAt sql.NullTime `json:"last_used_at"`
}

type Webhook

type Webhook struct {
	ID        int64     `json:"id"`
	Name      string    `json:"name"`
	Url       string    `json:"url"`
	Secret    string    `json:"secret"`
	Events    string    `json:"events"`
	IsActive  bool      `json:"is_active"`
	Headers   string    `json:"headers"`
	CreatedBy int64     `json:"created_by"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type WebhookDelivery

type WebhookDelivery struct {
	ID           int64          `json:"id"`
	WebhookID    int64          `json:"webhook_id"`
	Event        string         `json:"event"`
	Payload      string         `json:"payload"`
	ResponseCode sql.NullInt64  `json:"response_code"`
	ResponseBody sql.NullString `json:"response_body"`
	Attempts     int64          `json:"attempts"`
	NextRetryAt  sql.NullTime   `json:"next_retry_at"`
	DeliveredAt  sql.NullTime   `json:"delivered_at"`
	Status       string         `json:"status"`
	ErrorMessage sql.NullString `json:"error_message"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

type Widget

type Widget struct {
	ID           int64          `json:"id"`
	Theme        string         `json:"theme"`
	Area         string         `json:"area"`
	WidgetType   string         `json:"widget_type"`
	Title        sql.NullString `json:"title"`
	Content      sql.NullString `json:"content"`
	Settings     sql.NullString `json:"settings"`
	Position     int64          `json:"position"`
	IsActive     int64          `json:"is_active"`
	LanguageCode string         `json:"language_code"`
	CreatedAt    time.Time      `json:"created_at"`
	UpdatedAt    time.Time      `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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