UNPKG

eggi-ai-db-schema

Version:

Type-safe database schema and ORM client for Eggi.AI with direct RDS connection

54 lines 1.94 kB
import { Database } from "../lib/db"; export interface CloseConnectionResult { source_user_name: string; source_linkedin_identifier: string; suggestion_for_user_name: string; linkedin_url: string; score: number; score_rank: number; total_connections: number; } export interface ReferenceUser { full_name: string; profile_image_url: string | null; internal_identifier: string; linkedin_identifier: string; connections_count: number; } export interface AnalysisReport { found_accounts: ReferenceUser[]; missing_accounts: string[]; accounts_with_no_relationships: string[]; total_requested: number; total_found: number; total_with_relationships: number; } /** * Find close connections for given LinkedIn identifiers * This function implements the complex bidirectional relationship analysis * with 50% filtering and max 50 connections per person */ export declare function findCloseConnections(db: Database, identifiers: string[]): Promise<CloseConnectionResult[]>; /** * Get reference users information (the users we're analyzing) */ export declare function getReferenceUsers(db: Database, identifiers: string[]): Promise<ReferenceUser[]>; /** * Generate comprehensive analysis report for missing accounts and relationships */ export declare function generateAnalysisReport(db: Database, identifiers: string[]): Promise<AnalysisReport>; /** * Extract LinkedIn identifier from URL */ export declare function extractLinkedInIdentifier(linkedinUrl: string): string | null; /** * Find users by LinkedIn identifiers (for Supabase sync) */ export declare function findUsersByLinkedInIdentifiers(db: Database, identifiers: string[]): Promise<Array<{ id: string; linkedin_identifier_regular: string; linkedin_identifier: string | null; full_name: string; profile_image_url: string | null; }>>; //# sourceMappingURL=close-connections.d.ts.map