UNPKG

@chordcommerce/analytics

Version:

Chord Commerce event tracking

23 lines (22 loc) 743 B
export interface ConsentAdapter { getCurrentConsent: () => ConsentConfiguration | Promise<ConsentConfiguration>; handleConsentUpdates: (fn: (consent: ConsentConfiguration) => void) => void; userCanBeTracked: () => boolean | Promise<boolean>; /** * Get current consent categories - called FRESH on every event, no caching! */ getCategories?: () => Record<string, boolean>; /** * Check if consent manager is ready (duck typing check) */ isConsentReady?: () => boolean; /** * Get the consent model ('opt-in' or 'opt-out') */ getConsentModel?: () => 'opt-in' | 'opt-out'; } export interface ConsentConfiguration { consentCategories?: { [key: string]: boolean; }; }