import { ClusterEntity } from '../../infrastructure/clusters/entities/cluster.entity';
import { AppRevisionEntity } from './app-revision.entity';
import { AppResourceEntity } from './app-resource.entity';
import { ApplicationCategory } from '../enums/application-category.enum';
import { ApplicationKind } from '../enums/application-kind.enum';
import { ApplicationSourceType } from '../enums/application-source-type.enum';
import { ApplicationStatus } from '../enums/application-status.enum';
import { ApplicationExposure } from '../enums/application-exposure.enum';
import { ReconciliationStatus } from '../../infrastructure/shared/enums/reconciliation-status.enum';
import { ApplicationSourceConfig, ApplicationEnvVar, ApplicationResources, ApplicationScaling, ApplicationHealthProbe, ApplicationVolume } from '../interfaces/source-config.interface';
export declare class ApplicationEntity {
    id: string;
    generateId(): void;
    name: string;
    slug: string;
    description?: string;
    category: ApplicationCategory;
    kind: ApplicationKind;
    sourceType: ApplicationSourceType;
    clusterId: string;
    cluster: ClusterEntity;
    k8sNamespace: string;
    status: ApplicationStatus;
    reconciliationStatus: ReconciliationStatus;
    lastReconciliationAt?: Date;
    reconciliationError?: string;
    sourceConfig: ApplicationSourceConfig;
    env: ApplicationEnvVar[];
    resources: ApplicationResources;
    scaling: ApplicationScaling;
    healthProbe?: ApplicationHealthProbe;
    volumes: ApplicationVolume[];
    workloadKind: 'Deployment' | 'StatefulSet' | 'DaemonSet';
    replicas: number;
    port?: number;
    currentRevisionId?: string;
    imageRef?: string;
    startCommand?: string;
    userId?: string;
    systemProtected: boolean;
    autoDeploy: boolean;
    /**
     * Controls how the app is reached. `public` generates Ingress + Certificate
     * + DNS on a public hostname. `internal` skips all public exposure: only
     * Deployment + Service ClusterIP are created; the app is reachable only
     * from the Flui dashboard via the ForwardAuth proxy.
     */
    exposure: ApplicationExposure;
    labels: Record<string, string>;
    metadata: Record<string, string>;
    preDeploySnapshotEnabled: boolean;
    preDeploySnapshotPolicy: 'required' | 'best_effort';
    preDeployRetention: {
        maxCopies: number;
        days: number;
    };
    lastDeployedAt?: Date;
    /** GitHub Actions V2 build path fields */
    buildPath?: 'github-actions' | 'railpack' | 'dockerfile' | 'image';
    workflowRunId?: string;
    /**
     * Fully-qualified HTML URL of the workflow run on GitHub, cached at commit
     * time so the frontend can link to it without re-resolving owner/repo.
     * Populated in generateAndCommitWorkflow[V3] once the run is visible.
     */
    workflowRunUrl?: string;
    /**
     * Timestamp at which the app entered AWAITING_BUILD. Used by the background
     * build watcher to enforce a timeout: if we stay in AWAITING_BUILD past
     * this timestamp + BUILD_TIMEOUT_MS, we transition to FAILED with a clear
     * error instead of lingering forever.
     */
    buildStartedAt?: Date;
    /**
     * Snapshot of the GitHub Actions workflow run status from the last watcher
     * tick (or from /workflow-status polls). Cached so that GET /applications/:id
     * can return up-to-date build info without hitting the GitHub API.
     * Values mirror {@link WorkflowRunStatus.status}: queued | in_progress | completed
     */
    lastBuildStatus?: string;
    /**
     * Cached conclusion of the last completed workflow run. Null while the
     * build is still queued or in progress. Values mirror
     * {@link WorkflowRunStatus.conclusion}: success | failure | cancelled | null
     */
    lastBuildConclusion?: string;
    webhookToken?: string;
    frameworkConfirmed?: string;
    isFluiManaged: boolean;
    /**
     * Placement strategy for the app's PersistentVolumeClaims.
     *
     * - `shared` (default): pods can run anywhere; PVCs land on the cluster
     *   flui-shared (NFS) layer. Safe for stateless apps and light file I/O.
     * - `dedicated`: pods pin to the master node so writes hit the backing
     *   Volume directly (no NFS hop). Required for databases (Postgres,
     *   MariaDB, MongoDB, …) where NFS breaks fsync/locking semantics.
     *
     * Source: catalog manifest `spec.persistence.scope`, defaulting to
     * `shared` when missing.
     */
    persistenceScope: 'shared' | 'dedicated';
    /**
     * Target node for `persistenceScope=dedicated` workloads.
     *
     * - `null` (default) → pinned to the master node via the standard
     *   `node-role.kubernetes.io/control-plane` selector + tolerations.
     * - explicit kubernetes node name → pinned to that specific worker via
     *   `kubernetes.io/hostname=<name>`. The node hosting at least one
     *   dedicated app is considered "locked" by the cluster scaling
     *   primitives (cannot be drained nor scale-downed).
     *
     * Ignored when `persistenceScope=shared`.
     */
    dedicatedNodeName?: string;
    createdAt: Date;
    updatedAt: Date;
    deletedAt?: Date;
    revisions: AppRevisionEntity[];
    appResources: AppResourceEntity[];
}
