/** * ID Manager for Grain Analytics * Generates and manages user IDs based on consent mode * * Privacy-first implementation: * - Cookieless mode: Daily rotating IDs (no persistence) * - GDPR Strict: Permanent IDs only with consent * - GDPR Opt-out: Permanent IDs by default */ export type IdMode = 'cookieless' | 'permanent'; export interface IdConfig { mode: IdMode; tenantId: string; useLocalStorage?: boolean; } /** * ID Manager class * Handles both daily rotating IDs and permanent IDs */ export declare class IdManager { private config; private cachedDailyId; private dailyIdDate; private dailyRandomSeed; private permanentId; constructor(config: IdConfig); /** * Generate a daily rotating ID * Rotates at midnight in user's local timezone * Provides same-day continuity without persistent tracking */ generateDailyRotatingId(): string; /** * Generate or retrieve permanent user ID * Only used when consent is given */ generatePermanentId(): string; /** * Get the current user ID based on mode */ getCurrentUserId(): string; /** * Switch ID mode (e.g., when consent is granted/revoked) */ setMode(mode: IdMode): void; /** * Load permanent ID from localStorage */ private loadPermanentId; /** * Save permanent ID to localStorage */ private savePermanentId; /** * Clear permanent ID from localStorage */ private clearPermanentId; /** * Load daily random seed from sessionStorage */ private loadDailySeed; /** * Save daily random seed to sessionStorage */ private saveDailySeed; /** * Clear daily seed from sessionStorage */ private clearDailySeed; /** * Get info about current ID for debugging */ getIdInfo(): { mode: IdMode; id: string; isDailyRotating: boolean; }; } //# sourceMappingURL=id-manager.d.ts.map