/** * @author Leonid Vinikov * @description Responsible for manging restful commands which are wrappers for HTTP requests. */ import { Commands } from "./commands"; import { Http } from "../clients/http"; import { E_RESPONSE_HANDLER_TYPE, E_HTTP_METHOD_TYPE } from "../interfaces"; import type { CommandRestful } from "../command-bases"; import type { IAPIConfig, ICommandArgsInterface, ICommandOptionsInterface, TPossibleHandlersType } from "../interfaces"; export declare class Restful extends Commands { private static client; currentHttpMethod: E_HTTP_METHOD_TYPE; static getName(): string; constructor(Config: IAPIConfig); getClient(): Http; get(command: string, args?: ICommandArgsInterface, options?: ICommandOptionsInterface): Promise; update(command: string, args?: ICommandArgsInterface, options?: {}): Promise; delete(command: string, args?: ICommandArgsInterface, options?: {}): Promise; create(command: string, args?: ICommandArgsInterface, options?: {}): Promise; protected runInstance(command: CommandRestful, args?: ICommandArgsInterface, options?: {}): Promise; /** * Handlers on return true will swallow the request. */ setHandler(type: E_RESPONSE_HANDLER_TYPE, callback: TPossibleHandlersType): void; }