eggi-ai-db-schema
Version:
Type-safe database schema and ORM client for Eggi.AI with direct RDS connection
40 lines • 1.91 kB
TypeScript
/**
* =============================================================================
* SOCIAL ACCOUNT RELATIONSHIP OPERATIONS UTILITIES
* =============================================================================
* Utility functions for creating and managing relationship scores between LinkedIn social accounts
*/
import { type RelationshipScore } from "../lib/schema";
export interface CreateSocialAccountRelationshipScoreData {
socialAccountIdA: number;
socialAccountIdB: number;
score: number;
modelVersion: string;
analysisType?: "MESSAGE_ANALYSER" | "FEED_ANALYSER";
metadata?: {
sources?: string[];
analysisDate?: string;
conversationCount?: number;
messageCount?: number;
[key: string]: any;
};
}
/**
* Creates or updates a relationship score between two LinkedIn social accounts
* Automatically ensures socialAccountIdA < socialAccountIdB for consistency
*
* @param data - Relationship score creation data
* @returns Promise resolving to the created/updated relationship score
*/
export declare function upsertSocialAccountRelationshipScore(data: CreateSocialAccountRelationshipScoreData): Promise<RelationshipScore>;
/**
* Gets a relationship score between two social accounts for a specific model version and analysis type
*
* @param socialAccountIdA - First social account ID
* @param socialAccountIdB - Second social account ID
* @param modelVersion - AI model version
* @param analysisType - Analysis type (defaults to 'MESSAGE_ANALYSER')
* @returns Promise resolving to relationship score or null if not found
*/
export declare function getSocialAccountRelationshipScore(socialAccountIdA: number, socialAccountIdB: number, modelVersion: string, analysisType?: "MESSAGE_ANALYSER" | "FEED_ANALYSER"): Promise<RelationshipScore | null>;
//# sourceMappingURL=social-account-relationship-operations.d.ts.map