export interface ContainerPort {
  container_port: number;
  host_ip: string;
  host_port: number;
  protocol: string;
}

export interface Container {
  hostkey: string;
  owner: string;
  id: string;
  name: string | null;
  image: string | null;
  image_id: string | null;
  command: string | null;
  state: string | null;
  ports: ContainerPort[] | null;
  engine: string | null;
  created_at: string | null;
  started_at: string | null;
  finished_at: string | null;
  collected_at: string | null;
  details: Record<string, unknown> | null;
}

export interface ContainerImage {
  hostkey: string;
  owner: string;
  id: string;
  repository: string | null;
  tag: string | null;
  size_bytes: number | null;
  engine: string | null;
  created_at: string | null;
  collected_at: string | null;
}

export interface ContainerVolume {
  hostkey: string;
  owner: string;
  name: string;
  driver: string | null;
  size_bytes: number | null;
  engine: string | null;
  created_at: string | null;
  collected_at: string | null;
}

export interface ContainersSummary {
  hostkey: string;
  last_collected_at: string | null;
  containers: { running: number; total: number };
  images: { named: number; total: number; total_size_bytes: number };
  volumes: { count: number; total_size_bytes: number };
  engines: string[];
}

export interface ListMeta {
  total: number;
  page: number;
  count: number;
}

export interface ListResponse<T> {
  data: T[];
  meta: ListMeta;
}
