import {TMethod, IRoutes} from '@rondo/common' import {ITypedRequestParams} from './ITypedRequestParams' export interface IHTTPClient { request< P extends keyof T & string, M extends TMethod, >(params: ITypedRequestParams): Promise get

( path: P, query?: T[P]['get']['query'], params?: T[P]['get']['params'], ): Promise post

( path: P, body: T[P]['post']['body'], params?: T[P]['post']['params'], ): Promise put

( path: P, body: T[P]['put']['body'], params?: T[P]['put']['params'], ): Promise delete

( path: P, body: T[P]['delete']['body'], params?: T[P]['delete']['params'], ): Promise head

( path: P, query?: T[P]['head']['query'], params?: T[P]['head']['params'], ): Promise options

( path: P, query?: T[P]['options']['query'], params?: T[P]['options']['params'], ): Promise patch

( path: P, body: T[P]['patch']['body'], params?: T[P]['patch']['params'], ): Promise }