/** * Export Filtering Module * * Shared filtering logic for all export formats (CSV, Excel, JSON, Map, PDF). * Provides a single code path for filtering, sorting, and limiting activities. */ import type { GeocodedActivity, SortOrder } from '../types'; export type { SortOrder }; /** * Options for filtering activities before export. * All fields are optional - only specified filters are applied. */ export interface FilterOptions { /** Filter by categories (exact match, case-insensitive) */ readonly categories?: readonly string[]; /** Filter by countries (name or ISO code, case-insensitive) */ readonly countries?: readonly string[]; /** Filter by sender names (word-boundary match, case-insensitive) */ readonly from?: readonly string[]; /** Only activities on or after this date */ readonly startDate?: Date; /** Only activities on or before this date */ readonly endDate?: Date; /** Minimum score threshold (0-5, derived from interestingScore and funScore) */ readonly minScore?: number; /** Only activities with specific venue/location (at least region + country) */ readonly onlyLocations?: boolean; /** Only generic activities without specific locations */ readonly onlyGeneric?: boolean; /** Maximum number of activities to return (0 = all, applied after sort) */ readonly maxActivities?: number; /** Sort order when limiting (default: score) */ readonly sort?: SortOrder; } /** * Normalize a country input to a standard country name. * Accepts ISO alpha-2, alpha-3 codes, or country names. * Returns null if the input cannot be normalized. */ export declare function normalizeCountry(input: string): string | null; /** * Check if a sender name matches the filter using word-boundary matching. * "John" matches "John Smith" but not "Johnson". */ export declare function matchesSender(senderName: string, filter: string): boolean; /** * Filter, sort, and limit activities based on the provided options. * * @param activities - Activities to filter * @param options - Filter options (all optional) * @returns Filtered, sorted, and limited activities * * @example * ```typescript * const filtered = filterActivities(activities, { * categories: ['food', 'travel'], * countries: ['NZ', 'Australia'], * minScore: 1.5, * maxActivities: 50, * sort: 'score' * }) * ``` */ export declare function filterActivities(activities: readonly GeocodedActivity[], options?: FilterOptions): GeocodedActivity[]; //# sourceMappingURL=filter.d.ts.map