import { Stats } from '@/types/Stats'
import { Package } from '@/types/Package'

export interface dataStore {
  lastUpdated: number
  packages: {
    offset: number
    limit: number
    totalPackages: Array<Package>
    byStatus: {
      latest: Array<Package>
      built: Array<Package>
      failed: Array<Package>
      skipped: Array<Package>
      delayed: Array<Package>
      queued: Array<Package>
      building: Array<Package>
      signing: Array<Package>
      unknown: Array<Package>
    }
    byRepo: {
      core: {
        v2: Array<Package>
        v3: Array<Package>
        v4: Array<Package>
      }
      extra: {
        v2: Array<Package>
        v3: Array<Package>
        v4: Array<Package>
      }
      multilib: {
        v2: Array<Package>
        v3: Array<Package>
        v4: Array<Package>
      }
    }
  }
  stats: Stats & {
    total: number
    built: number
    building: number
  }
}
