// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 package sqlcdb import ( "context" "database/sql" "encoding/json" "github.com/google/uuid" ) type Querier interface { // Portable bucket bucketing (no TimescaleDB): floor epoch seconds into // bucket-sized buckets, then back to timestamptz. AggregateNodeMetrics(ctx context.Context, arg AggregateNodeMetricsParams) ([]AggregateNodeMetricsRow, error) CancelBuild(ctx context.Context, arg CancelBuildParams) (int64, error) CheckSecurityProjectAccess(ctx context.Context, arg CheckSecurityProjectAccessParams) (bool, error) ClearServiceDomainDefault(ctx context.Context, serviceID uuid.UUID) error ClearServiceNodePins(ctx context.Context, nodeID sql.NullString) (int64, error) CloneServiceDomains(ctx context.Context, arg CloneServiceDomainsParams) error CloneServiceRow(ctx context.Context, arg CloneServiceRowParams) error CloneServiceVariables(ctx context.Context, arg CloneServiceVariablesParams) error CompleteCommand(ctx context.Context, arg CompleteCommandParams) (AgentCommand, error) CompleteDeployment(ctx context.Context, arg CompleteDeploymentParams) error ComplianceFrameworkExists(ctx context.Context, id uuid.UUID) (bool, error) CountAPKeys(ctx context.Context) (int64, error) CountAPServices(ctx context.Context) (int64, error) CountAccessibleDeployments(ctx context.Context, arg CountAccessibleDeploymentsParams) (int64, error) CountActivePreviewsForBranch(ctx context.Context, arg CountActivePreviewsForBranchParams) (int64, error) CountDatabaseServicesByUserAndName(ctx context.Context, arg CountDatabaseServicesByUserAndNameParams) (int64, error) CountDatabasesUsingBackupTarget(ctx context.Context, targetID sql.NullString) (int64, error) CountDeploymentsForService(ctx context.Context, serviceID uuid.UUID) (int64, error) CountEnvironmentServices(ctx context.Context, environmentID uuid.UUID) (int64, error) CountGitRepositories(ctx context.Context, arg CountGitRepositoriesParams) (int64, error) CountProjects(ctx context.Context) (int64, error) CountProjectsByUser(ctx context.Context, arg CountProjectsByUserParams) (int64, error) CountServiceDomains(ctx context.Context, serviceID uuid.UUID) (int64, error) CountServicesByName(ctx context.Context, arg CountServicesByNameParams) (int64, error) CountServicesByProjectAndName(ctx context.Context, arg CountServicesByProjectAndNameParams) (int64, error) CountUnreadNotificationsByUser(ctx context.Context, userID uuid.UUID) (int64, error) CountUserRepositories(ctx context.Context, userID uuid.UUID) (int64, error) CountUsers(ctx context.Context) (int64, error) CountUsersByEmail(ctx context.Context, email string) (int64, error) CreateAgent(ctx context.Context, arg CreateAgentParams) (NodeAgent, error) CreateAgentAuthToken(ctx context.Context, arg CreateAgentAuthTokenParams) (AgentAuthToken, error) CreateBackupTarget(ctx context.Context, arg CreateBackupTargetParams) error CreateBanner(ctx context.Context, arg CreateBannerParams) (Banner, error) CreateCommand(ctx context.Context, arg CreateCommandParams) (AgentCommand, error) CreateContainer(ctx context.Context, arg CreateContainerParams) (ContainerInstance, error) CreateDatabaseBackup(ctx context.Context, arg CreateDatabaseBackupParams) error CreateDatabaseService(ctx context.Context, arg CreateDatabaseServiceParams) error CreateExternalDatabaseService(ctx context.Context, arg CreateExternalDatabaseServiceParams) error CreateNotification(ctx context.Context, arg CreateNotificationParams) error CreateOutboundWebhook(ctx context.Context, arg CreateOutboundWebhookParams) error CreatePreviewDomain(ctx context.Context, arg CreatePreviewDomainParams) error CreatePreviewEnvironment(ctx context.Context, arg CreatePreviewEnvironmentParams) error CreateProject(ctx context.Context, arg CreateProjectParams) (Project, error) CreateServiceDomain(ctx context.Context, arg CreateServiceDomainParams) (CreateServiceDomainRow, error) CreateServiceFromTemplate(ctx context.Context, arg CreateServiceFromTemplateParams) error CreateUserInvite(ctx context.Context, arg CreateUserInviteParams) (UserInvite, error) CreateUserTemplate(ctx context.Context, arg CreateUserTemplateParams) error CreateUserToken(ctx context.Context, arg CreateUserTokenParams) (UserToken, error) CreateWebhookDelivery(ctx context.Context, arg CreateWebhookDeliveryParams) error DatabaseServiceExistsByIDAndUser(ctx context.Context, arg DatabaseServiceExistsByIDAndUserParams) (bool, error) DeleteAgent(ctx context.Context, id string) error DeleteAllServiceDomains(ctx context.Context, serviceID uuid.UUID) error DeleteAppSetting(ctx context.Context, key string) error DeleteBackupTargetByIDAndUser(ctx context.Context, arg DeleteBackupTargetByIDAndUserParams) error DeleteBanner(ctx context.Context, id uuid.UUID) error DeleteCronJob(ctx context.Context, id uuid.UUID) error DeleteDatabaseServiceByID(ctx context.Context, id string) error DeleteDatabaseServiceByIDAndUser(ctx context.Context, arg DeleteDatabaseServiceByIDAndUserParams) error DeleteEnvVarsForService(ctx context.Context, serviceID uuid.UUID) error DeleteGitProvider(ctx context.Context, arg DeleteGitProviderParams) (int64, error) DeleteNotificationChannel(ctx context.Context, arg DeleteNotificationChannelParams) (int64, error) DeleteOutboundWebhookByIDAndUser(ctx context.Context, arg DeleteOutboundWebhookByIDAndUserParams) error DeletePreviewEnvironment(ctx context.Context, id uuid.UUID) error DeleteProjectByID(ctx context.Context, projectID uuid.UUID) (int64, error) DeleteProjectEnvironment(ctx context.Context, arg DeleteProjectEnvironmentParams) error DeleteProjectVariables(ctx context.Context, projectID uuid.UUID) error DeleteServiceByID(ctx context.Context, id uuid.UUID) error DeleteServiceContainersOnAgent(ctx context.Context, arg DeleteServiceContainersOnAgentParams) error DeleteServiceDomain(ctx context.Context, arg DeleteServiceDomainParams) (int64, error) DeleteUserInvite(ctx context.Context, id uuid.UUID) error DeleteUserTemplate(ctx context.Context, arg DeleteUserTemplateParams) (int64, error) FailDeployment(ctx context.Context, arg FailDeploymentParams) error FailInterruptedDeployments(ctx context.Context) error FinishCronExecution(ctx context.Context, arg FinishCronExecutionParams) error GetAPServiceBySlug(ctx context.Context, slug string) (GetAPServiceBySlugRow, error) GetAPServiceForValidate(ctx context.Context, id uuid.UUID) (GetAPServiceForValidateRow, error) GetActiveAgentAuthTokenByHash(ctx context.Context, tokenHash string) (AgentAuthToken, error) GetAdminUserInfo(ctx context.Context, id uuid.UUID) (GetAdminUserInfoRow, error) GetAgent(ctx context.Context, id string) (NodeAgent, error) GetAgentByHostAndIP(ctx context.Context, arg GetAgentByHostAndIPParams) (NodeAgent, error) GetAppSetting(ctx context.Context, key string) (string, error) GetBackupTargetByID(ctx context.Context, id string) (BackupTarget, error) GetBackupTargetByIDAndUser(ctx context.Context, arg GetBackupTargetByIDAndUserParams) (BackupTarget, error) GetBannerByID(ctx context.Context, id uuid.UUID) (Banner, error) GetBuild(ctx context.Context, id string) (GetBuildRow, error) GetCommandForAgent(ctx context.Context, arg GetCommandForAgentParams) (AgentCommand, error) GetComplianceReportProjectID(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetContainer(ctx context.Context, id string) (ContainerInstance, error) GetContainerForAgent(ctx context.Context, arg GetContainerForAgentParams) (ContainerInstance, error) GetCronJob(ctx context.Context, id uuid.UUID) (CronJob, error) GetCronJobForTrigger(ctx context.Context, id uuid.UUID) (GetCronJobForTriggerRow, error) GetCronJobOwner(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetCronJobProjectID(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetCronOwnerViaService(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetDatabaseBackupByIDAndDatabaseAndUser(ctx context.Context, arg GetDatabaseBackupByIDAndDatabaseAndUserParams) (DatabaseBackup, error) GetDatabaseServiceByID(ctx context.Context, id string) (DatabaseService, error) GetDatabaseServiceByIDAndUser(ctx context.Context, arg GetDatabaseServiceByIDAndUserParams) (DatabaseService, error) GetDatabaseServiceOwnerID(ctx context.Context, id string) (string, error) GetDeploymentAccess(ctx context.Context, id uuid.UUID) (GetDeploymentAccessRow, error) GetDeploymentForRollback(ctx context.Context, id uuid.UUID) (GetDeploymentForRollbackRow, error) GetDeploymentWithProject(ctx context.Context, id uuid.UUID) (GetDeploymentWithProjectRow, error) GetEnvironmentProjectID(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetGitProviderForFetch(ctx context.Context, arg GetGitProviderForFetchParams) (GetGitProviderForFetchRow, error) GetGitProviderForRepos(ctx context.Context, arg GetGitProviderForReposParams) (GetGitProviderForReposRow, error) GetGitProviderName(ctx context.Context, arg GetGitProviderNameParams) (string, error) GetGitProviderNameByID(ctx context.Context, id uuid.UUID) (string, error) GetGitProviderTimestamps(ctx context.Context, id uuid.UUID) (GetGitProviderTimestampsRow, error) GetGitRepoCloneByFullName(ctx context.Context, arg GetGitRepoCloneByFullNameParams) (GetGitRepoCloneByFullNameRow, error) GetGitRepoForPush(ctx context.Context, id uuid.UUID) (GetGitRepoForPushRow, error) GetGitRepoProviderByCloneURL(ctx context.Context, arg GetGitRepoProviderByCloneURLParams) (uuid.UUID, error) GetGitRepositoryByFullName(ctx context.Context, arg GetGitRepositoryByFullNameParams) (GetGitRepositoryByFullNameRow, error) GetGitRepositoryProviderID(ctx context.Context, arg GetGitRepositoryProviderIDParams) (uuid.UUID, error) GetGitWebhookForPush(ctx context.Context, id uuid.UUID) (GetGitWebhookForPushRow, error) GetLastAgentCommandByType(ctx context.Context, arg GetLastAgentCommandByTypeParams) (AgentCommand, error) GetLastDeployedImage(ctx context.Context, serviceID uuid.UUID) (string, error) GetLatestComplianceReport(ctx context.Context, projectID uuid.UUID) (GetLatestComplianceReportRow, error) GetLatestSecurityScan(ctx context.Context, projectID uuid.UUID) (GetLatestSecurityScanRow, error) GetNodeAgentName(ctx context.Context, id string) (string, error) GetOutboundWebhookByID(ctx context.Context, id uuid.UUID) (OutboundWebhook, error) GetOutboundWebhookByIDAndUser(ctx context.Context, arg GetOutboundWebhookByIDAndUserParams) (OutboundWebhook, error) GetPreviewEnvironment(ctx context.Context, arg GetPreviewEnvironmentParams) (GetPreviewEnvironmentRow, error) GetPreviewEnvironmentForPromote(ctx context.Context, arg GetPreviewEnvironmentForPromoteParams) (GetPreviewEnvironmentForPromoteRow, error) GetPreviewEnvironmentForWrite(ctx context.Context, arg GetPreviewEnvironmentForWriteParams) (GetPreviewEnvironmentForWriteRow, error) GetPreviewEnvironmentOwner(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetPreviewServiceID(ctx context.Context, id uuid.UUID) (uuid.NullUUID, error) GetProjectBrief(ctx context.Context, id uuid.UUID) (GetProjectBriefRow, error) GetProjectByIDForUser(ctx context.Context, arg GetProjectByIDForUserParams) (Project, error) GetProjectEnvironmentByName(ctx context.Context, arg GetProjectEnvironmentByNameParams) (Environment, error) GetProjectOwner(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetProjectOwnerByID(ctx context.Context, projectID uuid.UUID) (uuid.UUID, error) GetProjectOwnerID(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetProjectOwnerText(ctx context.Context, id uuid.UUID) (string, error) GetProjectReadAccess(ctx context.Context, id uuid.UUID) (GetProjectReadAccessRow, error) GetProjectRoleForUser(ctx context.Context, arg GetProjectRoleForUserParams) (string, error) GetProjectVariableValue(ctx context.Context, arg GetProjectVariableValueParams) (string, error) GetRegistryAuth(ctx context.Context, arg GetRegistryAuthParams) (GetRegistryAuthRow, error) GetSecurityScanProjectID(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetServiceAccess(ctx context.Context, id uuid.UUID) (GetServiceAccessRow, error) GetServiceDomainDefault(ctx context.Context, serviceID uuid.UUID) (string, error) GetServiceDomainFirst(ctx context.Context, serviceID uuid.UUID) (string, error) GetServiceDomainText(ctx context.Context, id uuid.UUID) (string, error) GetServiceEnvironment(ctx context.Context, id uuid.UUID) (string, error) GetServiceForDeploy(ctx context.Context, id uuid.UUID) (GetServiceForDeployRow, error) GetServiceForDeployWithOwner(ctx context.Context, id uuid.UUID) (GetServiceForDeployWithOwnerRow, error) GetServiceNameProjectPort(ctx context.Context, id uuid.UUID) (GetServiceNameProjectPortRow, error) GetServiceNodeID(ctx context.Context, id uuid.UUID) (sql.NullString, error) GetServicePlacementBrief(ctx context.Context, id uuid.UUID) (GetServicePlacementBriefRow, error) GetServicePlacementTags(ctx context.Context, id uuid.UUID) (json.RawMessage, error) GetServicePort(ctx context.Context, id uuid.UUID) (int32, error) GetServiceProjectAndStatus(ctx context.Context, id uuid.UUID) (GetServiceProjectAndStatusRow, error) GetServiceProjectID(ctx context.Context, id uuid.UUID) (uuid.UUID, error) GetServicePublishedPort(ctx context.Context, id uuid.UUID) (int32, error) GetServiceRuntimeWithOwner(ctx context.Context, id uuid.UUID) (GetServiceRuntimeWithOwnerRow, error) GetServiceSleep(ctx context.Context, id uuid.UUID) (GetServiceSleepRow, error) GetServiceSpread(ctx context.Context, id uuid.UUID) (bool, error) GetServiceStatusText(ctx context.Context, id uuid.UUID) (string, error) GetServiceTemplateByID(ctx context.Context, id string) (ServiceTemplate, error) GetServiceTraefikLabels(ctx context.Context, id uuid.UUID) (json.RawMessage, error) GetServiceTypeBrief(ctx context.Context, arg GetServiceTypeBriefParams) (GetServiceTypeBriefRow, error) GetServiceVariableValue(ctx context.Context, arg GetServiceVariableValueParams) (string, error) GetServiceVolumes(ctx context.Context, id uuid.UUID) (json.RawMessage, error) GetUserByEmailForAuth(ctx context.Context, email string) (GetUserByEmailForAuthRow, error) GetUserByID(ctx context.Context, id uuid.UUID) (GetUserByIDRow, error) GetUserInviteByTokenHash(ctx context.Context, tokenHash string) (UserInvite, error) GetUserIsAdmin(ctx context.Context, id uuid.UUID) (bool, error) GetUserTokenByHash(ctx context.Context, tokenHash string) (UserToken, error) GetVulnerabilityMetrics(ctx context.Context, projectID uuid.UUID) (GetVulnerabilityMetricsRow, error) GetVulnerabilityProjectID(ctx context.Context, id uuid.UUID) (uuid.UUID, error) InsertAPKey(ctx context.Context, arg InsertAPKeyParams) (uuid.UUID, error) InsertAPService(ctx context.Context, arg InsertAPServiceParams) (uuid.UUID, error) InsertAgentHeartbeat(ctx context.Context, arg InsertAgentHeartbeatParams) error InsertAuditLog(ctx context.Context, arg InsertAuditLogParams) error InsertAuditLogWithRequest(ctx context.Context, arg InsertAuditLogWithRequestParams) error InsertCronExecution(ctx context.Context, arg InsertCronExecutionParams) error InsertCronJob(ctx context.Context, arg InsertCronJobParams) error InsertDeployment(ctx context.Context, arg InsertDeploymentParams) error InsertEnvVar(ctx context.Context, arg InsertEnvVarParams) error InsertGatewayIncident(ctx context.Context, arg InsertGatewayIncidentParams) error InsertGitProvider(ctx context.Context, arg InsertGitProviderParams) error InsertGitRepository(ctx context.Context, arg InsertGitRepositoryParams) (InsertGitRepositoryRow, error) InsertMetricPoint(ctx context.Context, labelsJson sql.NullString) error InsertNotificationChannel(ctx context.Context, arg InsertNotificationChannelParams) (NotificationChannel, error) InsertPendingDeployment(ctx context.Context, arg InsertPendingDeploymentParams) error InsertProjectEnvironment(ctx context.Context, arg InsertProjectEnvironmentParams) error InsertProjectVariable(ctx context.Context, arg InsertProjectVariableParams) error InsertServiceIncident(ctx context.Context, arg InsertServiceIncidentParams) error InsertUser(ctx context.Context, arg InsertUserParams) (InsertUserRow, error) InsertUserAdmin(ctx context.Context, arg InsertUserAdminParams) (InsertUserAdminRow, error) ListAPKeys(ctx context.Context) ([]ListAPKeysRow, error) ListAPKeysByPrefix(ctx context.Context, keyPrefix string) ([]ListAPKeysByPrefixRow, error) ListAPServices(ctx context.Context) ([]ListAPServicesRow, error) ListActiveBanners(ctx context.Context) ([]Banner, error) ListActiveOperationDeployments(ctx context.Context, arg ListActiveOperationDeploymentsParams) ([]ListActiveOperationDeploymentsRow, error) ListAdminUserIDs(ctx context.Context) ([]uuid.UUID, error) ListAdminUsers(ctx context.Context) ([]ListAdminUsersRow, error) ListAgentAuthTokens(ctx context.Context) ([]AgentAuthToken, error) ListAgentHealthRows(ctx context.Context, lastHeartbeat sql.NullTime) ([]ListAgentHealthRowsRow, error) ListAgentHeartbeatsSince(ctx context.Context, arg ListAgentHeartbeatsSinceParams) ([]AgentHeartbeat, error) ListAgents(ctx context.Context) ([]NodeAgent, error) ListAllDatabaseServices(ctx context.Context) ([]DatabaseService, error) ListAllNotificationChannelsByUser(ctx context.Context, userID uuid.UUID) ([]NotificationChannel, error) ListAuditBackfillBatch(ctx context.Context, dollar_1 uuid.UUID) ([]ListAuditBackfillBatchRow, error) ListBackupTargetsByUser(ctx context.Context, userID string) ([]BackupTarget, error) ListBanners(ctx context.Context) ([]Banner, error) ListClientEventPaths(ctx context.Context) ([]ListClientEventPathsRow, error) ListCommandsForAgent(ctx context.Context, nodeAgentID string) ([]AgentCommand, error) ListComplianceFrameworks(ctx context.Context) ([]ListComplianceFrameworksRow, error) ListConnectedRepositories(ctx context.Context, arg ListConnectedRepositoriesParams) ([]ListConnectedRepositoriesRow, error) ListContainersForAgent(ctx context.Context, nodeAgentID string) ([]ContainerInstance, error) ListCronExecutions(ctx context.Context, cronJobID uuid.UUID) ([]CronExecution, error) ListDatabaseBackupsByDatabaseAndUser(ctx context.Context, arg ListDatabaseBackupsByDatabaseAndUserParams) ([]DatabaseBackup, error) ListDatabaseServicesByProject(ctx context.Context, projectID uuid.NullUUID) ([]DatabaseService, error) ListDatabaseServicesByUser(ctx context.Context, userID string) ([]DatabaseService, error) ListDeploymentsForService(ctx context.Context, arg ListDeploymentsForServiceParams) ([]ListDeploymentsForServiceRow, error) ListDueCronJobs(ctx context.Context) ([]ListDueCronJobsRow, error) ListDueDatabaseBackups(ctx context.Context) ([]ListDueDatabaseBackupsRow, error) ListEnabledOutboundWebhooks(ctx context.Context) ([]OutboundWebhook, error) ListExpiredPreviewsForUser(ctx context.Context, arg ListExpiredPreviewsForUserParams) ([]ListExpiredPreviewsForUserRow, error) ListGitProviders(ctx context.Context, userID uuid.UUID) ([]ListGitProvidersRow, error) ListGitRepositories(ctx context.Context, arg ListGitRepositoriesParams) ([]ListGitRepositoriesRow, error) ListIncidentStatusCodes(ctx context.Context) ([]ListIncidentStatusCodesRow, error) ListInstanceMetrics(ctx context.Context, arg ListInstanceMetricsParams) ([]ListInstanceMetricsRow, error) ListNodeAgentsForService(ctx context.Context, serviceID string) ([]string, error) ListNodeMetrics(ctx context.Context, arg ListNodeMetricsParams) ([]ListNodeMetricsRow, error) ListNotificationChannelsByUser(ctx context.Context, userID uuid.UUID) ([]NotificationChannel, error) ListNotificationsByUser(ctx context.Context, arg ListNotificationsByUserParams) ([]Notification, error) ListOutboundWebhooksByUser(ctx context.Context, userID uuid.UUID) ([]OutboundWebhook, error) ListPendingCommands(ctx context.Context, nodeAgentID string) ([]AgentCommand, error) ListPendingProjects(ctx context.Context) ([]Project, error) ListPreviewEnvironmentsForProject(ctx context.Context, projectID uuid.UUID) ([]ListPreviewEnvironmentsForProjectRow, error) ListProjectEnvironments(ctx context.Context, projectID uuid.UUID) ([]ListProjectEnvironmentsRow, error) ListProjectServiceRefs(ctx context.Context, projectID uuid.UUID) ([]ListProjectServiceRefsRow, error) // Visibility model: a project is readable when it is approved for public // display, when the caller owns or is a member of it, or when the caller is a // platform admin. Anonymous callers pass user_id = uuid.Nil, is_admin = false. ListProjectsWithStatsByUser(ctx context.Context, arg ListProjectsWithStatsByUserParams) ([]ListProjectsWithStatsByUserRow, error) ListRecentAccessibleDeployments(ctx context.Context, arg ListRecentAccessibleDeploymentsParams) ([]ListRecentAccessibleDeploymentsRow, error) ListRecentCronRuns(ctx context.Context, arg ListRecentCronRunsParams) ([]ListRecentCronRunsRow, error) ListRecentFailedDeployments(ctx context.Context, arg ListRecentFailedDeploymentsParams) ([]ListRecentFailedDeploymentsRow, error) ListRecentOperationBackups(ctx context.Context, arg ListRecentOperationBackupsParams) ([]ListRecentOperationBackupsRow, error) ListRequestsByDay(ctx context.Context) ([]ListRequestsByDayRow, error) ListResourceAuditLogs(ctx context.Context, arg ListResourceAuditLogsParams) ([]ListResourceAuditLogsRow, error) // Base domains of every online, schedulable agent carrying the required // placement tags — auto-domain candidates for spread services. ListSchedulableAgentDomains(ctx context.Context, dollar_1 json.RawMessage) ([]string, error) ListSchedulableAgents(ctx context.Context) ([]ListSchedulableAgentsRow, error) // Only agents carrying every required placement tag (jsonb array containment). ListSchedulableAgentsMatching(ctx context.Context, dollar_1 json.RawMessage) ([]ListSchedulableAgentsMatchingRow, error) ListSecretEnvVars(ctx context.Context) ([]ListSecretEnvVarsRow, error) // Distinct agents holding inventory rows for a service. ListServiceAgents(ctx context.Context, serviceID string) ([]string, error) ListServiceContainers(ctx context.Context, serviceID string) ([]ListServiceContainersRow, error) ListServiceDomains(ctx context.Context, serviceID uuid.UUID) ([]ServiceDomain, error) ListServiceMetrics(ctx context.Context, arg ListServiceMetricsParams) ([]ListServiceMetricsRow, error) ListServiceTemplatesByCategoryForUser(ctx context.Context, arg ListServiceTemplatesByCategoryForUserParams) ([]ServiceTemplate, error) ListServiceTemplatesForUser(ctx context.Context, ownerID uuid.NullUUID) ([]ServiceTemplate, error) ListServiceVariableValues(ctx context.Context, serviceID uuid.UUID) ([]ListServiceVariableValuesRow, error) ListServiceVariablesWithSecret(ctx context.Context, serviceID uuid.UUID) ([]ListServiceVariablesWithSecretRow, error) ListServicesForPush(ctx context.Context, arg ListServicesForPushParams) ([]ListServicesForPushRow, error) ListSleepCandidates(ctx context.Context) ([]ListSleepCandidatesRow, error) ListSweepablePreviews(ctx context.Context) ([]ListSweepablePreviewsRow, error) ListTopAPServices(ctx context.Context) ([]ListTopAPServicesRow, error) ListUserInvites(ctx context.Context) ([]UserInvite, error) ListUserTokens(ctx context.Context, userID uuid.UUID) ([]UserToken, error) ListVulnerabilities(ctx context.Context, projectID uuid.UUID) ([]ListVulnerabilitiesRow, error) ListWebhookDeliveriesByWebhook(ctx context.Context, webhookID uuid.UUID) ([]WebhookDelivery, error) MarkAllNotificationsReadByUser(ctx context.Context, arg MarkAllNotificationsReadByUserParams) error MarkNotificationReadByIDAndUser(ctx context.Context, arg MarkNotificationReadByIDAndUserParams) error MarkPreviewEnvironmentStatus(ctx context.Context, arg MarkPreviewEnvironmentStatusParams) error MarkUserInviteUsed(ctx context.Context, arg MarkUserInviteUsedParams) error MoveServiceProject(ctx context.Context, arg MoveServiceProjectParams) (int64, error) // Resource-aware: lowest memory utilisation first, then cpu, then container // count. Agents without telemetry sort last (NULL → worst score). PickLeastLoadedAgent(ctx context.Context) (string, error) // Same resource-aware ordering as PickLeastLoadedAgent, restricted to agents // carrying every required placement tag. PickLeastLoadedAgentMatching(ctx context.Context, dollar_1 json.RawMessage) (string, error) ProjectMemberExists(ctx context.Context, arg ProjectMemberExistsParams) (bool, error) PruneAuditLogs(ctx context.Context, dollar_1 int32) (int64, error) RevokeAgentAuthToken(ctx context.Context, id uuid.UUID) (AgentAuthToken, error) RevokeUserToken(ctx context.Context, arg RevokeUserTokenParams) (int64, error) ScrubCommandPayload(ctx context.Context, arg ScrubCommandPayloadParams) error ServiceExistsInProject(ctx context.Context, arg ServiceExistsInProjectParams) (bool, error) ServiceWriteAccess(ctx context.Context, arg ServiceWriteAccessParams) (bool, error) SetAPKeyEnabled(ctx context.Context, arg SetAPKeyEnabledParams) error SetAPServiceEnabled(ctx context.Context, arg SetAPServiceEnabledParams) error SetAPServiceValidation(ctx context.Context, arg SetAPServiceValidationParams) error SetAgentDefaultDomain(ctx context.Context, arg SetAgentDefaultDomainParams) error SetAgentSchedulable(ctx context.Context, arg SetAgentSchedulableParams) error SetAgentStatus(ctx context.Context, arg SetAgentStatusParams) error SetAgentTags(ctx context.Context, arg SetAgentTagsParams) error SetAuditLogMetadata(ctx context.Context, arg SetAuditLogMetadataParams) error SetDatabaseBackupRemoteKeyByID(ctx context.Context, arg SetDatabaseBackupRemoteKeyByIDParams) error SetDatabaseBackupScheduleByIDAndUser(ctx context.Context, arg SetDatabaseBackupScheduleByIDAndUserParams) error SetDatabaseBackupStatusByID(ctx context.Context, arg SetDatabaseBackupStatusByIDParams) error SetDatabaseBackupTargetByIDAndUser(ctx context.Context, arg SetDatabaseBackupTargetByIDAndUserParams) error SetDatabaseNextBackupAt(ctx context.Context, arg SetDatabaseNextBackupAtParams) error SetDatabaseServicePublicPortByIDAndUser(ctx context.Context, arg SetDatabaseServicePublicPortByIDAndUserParams) error SetDatabaseServiceStatusAndConnectionByID(ctx context.Context, arg SetDatabaseServiceStatusAndConnectionByIDParams) error SetDatabaseServiceStatusByID(ctx context.Context, arg SetDatabaseServiceStatusByIDParams) error SetDatabaseServiceStatusByIDAndUser(ctx context.Context, arg SetDatabaseServiceStatusByIDAndUserParams) error SetDeploymentStatus(ctx context.Context, arg SetDeploymentStatusParams) error SetProjectApproved(ctx context.Context, arg SetProjectApprovedParams) (int64, error) SetServiceDomainDefault(ctx context.Context, arg SetServiceDomainDefaultParams) (int64, error) SetServiceLegacyDomain(ctx context.Context, arg SetServiceLegacyDomainParams) error SetServicePublishedPort(ctx context.Context, arg SetServicePublishedPortParams) error SetServiceReplicas(ctx context.Context, arg SetServiceReplicasParams) error SetServiceStatus(ctx context.Context, arg SetServiceStatusParams) error SetUserAdmin(ctx context.Context, arg SetUserAdminParams) (int64, error) SumRequestMetricSince(ctx context.Context, dollar_1 string) (int32, error) SumUsageByKey(ctx context.Context, arg SumUsageByKeyParams) (int64, error) SumUsageByService(ctx context.Context, arg SumUsageByServiceParams) (int64, error) SumUsageCounters(ctx context.Context) (interface{}, error) SyncDeploymentProgress(ctx context.Context, arg SyncDeploymentProgressParams) error SyncPreviewStatuses(ctx context.Context) error TouchAPKeyLastUsed(ctx context.Context, id uuid.UUID) error TouchAgentAuthToken(ctx context.Context, tokenHash string) error TouchServiceDomainChecked(ctx context.Context, id uuid.UUID) error TouchUserToken(ctx context.Context, id uuid.UUID) error TrimCronExecutions(ctx context.Context, arg TrimCronExecutionsParams) error UpdateAgent(ctx context.Context, arg UpdateAgentParams) (NodeAgent, error) UpdateAgentHeartbeat(ctx context.Context, arg UpdateAgentHeartbeatParams) error UpdateBackupTargetByIDAndUser(ctx context.Context, arg UpdateBackupTargetByIDAndUserParams) error UpdateBanner(ctx context.Context, arg UpdateBannerParams) (Banner, error) // Agent reports the real host bindings after create — persist them with // the status flip so ingress can route to the assigned port. UpdateContainerPorts(ctx context.Context, arg UpdateContainerPortsParams) error // Agent heartbeat reports real docker state + net counters; reconcile // inventory for rows this node owns. Tombstones win — never resurrect a // removed replica. $4 is the cumulative rx+tx byte counter. UpdateContainerStateByName(ctx context.Context, arg UpdateContainerStateByNameParams) error UpdateContainerStatus(ctx context.Context, arg UpdateContainerStatusParams) error UpdateCronJobRun(ctx context.Context, arg UpdateCronJobRunParams) error UpdateDatabaseServiceNameAndPlanByIDAndUser(ctx context.Context, arg UpdateDatabaseServiceNameAndPlanByIDAndUserParams) error UpdateDatabaseServiceNameByIDAndUser(ctx context.Context, arg UpdateDatabaseServiceNameByIDAndUserParams) error UpdateDatabaseServicePlanByIDAndUser(ctx context.Context, arg UpdateDatabaseServicePlanByIDAndUserParams) error UpdateEnvVarValue(ctx context.Context, arg UpdateEnvVarValueParams) error UpdateOutboundWebhook(ctx context.Context, arg UpdateOutboundWebhookParams) error UpdatePreviewEnvironment(ctx context.Context, arg UpdatePreviewEnvironmentParams) error UpdateProjectByID(ctx context.Context, arg UpdateProjectByIDParams) (int64, error) UpdateServiceDeployMeta(ctx context.Context, arg UpdateServiceDeployMetaParams) error UpdateServicePreviewBranch(ctx context.Context, arg UpdateServicePreviewBranchParams) error UpdateServiceRuntimeMeta(ctx context.Context, arg UpdateServiceRuntimeMetaParams) error UpdateUserProfile(ctx context.Context, arg UpdateUserProfileParams) error UpdateUserTemplate(ctx context.Context, arg UpdateUserTemplateParams) (int64, error) UpdateVulnerabilityStatus(ctx context.Context, arg UpdateVulnerabilityStatusParams) error UpdateWebhookDeliveryResult(ctx context.Context, arg UpdateWebhookDeliveryResultParams) error UpsertAdminUser(ctx context.Context, arg UpsertAdminUserParams) (uuid.UUID, error) UpsertAppSetting(ctx context.Context, arg UpsertAppSettingParams) error UpsertAppSettingValue(ctx context.Context, arg UpsertAppSettingValueParams) error UpsertBuild(ctx context.Context, arg UpsertBuildParams) error UpsertEnvironmentVariable(ctx context.Context, arg UpsertEnvironmentVariableParams) error UpsertGitHubAppProvider(ctx context.Context, arg UpsertGitHubAppProviderParams) (UpsertGitHubAppProviderRow, error) UpsertGitRepository(ctx context.Context, arg UpsertGitRepositoryParams) error UpsertGitWebhook(ctx context.Context, arg UpsertGitWebhookParams) (UpsertGitWebhookRow, error) UpsertInstanceMetrics(ctx context.Context, arg UpsertInstanceMetricsParams) error UpsertLocalUser(ctx context.Context, arg UpsertLocalUserParams) (UpsertLocalUserRow, error) UpsertNodeMetrics(ctx context.Context, arg UpsertNodeMetricsParams) error UpsertServiceContainer(ctx context.Context, arg UpsertServiceContainerParams) error UpsertServiceMetrics(ctx context.Context, arg UpsertServiceMetricsParams) error UpsertServiceTemplate(ctx context.Context, arg UpsertServiceTemplateParams) error UpsertUsageCounter(ctx context.Context, arg UpsertUsageCounterParams) error } var _ Querier = (*Queries)(nil)