UNPKG

c15t

Version:

<div align="center"> <img src="https://c15t.com/logo-icon.png" alt="c15t Logo" width="64" height="64" /> <h1>c15t</h1> <p>Transform privacy consent from a compliance checkbox into a fully observable system</p>

29 lines 1.28 kB
import type { AllConsentNames, ConsentState } from '../types'; /** * Determines the effective consents based on the user's Do Not Track setting. * * @param consents - The current state of user consents. * @param honorDoNotTrack - Whether to respect the user's Do Not Track setting. * @returns The effective consents after considering Do Not Track. */ export declare function getEffectiveConsents(consents: ConsentState, honorDoNotTrack: boolean): ConsentState; /** * Checks if the user has given consent for a specific type. * * @param consentType - The type of consent to check. * @param consents - The current state of user consents. * @param honorDoNotTrack - Whether to respect the user's Do Not Track setting. * @returns True if consent is given, false otherwise. */ export declare function hasConsentFor(consentType: AllConsentNames, consents: ConsentState, honorDoNotTrack: boolean): boolean; /** * Determines if the user has consented based on consent information. * * @param consentInfo - The consent information. * @returns True if the user has consented, false otherwise. */ export declare function hasConsented(consentInfo: { time: number; type: 'all' | 'custom' | 'necessary'; } | null): boolean; //# sourceMappingURL=consent-utils.d.ts.map