export interface DeploymentPlatformTemplate {
  platformName: string;
  domain: string;
  supportedDeploymentTypes: SupportedDeploymentTypes[];
  supportedEnvironments: SupportedEnvironments[];
  awsRegion?: string;
  awsAccountId: string;
  awsKeyPairName?: string;
  awsRoleToAssume?: string;
  awsDeploymentSqsArn?: string;
  ciSubDomain?: string;
  ciInternalServerPort?: string | number;
  ciServerName?: string;
  ciDockerNetworkName?: string;
}

export interface DeploymentPlatform extends Required<Omit<DeploymentPlatformTemplate, 'awsRoleToAssume' | 'awsKeyPairName'>> {
  activeEnvironment: SupportedEnvironments;
  awsRoleToAssume?: string;
  awsKeyPairName?: string;
}

export enum SupportedRegions {
  North = 'eu-north-1'
}

export enum SupportedEnvironments {
  LOCAL = 'local',
  QA = 'qa',
  TEST = 'test',
  DEMO = 'demo',
  PROD = 'prod'
}

export enum SupportedDeploymentTypes {
  Container = 'CONTAINER',
  // Static = 'STATIC'
}

export interface DeploymentTemplate {
  type: SupportedDeploymentTypes;
  targetDeploymentPlatform: string;
  subdomain?: string;
  env?: {
    shared?: { [name: string]: string | number };
    prod?: { [name: string]: string | number };
    test?: { [name: string]: string | number };
    qa?: { [name: string]: string | number };
  }
}

export interface ContainerDeploymentTemplate extends DeploymentTemplate {
  type: SupportedDeploymentTypes.Container;
  dockerFile: string;
  dockerContext: string;
  image: string;
  hostPort: number;
  containerPort: number;
  registry: string;
}

export interface ContainerDeploymentRequest extends ContainerDeploymentTemplate {
  authentication?: string;
  username?: string;
}
