import { IRequestLog, RequestLog } from './RequestLog.js';
export declare const Kind = "Core#HttpHistory";
export declare const createdSymbol: unique symbol;
export declare const midnightSymbol: unique symbol;
/**
 * An HTTP history log.
 * It's a definition of a HTTP requests history made in an app.
 */
export interface IHttpHistory {
    kind: typeof Kind;
    /**
     * The key of the history entry. The application must
     * revalidate the local copy of the record as the store may change the key.
     */
    key: string;
    /**
     * The key of the parent organization.
     */
    organization: string;
    /**
     * The key of the project the request belongs to.
     */
    project: string;
    /**
     * The application id that generated the history entry.
     */
    app: string;
    /**
     * The key of the request that generated the history entry.
     */
    request: string;
    /**
     * The user id that made that request.
     * This is only available when the store support multi-user environment.
     */
    user?: string;
    /**
     * The request log.
     */
    log: IRequestLog;
    /**
     * The timestamp when this history request has been created.
     */
    created: number;
    /**
     * A timestamp of the midnight when the object was created
     */
    midnight?: number;
}
/**
 * An interface used when adding a history in bulk.
 * The store creates a history object propagating meta values defined here
 * onto the history objects.
 * Because of that, bulk operation can only be performed when the requests are made in similar
 * context (app, organization, project).
 */
export interface IHttpHistoryBulkAdd {
    /**
     * The key of the parent organization.
     */
    organization: string;
    /**
     * The key of the project the request belongs to.
     */
    project: string;
    /**
     * The application id that generated the history entry.
     */
    app: string;
    /**
     * The key of the request that generated the history entry.
     */
    request: string;
    /**
     * The list of request logs.
     */
    log: IRequestLog[];
}
/**
 * An HTTP history is an object containing an information of a request and response
 * made by an application.
 *
 * Note, history object are not mutable. Can only be created or deleted.
 */
export declare class HttpHistory {
    [createdSymbol]: number;
    [midnightSymbol]: number;
    kind: string;
    /**
     * The key of the history entry. The application must
     * revalidate the local copy of the record as the store may change the key.
     */
    key: string;
    /**
     * The key of the parent organization.
     */
    organization: string;
    /**
     * The key of the project the request belongs to.
     */
    project: string;
    /**
     * The application id that generated the history entry.
     */
    app: string;
    /**
     * The user id that made that request.
     * This is only available when the store support multi-user environment.
     */
    user: string;
    /**
     * The key of the request that generated the history entry.
     */
    request: string;
    /**
     * The execution log of the HTTP request with a response.
     */
    log: RequestLog;
    /**
     * @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 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 | IHttpHistory);
    new(init: IHttpHistory): void;
    toJSON(): IHttpHistory;
    /**
     * @returns The default value for the midnight when the request was last updated.
     */
    defaultMidnight(): number;
}
//# sourceMappingURL=HttpHistory.d.ts.map