export class VelociousHttpServerWebsocketEventsHost {
    /**
     * Narrows the runtime value to the documented type.
      @type {Set<import("./worker-handler/index.js").default>} */
    handlers: Set<import("./worker-handler/index.js").default>;
    publishQueue: Promise<void>;
    /**
     * Returns a promise that resolves when all pending publish/broadcast
     * operations have completed (including event-log persistence). Useful
     * when a request handler needs to guarantee its broadcast is persisted
     * before responding — without this, the HTTP response can return before
     * the async event-log write finishes.
     * @returns {Promise<void>}
     */
    awaitPendingBroadcasts(): Promise<void>;
    /**
     * Runs register.
     * @param {import("./worker-handler/index.js").default} handler - Handler instance.
     * @returns {() => void} - The register.
     */
    register(handler: import("./worker-handler/index.js").default): () => void;
    /**
     * Runs publish.
     * @param {object | string} channelOrArgs - Channel name or options object.
     * @param {?} [payloadArg] - Payload data when channel is passed separately.
     * @returns {void} - No return value.
     */
    publish(channelOrArgs: object | string, payloadArg?: unknown): void;
    /**
     * Fan a V2 channel broadcast out to every registered worker handler.
     * Persists the event to the event-log store (if the channel is marked
     * interested) so clients can resume from a `lastEventId` checkpoint.
     * @param {object} args - Options object.
     * @param {string} args.channel - Channel name.
     * @param {Record<string, ?>} args.broadcastParams - Routing filter params.
     * @param {?} args.body - Message body.
     * @returns {void}
     */
    broadcastV2({ body, broadcastParams, channel }: {
        channel: string;
        broadcastParams: Record<string, unknown>;
        body: unknown;
    }): void;
    /**
     * Runs queue publish.
     * @param {() => Promise<void>} callback - Publish work to run in order.
     * @param {string} errorMessage - Message logged when publish work fails.
     * @returns {void}
     */
    _queuePublish(callback: () => Promise<void>, errorMessage: string): void;
    /**
     * Runs persist v2 event if needed.
     * @param {object} args - Options.
     * @param {?} args.body - Event body.
     * @param {string} args.channel - Channel name.
     * @returns {Promise<{createdAt: string, id: string} | null>}
     */
    _persistV2EventIfNeeded({ body, channel }: {
        body: unknown;
        channel: string;
    }): Promise<{
        createdAt: string;
        id: string;
    } | null>;
    /**
     * Runs persist event if needed.
     * @param {object} args - Options object.
     * @param {string} args.channel - Channel name.
     * @param {?} args.payload - Payload data.
     * @returns {Promise<{createdAt: string, id: string} | null>} - Persisted event metadata.
     */
    _persistEventIfNeeded({ channel, payload }: {
        channel: string;
        payload: unknown;
    }): Promise<{
        createdAt: string;
        id: string;
    } | null>;
    /**
     * Runs persist channel event if needed.
     * @param {object} args - Options object.
     * @param {string} args.channel - Channel name.
     * @param {?} args.payload - Payload data.
     * @returns {Promise<{createdAt: string, id: string} | null>} - Persisted event metadata.
     */
    _persistChannelEventIfNeeded({ channel, payload }: {
        channel: string;
        payload: unknown;
    }): Promise<{
        createdAt: string;
        id: string;
    } | null>;
}
export default websocketEventsHost;
declare const websocketEventsHost: VelociousHttpServerWebsocketEventsHost;
//# sourceMappingURL=websocket-events-host.d.ts.map