// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 package dbgen import ( "context" "github.com/google/uuid" ) type Querier interface { AddCandidateCertification(ctx context.Context, arg AddCandidateCertificationParams) error AddCandidateCustomerExperience(ctx context.Context, arg AddCandidateCustomerExperienceParams) error AddCandidateSkill(ctx context.Context, arg AddCandidateSkillParams) error AddRequiredCertification(ctx context.Context, arg AddRequiredCertificationParams) error AddRequiredSkill(ctx context.Context, arg AddRequiredSkillParams) error AddSlateMember(ctx context.Context, arg AddSlateMemberParams) (SlateMember, error) // Right to erasure as anonymize in place: wipe the identifying PII while KEEPING the row so the de // identified scored outcomes (slate_members) and the demographic bucket survive for the adverse impact // record. Once the name, email, contact, and resume vector are gone the row is no longer personal data, // so erasure is satisfied and the compliance history is preserved. Idempotent on anonymized_at. AnonymizeCandidate(ctx context.Context, id uuid.UUID) (int64, error) AwardsSyncMeta(ctx context.Context) (AwardsSyncMetaRow, error) CreateCandidate(ctx context.Context, arg CreateCandidateParams) (Candidate, error) CreateOpportunity(ctx context.Context, arg CreateOpportunityParams) (Opportunity, error) CreateRequirement(ctx context.Context, arg CreateRequirementParams) (Requirement, error) CreateSlate(ctx context.Context, arg CreateSlateParams) (Slate, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) DeleteExternalCandidate(ctx context.Context, id uuid.UUID) (int64, error) // Erasure must also remove slate placements of the sourced person; slate_members has no ON DELETE rule // so the candidate delete would otherwise fail. RLS scopes this to the caller's org. DeleteSlateMembersForCandidate(ctx context.Context, candidateID uuid.UUID) error DetachSourcingLog(ctx context.Context, candidateID *uuid.UUID) error GetCandidate(ctx context.Context, id uuid.UUID) (Candidate, error) GetOpportunity(ctx context.Context, id uuid.UUID) (Opportunity, error) GetOrganization(ctx context.Context, id uuid.UUID) (Organization, error) GetRequirement(ctx context.Context, id uuid.UUID) (Requirement, error) GetSamOpportunity(ctx context.Context, noticeID string) (SamOpportunity, error) GetSkillByName(ctx context.Context, name string) (Skill, error) GetSlate(ctx context.Context, id uuid.UUID) (Slate, error) // PK tiebreaker => total order [review SQLC-5] // The frozen decision record for one member: the full per component trace, rationale, and gap summary // for the audit and candidate facing explanation. GetSlateMember(ctx context.Context, arg GetSlateMemberParams) (SlateMember, error) GetUser(ctx context.Context, id uuid.UUID) (User, error) GetUserByEmail(ctx context.Context, lower string) (User, error) // audit_logs is append-only (enforced by trigger); only INSERT/SELECT are granted. InsertAuditLog(ctx context.Context, arg InsertAuditLogParams) (InsertAuditLogRow, error) InsertCandidateNotice(ctx context.Context, arg InsertCandidateNoticeParams) (AedtCandidateNotice, error) InsertSourcingLog(ctx context.Context, arg InsertSourcingLogParams) error ListAedtInventory(ctx context.Context) ([]AedtInventory, error) // audit_logs has NO RLS policy by design. Bind the read to the validated session GUC (NOT a // caller-supplied org param) so it inherits the same fail-closed default-deny as every RLS table — // a missing/wrong org can no longer leak another tenant's trail. Run inside RunInTenantTx so the GUC // is set [review AUDIT-2/RLS-3]. ListAuditLogsForOrg(ctx context.Context, arg ListAuditLogsForOrgParams) ([]AuditLog, error) // Incumbents and similar awards for a NAICS, largest first (excludes Galapagos own awards). ListAwardsByNaics(ctx context.Context, arg ListAwardsByNaicsParams) ([]UsaspendingAward, error) ListBlsWages(ctx context.Context) ([]BlsWage, error) ListCandidateCertifications(ctx context.Context, candidateID uuid.UUID) ([]string, error) ListCandidateCustomerExperience(ctx context.Context, candidateID uuid.UUID) ([]string, error) ListCandidateSkills(ctx context.Context, candidateID uuid.UUID) ([]ListCandidateSkillsRow, error) ListCandidates(ctx context.Context, arg ListCandidatesParams) ([]Candidate, error) // Available (staffable) candidates first, most recently updated next, so the workforce intelligence // surface leads with the talent you can deploy and newly staffed or sourced people are always scored. ListCandidatesForIntel(ctx context.Context, limit int32) ([]Candidate, error) ListExternalCandidates(ctx context.Context, limit int32) ([]ListExternalCandidatesRow, error) // Galapagos own past performance, largest first. ListGalapagosAwards(ctx context.Context, lim int32) ([]UsaspendingAward, error) // AEDT governance: model version registry, the org AEDT inventory, candidate notices, and the // retention sweep. All on the app pool under RLS (the eeo schema is reached only by the compliance // pool, never here). ListModelVersions(ctx context.Context) ([]AedtModelVersion, error) ListOpportunities(ctx context.Context, arg ListOpportunitiesParams) ([]Opportunity, error) ListRequiredCertifications(ctx context.Context, requirementID uuid.UUID) ([]string, error) ListRequiredSkills(ctx context.Context, requirementID uuid.UUID) ([]ListRequiredSkillsRow, error) ListRequirements(ctx context.Context, arg ListRequirementsParams) ([]Requirement, error) ListRequirementsForOpportunity(ctx context.Context, opportunityID *uuid.UUID) ([]Requirement, error) // All filters are optional (NULL array / NULL scalar = "no filter"). active_only defaults true at the // handler. Soonest-closing first, then most-recently-posted. // Text equality filters are case-insensitive (upper() both sides; the service upper-cases the params) // so casing drift from SAM's path text can't silently zero out results [review COR-3]. The title search // is a literal substring (position()), NOT a LIKE pattern, so q's %/_/\ are matched literally and a // trailing backslash can't 500 the request [review COR-1]. Past-deadline / null-deadline notices sort // to the bottom so the feed leads with what's still open [review COR-2]. ListSamOpportunities(ctx context.Context, arg ListSamOpportunitiesParams) ([]SamOpportunity, error) ListSkills(ctx context.Context, arg ListSkillsParams) ([]Skill, error) ListSlateMembers(ctx context.Context, slateID uuid.UUID) ([]SlateMember, error) ListSlatesForRequirement(ctx context.Context, requirementID uuid.UUID) ([]Slate, error) ListSourcingLog(ctx context.Context, limit int32) ([]ListSourcingLogRow, error) // Platform/security events with NO org (e.g. failed logins before org resolution). Privileged read // path only — never the per-tenant app path — so these events are not a black hole [review AUDIT-3]. ListSystemAuditLogs(ctx context.Context, arg ListSystemAuditLogsParams) ([]AuditLog, error) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error) // Band/decision rollup across every slate member under one opportunity's requirements — the source // for GET /proposal-readiness [review COMPL-2]. RLS scopes all three tables to the caller's org. ProposalReadiness(ctx context.Context, opportunityID *uuid.UUID) ([]ProposalReadinessRow, error) // Candidates whose most recent recorded decision is older than the retention window and whose PII is // not yet anonymized. The de identified slate_members outcomes are retained; only the candidate PII is // wiped (by AnonymizeCandidate). RLS scopes this to the caller's org. RetentionDueCandidates(ctx context.Context, dollar_1 int32) ([]uuid.UUID, error) SamSyncMeta(ctx context.Context) (SamSyncMetaRow, error) // Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion (k=60). // RLS already scopes both legs to the caller's org. $1=query embedding, $2=limit, $3=text query. // Every ORDER BY carries a unique tiebreaker (id) so results are byte-stable for fixed inputs, the // AEDT reproducibility mandate [review SQLC-2/PGV-1/PGV-2]. Caller SETs LOCAL hnsw.ef_search first. SearchCandidatesHybrid(ctx context.Context, arg SearchCandidatesHybridParams) ([]SearchCandidatesHybridRow, error) // Cosine nearest-neighbor over the skills ontology (powers semantic skill adjacency). SearchSkillsSemantic(ctx context.Context, arg SearchSkillsSemanticParams) ([]SearchSkillsSemanticRow, error) // Human-in-the-loop: a person approves/rejects each member. Never auto-decided. SetSlateMemberDecision(ctx context.Context, arg SetSlateMemberDecisionParams) (SlateMember, error) SoftDeleteCandidate(ctx context.Context, id uuid.UUID) error TouchUserLogin(ctx context.Context, id uuid.UUID) error UpdateSlateStatus(ctx context.Context, arg UpdateSlateStatusParams) (Slate, error) UpsertAedtInventory(ctx context.Context, arg UpsertAedtInventoryParams) (AedtInventory, error) // USASpending awards cache. Global public catalog (no organization_id, outside RLS): reads run off // the pool, writes come from the daily sync (cmd/awards-sync) as the migrator role. UpsertAward(ctx context.Context, arg UpsertAwardParams) error // BLS OEWS wage baseline cache. Global public catalog (no organization_id, outside RLS): reads run // off the pool, writes come from the weekly rates sync (cmd/rates-sync) as the migrator role. UpsertBlsWage(ctx context.Context, arg UpsertBlsWageParams) error // External candidate sourcing. The import command (cmd/import-candidates) writes as the migrator role // with an explicit organization_id; the delete path runs as the app role inside a tenant tx (RLS). UpsertExternalCandidate(ctx context.Context, arg UpsertExternalCandidateParams) (uuid.UUID, error) // SAM.gov opportunities cache. Global public catalog (no organization_id, outside RLS): reads run // straight off the pool, writes come from the daily sync (cmd/sam-sync) as the migrator role. UpsertSamOpportunity(ctx context.Context, arg UpsertSamOpportunityParams) error UpsertSkill(ctx context.Context, arg UpsertSkillParams) (Skill, error) WagesSyncMeta(ctx context.Context) (WagesSyncMetaRow, error) } var _ Querier = (*Queries)(nil)