import type { App } from '@solid/community-server'; import type http from 'node:http'; import type { AuthContext } from '../api/auth/AuthContext'; import type { ApiServiceHandle } from '../api/runtime'; import { Supervisor } from '../supervisor/Supervisor'; import type { Logger } from 'global-logger-factory'; import type { RuntimeHost } from './host/types'; import type { RuntimeBootstrapState } from './bootstrap'; import type { ApiRuntimeRunner, CssRuntimeRunner, GatewayRuntimeHandle, GatewayRuntimeRunner } from './runner/types'; export interface RuntimeServices { cssApp?: App; apiService?: ApiServiceHandle; gateway?: GatewayRuntimeHandle; } interface StartCssRuntimeOptions { state: RuntimeBootstrapState; host: RuntimeHost; runtimeShorthand: Record; supervisor: Supervisor; createCssRuntimeConfig: (state: RuntimeBootstrapState) => string; cssRunner: CssRuntimeRunner; } interface StartApiRuntimeOptions { state: RuntimeBootstrapState; host: RuntimeHost; supervisor: Supervisor; authContext?: AuthContext; apiRunner: ApiRuntimeRunner; } interface StartGatewayRuntimeOptions { state: RuntimeBootstrapState; host: RuntimeHost; supervisor: Supervisor; shutdownHandler: () => Promise; gatewayRunner: GatewayRuntimeRunner; clientRemoteAddressResolver?: (req: http.IncomingMessage) => string | undefined; } interface StopRuntimeServicesOptions { services: RuntimeServices; supervisor: Supervisor; logger: Logger; host: RuntimeHost; state: RuntimeBootstrapState; unregisterSocketOrigins: () => Promise; closeIdentityConnections: () => Promise; restoreRuntimeEnv: () => void; stopTimeoutMs?: number; } export declare function createOpenAuthContext(baseUrl: string, override?: AuthContext): AuthContext; export declare function registerManagedRuntimeServices(supervisor: Supervisor, services: RuntimeServices): void; export declare function startCssRuntime({ state, host, runtimeShorthand, supervisor, createCssRuntimeConfig, cssRunner, }: StartCssRuntimeOptions): Promise; export declare function startApiRuntime({ state, host, supervisor, authContext, apiRunner, }: StartApiRuntimeOptions): Promise; export declare function startGatewayRuntime({ state, host, supervisor, shutdownHandler, gatewayRunner, clientRemoteAddressResolver, }: StartGatewayRuntimeOptions): Promise; export declare function stopRuntimeServices({ services, supervisor, logger, host, state, unregisterSocketOrigins, closeIdentityConnections, restoreRuntimeEnv, stopTimeoutMs, }: StopRuntimeServicesOptions): Promise; export {};