import { IBaseRepository, BaseService } from './base-service.js';
import '../subsystems/events/event-bus.protocol.js';
import '../types/drizzle.js';
import 'drizzle-orm/node-postgres';

/**
 * ActivityEntityService<TRepo, TEntity>
 *
 * Family-specific base service for activity entities.
 * Delegates to an activity repository that provides date-range,
 * user, and opportunity queries.
 */

interface IActivityEntityRepository<TEntity> extends IBaseRepository<TEntity> {
    findByDateRange(start: Date, end: Date): Promise<TEntity[]>;
    findByUserId(userId: string): Promise<TEntity[]>;
    findByOpportunityId(opportunityId: string): Promise<TEntity[]>;
    findRecentByOpportunityId(opportunityId: string, limit?: number): Promise<TEntity[]>;
}
declare abstract class ActivityEntityService<TRepo extends IActivityEntityRepository<TEntity>, TEntity> extends BaseService<TRepo, TEntity> {
    /**
     * Find activities within a date range (inclusive).
     */
    findByDateRange(start: Date, end: Date): Promise<TEntity[]>;
    /**
     * Find all activities for a specific user.
     */
    findByUser(userId: string): Promise<TEntity[]>;
    /**
     * Find all activities for a specific opportunity.
     */
    findByOpportunity(opportunityId: string): Promise<TEntity[]>;
    /**
     * Find the most recent activities for an opportunity.
     */
    findRecent(opportunityId: string, limit?: number): Promise<TEntity[]>;
}

export { ActivityEntityService, type IActivityEntityRepository };
