/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { SustainedClientSubscribe } from "#action/client/subscription/ClientSubscribe.js";
import { Read } from "#action/request/Read.js";
import { Subscribe } from "#action/request/Subscribe.js";
import { ReadResult } from "#action/response/ReadResult.js";
import { AsyncObservableValue, RetrySchedule } from "@matter/general";
import { SubscribeResponse } from "@matter/types";
import { ClientSubscription } from "./ClientSubscription.js";
import { PeerSubscription } from "./PeerSubscription.js";
/**
 * An {@link ActiveSubscription} that remains active regardless of the state of the peer.
 *
 * This class performs retries in response to connection errors and timeouts.  The underlying Matter subscription and
 * thus {@link ActiveSubscription#subscriptionId} may change if the peer goes offline or experiences transient errors.
 *
 * TODO - need to make underlying exchange provider abortable and work out how the retry schedule at this level
 *   interacts with the MDNS and secure protocol retries.  Will require some refactoring at lower levels.  Leaving
 *   retries at this level relatively conservative for now
 */
export declare class SustainedSubscription extends ClientSubscription {
    #private;
    constructor(config: SustainedSubscription.Configuration);
    /**
     * Emits when the active state changes.
     */
    get active(): AsyncObservableValue<[any, ...any[]]>;
    /**
     * Emits when inactive state changes.
     */
    get inactive(): AsyncObservableValue<[any, ...any[]]>;
    get interactionModelRevision(): number;
    get maxInterval(): number;
}
export declare namespace SustainedSubscription {
    /**
     * Configuration for {@link SustainedSubscription}.
     */
    interface Configuration extends Omit<ClientSubscription.Configuration, "request"> {
        request: SustainedClientSubscribe;
        /**
         * Function to establish underlying subscription.
         */
        subscribe: (request: Subscribe, abort: AbortSignal) => Promise<PeerSubscription>;
        /**
         * Performs bootstrap read.
         */
        read: (request: Read, abort: AbortSignal) => ReadResult;
        /**
         * Probe the peer with an empty read to verify session liveness.
         */
        probe: (abort: AbortSignal) => Promise<boolean>;
        /**
         * The schedule we use for retrying subscription connections.
         *
         * We handle reconnection separately at the exchange level.  This retry schedule only applies to establishing a
         * subscription once we have an active exchange.  Exchange reconnection is handled by lower-level components.
         */
        retries: RetrySchedule;
    }
    function assert(subscription: SubscribeResponse): asserts subscription is SustainedSubscription;
    const DefaultRetrySchedule: RetrySchedule.Configuration;
}
//# sourceMappingURL=SustainedSubscription.d.ts.map