Governed operator lists (organizations, grants, people, billing×4) gain
server-side search, status filters, and 50-row pages with true totals
from count(*) OVER(); state is URL-addressable, out-of-range pages
clamp,
and no-match is distinct from true-empty.
People is the eighth flat sidebar entry: /operator/persons lists persons
newest-joined first (excluding the reserved system person), rows linking
to the existing detail.
Billing gains an operator invoice detail at
/operator/billing/invoices/{invoiceID} reusing the member projection;
open invoices past due present as Overdue (derived, filterable, stored
status untouched); all four views lead with the linked organization and
mute object IDs.
Grants filter over the derived Live/Superseded/Inactive state, the SQL
HAVING predicate pinned to the Go derivation by test. Embedded lists
(org composite ledger, Tier changes) adopt the shared controls under
namespaced params with sibling-state-preserving URLs and scoped htmx
swaps that hold the viewport.
Review corrections: blocked ladder Delete renders disabled with tooltip
and mutations fire toasts; collapse triggers paint their open state;
sections use outside headings; plan topology drops the orphan-product
check; domains policy collapses behind a disclosure.
62 lines
3.2 KiB
Go
62 lines
3.2 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.29.0
|
|
|
|
package identity
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Querier interface {
|
|
// Operator overview tile: how many people the deployment currently serves.
|
|
// Mirrors LookupPersons' status='active' filter so the headline number and
|
|
// the lookup affordance above it are counting the same population.
|
|
CountActivePersons(ctx context.Context) (int64, error)
|
|
// The People tile's caption: velocity rather than a restatement of the
|
|
// census. Same status filter as CountActivePersons so both numbers
|
|
// describe the same population.
|
|
CountPersonsJoinedLast30Days(ctx context.Context) (int64, error)
|
|
CreatePerson(ctx context.Context, arg CreatePersonParams) (Person, error)
|
|
CreateUser(ctx context.Context, oidcSubject string) (User, error)
|
|
// Idempotently insert the reserved system person that owns the System tenant
|
|
// (keyed on the unique user_id). Read back with GetPersonByUserID.
|
|
EnsureSystemPerson(ctx context.Context, arg EnsureSystemPersonParams) error
|
|
// Idempotently insert the reserved, non-loginable system user (keyed on the
|
|
// unique oidc_subject sentinel). Safe under concurrent boots; read back with
|
|
// GetUserByOIDCSubject.
|
|
EnsureSystemUser(ctx context.Context, oidcSubject string) error
|
|
GetPersonByID(ctx context.Context, personID string) (Person, error)
|
|
GetPersonByUserID(ctx context.Context, userID string) (Person, error)
|
|
GetUserByOIDCSubject(ctx context.Context, oidcSubject string) (User, error)
|
|
ListPersons(ctx context.Context) ([]Person, error)
|
|
// People directory operator surface (operator-list-scale UX-4 /
|
|
// operator-people-directory D6): the paged, searched query feeding
|
|
// GET /operator/persons. Ordered newest-joined first so "who joined this
|
|
// week?" is answered by page one.
|
|
//
|
|
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
|
|
// match against display_name or primary_email (operator-list-scale:
|
|
// "carries a scoped server-side search" -- "people: display name and
|
|
// email").
|
|
// sqlc.narg(exclude_person_id): the reserved system person (maintainer
|
|
// decision 2026-08-23: infrastructure, never "joined", excluded from the
|
|
// directory and its totals; it stays visible as the System tenant's owner
|
|
// in the organizations context). NULL excludes nothing.
|
|
// count(*) OVER() carries the true total for the filtered set alongside
|
|
// the page's rows (design D2), so the stated total never reflects only
|
|
// the page.
|
|
ListPersonsPage(ctx context.Context, arg ListPersonsPageParams) ([]ListPersonsPageRow, error)
|
|
// Resolves a lookup term to one or more active persons for the operator
|
|
// landing-surface lookup affordance. Exact email match wins (deterministic
|
|
// — operators using email expect precision); otherwise falls through to
|
|
// case-insensitive substring match against display_name. Status='active'
|
|
// filters out removed accounts. LIMIT 20 caps the disambiguation list
|
|
// without paging.
|
|
LookupPersons(ctx context.Context, primaryEmail string) ([]LookupPersonsRow, error)
|
|
UpdatePerson(ctx context.Context, arg UpdatePersonParams) (Person, error)
|
|
UpdateUserLogin(ctx context.Context, arg UpdateUserLoginParams) (User, error)
|
|
}
|
|
|
|
var _ Querier = (*Queries)(nil)
|