import { type RuntimeEventDomain } from '../contracts/index.js';
import { type AuthTokenResolver, type StreamReconnectPolicy } from '../transport-http/index.js';
import { type DomainEventConnector, type DomainEvents, type SerializedEventEnvelope } from './domain-events.js';
type RuntimeEventRecord = {
    readonly type: string;
};
export type SerializedRuntimeEnvelope<TEvent extends RuntimeEventRecord = RuntimeEventRecord> = SerializedEventEnvelope<TEvent>;
export type RemoteRuntimeEvents<TEvent extends RuntimeEventRecord = RuntimeEventRecord> = DomainEvents<RuntimeEventDomain, TEvent>;
export interface RuntimeEventConnectorOptions {
    readonly reconnect?: StreamReconnectPolicy;
    readonly onError?: (error: unknown) => void;
}
type AuthTokenSource = string | null | undefined | AuthTokenResolver;
export declare function createRemoteRuntimeEvents<TEvent extends RuntimeEventRecord = RuntimeEventRecord>(connect: DomainEventConnector<RuntimeEventDomain, TEvent>): RemoteRuntimeEvents<TEvent>;
export declare function buildEventSourceUrl(baseUrl: string, domain: RuntimeEventDomain): string;
export declare function buildWebSocketUrl(baseUrl: string, domains: readonly RuntimeEventDomain[]): string;
export declare function createEventSourceConnector(baseUrl: string, token: AuthTokenSource, fetchImpl: typeof fetch, options?: RuntimeEventConnectorOptions): DomainEventConnector<RuntimeEventDomain, RuntimeEventRecord>;
export declare function createWebSocketConnector(baseUrl: string, token: AuthTokenSource, WebSocketImpl: typeof WebSocket, options?: RuntimeEventConnectorOptions): DomainEventConnector<RuntimeEventDomain, RuntimeEventRecord>;
export {};
//# sourceMappingURL=runtime-events.d.ts.map