Skip to content

@mega-yfue/eufy-sdk / parseCleanRecordDetail

Function: parseCleanRecordDetail()

ts
function parseCleanRecordDetail(blob, codec): CleanRecordDetail | undefined;

Decode one run's detail blob into a CleanRecordDetail.

codec is the same RawDpCodec the capabilities read DP payloads with — passed in rather than imported, because the implementation lives in the transport layer and this one does not reach across that line.

Every field defaults to 0 when the message omits it: proto3 omits a zero, so a run that covered no area and one that said nothing about area are the same bytes, and 0 is the honest reading of both. finishReason is the exception — an index this version cannot name answers undefined rather than being flattened onto a neighbouring reason.

Returns undefined when the container fails its checksum or the bytes inside are not a message — never throws, and never a partial read.

Extra is not decoded. The message carries a nested Extra { mode, mus, error_code, prompt_code } whose own field number within CleanRecordDesc is not recorded in any source this SDK can point at. Reading it would mean picking a number, and a wrong one would silently report another field's bytes.

Parameters

blob

Uint8Array

codec

RawDpCodec

Returns

CleanRecordDetail | undefined

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.