import type { StorageBucketName, StoragePath, UploadSessionId, UtcIsoDateTimeString } from '@riverbankcms/core';
import { type UploadSessionState } from './fileDomain';
import type { FileUploadSessionRecord } from './filePersistence';
export type FileUploadCleanupInput = {
    readonly uploadSession: FileUploadSessionRecord;
    readonly now: UtcIsoDateTimeString;
};
export type FileUploadCleanupNoopState = Extract<UploadSessionState, {
    readonly tag: 'pending' | 'uploaded' | 'finalizing' | 'finalized' | 'cleaned-up';
}>;
export type FileUploadCleanupStorageObject = {
    readonly storageBucket: StorageBucketName;
    readonly storagePath: StoragePath;
};
export type FileUploadCleanupStep = {
    readonly tag: 'update-session-state';
    readonly state: UploadSessionState;
} | {
    readonly tag: 'delete-staged-object';
    readonly storageObject: FileUploadCleanupStorageObject;
};
export type FileUploadCleanupPlan = {
    readonly tag: 'no-op';
    readonly sessionId: UploadSessionId;
    readonly state: FileUploadCleanupNoopState;
} | {
    readonly tag: 'run-cleanup';
    readonly sessionId: UploadSessionId;
    readonly steps: readonly [FileUploadCleanupStep, ...FileUploadCleanupStep[]];
};
export declare function planFileUploadCleanup(input: FileUploadCleanupInput): FileUploadCleanupPlan;
