import { IChassisContext, IOperation } from "../interfaces"; export default class APIs { static DEBUG: boolean; constructor(); static get(context: IChassisContext, url: string): Promise; static request(context: IChassisContext, url: string, _headers?: any): Promise; static named_request(context: IChassisContext, api_name: string, api: APIRequest): Promise; static get_headers_with_token(headers: any, token?: string): any; /** * Collect a set of API responses as promise * * @param apis * @param opx_ctx * @param token */ static requests(context: IChassisContext, apis: APIRequests, op_ctx: any, token?: string): Promise; static getOperationContext(_op: IOperation, req: any, _ctx?: any): APIContext; static getRequestContext(req: any, _ctx?: any): APIContext; static resource_path_to_express_path(resource: string): string; static getContentType(type: string): string; static oops(context: IChassisContext, res: any, log: any): void; static sleep(ms: any): Promise; } export interface APIRequests { [name: string]: APIRequest; } export interface APIRequest { url: string; method?: string; headers?: any; params?: any; } export interface APIResponses { [name: string]: any; } export interface APIContext { req: any; op: any; jwt: any; headers?: any; params: any; query: any; }