/** * Copyright (c) 2025 Elara AI Pty Ltd * Licensed under BSL 1.1. See LICENSE for details. */ import type { StorageBackend } from '../storage/index.js'; import type { TransferBackend, DatasetUploadStore, DatasetDownloadStore, PackageImportStore, PackageExportStore } from './interfaces.js'; import type { DatasetUpload, PackageImport, PackageExport } from './types.js'; declare class InMemoryDatasetUploadStore implements DatasetUploadStore { private readonly baseUrl; private readonly records; constructor(baseUrl: string); create(id: string, record: DatasetUpload): Promise; get(id: string): Promise; delete(id: string): Promise; getUploadUrl(id: string, _repo: string, _hash: string): Promise; commitObject(_repo: string, _hash: string, uploadId: string): Promise; clear(): void; } declare class InMemoryDatasetDownloadStore implements DatasetDownloadStore { private readonly baseUrl; private readonly records; constructor(baseUrl: string); getDownloadUrl(repo: string, hash: string): Promise; get(id: string): Promise<{ repo: string; hash: string; } | null>; delete(id: string): Promise; clear(): void; } declare class InMemoryPackageImportStore implements PackageImportStore { private readonly baseUrl; private readonly storage?; private readonly getRepoPath?; private readonly records; private readonly executing; constructor(baseUrl: string, storage?: StorageBackend | undefined, getRepoPath?: ((repo: string) => string) | undefined); create(id: string, record: PackageImport): Promise; get(id: string): Promise; updateStatus(id: string, status: PackageImport['status']): Promise; delete(id: string): Promise; getUploadUrl(id: string, _repo: string): Promise; execute(id: string, repo: string): Promise; clear(): void; } declare class InMemoryPackageExportStore implements PackageExportStore { private readonly baseUrl; private readonly storage?; private readonly getRepoPath?; private readonly records; private readonly executing; constructor(baseUrl: string, storage?: StorageBackend | undefined, getRepoPath?: ((repo: string) => string) | undefined); create(id: string, record: PackageExport): Promise; get(id: string): Promise; updateStatus(id: string, status: PackageExport['status']): Promise; delete(id: string): Promise; getDownloadUrl(id: string, _repo: string): Promise; execute(id: string, repo: string): Promise; clear(): void; } export interface InMemoryTransferBackendOptions { baseUrl?: string; storage?: StorageBackend; getRepoPath?: (repo: string) => string; } export declare class InMemoryTransferBackend implements TransferBackend { readonly datasetUpload: InMemoryDatasetUploadStore; readonly datasetDownload: InMemoryDatasetDownloadStore; readonly packageImport: InMemoryPackageImportStore; readonly packageExport: InMemoryPackageExportStore; constructor(options: InMemoryTransferBackendOptions); clear(): void; } export {}; //# sourceMappingURL=InMemoryTransferBackend.d.ts.map