import type { H3Event } from "h3"; import { type ConsentCategory } from "../shared/consent.js"; /** * The visitor's country from the host's geo header, if it sent one. The * headers a CDN always overwrites come first, so a visitor's own `x-country` * can't outrank them. */ export declare function requestCountry(event: H3Event): string | undefined; export declare function requestCountryFromHeaders(headers: Headers | null | undefined): string | undefined; /** Consent decision for auth callbacks using standard request headers. */ export declare function requestAllowsConsentCategoryFromHeaders(headers: Headers | null | undefined, category: ConsentCategory): boolean; /** * A stored choice applies everywhere; without one, the country decides * whether storing `category` cookies requires an opt-in. */ export declare function requestAllowsConsentCategory(event: H3Event, category: ConsentCategory): boolean; /** * `GET /_agent-native/auth/consent-region`: `consent` when the visitor's * country gets the banner, `none` when it doesn't, `unknown` when the host * sent no country. The SSR shell is cached for everyone, so the browser asks * here instead of reading it from the page. */ export declare function createConsentRegionHandler(): import("h3").EventHandlerWithFetch; /** * `POST /_agent-native/auth/consent` with `{ choice: "1.p1.t0" }`: write the * visitor's choice from the server. Safari keeps a cookie page JavaScript * wrote for seven days at most, and builder.io asks again only after a year. * Uses the same domain as the browser's copy, so it replaces that copy. */ export declare function createConsentHandler(): import("h3").EventHandlerWithFetch>;