/**
 * Platform service data shapes for Onebox
 */

export type TPlatformServiceType = 'mongodb' | 'minio' | 'smartstorage' | 'valkey' | 'postgresql' | 'rabbitmq' | 'coretraffic' | 'clickhouse' | 'mariadb';
export type TPlatformServiceStatus = 'not-deployed' | 'stopped' | 'starting' | 'running' | 'stopping' | 'failed' | 'unknown';
export type TPlatformResourceType = 'database' | 'bucket' | 'cache' | 'queue';

export interface IPlatformRequirements {
  mongodb?: boolean;
  s3?: boolean;
  clickhouse?: boolean;
  valkey?: boolean;
  mariadb?: boolean;
}

export interface IPlatformService {
  type: TPlatformServiceType;
  displayName: string;
  resourceTypes: TPlatformResourceType[];
  status: TPlatformServiceStatus;
  containerId?: string;
  isCore?: boolean;
  createdAt?: number;
  updatedAt?: number;
}

export interface IPlatformResource {
  id: number;
  resourceType: TPlatformResourceType;
  resourceName: string;
  platformService: {
    type: TPlatformServiceType;
    name: string;
    status: TPlatformServiceStatus;
  };
  envVars: Record<string, string>;
  createdAt: number;
}
