///
import { Rivendell } from './Rivendell';
export type Method = 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE';
/**
* Low level http handler for interacting with the Moria api.
*/
export declare namespace MoriaApi {
interface ApiResponse {
response: Response;
body: T;
}
export class ApiError extends Error {
responseText: string;
response?: Response | undefined;
constructor(message: string, responseText: string, response?: Response | undefined);
}
export function get(shard: Rivendell.Shard, uri: string): Promise>;
export function post(shard: Rivendell.Shard, uri: string, body: any): Promise>;
export function put(shard: Rivendell.Shard, uri: string, body: any): Promise>;
export function request(shard: Rivendell.Shard, method: Method, uri: string, body?: any): Promise>;
export {};
}