import { Types } from '../Types.js'; import { Lorem } from '../Lorem.js'; import { Random } from '../Random.js'; import { Internet } from '../Internet.js'; import { Svg } from '../Svg.js'; import { IDataMockInit, IHttpPayloadInit, ISvgImageInit } from '../../Types.js'; import { DataMockLocale } from '../../../locales/Types.js'; export declare const randomValue: unique symbol; export declare const typesValue: unique symbol; export declare const loremValue: unique symbol; export declare const SupportedPayloads: string[]; /** * Generates date/time related values. */ export default class HttpPayloadGenerator { [typesValue]: Types; [randomValue]: Random; [loremValue]: Lorem; protected _internet: Internet; protected _svg: Svg; /** * @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; /** * Randomly generates a boolean flag describing whether the request can * carry a payload. * * @returns `true` when the request can carry a payload and `false` otherwise. */ isPayload(init?: IHttpPayloadInit): boolean; /** * Tests whether this generator supports generating a payload of a given mime type * @param mime The mime type of the body * @returns True when the body can be generated via this generator. */ supportsPayload(mime?: string): boolean; /** * Generates a random payload data for the given options. */ payload(options: IHttpPayloadInit): string | string; /** * Generates a random payload data for given mime type. * * @param mime The mime type. When not set it picks one. */ payload(mime: string): string; /** * Generates a random payload data. */ payload(): string; protected _payloadMime(mime: string): string; /** * Generates a random x-www-form-urlencoded payload. * @returns The x-www-form-urlencoded payload. */ urlEncoded(): string; /** * Generates random JSON data. * @returns JSON payload */ json(): string; /** * Generates random XML data. * @returns XML payload */ xml(): string; /** * This is a link to the SVG generator. */ svg(init?: ISvgImageInit): string; } //# sourceMappingURL=Payload.d.ts.map