import { PathLike } from 'fs';
import { Serializable } from '../../internals/serializable.cjs';
import '../../internals/types.cjs';
import '../../internals/helpers/guards.cjs';

/**
 * Copyright 2025 IBM Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

interface PythonFile {
    id: string;
    pythonId: string;
    filename: string;
}
interface PythonUploadFile {
    id: string;
    filename: string;
}
interface PythonDownloadFile {
    id?: string;
    filename: string;
    pythonId: string;
}
declare abstract class PythonStorage extends Serializable {
    /**
     * List all files that code interpreter can use.
     */
    abstract list(): Promise<PythonFile[]>;
    /**
     * Prepare subset of available files to code interpreter.
     */
    abstract upload(files: PythonUploadFile[]): Promise<PythonFile[]>;
    /**
     * Process updated/modified/deleted files from code interpreter response.
     */
    abstract download(files: PythonDownloadFile[]): Promise<PythonFile[]>;
}
declare class TemporaryStorage extends PythonStorage {
    protected files: PythonFile[];
    list(): Promise<PythonFile[]>;
    upload(files: PythonUploadFile[]): Promise<PythonFile[]>;
    download(files: PythonDownloadFile[]): Promise<PythonFile[]>;
    createSnapshot(): {
        files: PythonFile[];
    };
    loadSnapshot(snapshot: ReturnType<typeof this.createSnapshot>): void;
}
interface Input {
    localWorkingDir: PathLike;
    interpreterWorkingDir: PathLike;
    ignoredFiles?: Set<string>;
}
declare class LocalPythonStorage extends PythonStorage {
    protected readonly input: Required<Input>;
    constructor(input: Input);
    protected init(): Promise<void>;
    list(): Promise<PythonFile[]>;
    upload(files: PythonUploadFile[]): Promise<PythonFile[]>;
    download(files: PythonDownloadFile[]): Promise<{
        id: string;
        filename: string;
        pythonId: string;
    }[]>;
    protected computeHash(file: PathLike): Promise<string>;
    createSnapshot(): {
        input: Required<Input>;
    };
    loadSnapshot(snapshot: ReturnType<typeof this.createSnapshot>): void;
}

export { LocalPythonStorage, type PythonDownloadFile, type PythonFile, PythonStorage, type PythonUploadFile, TemporaryStorage };
