import { ColdObservable } from 'rxjs'; import { AjaxError, AjaxResponse } from './fromAjax.js'; import type { AjaxConfig } from './fromAjax.js'; type Constructor = new (...args: any[]) => T; export declare const AjaxProviderMixin: (Base: T) => { new (...args: any[]): { url: string; path: string; body: unknown; async: boolean; method: string; _headers: Record; headers?: Record; timeout: number; user: string; password: string; withCredentials: boolean; xsrfCookieName: string; xsrfHeaderName: string; responseType: string; queryParams?: unknown; includeDownloadProgress: boolean; includeUploadProgress: boolean; avoidBoundary?: boolean; dispatchEventContext?: { dispatchEvent(event: CustomEvent): void; }; customEventPrefix?: string; lastResponse?: AjaxResponse; lastError?: AjaxError; /** * Assigns the configuration settings for the AJAX request. * * @returns {Object} config - Configuration for the ajax creation function. * @private */ _assignAjaxRxjsConfig(): AjaxConfig; /** * Joins the base URL and path to create the complete request URL. * * @returns {string} The complete request URL or an empty string if not valid. * @private */ _joinUrlData(): string; /** * Joins the default headers with custom headers. * * @returns {Object} Merged headers. * @private */ _joinHeaders(formData: unknown): Record; /** * Dispatches a custom event with the specified type and payload. * * @param {string} type - The type of the custom event. * @param {*} payload - The payload to include in the custom event. * @private */ _dispatchEvent(type: string, payload: unknown): void; /** * Returns a cold Observable that performs the AJAX request on each subscription. * * Progress is reported through the `ajaxprogress` event. Errors are reported * through `ajaxerror`/`ajaxerrorend` events before the observable errors. * * @returns {ColdObservable>} An observable that emits the AJAX response. * * @fires ajaxpresend - Fired before a request is sent. * @fires ajaxprogress - Fired when some progress state is received. * @fires ajaxresponse - Fired when a response is received. * @fires ajaxresponseend - Fired after a response is received. * @fires ajaxerror - Fired when an error is received. * @fires ajaxerrorend - Fired after a error is received. */ request$(): ColdObservable>; /** * Generates and sends the AJAX request. * * @returns {Promise} A promise that resolves with the AJAX response. * * @fires ajaxpresend - Fired before a request is sent. * @fires ajaxresponse - Fired when a response is received. * @fires ajaxresponseend - Fired after a response is received. */ generateRequest(): Promise>; }; } & T; export {};