import Context from './context'; import { SendReponse, Bypass } from './context'; export declare type Request = { /** * The ID of context between a request and a response */ id: string; /** * Remote address */ ip: string; /** * HTTP version */ httpVersion: string; /** * HTTP method */ method: string; /** * Requested URL */ url: string; /** * Request headers */ headers: any; /** * Requedted at */ date: Date; }; export declare type Response = { /** * The ID of context between a request and a response */ id: string; /** * The status code of the response */ status: number; /** * The time between request and response, in milliseconds */ time: number; }; export default class Core { intercepting: boolean; interceptingIps: string[]; constructor(); /** * リクエストを捕捉します * @param req リクエスト */ capture(req: any, response: SendReponse, bypass: Bypass): Context; /** * インターセプト開始 */ intercept(): void; /** * インターセプト終了 */ unintercept(): void; interceptResponse(status: number, body: any, id?: string): void; bypass(id: string): void; interceptIp(ip: string): void; }