import { type CatalogEntry } from "./delegated.js"; import type { GrantAllow } from "./grants.js"; /** One age-restricted product a grant names — what the page calls out by name. */ export interface AgeRestrictedItem { sku: string; /** The catalog's display name, when it carries one (falls back to the sku id). */ name?: string; price: number; minAge: number; } /** The age fact a grant's bounds imply, derived server-side from the catalog. */ export interface GrantAgeScope { /** The strictest `minAge` among the products in scope; `null` when none is restricted. */ minimumAge: number | null; /** Those products — the disclosure list. */ items: AgeRestrictedItem[]; /** Where the list came from. `"named"` ⇒ the grant pins these exact products, so the list is * closed. `"scanned"` ⇒ it was found by looking at what the allowed categories (or the whole * store) hold right now, so it is a forecast and the page must not imply otherwise. */ from: "named" | "scanned"; } /** * Is `sku` inside the grant's `allow` bounds? Fail-closed: with bounds set, an unknown or * uncategorized item does NOT pass. No bounds (absent, or neither list present) ⇒ everything in * the catalog is allowed. This is the SPEND-TIME enforcement predicate `Grants.allowed()` runs. */ export declare function skuAllowed(allow: GrantAllow | undefined, sku: string, catalog: Record): boolean; /** * The age-restricted products a grant's bounds cover. Pure: no I/O, no agent input, no new field * on the wire. * * A grant that NAMES products reads only those — an exact, closed list. A grant bounded by * category (or unbounded) is scanned against the catalog, and the result is marked * `from: "scanned"` so the page can present it as what the shelf holds today rather than a * promise. Either way the spend-time refusal is unchanged; this is disclosure. */ export declare function ageScopeFor(allow: GrantAllow | undefined, catalog: Record | undefined): GrantAgeScope;