import type { ConsentCategory, UserConsentState, ConsentGrantMeta, } from "./consent-types"; /** * Vendor-neutral consent management interface. * * Feature binders that receive a consent instance operate through this * interface. Concrete implementations (Payload-backed, in-memory, etc.) are * wired at DI bind time and never imported by feature packages directly. */ export interface IConsent { /** Synchronous check — true when the subject has granted the category. */ isGranted(category: ConsentCategory): boolean; /** Record a consent grant for the given category. */ grant(category: ConsentCategory, meta?: ConsentGrantMeta): Promise; /** Record a consent withdrawal for the given category. */ withdraw(category: ConsentCategory): Promise; /** Return the full list of per-category consent states. */ getCategories(): UserConsentState[]; }