// Generated by scripts/public-api-client-types.mjs. Do not edit.
/**
 * Keep this client on your server. API keys must never be shipped to a browser.
 * @param {{apiKey: string, baseUrl?: string, actAs?: string, fetch?: typeof fetch}} config
 */
export function createBriggClient({ apiKey, actAs, baseUrl, fetch: fetcher, }: {
    apiKey: string;
    baseUrl?: string;
    actAs?: string;
    fetch?: typeof fetch;
}): {
    call: (operation: string, input?: Record<string, unknown>, { requestId, signal }?: {
        requestId?: string;
        signal?: AbortSignal;
    }) => Promise<any>;
    items: (operation: string, input?: Record<string, unknown>, { signal }?: {
        signal?: AbortSignal;
    }) => AsyncGenerator<any, void, any>;
    uploadFile: (source: string | Blob, { filename, contentType, visibility, path, requestId, signal }: {
        filename?: string;
        contentType: string;
        visibility: "personal" | "workspace";
        path?: string;
        requestId: string;
        signal?: AbortSignal;
    }) => Promise<any>;
    downloadFile: (fileId: string, { signal }?: {
        signal?: AbortSignal;
    }) => Promise<Response>;
};
export class BriggApiError extends Error {
    /** @param {number} status
     * @param {{message?: string, error?: string, details?: Record<string, unknown>}} body
     * @param {string | null} requestId
     * @param {number | undefined} retryAfter */
    constructor(status: number, body: {
        message?: string;
        error?: string;
        details?: Record<string, unknown>;
    }, requestId: string | null, retryAfter: number | undefined);
    status: number;
    code: string | undefined;
    details: Record<string, unknown> | undefined;
    requestId: string | null;
    retryAfter: number | undefined;
}
