/**
 * Leaderboards Event Publisher Port
 *
 * Defines the interface for publishing leaderboards-related events.
 */

/**
 * Global leaderboards accessed event
 */
export interface GlobalLeaderboardsAccessedEvent {
  type: 'global_leaderboards_accessed';
  timestamp: Date;
}

/**
 * Driver rankings accessed event
 */
export interface DriverRankingsAccessedEvent {
  type: 'driver_rankings_accessed';
  timestamp: Date;
}

/**
 * Team rankings accessed event
 */
export interface TeamRankingsAccessedEvent {
  type: 'team_rankings_accessed';
  timestamp: Date;
}

/**
 * Leaderboards error event
 */
export interface LeaderboardsErrorEvent {
  type: 'leaderboards_error';
  error: string;
  timestamp: Date;
}

/**
 * Leaderboards Event Publisher Interface
 *
 * Publishes events related to leaderboards operations.
 */
export interface LeaderboardsEventPublisher {
  /**
   * Publish a global leaderboards accessed event
   * @param event - The event to publish
   */
  publishGlobalLeaderboardsAccessed(event: GlobalLeaderboardsAccessedEvent): Promise<void>;

  /**
   * Publish a driver rankings accessed event
   * @param event - The event to publish
   */
  publishDriverRankingsAccessed(event: DriverRankingsAccessedEvent): Promise<void>;

  /**
   * Publish a team rankings accessed event
   * @param event - The event to publish
   */
  publishTeamRankingsAccessed(event: TeamRankingsAccessedEvent): Promise<void>;

  /**
   * Publish a leaderboards error event
   * @param event - The event to publish
   */
  publishLeaderboardsError(event: LeaderboardsErrorEvent): Promise<void>;
}
