export type RfmEventRow = { contact_id?: string | null; reachy_id?: string | null; event_name?: string | null; event_timestamp: string | Date; event_data?: any; }; export type RfmContactRow = { id: string; reachy_id?: string | null; email?: string | null; phone?: string | null; is_subscribed?: boolean | null; communication_preferences?: any; }; export type RfmAggregateRow = { contact_id: string; last_ts: Date; event_count: number; }; export type RfmScoredContact = RfmAggregateRow & { recency_days: number; r_score: 1 | 2 | 3 | 4 | 5; f_score: 1 | 2 | 3 | 4 | 5; segment_key: string; email_ok: 0 | 1; sms_ok: 0 | 1; }; export type RfmPreviewSegment = { segment_key: string; segment_name: string; users: number; percent: number; avm: number; email_reachability: number; sms_reachability: number; }; export type RfmThresholdRow = { kind: 'r' | 'f'; score: 1 | 2 | 3 | 4 | 5; min_value: number; max_value: number; }; export type RfmComputeOptions = { from: string | Date; to: string | Date; rfEventName: string; filterContactIds?: Set | string[] | null; }; type PercentileCuts = [number, number, number, number]; export declare class RfmEngine { static aggregateFromEvents(contacts: RfmContactRow[], events: RfmEventRow[], opts: RfmComputeOptions): RfmAggregateRow[]; static scoreAggregates(contacts: RfmContactRow[], aggregates: RfmAggregateRow[], opts: Pick): { scored: RfmScoredContact[]; r_days_cuts: PercentileCuts; f_count_cuts: PercentileCuts; }; static thresholdsFromScored(scored: RfmScoredContact[]): RfmThresholdRow[]; static previewFromScored(scored: RfmScoredContact[]): RfmPreviewSegment[]; static computeFromEvents(contacts: RfmContactRow[], events: RfmEventRow[], opts: RfmComputeOptions): { segments: RfmPreviewSegment[]; thresholds: RfmThresholdRow[]; scored: RfmScoredContact[]; }; } export {}; //# sourceMappingURL=RfmEngine.d.ts.map