/**
 * Copyright 2024 Phenix Real Time Solutions, Inc. Confidential and Proprietary. All Rights Reserved.
 */
export interface ITimeToFirstFrameCluster {
  realTime: ITimeToFirstFrame;
  dash: ITimeToFirstFrame;
  hls: ITimeToFirstFrame;
}

export interface ITimeToFirstFrame {
  data: Array<ITimeToFirstFrameData>;
  median: number;
  timeToFirstFrame90Percentile: number;
  isFetching?: boolean;
  error?: string;
}

export interface ITimeToFirstFrameData {
  percentile: number;
  value: number;
}

export interface IUsageStatistics {
  usageStatisticsChartData: Array<IUsageStatisticsChartData>;
  currentViewStreamUsage: IUsageStatisticsByType;
  pastViewStreamUsage: IUsageStatisticsByType;
  currentUsageStatisticsByType: IUsageStatisticsGeneral;
  pastUsageStatisticsByType: IUsageStatisticsGeneral;
  isFetching?: boolean;
  error?: string;
}

export interface IUsageStatisticsChartData {
  country: string;
  data: Array<IUsageStatisticsByType>;
}

export interface IUsageStatisticsByType {
  type: string;
  subtype: string;
  usage: IUsageStatisticsValue;
  minutesPerView?: number;
  minutesPerUser?: number;
}

export interface IUsageStatisticsValue {
  streams: number;
  users: number;
  devices: number;
  minutes: number;
}

export interface IUsageStatisticsGeneral {
  publishing: IUsageStatisticsValue;
  viewing: IUsageStatisticsValue;
}

export interface IActiveUserData {
  country: string;
  data: {
    users: number;
    sessions: number;
  };
}

export interface IStartEnd {
  start: Date | string;
  end: Date | string;
}

export interface IReport extends IStartEnd {
  kind?: string;
  applicationIds?: string[];
  channelIds?: string[];
}
