export interface User {
  id: string;
  email: string;
  companies?: Company[];
  requestCount?: number;
  errorCount?: number;
  averageExecutionTime?: number;
  averagePayloadSize?: number;
}

export interface Company {
  id: string;
  name: string;
  user: User;
  members: User[];
  projects: Project[];
}

export interface Project {
  id: string;
  name: string;
  apiKeys?: ProjectApiKey[];
}

export interface ProjectApiKey {
  id: string;
  name: string;
  key: string;
  requests?: Request[];
}

export interface Request {
  id: string;
  callType: CallType;
  url: string;
  method: string;
  body: string;
  headers: string;
  timestamp: string;
  response?: ApiResponse;
}

export interface ApiResponse {
  id: string;
  statusCode: number;
  body: string;
  headers: string;
  timestamp: string;
}

export enum CallType {
  GRAPHQL = "GRAPHQL",
  REST = "REST",
}
