/** * Funnel events — ADR-305 attribution / ADR-309 constrained schema. * * LOCAL-ONLY by design: this module performs no network I/O. Events are * appended to a bounded local queue only when the telemetry consent domain * is granted (ADR-302). Server-side ingestion (POST /v1/events, ADR-308) * is a separate opt-in transport that does not exist in this build — until * it does, the queue is simply a bounded local record the user can inspect * and delete. * * Constraints enforced here, permanently (ADR-309): closed event set, daily * timestamp buckets (never full timestamps), no raw prompts/commands/paths/ * repo names — the schema has no field that could carry them. */ import type { FunnelEventName, FunnelSurface } from './types.js'; /** * Lazily created pseudonymous funnel ID — random UUID, derived from nothing * (no hardware, account, email, or path). Exists only when attribution * consent (telemetry domain) is granted; deleted on opt-out. */ export declare function getFunnelId(now?: Date): string | null; /** Opt-out: stop emission, delete the ID and the local queue (ADR-305). */ export declare function deleteFunnelData(): void; /** * Most recent local record of `event`, as a daily bucket (`YYYY-MM-DD`) — * events never carry a full timestamp (ADR-309). Returns null when nothing * is recorded, which is also what you get with telemetry consent off (the * queue is never written at all in that case) — this can't distinguish * "never happened" from "not being recorded," by design. */ export declare function lastRecordedEvent(event: FunnelEventName): string | null; /** * Record a funnel event to the local queue. No-op (returns false) when * telemetry consent is absent — consent-off means zero funnel records. * `messageId` is only carried for promo_impression / promo_open events; on * every other event it is dropped so the schema stays clean. */ export declare function recordFunnelEvent(event: FunnelEventName, surface: FunnelSurface, release: string, optsOrNow?: Date | { now?: Date; messageId?: string; }): boolean; //# sourceMappingURL=events.d.ts.map