/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Duration } from "#time/index.js";
import { MatterError } from "../MatterError.js";
import { Bytes } from "./Bytes.js";
type Cache = (name: string, generator: (name: string) => Promise<string>) => Promise<string>;
export declare namespace Github {
    /**
     * Options for GitHub API requests via fetch
     */
    interface FetchOptions {
        /** Timeout in milliseconds for GitHub API requests */
        timeout?: Duration;
    }
    /** Error thrown when a GitHub request returns a non-200 status. */
    class HttpError extends MatterError {
        readonly statusCode: number;
        constructor(message: string, statusCode: number);
        /** True for the statuses GitHub uses to signal rate limiting. */
        get isRateLimit(): boolean;
    }
    class Directory {
        #private;
        readonly url: string;
        constructor(url: string, cache: Cache, options?: FetchOptions, auth?: string);
        ls(): Promise<string[]>;
        cd(name: string): Promise<Directory>;
        get(name: string): Promise<string>;
        getBinary(name: string): Promise<Bytes>;
        private load;
        private find;
        private fetch;
        private fetchBinary;
        private doFetch;
    }
    /**
     * Uber-minimal github client
     */
    class Repo extends Directory {
        constructor(org: string, repo: string, branch: string, options?: FetchOptions, cache?: Cache, auth?: string);
    }
}
export {};
//# sourceMappingURL=Github.d.ts.map