import { Types } from '../Types.js'; import { Lorem } from '../Lorem.js'; import HttpPayloadGenerator from './Payload.js'; import { IDataMockInit, IFormDataTextPartInit, IFormDataPartInit, IFormDataInit } from '../../Types.js'; import { DataMockLocale } from '../../../locales/Types.js'; /** * Generator of a FormData. * * Note, this is only available in a browser. */ export default class FormDataGenerator { protected _types: Types; protected _lorem: Lorem; protected _payload: HttpPayloadGenerator; /** * @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; /** * Generates random data as a FormData. */ form(init?: IFormDataInit): FormData; /** * Adds a random part to the FormData. * * @param form The FormData object to add the part to. * @param init Optional configuration. */ part(form: FormData, init?: IFormDataPartInit): void; /** * Adds a random text part to the FormData object. * When `textMime` is set then the part is a text added as a Blob with the corresponding mime. * When not set then it adds a clear text. * * @param form The FormData object * @param init Optional configuration. */ textPart(form: FormData, init?: IFormDataTextPartInit): void; /** * Adds a random File part to the FormData object. * @param form The FormData object */ filePart(form: FormData): void; } //# sourceMappingURL=FormData.d.ts.map