variable dayRecords

Codec for <DayRecords>.

Examples

Build a cmd 142 request

import { assertStringIncludes } from "@std/assert";
import { dayRecords } from "@hertzg/reolink-api/protocol/params";

const xml = dayRecords.encode({
  startTime: { year: 2026, month: 10, day: 1, hour: 0, minute: 0, second: 0 },
  endTime: { year: 2026, month: 10, day: 31, hour: 23, minute: 59, second: 59 },
  DayRecordList: [{ channelId: 0 }],
});

assertStringIncludes(
  xml,
  "<DayRecordList><DayRecord><channelId>0</channelId></DayRecord></DayRecordList>",
);

Type

XmlParam<"DayRecords", DayRecords>

Usage

import { dayRecords } from "protocol/params/mod.ts";