import type { Settings } from './settings';
import { type ComponentHistory, type ComponentObject, type ComponentRevisionList, type ComponentTree, type ProjectComponentList, type PublicComponentState } from './models';
export declare const STORAGE_LANGUAGE = "typescript";
export type SchemaKind = 'jsonSchema' | 'eventSchema' | 'llms.txt';
export declare class PieStorageError extends Error {
    constructor(message: string);
}
export declare const normalizeObjectPath: (value: string) => string;
export declare class PieStorageService {
    private readonly settings;
    private readonly baseUrl;
    private readonly v2BaseUrl;
    constructor(settings: Settings);
    projectComponentsUrl(args: {
        userId: string;
        project: string;
    }): string;
    componentUrl(args: {
        componentName: string;
        userId?: string;
        project?: string;
        isPublic?: boolean;
    }): string;
    languageFileUrl(args: {
        componentName: string;
        objectPath: string;
        userId?: string;
        project?: string;
        revision?: number;
        isPublic?: boolean;
    }): string;
    componentTreeUrl(args: {
        componentName: string;
        userId?: string;
        project?: string;
        revision?: number;
        isPublic?: boolean;
    }): string;
    revisionsUrl(args: {
        componentName: string;
        userId?: string;
        project?: string;
    }): string;
    publicMarkUrl(args: {
        componentName: string;
        userId?: string;
        project?: string;
    }): string;
    historyUrl(args: {
        componentName: string;
        userId?: string;
        project?: string;
        page?: number;
        perPage?: number;
        from?: number;
        to?: number;
    }): string;
    languageBatchUrl(args: {
        componentName: string;
        userId?: string;
        project?: string;
    }): string;
    metadataUrl(args: {
        componentName: string;
        schemaKind: string;
        userId?: string;
        project?: string;
    }): string;
    envelopeUrl(args: {
        componentName: string;
        userId?: string;
        project?: string;
        revision?: number;
    }): string;
    pushEnvelope(args: {
        componentName: string;
        body: Record<string, unknown>;
        userId?: string;
        project?: string;
    }): Promise<Record<string, unknown>>;
    fetchEnvelope(args: {
        componentName: string;
        userId?: string;
        project?: string;
        revision?: number;
    }): Promise<Record<string, unknown>>;
    listProjectComponents(args: {
        userId: string;
        project: string;
    }): Promise<ProjectComponentList>;
    listComponent(args: {
        componentName: string;
        userId?: string;
        project?: string;
        revision?: number;
        isPublic?: boolean;
    }): Promise<ComponentTree>;
    listRevisions(args: {
        componentName: string;
        userId?: string;
        project?: string;
    }): Promise<ComponentRevisionList>;
    markComponentPublic(args: {
        componentName: string;
        userId?: string;
        project?: string;
    }): Promise<PublicComponentState>;
    markComponentPrivate(args: {
        componentName: string;
        userId?: string;
        project?: string;
    }): Promise<PublicComponentState>;
    getHistory(args: {
        componentName: string;
        userId?: string;
        project?: string;
        page?: number;
        perPage?: number;
        from?: number;
        to?: number;
    }): Promise<ComponentHistory>;
    deleteComponent(args: {
        componentName: string;
        userId?: string;
        project?: string;
    }): Promise<void>;
    uploadMetadataContent(args: {
        componentName: string;
        schemaKind: SchemaKind;
        content: Uint8Array;
        userId?: string;
        project?: string;
    }): Promise<ComponentObject>;
    downloadMetadata(args: {
        componentName: string;
        schemaKind: SchemaKind;
        targetPath: string;
        userId?: string;
        project?: string;
    }): Promise<string>;
    deleteMetadata(args: {
        componentName: string;
        schemaKind: SchemaKind;
        userId?: string;
        project?: string;
    }): Promise<void>;
    uploadLanguageFilesBatch(args: {
        componentName: string;
        files: Array<[string, string]>;
        userId?: string;
        project?: string;
    }): Promise<ComponentObject[]>;
    uploadComponentDirectory(args: {
        componentName: string;
        sourceDir: string;
        userId?: string;
        project?: string;
    }): Promise<ComponentObject[]>;
    downloadLanguageFile(args: {
        componentName: string;
        objectPath: string;
        targetPath: string;
        userId?: string;
        project?: string;
        revision?: number;
        isPublic?: boolean;
    }): Promise<string>;
    downloadComponentDirectory(args: {
        componentName: string;
        targetDir: string;
        userId?: string;
        project?: string;
        revision?: number;
        isPublic?: boolean;
    }): Promise<string[]>;
    private headers;
    private request;
}
//# sourceMappingURL=storage.d.ts.map