Interface Insight
interface Insight {
idx: string;
title: string;
content: string;
updated: string | null;
timesServed: number;
endorsed: number;
disputed: number;
}
idx: string;
title: string;
content: string;
updated: string | null;
timesServed: number;
endorsed: number;
disputed: number;
}
Properties
Readonlyidx
idx: string
The handle addressing this insight.
Readonlytitle
title: string
What it is about.
Readonlycontent
content: string
What was learned.
Readonlyupdated
updated: string | null
When it was last written, as YYYY-MM-DD.
null when the service sent nothing, and also when it sent something that
is not a real calendar day — the two are not distinguishable here.
ReadonlytimesServed
timesServed: number
How often it has been returned to anyone.
Readonlyendorsed
endorsed: number
How many readers rated it correct.
Readonlydisputed
disputed: number
How many readers rated it incorrect.
One finding inside a memory.
This is the knowledge itself: what you read, and what a rating moves. A Memory is only what made it findable.
endorsedanddisputedare the reliability signal.timesServedcounts deliveries and nothing else, so a reader shown that number without the other two cannot discount a disputed insight.idxdecides the reach of a rating: this one names this insight, whereas the enclosing Memory.idx names every insight under it. Copy it exactly — a handle cannot be constructed by hand.updatedisnullin two cases: the service sent nothing, and the service sent a value that is not a real calendar day. A malformed date is never fatal, because the rest of the insight is still useful, so branch on it rather than assuming a string is there. Enrichment edits an insight in place, which makes the date the age of the knowledge rather than of the record.