import type { ApiDefinitionRegistry, ComponentDataBindingRegistry, ComponentEventDto, DataSourceDiagnostic, UiNode } from '@ankhorage/contracts'; import { type RuntimeBindingOperationExecutor, type RuntimeBindingOperationResultCache, type RuntimeBindingOperationResultWriter } from './runtimeBindings'; import { type RuntimeEventOperationLifecycle } from './runtimeEventOperationLifecycle'; import type { RuntimeActionHandler, RuntimeActionHandlers } from './RuntimeRendererConfig'; type RuntimeEventPayload = Record; export interface RuntimeActionRegistry { dispatchComponentEvent(args: RuntimeComponentEventDispatchArgs): Promise; registerActionHandler(type: string, handler: RuntimeActionHandler): () => void; } export interface RuntimeActionResolutionScope { readonly context?: Record; readonly operationResults?: RuntimeBindingOperationResultCache; readonly state?: Record; } export interface RuntimeActionResolutionArgs extends RuntimeActionResolutionScope { readonly event: ComponentEventDto; } export interface RuntimeComponentEventDispatchArgs extends RuntimeActionResolutionScope { readonly node: UiNode; readonly event: ComponentEventDto; readonly eventName?: string; readonly executeAction?: RuntimeActionHandler; readonly apis?: ApiDefinitionRegistry; readonly dataBindings?: ComponentDataBindingRegistry; readonly executeOperation?: RuntimeBindingOperationExecutor; readonly writeOperationResult?: RuntimeBindingOperationResultWriter; readonly eventOperationLifecycle?: RuntimeEventOperationLifecycle; } export interface RuntimeEventPropWrapArgs extends RuntimeActionResolutionScope { readonly node: UiNode; readonly props: Record; readonly disableActions: boolean; readonly dataBindings?: ComponentDataBindingRegistry; readonly dispatchComponentEvent: (args: RuntimeComponentEventDispatchArgs) => Promise | void; } export declare function createRuntimeActionRegistry(options?: { actionHandlers?: RuntimeActionHandlers; apis?: ApiDefinitionRegistry; dataBindings?: ComponentDataBindingRegistry; executeAction?: RuntimeActionHandler; executeOperation?: RuntimeBindingOperationExecutor; eventOperationLifecycle?: RuntimeEventOperationLifecycle; operationResults?: RuntimeBindingOperationResultCache; writeOperationResult?: RuntimeBindingOperationResultWriter; }): RuntimeActionRegistry; export declare function dispatchRuntimeComponentEvent(args: RuntimeComponentEventDispatchArgs & { readonly actionHandlers?: RuntimeActionHandlers; }): Promise; export declare function wrapRuntimeEventProps(args: RuntimeEventPropWrapArgs): Record; export declare function createComponentEventFromHandlerArgs(args: { readonly node: UiNode; readonly eventName: string; readonly handlerArgs: readonly unknown[]; }): ComponentEventDto; export declare function resolveRuntimeActionPayload(payload: object | undefined, args: RuntimeActionResolutionArgs): object | undefined; export declare function resolveRuntimeActionValue(value: unknown, args: RuntimeActionResolutionArgs): object | undefined; export {}; //# sourceMappingURL=runtimeActionRegistry.d.ts.map