/**
 * src/analytics/tracker.ts
 * تتبع الاستخدام والتكاليف — Usage/cost tracking
 */
export type MessageDirection = 'inbound' | 'outbound';
export type MessageType = 'text' | 'voice' | 'image' | 'document' | 'location' | 'system';
export interface DailyUsage {
    date: string;
    messagesIn: number;
    messagesOut: number;
    tokensIn: number;
    tokensOut: number;
    costUsd: number;
    avgResponseTimeMs: number;
    uniqueCustomers: number;
}
export interface MonthlyUsage {
    year: number;
    month: number;
    totalMessages: number;
    totalTokensIn: number;
    totalTokensOut: number;
    totalCostUsd: number;
    avgResponseTimeMs: number;
    uniqueCustomers: number;
    dailyBreakdown: DailyUsage[];
}
export interface TenantAnalytics {
    tenantId: string;
    period: {
        from: string;
        to: string;
    };
    totalMessages: number;
    totalInbound: number;
    totalOutbound: number;
    totalTokensIn: number;
    totalTokensOut: number;
    totalCostUsd: number;
    avgResponseTimeMs: number;
    uniqueCustomers: number;
    topModels: {
        model: string;
        count: number;
        cost: number;
    }[];
    dailyBreakdown: DailyUsage[];
}
export declare function trackMessage(tenantId: string, direction: MessageDirection, type: MessageType, model: string | null, tokensIn: number, tokensOut: number, costUsd: number, responseTimeMs: number): Promise<void>;
export declare function getDailyUsage(tenantId: string, date: string): Promise<DailyUsage | null>;
export declare function getMonthlyUsage(tenantId: string, year: number, month: number): Promise<MonthlyUsage>;
export declare function getTenantAnalytics(tenantId: string, fromDate: string, toDate: string): Promise<TenantAnalytics>;
//# sourceMappingURL=tracker.d.ts.map