records.TRACE_SCHEMAconstno test imports itconst TRACE_SCHEMA: "planning/trace@1"The schema of a trace file.
The files of a store that are not events: a trace of an item in a source (the content last taken, the base of a three-way merge) and an entry of the outbox (a patch no source could apply, and why), in JSON5 with the order of keys of RFC 8785 (0037-planning FR-033, FR-038). Decoding is total: a text that is not one of them is an error value.
import { decodeTrace, encodeTrace } from "./trace-file.ts";
// decodeTrace(encodeTrace(trace)) is the tracerecords.TRACE_SCHEMAconstno test imports itconst TRACE_SCHEMA: "planning/trace@1"The schema of a trace file.
records.OUTBOX_SCHEMAconstno test imports itconst OUTBOX_SCHEMA: "planning/outbox@1"The schema of an outbox file.
records.observedToJsonfunctionno test imports itfunction observedToJson(o: ObservedItem): JsonThe JSON of an observed item: what an opening holds, its state and the ids it was read with. The history a place keeps is not kept in a trace.
records.observedOfJsonfunctionno test imports itfunction observedOfJson(j: Json | undefined): Result<ObservedItem, CodecProblem>An observed item from its JSON, or why it is not one.
records.encodeTracefunctionno test imports itfunction encodeTrace(t: Trace): stringThe text of a trace's file.
records.decodeTracefunctionno test imports itfunction decodeTrace(text: string): Result<Trace, CodecProblem>A trace from the text of its file, or why it is not one.
records.encodeOutboxfunctionno test imports itfunction encodeOutbox(e: OutboxEntry): stringThe text of an outbox file.
records.decodeOutboxfunctionno test imports itfunction decodeOutbox(text: string): Result<OutboxEntry, CodecProblem>An outbox entry from the text of its file, or why it is not one.
TRACE_SCHEMAconstno test imports itconst TRACE_SCHEMA: "planning/trace@1"The schema of a trace file.
OUTBOX_SCHEMAconstno test imports itconst OUTBOX_SCHEMA: "planning/outbox@1"The schema of an outbox file.
observedToJsonfunctionno test imports itfunction observedToJson(o: ObservedItem): JsonThe JSON of an observed item: what an opening holds, its state and the ids it was read with. The history a place keeps is not kept in a trace.
observedOfJsonfunctionno test imports itfunction observedOfJson(j: Json | undefined): Result<ObservedItem, CodecProblem>An observed item from its JSON, or why it is not one.
encodeTracefunctionno test imports itfunction encodeTrace(t: Trace): stringThe text of a trace's file.
decodeTracefunctionno test imports itfunction decodeTrace(text: string): Result<Trace, CodecProblem>A trace from the text of its file, or why it is not one.
encodeOutboxfunctionno test imports itfunction encodeOutbox(e: OutboxEntry): stringThe text of an outbox file.
decodeOutboxfunctionno test imports itfunction decodeOutbox(text: string): Result<OutboxEntry, CodecProblem>An outbox entry from the text of its file, or why it is not one.