/** * Copyright (c) 2019-2025 Mark Sandford * Licensed under the MIT License. See LICENSE and NOTICE files. */ /** * Standardized entity record with normalized name and metadata */ export interface StandardizedEntity { normalizedName: string; displayName: string; rawVariants: string[]; entityType: 'individual' | 'organization' | 'unknown'; metadata: { employer?: string; occupation?: string; city?: string; state?: string; zip?: string; }; } /** * Entity aggregation with deduplication */ export interface AggregatedEntity extends StandardizedEntity { totalAmount: number; transactionCount: number; transactions: Array<{ amount: number; date: string; rawName: string; }>; } /** * Check if two entities should be considered the same based on name similarity * and metadata matching */ export declare function entitiesMatch(entity1: { name: string; employer?: string; city?: string; state?: string; zip?: string; }, entity2: { name: string; employer?: string; city?: string; state?: string; zip?: string; }, threshold?: number): boolean; /** * Normalize a single entity name and metadata */ export declare function normalizeEntity(name: string, metadata?: { employer?: string; occupation?: string; city?: string; state?: string; zip?: string; }): StandardizedEntity; /** * Deduplicate and aggregate contributions by entity */ export declare function deduplicateContributions(contributions: Array<{ contributor_name: string; contributor_employer?: string; contributor_occupation?: string; contributor_city?: string; contributor_state?: string; contributor_zip?: string; contribution_receipt_amount: number; contribution_receipt_date: string; }>): AggregatedEntity[]; /** * Deduplicate and aggregate disbursements by recipient */ export declare function deduplicateDisbursements(disbursements: Array<{ recipient_name: string; recipient_city?: string; recipient_state?: string; disbursement_amount: number; disbursement_date: string; disbursement_description?: string; }>): AggregatedEntity[]; /** * Standardize employer/organization names for industry analysis */ export declare function standardizeEmployerName(employer: string): string; //# sourceMappingURL=fec-entity-resolution.d.ts.map