import type { ISession } from '../session/types.js';
type JsonObject = {
    [index: string]: any;
};
/**
 * Perform json GET request to `url`
 *
 * If request is successful, return the response json.
 * If request fails, throw an error.
 */
export declare function getFromUrl(session: ISession, url: string): Promise<any>;
/**
 * Perform json GET request to `pathname` on the journals API
 *
 * If request is successful, return the response json.
 * If request fails, throw an error.
 */
export declare function getFromJournals(session: ISession, pathname: string): Promise<any>;
export declare function postToUrl(session: ISession, url: string, body: JsonObject, opts?: {
    method?: 'POST' | 'PATCH' | 'PUT';
}): Promise<import("node-fetch").Response>;
export declare function postToJournals(session: ISession, pathname: string, body: JsonObject, opts?: {
    method?: 'POST' | 'PATCH';
}): Promise<import("node-fetch").Response>;
export {};
//# sourceMappingURL=api.d.ts.map