UNPKG

@cliqdigital/bloomreach-sdk

Version:

React component library for integrating Bloomreach SDK with push notifications support

78 lines (77 loc) 2.13 kB
/// <reference types="react" /> export interface ConsentBannerStyles { container?: React.CSSProperties; title?: React.CSSProperties; description?: React.CSSProperties; buttonContainer?: React.CSSProperties; acceptButton?: React.CSSProperties; rejectButton?: React.CSSProperties; } export interface BloomreachConfig { projectToken: string; target?: string; cookie_domain?: string; publicToken?: string; apiKey?: string; apiTarget?: string; enableTaboola?: boolean; taboolaConfig?: { publisherId: string; appType: string; }; onConsentGranted?: () => void; onConsentDenied?: () => void; debug?: boolean; notifications?: { showConsentBanner?: boolean; requestPermissionOnLoad?: boolean; vapidPublicKey?: string; consentBannerProps?: { title?: string; description?: string; acceptLabel?: string; rejectLabel?: string; styles?: ConsentBannerStyles; }; }; taboola?: { enabled?: boolean; containerId?: string; }; } export interface TaboolaConfig { publisherId: string; appType: string; apiKey: string; placement?: string; mode?: "thumbnails-a" | "thumbnails-b" | "thumbnails-c"; container?: string; target_type?: string; } export interface TrackingEvent { name: string; properties?: Record<string, any>; } export interface UserProperties { [key: string]: any; } export interface BloomreachSDK { start: () => void; identify: (id: string) => void; update: (properties: Record<string, any>) => void; track: (event: string, properties?: Record<string, any>) => void; push: (...args: any[]) => number; setConsent: (consent: Record<string, boolean>) => void; notifications: { isSubscribed: () => Promise<boolean>; subscribe: () => Promise<void>; unsubscribe: () => Promise<void>; isAvailable: () => boolean; }; } declare global { interface Window { exponea: BloomreachSDK; _taboola: any[]; } }