import { TokenUsageEntity } from '../entities/token-usage.entity';

export interface ITokenUsageRepository {
  save(tokenUsage: TokenUsageEntity): Promise<TokenUsageEntity>;
  findByConversationId(conversationId: string): Promise<TokenUsageEntity[]>;
  findByUserId(userId: string, options?: { limit?: number }): Promise<TokenUsageEntity[]>;
  sumByConversationId(conversationId: string): Promise<{
    totalInputTokens: number;
    totalOutputTokens: number;
    totalCost: number;
  }>;
  sumByUserId(userId: string): Promise<{
    totalInputTokens: number;
    totalOutputTokens: number;
    totalCost: number;
  }>;
}

export const TOKEN_USAGE_REPOSITORY = Symbol('ITokenUsageRepository');
