/**
 * Repository Interface: AnalyticsSnapshotRepository
 * 
 * Defines persistence operations for AnalyticsSnapshot entities.
 */

import type { AnalyticsSnapshot, SnapshotEntityType, SnapshotPeriod } from '../entities/AnalyticsSnapshot';

export interface AnalyticsSnapshotRepository {
  save(snapshot: AnalyticsSnapshot): Promise<void>;
  findById(id: string): Promise<AnalyticsSnapshot | null>;
  findByEntity(entityType: SnapshotEntityType, entityId: string): Promise<AnalyticsSnapshot[]>;
  findByPeriod(
    entityType: SnapshotEntityType,
    entityId: string,
    period: SnapshotPeriod,
    startDate: Date,
    endDate: Date
  ): Promise<AnalyticsSnapshot | null>;
  findLatest(entityType: SnapshotEntityType, entityId: string, period: SnapshotPeriod): Promise<AnalyticsSnapshot | null>;
  getHistoricalSnapshots(
    entityType: SnapshotEntityType,
    entityId: string,
    period: SnapshotPeriod,
    limit: number
  ): Promise<AnalyticsSnapshot[]>;
}