import { Random } from '../Random.js'; import { Types } from '../Types.js'; import { GenerateInit } from './HeadersSchema.js'; import { Time } from '../Time.js'; import { Lorem } from '../Lorem.js'; import { Internet } from '../Internet.js'; import { IDataMockInit, IHttpHeadersInit, IHttpPayloadInit } from '../../Types.js'; import { DataMockLocale } from '../../../locales/Types.js'; export declare const randomValue: unique symbol; export declare const internetValue: unique symbol; export declare const typesValue: unique symbol; export declare const timeValue: unique symbol; export declare const loremValue: unique symbol; export declare const getInit: unique symbol; export declare const collectHeaders: unique symbol; export default class HttpHeadersGenerator { [randomValue]: Random; [typesValue]: Types; [timeValue]: Time; [loremValue]: Lorem; [internetValue]: Internet; /** * @param init The library init options. */ constructor(init?: IDataMockInit); seed(value?: number): void; /** * @param locale The locale to set. When nothing is passed then it uses the default locale. */ locale(locale?: DataMockLocale): void; [getInit](): GenerateInit; /** * Generates a content type header for the given payload options. */ contentType(init: IHttpPayloadInit): string | undefined; /** * Generates a random content type header */ contentType(): string; _pickContentType(): string; /** * Note, the returned value may contain duplicates. In such case the generated list of headers * is the same as size but a header can have multiple values. * * Note, invalid configuration may lead to an infinity loop. This may happen when pool is set with the size * that exceed pool size and the pool contains headers that have only singular values. * * @param type Either `request` or `response` * @param size The number of requests to return. * @param group The name of the headers group * @param pool The pool of header names to choose from. * @returns The list of header names from the `HeadersSchema` object to use. */ [collectHeaders](type: 'request' | 'response', size: number, group?: string, pool?: string[], noMulti?: boolean): string[]; /** * Generates a list of request or response headers. * @param type Either `request` or `response` */ headers(type: 'request' | 'response', init?: IHttpHeadersInit): string; /** * @returns A value for the `location` header */ link(): string; } //# sourceMappingURL=Headers.d.ts.map