/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { AttributePath, ClusterType, DataVersionFilter, EventFilter, EventPath, GlobalAttributes, ReadRequest } from "#types";
import { Specifier } from "./Specifier.js";
/**
 * A read request formulated using Matter protocol semantics.
 */
export interface Read extends ReadRequest {
}
/**
 * Formulate a read request with extended options and name-based IDs.
 */
export declare function Read(options: Read.Options, ...selectors: Read.Selector[]): Read;
/**
 * Formulate a read request with name-based IDs.
 */
export declare function Read(...selectors: Read.Selector[]): Read;
export declare namespace Read {
    interface Options {
        attributes?: AttributePath[];
        versionFilters?: DataVersionFilter[];
        events?: EventPath[];
        eventFilters?: EventFilter[];
        fabricFilter?: boolean;
        interactionModelRevision?: number;
    }
    interface Attributes extends Read {
        attributeRequests: Exclude<Read["attributeRequests"], undefined>;
    }
    function containsAttribute(request: Read): request is Attributes;
    interface Events extends Read {
        eventRequests: Exclude<Read["eventRequests"], undefined>;
    }
    function containsEvent(request: Read): request is Events;
    /**
     * Selects attributes or events to read.
     */
    type Selector<C extends Specifier.Cluster = Specifier.Cluster> = ({
        kind: "attribute";
    } & AttributeSelector<C>) | ({
        kind: "event";
    } & EventSelector<C>);
    /**
     * Selects attributes to read.  Limits fields to legal permutations per the Matter specification.
     */
    type AttributeSelector<C extends Specifier.Cluster = Specifier.Cluster> = AttributeSelector.Concrete<C> | AttributeSelector.FullWildcard | AttributeSelector.Global | AttributeSelector.WildcardEndpoint<C> | AttributeSelector.WildcardAttribute | AttributeSelector.Endpoint;
    /**
     * Selects events to read.  Limits fields to legal permutations per the Matter specification.
     */
    type EventSelector<C extends Specifier.Cluster = Specifier.Cluster> = EventSelector.Concrete<C> | EventSelector.FullWildcard | EventSelector.WildcardEndpoint<C> | EventSelector.WildcardEvent | EventSelector.Endpoint;
    function Attribute<const C extends ClusterType>(selector?: AttributeSelector<C>): {
        kind: "attribute";
    } & AttributeSelector<C>;
    function Event<const T extends EventSelector>(selector: T): {
        kind: "event";
    } & T;
    interface WildcardFlags {
        skipRoot?: boolean;
        skipCustom?: boolean;
        skipDiagnostics?: boolean;
        skipGlobals?: boolean;
        skipAttributeList?: boolean;
        skipCommandList?: boolean;
        skipFixed?: boolean;
        skipChangesOmitted?: boolean;
    }
    type GlobalAttributeSpecifier = ClusterType.Attribute | keyof GlobalAttributes<any>;
    namespace AttributeSelector {
        interface Concrete<C extends Specifier.Cluster> {
            endpoint: Specifier.Endpoint;
            cluster: C;
            attributes: Specifier.Attribute<Specifier.ClusterFor<C>> | Specifier.Attribute<Specifier.ClusterFor<C>>[];
        }
        interface Wildcard {
            flags?: WildcardFlags;
        }
        interface FullWildcard extends Wildcard {
            endpoint?: undefined;
            cluster?: undefined;
            attributes?: undefined;
        }
        interface Global extends Wildcard {
            endpoint?: Specifier.Endpoint;
            cluster?: undefined;
            attributes: GlobalAttributeSpecifier | GlobalAttributeSpecifier[];
        }
        interface WildcardEndpoint<C extends Specifier.Cluster> extends Wildcard {
            endpoint?: undefined;
            cluster: C;
            attributes: Specifier.Attribute<Specifier.ClusterFor<C>> | Specifier.Attribute<Specifier.ClusterFor<C>>[];
        }
        interface WildcardAttribute extends Wildcard {
            endpoint?: Specifier.Endpoint;
            cluster: Specifier.Cluster;
            attributes?: undefined;
        }
        interface Endpoint extends Wildcard {
            endpoint: Specifier.Endpoint;
            cluster?: undefined;
            attributes?: undefined;
        }
    }
    namespace EventSelector {
        interface Concrete<C extends Specifier.Cluster> {
            endpoint: Specifier.Endpoint;
            cluster: Specifier.Cluster;
            events: Specifier.Event<Specifier.ClusterFor<C>> | Specifier.Event<Specifier.ClusterFor<C>>[];
        }
        interface Wildcard {
            flags?: WildcardFlags;
        }
        interface FullWildcard extends Wildcard {
            endpoint?: undefined;
            cluster?: undefined;
            events?: undefined;
        }
        interface WildcardEndpoint<C extends Specifier.Cluster> extends Wildcard {
            endpoint?: undefined;
            cluster: Specifier.Cluster;
            events: Specifier.Event<Specifier.ClusterFor<C>> | Specifier.Event<Specifier.ClusterFor<C>>[];
        }
        interface WildcardEvent extends Wildcard {
            endpoint: Specifier.Endpoint;
            cluster: Specifier.Cluster;
            events?: undefined;
        }
        interface Endpoint extends Wildcard {
            endpoint: Specifier.Endpoint;
            cluster?: undefined;
            events?: undefined;
        }
    }
}
//# sourceMappingURL=Read.d.ts.map