import { Tokenizer } from "./tokenizer"; import { StreamFactory } from "./stream-factory"; import { CacheConfiguration } from "./cache-factory"; import { RequestCallback } from "./streamer"; import { RetryInputConfiguration } from "./retry"; import { SchemaStringifierConfiguration } from "./schema-stringifier"; import { RequestOptions } from "supra-http/dist/types"; type HTTP_METHOD = 'get' | 'post' | 'put' | 'del' | 'delete' | 'patch' | 'head' | 'options'; interface WardenRequestOptions extends Omit { url: string; method: HTTP_METHOD; json?: boolean; headers?: { [key: string]: string; }; body?: object | string; } interface RouteConfiguration { [key: string]: object | string | number | boolean | undefined; identifier?: string; cache?: CacheConfiguration | boolean; holder?: boolean; retry?: RetryInputConfiguration | boolean | number; schema?: SchemaStringifierConfiguration; } declare class RequestManager { private streams; private streamFactory; private tokenizer; private requestId; constructor(streamFactory: StreamFactory, tokenizer: Tokenizer); register(name: string, routeConfiguration: RouteConfiguration): (requestOptions: WardenRequestOptions, cb: RequestCallback) => void; unregister(name: string): void; handle(name: string, requestOptions: WardenRequestOptions, cb: RequestCallback): void; isRouteRegistered(name: string): boolean; private addStream; } export { HTTP_METHOD, WardenRequestOptions, RouteConfiguration, RequestManager };