/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { AccessControlServer } from "#behaviors/access-control";
import { Duration, Observable } from "@matter/general";
import { DataReport, DataReportPayloadIterator, ExchangeManager, InteractionRecipient, InteractionServerMessenger, InvokeRequest, Message, MessageExchange, NodeSession, PeerAddress, ProtocolHandler, ReadRequest, SessionManager, SubscribeRequest, TimedRequest, WriteRequest } from "@matter/protocol";
import { TlvAttributePath, TlvEventPath, TypeFromSchema } from "@matter/types";
import { ServerNode } from "../ServerNode.js";
import { ServerSubscription } from "./ServerSubscription.js";
export interface PeerSubscription {
    subscriptionId: number;
    peerAddress: PeerAddress;
    minIntervalFloor: Duration;
    maxIntervalCeiling: Duration;
    attributeRequests?: TypeFromSchema<typeof TlvAttributePath>[];
    eventRequests?: TypeFromSchema<typeof TlvEventPath>[];
    isFabricFiltered: boolean;
    maxInterval: Duration;
    sendInterval: Duration;
}
/**
 * Interfaces {@link InteractionServer} with other components.
 */
export interface InteractionContext {
    readonly sessions: SessionManager;
    readonly exchangeManager: ExchangeManager;
}
/**
 * Translates interactions from the Matter protocol to matter.js APIs.
 */
export declare class InteractionServer implements ProtocolHandler, InteractionRecipient {
    #private;
    readonly id = 1;
    readonly requiresSecureSession = true;
    constructor(node: ServerNode, sessions: SessionManager);
    [Symbol.asyncDispose](): Promise<void>;
    blockNewActivity(): void;
    protected get isClosing(): boolean;
    get maxPathsPerInvoke(): number;
    get subscriptionEstablishmentStarted(): Observable<[peerAddress: PeerAddress], void>;
    onNewExchange(exchange: MessageExchange, message: Message): Promise<void>;
    get aclServer(): AccessControlServer;
    get clientHandler(): ProtocolHandler | undefined;
    set clientHandler(clientHandler: ProtocolHandler);
    handleReadRequest(exchange: MessageExchange, readRequest: ReadRequest, message: Message): Promise<{
        dataReport: DataReport;
        payload?: DataReportPayloadIterator;
    }>;
    handleWriteRequest(exchange: MessageExchange, writeRequest: WriteRequest, messenger: InteractionServerMessenger, message: Message): Promise<void>;
    handleSubscribeRequest(exchange: MessageExchange, request: SubscribeRequest, messenger: InteractionServerMessenger, message: Message): Promise<void>;
    establishFormerSubscription({ subscriptionId, attributeRequests, eventRequests, isFabricFiltered, minIntervalFloor, maxIntervalCeiling, maxInterval, sendInterval }: PeerSubscription, session: NodeSession): Promise<ServerSubscription>;
    handleInvokeRequest(exchange: MessageExchange, request: InvokeRequest, messenger: InteractionServerMessenger, message: Message): Promise<void>;
    handleTimedRequest(exchange: MessageExchange, { timeout, interactionModelRevision }: TimedRequest): void;
    close(): Promise<void>;
}
//# sourceMappingURL=InteractionServer.d.ts.map