/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Behavior } from "#behavior/Behavior.js";
import { Endpoint } from "#endpoint/Endpoint.js";
import { Node } from "#node/Node.js";
import { ServerNode } from "#node/ServerNode.js";
import { Abort, Duration } from "@matter/general";
import { DatatypeModel } from "@matter/model";
import { EndpointNumber } from "@matter/types";
/**
 * The time from change to notification to change broadcast when transitioning from dormant state.
 */
export declare const DEFAULT_COALESCE_INTERVAL: Duration;
/**
 * A streaming view of node state.
 *
 * These streams offer a basic synchronization primitive, delivering state from scratch or from arbitrary version
 * offsets.
 *
 * Each stream tracks a root {@link ServerNode} as well as any available state for known peers.
 */
export interface StateStream extends AsyncIterator<StateStream.Change> {
}
/**
 * Open a new stream.
 */
export declare function StateStream(node: ServerNode, { nodes: nodeFilter, clusters: clusterFilter, versions, coalesceInterval, abort }?: StateStream.Options): AsyncGenerator<StateStream.Change, void, void>;
export declare namespace StateStream {
    /**
     * A single change event.
     *
     * Indicates either property updates or endpoint delete.
     */
    type Change = Update | Delete;
    /**
     * A serializable version of {@link Change}.
     */
    type WireChange = WireUpdate | WireDelete;
    type Key = string;
    interface Options {
        abort?: Abort.Signal;
        nodes?: Key[];
        clusters?: Key[];
        versions?: KnownVersion[];
        coalesceInterval?: Duration;
    }
    interface KnownVersion {
        node: Key;
        endpoint: EndpointNumber;
        cluster: Key;
        version: number;
    }
    interface Update {
        kind: "update";
        node: Node;
        endpoint: Endpoint;
        version: number;
        behavior: Behavior.Type;
        changes: Record<Key, unknown>;
    }
    interface Delete {
        kind: "delete";
        node: Node;
        endpoint: Endpoint;
    }
    interface WireUpdate {
        kind: "update";
        node: Key;
        endpoint: number;
        version: number;
        behavior: Key;
        changes: Record<Key, unknown>;
    }
    interface WireDelete {
        kind: "delete";
        node: Key;
        endpoint: number;
    }
    function WireChange(change: Change): WireChange;
    const OptionsSchema: DatatypeModel;
    const WireUpdateSchema: DatatypeModel;
    const WireDeleteSchema: DatatypeModel;
}
//# sourceMappingURL=StateStream.d.ts.map