/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { AccessControlServer } from "#behaviors/access-control";
import { Duration, Observable, ServerAddressUdp } from "#general";
import { DataReport, DataReportPayloadIterator, ExchangeManager, InteractionRecipient, InteractionServerMessenger, InvokeRequest, Message, MessageExchange, NodeSession, PeerAddress, ProtocolHandler, ReadRequest, SessionManager, SubscribeRequest, TimedRequest, WriteRequest, WriteResponse } from "#protocol";
import { TlvAttributePath, TlvEventPath, TypeFromSchema } from "#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;
    operationalAddress?: ServerAddressUdp;
}
/**
 * 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, message: Message): Promise<WriteResponse>;
    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