- ✅ 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
108 lines
3.5 KiB
TypeScript
108 lines
3.5 KiB
TypeScript
import IBrowserFrame from '../types/IBrowserFrame.js';
|
|
import IGoToOptions from '../types/IGoToOptions.js';
|
|
import Response from '../../fetch/Response.js';
|
|
import BrowserWindow from '../../window/BrowserWindow.js';
|
|
import FormData from '../../form-data/FormData.js';
|
|
/**
|
|
* Browser frame navigation utility.
|
|
*/
|
|
export default class BrowserFrameNavigator {
|
|
/**
|
|
* Navigates to a page.
|
|
*
|
|
* @throws Error if the request can't be resolved (because of SSL error or similar). It will not throw if the response is not ok.
|
|
* @param options Options.
|
|
* @param options.windowClass Window class.
|
|
* @param options.frame Frame.
|
|
* @param options.url URL.
|
|
* @param [options.goToOptions] Go to options.
|
|
* @param [options.method] Method.
|
|
* @param [options.formData] Form data.
|
|
* @param [options.disableHistory] Disables adding the navigation to the history.
|
|
* @returns Response.
|
|
*/
|
|
static navigate(options: {
|
|
windowClass: new (browserFrame: IBrowserFrame, options?: {
|
|
url?: string;
|
|
width?: number;
|
|
height?: number;
|
|
}) => BrowserWindow;
|
|
frame: IBrowserFrame;
|
|
url: string;
|
|
goToOptions?: IGoToOptions;
|
|
method?: string;
|
|
formData?: FormData | null;
|
|
disableHistory?: boolean;
|
|
}): Promise<Response | null>;
|
|
/**
|
|
* Navigates back in history.
|
|
*
|
|
* @param options Options.
|
|
* @param options.windowClass Window class.
|
|
* @param options.frame Frame.
|
|
* @param [options.goToOptions] Go to options.
|
|
*/
|
|
static navigateBack(options: {
|
|
windowClass: new (browserFrame: IBrowserFrame, options?: {
|
|
url?: string;
|
|
width?: number;
|
|
height?: number;
|
|
}) => BrowserWindow;
|
|
frame: IBrowserFrame;
|
|
goToOptions?: IGoToOptions;
|
|
}): Promise<Response | null>;
|
|
/**
|
|
* Navigates forward in history.
|
|
*
|
|
* @param options Options.
|
|
* @param options.windowClass Window class.
|
|
* @param options.frame Frame.
|
|
* @param [options.goToOptions] Go to options.
|
|
*/
|
|
static navigateForward(options: {
|
|
windowClass: new (browserFrame: IBrowserFrame, options?: {
|
|
url?: string;
|
|
width?: number;
|
|
height?: number;
|
|
}) => BrowserWindow;
|
|
frame: IBrowserFrame;
|
|
goToOptions?: IGoToOptions;
|
|
}): Promise<Response | null>;
|
|
/**
|
|
* Navigates steps in history.
|
|
*
|
|
* @param options Options.
|
|
* @param options.windowClass Window class.
|
|
* @param options.frame Frame.
|
|
* @param options.goToOptions Go to options.
|
|
* @param options.steps Steps.
|
|
*/
|
|
static navigateSteps(options: {
|
|
windowClass: new (browserFrame: IBrowserFrame, options?: {
|
|
url?: string;
|
|
width?: number;
|
|
height?: number;
|
|
}) => BrowserWindow;
|
|
frame: IBrowserFrame;
|
|
goToOptions?: IGoToOptions;
|
|
steps?: number;
|
|
}): Promise<Response | null>;
|
|
/**
|
|
* Reloads the current history item.
|
|
*
|
|
* @param options Options.
|
|
* @param options.windowClass Window class.
|
|
* @param options.frame Frame.
|
|
* @param options.goToOptions Go to options.
|
|
*/
|
|
static reload(options: {
|
|
windowClass: new (browserFrame: IBrowserFrame, options?: {
|
|
url?: string;
|
|
width?: number;
|
|
height?: number;
|
|
}) => BrowserWindow;
|
|
frame: IBrowserFrame;
|
|
goToOptions?: IGoToOptions;
|
|
}): Promise<Response | null>;
|
|
}
|
|
//# sourceMappingURL=BrowserFrameNavigator.d.ts.map
|