@mega-yfue/eufy-sdk / AvailabilityContext
Interface: AvailabilityContext
The device facts an availability / per-model gate reads. A truthful subset a CloudRecord can populate at resolve time — before a live session exists — without fabricating the transport fields (CommandContext.channel, CommandContext.paramIds) a real command carries. Every CommandContext is one structurally, so a gate written against this runs unchanged on the manifest path and the command path.
Extended by
Properties
capabilities?
capabilities?: ReadonlySet<Capability>;The device's resolved capability set, when known.
category?
category?: string;API category string, when known.
codec?
codec?: Codec;Resolved codec/family. Absent for a device outside the eufy device model entirely — the codecs are the eufy transport families, so an ecosystem with its own backend has no truthful value here and says so by omission rather than borrowing another family's. Every gate that reads it compares against a specific codec, so an absent one matches none.
deviceType?
deviceType?: number;eufy DeviceType, when known.
hasP2p?
hasP2p?: boolean;Whether the device is reachable over P2P — a live-transport fact, so it is absent on the pure resolve-time (manifest) path and present only when a command context is built. Availability gates that read it (a lock's P2P-only writes) are all writeOnly, which the manifest never lists, so its absence there changes nothing.
homeBaseAttached?
homeBaseAttached?: boolean;Whether the device hangs off a HomeBase (a parent_sn other than its own) rather than standing alone. A DEVICE fact, not a transport one — the same class of routing evidence as hasP2p — which is why it sits here rather than on CommandContext: it is as true of a described device as of a commanded one. The rtsp capability gates on it because a station serves an attached camera's stream itself and ignores that camera's authentication setting, so the write cannot do what its name promises there.
model?
model?: string;Model / T-code, when known.
paramIds?
paramIds?: ReadonlySet<number>;The param_type / DP ids this device has actually reported. Present at bind time (a real CommandContext); absent on the manifest path. DP-based availability gates should treat undefined as an empty set — ctx.paramIds?.has(dp) ?? false.
stationDeviceType?
stationDeviceType?: number;The vendor DeviceType of the station the device hangs off, when it is attached and the station's record states one. Answers which station family a command addressed to an attached device is carried through.
stationSerial?
stationSerial?: string;Serial of the covering station, when the device record names one.