diff --git a/package.json b/package.json index 649893167..0aad9ecf6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.0.41-beta-1", + "version": "0.0.41-beta-8", "description": "Supporting common component library", "main": "dist/index.js", "scripts": { diff --git a/src/Common/Types.ts b/src/Common/Types.ts index f5a69c62b..209970c3a 100644 --- a/src/Common/Types.ts +++ b/src/Common/Types.ts @@ -1,6 +1,8 @@ import React, { ReactNode, CSSProperties } from 'react' import { Placement } from 'tippy.js' import { ImageComment, ReleaseTag } from './ImageTags.Types' +import { DockerConfigOverrideType, TaskErrorObj } from '.' + export interface ResponseType { code: number status: string @@ -475,3 +477,149 @@ export interface AsyncState { export interface AsyncOptions { resetOnChange: boolean } + +export interface AppEnvironment { + environmentId: number + environmentName: string + appMetrics: boolean + infraMetrics: boolean + prod: boolean + chartRefId?: number + lastDeployed?: string + lastDeployedBy?: string + lastDeployedImage?: string + appStatus?: string + deploymentAppDeleteRequest?: boolean + isVirtualEnvironment?: boolean + isProtected?: boolean + pipelineId?: number + latestCdWorkflowRunnerId?: number +} + +export interface Strategy { + deploymentTemplate: string + config: any + default?: boolean +} + +export interface CDStage { + status: string + name: string + triggerType: 'AUTOMATIC' | 'MANUAL' + config: string +} + +export interface CDStageConfigMapSecretNames { + configMaps: any[] + secrets: any[] +} + +export interface PrePostDeployStageType { + isValid: boolean + steps: TaskErrorObj[] + triggerType: string + name: string + status: string +} + +export interface CdPipeline { + id: number + environmentId: number + environmentName?: string + description?: string + ciPipelineId: number + triggerType: 'AUTOMATIC' | 'MANUAL' + name: string + strategies?: Strategy[] + namespace?: string + appWorkflowId?: number + deploymentTemplate?: string + preStage?: CDStage + postStage?: CDStage + preStageConfigMapSecretNames?: CDStageConfigMapSecretNames + postStageConfigMapSecretNames?: CDStageConfigMapSecretNames + runPreStageInEnv?: boolean + runPostStageInEnv?: boolean + isClusterCdActive?: boolean + parentPipelineId?: number + parentPipelineType?: string + deploymentAppDeleteRequest?: boolean + deploymentAppCreated?: boolean + userApprovalConfig?: UserApprovalConfigType + isVirtualEnvironment?: boolean + deploymentAppType: DeploymentAppTypes + helmPackageName?: string + preDeployStage?: PrePostDeployStageType + postDeployStage?: PrePostDeployStageType + isProdEnv?: boolean +} + +export interface ExternalCiConfig { + id: number + webhookUrl: string + payload: string + accessKey: string +} + +export interface Source { + type: string + value?: string + regex?: string +} + +export interface CiMaterial { + source: Source + gitMaterialId: number + id: number + gitMaterialName: string + isRegex?: boolean +} + +export interface Task { + name?: string + type?: string + cmd?: string + args?: Array +} + +export interface CiScript { + id: number + index: number + name: string + script: string + outputLocation?: string +} + +export interface CiPipeline { + isManual: boolean + dockerArgs?: Map + isExternal: boolean + parentCiPipeline: number + parentAppId: number + externalCiConfig: ExternalCiConfig + ciMaterial?: CiMaterial[] + name?: string + id?: number + active?: boolean + linkedCount: number + scanEnabled: boolean + deleted?: boolean + version?: string + beforeDockerBuild?: Array + afterDockerBuild?: Array + appWorkflowId?: number + beforeDockerBuildScripts?: Array + afterDockerBuildScripts?: Array + isDockerConfigOverridden?: boolean + dockerConfigOverride?: DockerConfigOverrideType + appName?: string + appId?: string + componentId?: number + isCITriggerBlocked?: boolean + ciBlockState?: { + action: any + metadataField: string + } + isOffendingMandatoryPlugin?: boolean + pipelineType?: string +}