import type { ApplicationService } from '@adonisjs/core/types'; import type { HttpContext } from '@adonisjs/core/http'; import type { Component } from './component.js'; import type { Config } from './define_config.js'; import type { Checksum } from './checksum.js'; import type { ComponentRegistry } from './component_registry.js'; import type { SnapshotManager } from './snapshot_manager.js'; import type { ComponentHookConstructor, ComponentSnapshot, ComponentCall, MountOptions, ComponentEffects } from './types.js'; import ComponentContext from './component_context.js'; /** * Owns the request-lifecycle cluster — trigger/mount/fromSnapshot/new/ * update/callMethods/updateProperties/recursivelySetValue/render/ * getPublicMethods — for `Livewire`. Extracted from the `Livewire` god * object to give this cluster of responsibilities its own file and direct * test coverage. See the design doc for the full rationale. */ export declare class RequestHandler { private app; private config; private checksum; private registry; private snapshotManager; private getFeatures; private setOrUpdateComponentView; constructor(app: ApplicationService, config: Config, checksum: Checksum, registry: ComponentRegistry, snapshotManager: SnapshotManager, getFeatures: () => ComponentHookConstructor[], setOrUpdateComponentView: (component: Component, ctx?: HttpContext) => void); trigger(event: string, component: Component, ...params: any[]): Promise; /** * Get public methods from a component (excluding internal ones) * PHP parity: getPublicMethods */ protected getPublicMethods(component: Component): string[]; /** * Recursively set a deeply nested value, using synthesizers when available * PHP parity: recursivelySetValue * * This ensures Form objects and other synthesized types have their * set() methods called correctly when updating nested properties */ protected recursivelySetValue(baseProperty: string, target: any, leafValue: any, segments: string[], index: number | undefined, context: ComponentContext): Promise; protected updateProperties(component: Component, updates: Record, data: Record, context: ComponentContext): Promise; render(component: Component, defaultValue?: string): Promise; new(ctx: HttpContext, name: string, id?: string | null): Promise; fromSnapshot(ctx: HttpContext, snapshot: ComponentSnapshot): Promise<[Component, ComponentContext]>; callMethods(component: Component, calls: ComponentCall[], context: ComponentContext): Promise; mount(ctx: HttpContext, name: string, params?: Record, options?: MountOptions, slots?: Record): Promise; update(ctx: HttpContext, snapshot: ComponentSnapshot, updates: Record, calls: ComponentCall[]): Promise<[ComponentSnapshot, ComponentEffects]>; }