@komponent/unifi-protect-lib
Version:
Node library for connecting to Ubiquiti Unifi Protect controllers and listen for events
36 lines (35 loc) • 1.05 kB
TypeScript
/// <reference types="node" />
import { Logger } from "../types/Logging";
import { ProtectCameraLcdMessagePayload } from "../types/ProtectTypes";
declare type ProtectNvrUpdatePacket = {
action: ProtectNvrUpdateEventAction;
payload: Record<string, unknown> | string | Buffer;
};
declare type ProtectNvrUpdateEventAction = {
action: string;
id: string;
modelKey: string;
newUpdateId: string;
};
export declare type ProtectNvrUpdatePayloadEventAdd = {
camera: string;
id: string;
modelKey: string;
partition: null;
score: number;
smartDetectEvents: string[];
smartDetectTypes: string[];
start: number;
type: string;
};
export declare type ProtectNvrUpdatePayloadCameraUpdate = {
isMotionDetected: boolean;
lastMotion: number;
lastRing: number;
lcdMessage: ProtectCameraLcdMessagePayload;
};
export declare class ProtectApiUpdates {
static decodeUpdatePacket(log: Logger, packet: Buffer): ProtectNvrUpdatePacket | null;
private static decodeUpdateFrame;
}
export {};