import { Actor, Question } from '@testla/screenplay'; import { Headers, Response as ResponseType, ResponseBodyType } from '../types'; /** * Question Class. Verify certain aspects of an API Response. */ export declare class Response extends Question { private checkMode; private response; private action; private constructor(); /** * Verify if the given status is equal to the given response's status. * * @param {Actor} actor the actor which is used * @return {boolean} the verification result true or false */ answeredBy(actor: Actor): Promise; /** * make the Question check for the positive. * @return {Response} the new Response instance */ static get has(): Response; /** * make the Question check for the negative. * @return {Response} the new Response instance */ static get hasNot(): Response; /** * Verify if the given status is equal to the given response's status. * * @param {ResponseType} response the response to check. * @param {number} statusCode the expected status code. * @return {Response} the Response instance */ statusCode(response: ResponseType, statusCode: number): Response; /** * Verify if the given body is equal to the given response's body. * * @param {ResponseType} response the response to check. * @param {ResponseBodyType} body the expected body. * @return {Response} the Response instance */ body(response: ResponseType, body: ResponseBodyType): Response; /** * Verify if the given headers are included in the given response. * * @param {ResponseType} response the response to check. * @param {Headers} headers the expected header. * @return {Response} the Response instance */ headers(response: ResponseType, headers: Headers): Response; /** * Verify if the reponse (including receiving body) was received within a given duration. * * @param {ResponseType} response the response to check * @param {number} duration expected duration (in milliseconds) not to be exceeded * @return {Response} the Response instance */ beenReceivedWithin(response: ResponseType, duration: number): Response; }