import { IRequestConfig, RequestConfig } from './RequestConfig.js';
import { Thing, IThing } from './Thing.js';
import { HttpCertificate, Certificate } from './ClientCertificate.js';
import { IRequestAuthorization, RequestAuthorization } from './RequestAuthorization.js';
import { IRequestLog, RequestLog } from './RequestLog.js';
import { IHttpRequest, HttpRequest } from './HttpRequest.js';
import { ARCSavedRequest, ARCHistoryRequest } from './legacy/request/ArcRequest.js';
import { IHttpFlow } from './http-flows/HttpFlows.js';
import { IHttpAssertion } from './http-flows/HttpAssertion.js';
export declare const Kind = "Core#Request";
export declare const createdSymbol: unique symbol;
export declare const updatedSymbol: unique symbol;
export declare const midnightSymbol: unique symbol;
/**
 * The definition of a request object that functions inside API Client
 * with the full configuration.
 */
export interface IRequest {
    kind: string;
    /**
     * The basic information about the request.
     */
    info: IThing;
    /**
     * The HTTP definition of the request.
     */
    expects: IHttpRequest;
    /**
     * The execution log of the last HTTP request with a response.
     */
    log?: IRequestLog;
    /**
     * Timestamp when the request was last updated.
     */
    updated?: number;
    /**
     * Timestamp when the request was created.
     */
    created?: number;
    /**
     * A timestamp of the midnight when the request object was updated
     */
    midnight?: number;
    /**
     * Request processing configuration.
     */
    config?: IRequestConfig;
    /**
     * Request authorization configuration
     */
    authorization?: IRequestAuthorization[];
    /**
     * Http action flows.
     * In ARC this was "actions",
     */
    flows?: IHttpFlow[];
    /**
     * The certificate to use with the request.
     * Note, the certificate defined on the certificate authorization
     * should not be included here by default. The HTTP transport should recognize
     * this certificate and update the configuration.
     */
    clientCertificate?: HttpCertificate;
    /**
     * The list of assertions (tests) to perform after the response is ready.
     */
    assertions?: IHttpAssertion[];
}
export declare class Request {
    [createdSymbol]: number;
    [updatedSymbol]: number;
    [midnightSymbol]: number;
    kind: string;
    /**
     * The basic information about the project.
     */
    info: Thing;
    /**
     * The HTTP definition of the request.
     */
    expects: HttpRequest;
    /**
     * The execution log of the last HTTP request with a response.
     */
    log?: RequestLog;
    /**
     * Request processing configuration.
     */
    config?: RequestConfig;
    /**
     * Request authorization configuration
     */
    authorization?: RequestAuthorization[];
    /**
     * Http action flows.
     * In ARC this was "actions",
     */
    flows?: IHttpFlow[];
    /**
     * The certificate to use with the request.
     * Note, the certificate defined on the certificate authorization
     * should not be included here by default. The HTTP transport should recognize
     * this certificate and update the configuration.
     */
    clientCertificate?: Certificate;
    /**
     * The list of assertions (tests) to perform after the response is ready.
     */
    assertions?: IHttpAssertion[];
    /**
     * Creates a request from an URL.
     *
     * @param url The Request URL.
     */
    static fromUrl(url: string): Request;
    /**
     * Creates a request from a name.
     *
     * @param name The Request name.
     */
    static fromName(name: string): Request;
    /**
     * Creates a request from an HttpRequest definition.
     *
     * @param info The request data.
     */
    static fromHttpRequest(info: IHttpRequest): Request;
    static fromLegacy(request: ARCSavedRequest | ARCHistoryRequest): Promise<Request>;
    /**
     * @param value The timestamp when the request was created.
     */
    set created(value: number | undefined);
    /**
     * @returns The timestamp when the request was created.
     */
    get created(): number;
    /**
     * @param value The timestamp when the request was last updated.
     */
    set updated(value: number | undefined);
    /**
     * @returns The timestamp when the request was last updated.
     */
    get updated(): number;
    /**
     * @param value The timestamp of the midnight when the request object was updated
     */
    set midnight(value: number | undefined);
    /**
     * @returns The timestamp of the midnight when the request object was updated
     */
    get midnight(): number;
    constructor(input?: string | IRequest);
    new(init: IRequest): void;
    toJSON(): IRequest;
    /**
     * Sets the basic information about a project.
     */
    setInfo(info: IThing): void;
    /**
     * If the info object does not exist it is being created.
     * @return The instance of an HTTP request information.
     */
    getExpects(): HttpRequest;
    /**
     * @returns The default value for the midnight when the request was last updated.
     */
    defaultMidnight(): number;
    /**
     * Reads the config from the request. If the config object does not exists it creates one.
     */
    getConfig(): RequestConfig;
    setLog(log: IRequestLog): void;
}
//# sourceMappingURL=Request.d.ts.map