/** * Base resource class — handles HTTP requests to the BrainstormRouter API. * * All resource namespaces (providers, presets, etc.) extend this class * to inherit fetch, JSON parsing, and error handling. */ export declare class BrainstormRouterError extends Error { readonly status: number; readonly type: string; constructor(message: string, status: number, type: string); } export type HeaderFactory = () => Record; export declare class Resource { /** @internal */ _baseURL: string; /** @internal */ _headers: HeaderFactory; constructor(baseURL: string, headers: HeaderFactory); protected _get(path: string, query?: Record): Promise; protected _post(path: string, body?: unknown): Promise; protected _put(path: string, body?: unknown): Promise; protected _patch(path: string, body?: unknown): Promise; protected _delete(path: string): Promise; private _request; }