/// import { HAPServerConnection } from "../HAPServer"; import { HAPAccessoryCategory } from "../types/hap-proxy"; import { EventEmitter } from "../lib/EventEmitter"; import { HAPDeviceInfo } from "../lib/HAPBonjourBrowser"; export declare enum PermissionTypes { USER = 0, ADMIN = 1 } export declare type PairingInformation = { clientId: string; publicKey: Buffer; permission: PermissionTypes; }; export declare type SavedPairingInformation = { clientId: string; publicKey: string; permission: PermissionTypes; }; export declare enum AccessoryInfoEvents { REMOVED_CLIENT = "removed-client" } export declare type AccessoryInfoEventMap = { [AccessoryInfoEvents.REMOVED_CLIENT]: (initiator: HAPServerConnection, clientId: string) => void; }; export declare class AccessoryInfo extends EventEmitter { private readonly accessoryName; category: HAPAccessoryCategory; accessoryId: string; displayName: string; pincode: string; longTermPublicKey: Buffer; longTermSecretKey: Buffer; pairedClients: Record; private pairedAdminClientCount; configNumber: number; setupID: string; private loaded; constructor(accessoryName: string, pincode?: string); initWithClientInfo(deviceInfo: HAPDeviceInfo): Promise; updateConfigNumber(configNumber: number): Promise; /** * Add a paired client to memory. * @param {string} clientId * @param {Buffer} publicKey * @param {PermissionTypes} permission */ addPairedClient: (clientId: string, publicKey: Buffer, permission: PermissionTypes) => void; updatePermission: (username: string, permission: PermissionTypes) => void; listPairings: () => PairingInformation[]; /** * Remove a paired client from memory. * @param controller - the session of the controller initiated the removal of the pairing * @param {string} clientId */ removePairedClient: (controller: HAPServerConnection, clientId: string) => void; _removePairedClient0: (controller: HAPServerConnection, clientId: string) => void; /** * Check if clientId is paired * @param username */ isPaired: (username: string) => boolean; hasAdminPermissions: (clientId: string) => boolean; hasPairings(): boolean; getClientPublicKey: (clientId: string) => Buffer | undefined; save(): Promise; load(): Promise; private static genRandomMac; private static generateSetupID; } //# sourceMappingURL=AccessoryInfo.d.ts.map