import { BaseAnalyticsProvider } from '../../base-analytics-provider.js'; import type { ProviderConfig, ConsentSettings } from '../../../types/provider.js'; import type { RevenueData } from '../../../definitions.js'; interface HeapConfig extends ProviderConfig { appId: string; enableAutocapture?: boolean; captureClicks?: boolean; captureSubmits?: boolean; capturePageviews?: boolean; secureCookie?: boolean; disableTextCapture?: boolean; disableCookies?: boolean; forceSSL?: boolean; trackingServer?: string; globalProperties?: Record; } interface HeapSDK { load: (appId: string, options?: any) => void; track: (event: string, properties?: any) => void; identify: (userId: string) => void; addUserProperties: (properties: any) => void; removeEventProperty: (property: string) => void; addEventProperties: (properties: any) => void; clearEventProperties: () => void; resetUserId: () => void; getUserId: () => string; getSessionId: () => string; startRecording: (options?: any) => void; stopRecording: () => void; appid: string; loaded: boolean; config: { disableTextCapture: boolean; secureCookie: boolean; disableCookies: boolean; forceSSL: boolean; trackingServer?: string; }; } declare global { interface Window { heap?: HeapSDK; } } export declare class HeapAnalyticsProvider extends BaseAnalyticsProvider { readonly id = "heap"; readonly name = "Heap Analytics"; readonly version = "1.0.0"; private heap?; private heapConfig; private scriptLoaded; protected doInitialize(config: HeapConfig): Promise; private loadHeapSDK; protected doShutdown(): Promise; protected doUpdateConsent(consent: ConsentSettings): Promise; protected doTrack(eventName: string, properties: Record): Promise; protected doIdentifyUser(userId: string, traits: Record): Promise; protected doSetUserProperties(properties: Record): Promise; protected doLogScreenView(screenName: string, properties: Record): Promise; protected doLogRevenue(data: RevenueData): Promise; protected doProviderReset(): Promise; protected doSetDebugMode(enabled: boolean): void; /** * Add event properties (sent with all subsequent events) */ addEventProperties(properties: Record): void; /** * Remove an event property */ removeEventProperty(property: string): void; /** * Clear all event properties */ clearEventProperties(): void; /** * Get the current user ID */ getUserId(): string | null; /** * Get the current session ID */ getSessionId(): string | null; /** * Start recording user sessions */ startRecording(options?: any): void; /** * Stop recording user sessions */ stopRecording(): void; /** * Check if Heap is loaded */ isLoaded(): boolean; /** * Get the Heap App ID */ getAppId(): string | null; /** * Sanitize properties for Heap */ private sanitizeProperties; } export {};