/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Aspect } from "./Aspect.js";
/**
 * Matter access levels.
 *
 * This enum needs to be in sync with the AccessControl.AccessControlEntryPrivilege enum!
 */
export declare enum AccessLevel {
    View = 1,
    /**
     * Formally removed in Spec in 1.4.2 but SDK and tests still implement it
     * Remove when https://github.com/project-chip/connectedhomeip/issues/41840 is solved
     * @deprecated
     */
    ProxyView = 2,
    Operate = 3,
    Manage = 4,
    Administer = 5
}
/**
 * An operational representation of "access" as defined by the Matter specification.
 *
 * "Access" controls the operations a remote party may perform on a data field or cluster element.
 */
export declare class Access extends Aspect<Access.Definition> implements Access.Ast {
    rw?: Access.Rw;
    readPriv?: Access.Privilege;
    writePriv?: Access.Privilege;
    fabric?: Access.Fabric;
    timed?: boolean;
    get readable(): boolean;
    get writable(): boolean;
    get fabricScoped(): boolean;
    get fabricSensitive(): boolean;
    /**
     * Determine whether this access is fully specified.  This means we know whether reads and/or writes are allowed and
     * if so the required access levels.
     */
    get complete(): boolean;
    /**
     * Initialize from an Access.Definition or the access control DSL defined by the Matter Specification.
     */
    constructor(definition: string | Access.Definition);
    extend(other: Access): Access;
    /**
     * Parses standard Matter access syntax into an AccessFlag set.  Extremely lenient.
     */
    static parse(access: Access, definition: string): Access.Flags;
    /**
     * Displays access using the standard Matter syntax.
     */
    toString(): string;
}
export declare namespace Access {
    type Ast = {
        rw?: `${Rw}`;
        fabric?: `${Fabric}`;
        readPriv?: `${Privilege}`;
        writePriv?: `${Privilege}`;
        timed?: boolean;
    };
    /**
     * Types of read/write access.
     */
    enum Rw {
        /**
         * Read access.
         */
        Read = "R",
        /**
         * Write access.
         */
        Write = "W",
        /**
         * Read and mandatory write acess.
         */
        ReadWrite = "RW",
        /**
         * Read and optional write access.
         */
        ReadWriteOption = "R[W]"
    }
    /**
     * Affect of fabric on access.
     */
    enum Fabric {
        /**
         * Extension - allows for override of fabric specification.
         */
        Unaware = "U",
        /**
         * Writable only by scoped fabric.
         */
        Scoped = "F",
        /**
         * Readable and writable only by scoped fabric.
         */
        Sensitive = "S"
    }
    /**
     * Privilege required for access.
     */
    enum Privilege {
        /**
         * View privilege.
         */
        View = "V",
        /**
         * Operate privilege.
         */
        Operate = "O",
        /**
         * Manage privilege.
         */
        Manage = "M",
        /**
         * Administer privilege.
         */
        Administer = "A"
    }
    /**
     * Reverse map of Privilege.
     */
    enum PrivilegeName {
        V = "View",
        O = "Operate",
        M = "Manage",
        A = "Administer"
    }
    /**
     * Relative ordering of privilege.
     */
    const PrivilegeLevel: {
        V: AccessLevel;
        O: AccessLevel;
        M: AccessLevel;
        A: AccessLevel;
    };
    /**
     * Timed access requirement.
     */
    enum Timed {
        /**
         * Timed access required.
         */
        Required = "T"
    }
    /**
     * All atomic access control values.
     */
    type Flag = Rw | Fabric | Privilege | Timed;
    /**
     * A defined set of access control values.
     */
    type Flags = Flag[];
    const R = Rw.Read;
    const W = Rw.Write;
    const RW = Rw.ReadWrite;
    const RWo = Rw.ReadWriteOption;
    const U = Fabric.Unaware;
    const F = Fabric.Scoped;
    const S = Fabric.Sensitive;
    const V = Privilege.View;
    const O: [Privilege.Operate];
    const M: [Privilege.Manage];
    const A: [Privilege.Administer];
    const VO: [Privilege.View, Privilege.Operate];
    const VM: [Privilege.View, Privilege.Manage];
    const VA: [Privilege.View, Privilege.Administer];
    const OM: [Privilege.Operate, Privilege.Manage];
    const OA: [Privilege.Operate, Privilege.Administer];
    const MA: [Privilege.Manage, Privilege.Administer];
    const T = Timed.Required;
    /**
     * All valid privilege tags.
     */
    type Authorization = typeof V | typeof VO | typeof VM | typeof VA | typeof O | typeof OM | typeof OA | typeof M | typeof MA | typeof A;
    /**
     * All valid timed tags.
     */
    type TimedTag = typeof T;
    /**
     * Defines access as defined in the Matter 1.1 specification.
     *
     * In TypeScript and JavaScript, definitions adhering to this type look
     * like `[ RW, VA ]` or `[ Access.Rw.W, Access.Privilege.Operate ]`.
     */
    type Definition = Ast | (Flag | Authorization)[] | string | undefined;
}
export declare namespace Access {
    const Default: Access;
}
//# sourceMappingURL=Access.d.ts.map