codigo0/node_modules/happy-dom/lib/fetch/SyncFetch.d.ts
planetazuzu 5d7a6500fe refactor: Fase 1 - Clean Architecture, refactorización modular y eliminación de duplicidades
-  Ticket 1.1: Estructura Clean Architecture en backend
-  Ticket 1.2: Schemas Zod compartidos
-  Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares)
-  Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares)
-  Ticket 1.5: Eliminación de duplicidades (~50 líneas)

Cambios principales:
- Creada estructura Clean Architecture en backend/src/
- Schemas Zod compartidos en backend/src/shared/schemas/
- Refactorización modular de drugs y procedures
- Utilidades genéricas en src/utils/ (filter, validation)
- Eliminados scripts obsoletos y documentación antigua
- Corregidos errores: QueryClient, import test-error-handling
- Build verificado y funcionando correctamente
2026-01-25 21:09:47 +01:00

91 lines
2.6 KiB
TypeScript

import IRequestInit from './types/IRequestInit.js';
import IRequestInfo from './types/IRequestInfo.js';
import IBrowserFrame from '../browser/types/IBrowserFrame.js';
import BrowserWindow from '../window/BrowserWindow.js';
import ISyncResponse from './types/ISyncResponse.js';
import Headers from './Headers.js';
/**
* Handles synchronous fetch requests.
*/
export default class SyncFetch {
#private;
private request;
private redirectCount;
private disableCache;
private disableSameOriginPolicy;
private interceptor;
private requestHeaders;
/**
* Constructor.
*
* @param options Options.
* @param options.browserFrame Browser frame.
* @param options.window Window.
* @param options.url URL.
* @param [options.init] Init.
* @param [options.redirectCount] Redirect count.
* @param [options.contentType] Content Type.
* @param [options.disableCache] Disables the use of cached responses. It will still store the response in the cache.
* @param [options.disableSameOriginPolicy] Disables the Same-Origin policy.
* @param [options.unfilteredHeaders] Unfiltered headers - necessary for preflight requests.
*/
constructor(options: {
browserFrame: IBrowserFrame;
window: BrowserWindow;
url: IRequestInfo;
init?: IRequestInit;
redirectCount?: number;
contentType?: string | null;
disableCache?: boolean;
disableSameOriginPolicy?: boolean;
unfilteredHeaders?: Headers;
});
/**
* Sends request.
*
* @returns Response.
*/
send(): ISyncResponse;
/**
* Returns cached response.
*
* @returns Response.
*/
getCachedResponse(): ISyncResponse | null;
/**
* Returns virtual server response.
*
* @returns Response.
*/
private getVirtualServerResponse;
/**
* Checks if the request complies with the Cross-Origin policy.
*
* @returns True if it complies with the policy.
*/
private compliesWithCrossOriginPolicy;
/**
* Sends request.
*
* @returns Response.
*/
sendRequest(): ISyncResponse;
/**
* Parses response body.
*
* @param options Options.
* @param options.headers Headers.
* @param options.status Status.
* @param options.body Body.
* @returns Parsed body.
*/
private parseIResponseBody;
/**
* Handles redirect response.
*
* @param response Response.
* @returns Redirected response or null.
*/
private handleRedirectResponse;
}
//# sourceMappingURL=SyncFetch.d.ts.map