import type { ControlPlaneOperation, JsonValue } from '../control-plane';
import type { QueueOperationHandler } from '../queue';
import type { PersistentVolume, VolumeAttachment, VolumeCapabilities, VolumeDriver, VolumeSnapshot, VolumeType } from './model';
import { DurableOperationQueue } from '../queue';
import { VolumeStore } from './store';
declare const actions: readonly ['create', 'attach', 'detach', 'resize', 'snapshot', 'restore', 'delete', 'adopt', 'usage'];
export declare function unsupportedVolumeCapabilities(reason: string): VolumeCapabilities;
export declare function volumeCapabilities(supported: readonly (typeof actions)[number][], overrides?: Partial<VolumeCapabilities>): VolumeCapabilities;
export declare function validateMountPath(path: string): void;
export declare function validateAttachment(input: {
    targetPath: string;
    uid?: number;
    gid?: number;
    mode?: string;
    propagation?: VolumeAttachment['propagation'];
}): void;
export interface VolumeMutationResult {
    volume: PersistentVolume;
    operation: ControlPlaneOperation;
    attachment?: VolumeAttachment;
    snapshot?: VolumeSnapshot;
}
export declare class VolumeService {
    readonly store: VolumeStore;
    readonly drivers: readonly VolumeDriver[];
    private readonly now;
    readonly queue: DurableOperationQueue;
    constructor(store: VolumeStore, drivers: readonly VolumeDriver[], queue?: DurableOperationQueue, now?: () => Date);
    private driver;
    private capability;
    private queueMutation;
    create(input: {
        organizationId: string;
        projectId: string;
        environmentId?: string;
        resourceId?: string;
        name: string;
        provider: string;
        type: VolumeType;
        capacityBytes?: number;
        filesystem?: string;
        encrypted?: boolean;
        desiredState?: Record<string, JsonValue>;
        actorId?: string;
    }): VolumeMutationResult;
    attach(volumeId: string, input: {
        resourceId: string;
        targetPath: string;
        readOnly?: boolean;
        uid?: number;
        gid?: number;
        mode?: string;
        propagation?: VolumeAttachment['propagation'];
        driverOptions?: Record<string, JsonValue>;
        actorId?: string;
    }): VolumeMutationResult;
    detach(volumeId: string, attachmentId: string, input?: {
        force?: boolean;
        drained?: boolean;
        unmounted?: boolean;
        confirmation?: string;
        actorId?: string;
    }): VolumeMutationResult;
    resize(volumeId: string, capacityBytes: number, input?: {
        drained?: boolean;
        actorId?: string;
    }): VolumeMutationResult;
    snapshot(volumeId: string, input?: {
        name?: string;
        actorId?: string;
    }): VolumeMutationResult;
    restore(snapshotId: string, input: {
        name: string;
        actorId?: string;
    }): VolumeMutationResult;
    delete(volumeId: string, input: {
        recentAuthAt?: string;
        confirmation?: string;
        backupOverride?: boolean;
        backupOverrideConfirmation?: string;
        actorId?: string;
    }): VolumeMutationResult;
    discover(input: {
        organizationId: string;
        projectId: string;
        environmentId?: string;
        actorId?: string;
    }): Promise<PersistentVolume[]>;
    adopt(volumeId: string, input: {
        name: string;
        actorId?: string;
    }): PersistentVolume;
}
export declare function createVolumeQueueHandlers(store: VolumeStore, drivers: readonly VolumeDriver[]): Record<string, QueueOperationHandler>;
export {};
