import { type MediaCapability, type VolcengineFileTransport } from "./provider-core-facade.js";
export interface MediaFileApiProvider {
    id: string;
    type: "volcengine" | "gemini";
}
export interface MediaFileServiceContext {
    mediaClient: {
        getTransport(providerId: string): unknown;
    } | undefined;
    mediaProviders: Partial<Record<MediaCapability, {
        provider: string;
        model: string;
    }>>;
    mediaApiKeys: Record<string, string>;
}
export interface MediaFileUploadInput {
    buffer: Buffer;
    filename: string;
    mimeType: string;
    bytes: number;
    purpose?: string;
}
export interface MediaFileUploadResult {
    fileId: string;
    url?: string;
    filename: string;
    bytes: number;
    provider: string;
}
export interface MediaFileInfo {
    id: string;
    filename: string;
    bytes: number;
    status: string;
    createdAt?: string;
    url?: string;
}
interface GeminiFileInfo {
    name: string;
    uri?: string;
    state?: string;
    displayName?: string;
    sizeBytes?: string | number;
    createTime?: string;
}
interface GeminiFileApiClient {
    uploadFile(buffer: Buffer, apiKey: string, options: {
        mimeType: string;
        displayName: string;
    }): Promise<GeminiFileInfo>;
    waitForProcessing(fileName: string, apiKey: string): Promise<GeminiFileInfo>;
    getFile(fileId: string, apiKey: string): Promise<GeminiFileInfo>;
    listFiles(apiKey: string, options: {
        pageSize: number;
    }): Promise<{
        files: GeminiFileInfo[];
    }>;
    deleteFile(fileId: string, apiKey: string): Promise<void>;
}
export interface MediaFileApiServiceDeps {
    createGeminiFileApi?: () => GeminiFileApiClient;
    isVolcengineFileTransport?: (transport: unknown) => transport is VolcengineFileTransport;
}
export interface MediaFileApiService {
    resolveProvider(context: MediaFileServiceContext): MediaFileApiProvider | undefined;
    uploadFile(context: MediaFileServiceContext, input: MediaFileUploadInput): Promise<MediaFileUploadResult>;
    queryFile(context: MediaFileServiceContext, fileId: string): Promise<MediaFileInfo>;
    listFiles(context: MediaFileServiceContext, limit: number): Promise<MediaFileInfo[]>;
    deleteFile(context: MediaFileServiceContext, fileId: string): Promise<void>;
}
export declare function createMediaFileApiService(deps?: MediaFileApiServiceDeps): MediaFileApiService;
export declare const defaultMediaFileApiService: MediaFileApiService;
export {};
