UNPKG

cookie-though

Version:

Easy to use, minimal footprint application that manages cookie preferences. <br> So delicious, you'll never need another library again 😄

41 lines (40 loc) • 997 B
export declare type CookiePreference = Pick<Policy, 'id'> & { isEnabled: boolean; }; export interface CookiePreferences { isCustomised: boolean; cookieOptions: CookiePreference[]; } export declare type CookieOption = Policy & { isEnabled: boolean; }; export interface CookieOptions extends CookiePreferences { cookieOptions: CookieOption[]; } export interface Policy { id: string; label: string; description: string; category: 'essential' | 'social' | 'personalisation' | 'marketing' | 'statistics' | 'functional'; } export interface Config { policies: Policy[]; domain?: string; essentialLabel?: string; permissionLabels: { accept: string; acceptAll: string; decline: string; }; cookiePreferenceKey?: string; header: { title?: string; subTitle?: string; description: string; }; customizeLabel: string; cookiePolicy?: { url: string; label: string; }; }