import { type UserCredentialCapability, UserCredentialRule, UserCredentialType, UserCredentialUserType } from "@zwave-js/cc";
import { type SupervisionResult } from "@zwave-js/core";
import { FeatureAPI } from "./FeatureAPI.js";
export interface UserCapabilities {
    maxUsers: number;
    supportedUserTypes: readonly UserCredentialUserType[];
    maxUserNameLength: number | undefined;
    supportedCredentialRules: readonly UserCredentialRule[];
}
export interface CredentialCapabilities {
    supportedCredentialTypes: ReadonlyMap<UserCredentialType, UserCredentialCapability>;
    supportsAdminCode: boolean;
    supportsAdminCodeDeactivation: boolean;
}
export interface UserData {
    userId: number;
    active: boolean;
    userType: UserCredentialUserType;
    userName?: string;
    credentialRule?: UserCredentialRule;
    expiringTimeoutMinutes?: number;
}
export interface CredentialData {
    userId: number;
    type: UserCredentialType;
    slot: number;
    data?: string | Uint8Array;
}
export interface SetUserOptions {
    active?: boolean;
    userType?: UserCredentialUserType;
    userName?: string;
    credentialRule?: UserCredentialRule;
    expiringTimeoutMinutes?: number;
}
/** High-level API for managing users and credentials on access control devices */
export declare class AccessControlAPI extends FeatureAPI {
    #private;
    /**
     * Returns the user-related capabilities of this endpoint.
     * This method uses cached information from the most recent interview.
     */
    getUserCapabilitiesCached(): UserCapabilities;
    /**
     * Returns the credential-related capabilities of this endpoint.
     * This method uses cached information from the most recent interview.
     */
    getCredentialCapabilitiesCached(): CredentialCapabilities;
    /**
     * Returns the data for the user with the given ID.
     * This communicates with the node to retrieve fresh information.
     */
    getUser(userId: number): Promise<UserData | undefined>;
    /**
     * Returns the data for the user with the given ID.
     * This method uses cached information from the most recent interview.
     */
    getUserCached(userId: number): UserData | undefined;
    /**
     * Returns the data for all configured users.
     * This communicates with the node to retrieve fresh information.
     */
    getUsers(): Promise<UserData[]>;
    /**
     * Returns the data for all configured users.
     * This method uses cached information from the most recent interview.
     */
    getUsersCached(): UserData[];
    /**
     * Creates or updates the user with the given ID.
     * This communicates with the node.
     */
    setUser(userId: number, options: SetUserOptions): Promise<SupervisionResult | undefined>;
    /**
     * Deletes the user with the given ID and all of their credentials.
     * This communicates with the node.
     */
    deleteUser(userId: number): Promise<SupervisionResult | undefined>;
    /**
     * Deletes all users and their credentials.
     * This communicates with the node.
     */
    deleteAllUsers(): Promise<SupervisionResult | undefined>;
    /**
     * Returns the data for a specific credential.
     * This communicates with the node to retrieve fresh information.
     */
    getCredential(userId: number, type: UserCredentialType, slot: number): Promise<CredentialData | undefined>;
    /**
     * Returns the data for a specific credential.
     * This method uses cached information from the most recent interview.
     */
    getCredentialCached(userId: number, type: UserCredentialType, slot: number): CredentialData | undefined;
    /**
     * Returns all credentials for the given user.
     * This communicates with the node to retrieve fresh information.
     */
    getCredentials(userId: number): Promise<CredentialData[]>;
    /**
     * Returns all credentials for the given user.
     * This method uses cached information from the most recent interview.
     */
    getCredentialsCached(userId: number): CredentialData[];
    /**
     * Creates or updates a credential for the given user.
     * This communicates with the node.
     */
    setCredential(userId: number, type: UserCredentialType, slot: number, data: string | Uint8Array): Promise<SupervisionResult | undefined>;
    /**
     * Deletes the given credential.
     * This communicates with the node.
     */
    deleteCredential(userId: number, type: UserCredentialType, slot: number): Promise<SupervisionResult | undefined>;
    /**
     * Starts a learn process for the given credential slot, allowing a user
     * to input a credential directly on the device.
     * Only supported on nodes using the User Credential CC.
     * This communicates with the node.
     */
    startCredentialLearn(userId: number, type: UserCredentialType, slot: number, timeout?: number): Promise<SupervisionResult | undefined>;
    /**
     * Cancels an ongoing credential learn process.
     * Only supported on nodes using the User Credential CC.
     * This communicates with the node.
     */
    cancelCredentialLearn(): Promise<SupervisionResult | undefined>;
    /**
     * Retrieves the admin code from the node.
     * This communicates with the node to retrieve fresh information.
     */
    getAdminCode(): Promise<string | undefined>;
    /**
     * Sets the admin code on the node.
     * This communicates with the node.
     */
    setAdminCode(code: string): Promise<SupervisionResult | undefined>;
}
//# sourceMappingURL=AccessControl.d.ts.map