import { type SafeDownloadFilename, type SiteScopedStoragePath, type SiteId, type StorageBucketName, type StoragePath, type UploadSessionId, type UserId, type MediaAssetId, type Result } from '@riverbankcms/core';
import type { StorageClass } from './fileDomain';
export declare const FILE_STORAGE_BUCKETS: {
    readonly publicSite: StorageBucketName;
    readonly privateSite: StorageBucketName;
    readonly temporary: StorageBucketName;
};
export declare const PUBLIC_SITE_FILE_STORAGE_BUCKETS: readonly [StorageBucketName, StorageBucketName, StorageBucketName];
export declare const FILE_UPLOAD_STAGING_PREFIX = "temp-file-uploads";
export declare const DURABLE_FILE_STORAGE_PREFIX = "sites";
export declare const DURABLE_FILE_FOLDER = "files";
export declare const PRIVATE_SITE_FILE_BUCKET_MIME_TYPES: readonly ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "application/rtf", "text/rtf", "image/jpeg", "image/png", "image/webp", "image/gif", "image/avif", "image/heic", "image/heif", "image/svg+xml", "text/csv", "application/csv", "application/vnd.ms-excel", "application/zip", "application/x-zip-compressed", "audio/mpeg", "audio/mp4", "audio/wav", "audio/x-wav", "audio/ogg", "audio/webm", "audio/flac", "video/mp4", "video/webm", "video/quicktime"];
export declare const TEMP_UPLOAD_BUCKET_MIME_TYPES: readonly ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "application/rtf", "text/rtf", "image/jpeg", "image/png", "image/webp", "image/gif", "image/avif", "image/heic", "image/heif", "image/svg+xml", "text/csv", "application/csv", "application/vnd.ms-excel", "application/zip", "application/x-zip-compressed", "audio/mpeg", "audio/mp4", "audio/wav", "audio/x-wav", "audio/ogg", "audio/webm", "audio/flac", "video/mp4", "video/webm", "video/quicktime", "font/woff2", "application/font-woff2", "application/x-font-woff2", "application/octet-stream"];
export type FileStoragePathError = 'unsafe-path-segment';
export type StagedUploadStoragePathInput = {
    readonly userId: UserId;
    readonly siteId: SiteId;
    readonly uploadSessionId: UploadSessionId;
    readonly safeDownloadFilename: SafeDownloadFilename;
};
export type DurableFileStoragePathInput = {
    readonly siteId: SiteId;
    readonly fileAssetId: MediaAssetId;
    readonly safeDownloadFilename: SafeDownloadFilename;
};
/**
 * Maps a policy-derived storage class to the only bucket that RLS expects for
 * that class.
 */
export declare function storageBucketForStorageClass(storageClass: StorageClass): StorageBucketName;
/**
 * Builds the `temp-uploads` object path allowed by Storage RLS:
 * `temp-file-uploads/{userId}/{siteId}/{uploadSessionId}/{safeDownloadFilename}`.
 */
export declare function buildStagedUploadStoragePath(input: StagedUploadStoragePathInput): Result<StoragePath, FileStoragePathError>;
/**
 * Builds the durable site-scoped object path allowed by public/private site-file RLS:
 * `sites/{siteId}/files/{fileAssetId}/{safeDownloadFilename}`.
 */
export declare function buildDurableFileStoragePath(input: DurableFileStoragePathInput): Result<SiteScopedStoragePath, FileStoragePathError>;
