{
"id": "at.kotoba.stats",
"defs": {
"main": {
"key": "literal:self",
"type": "record",
"record": {
"type": "object",
"required": [
"updatedAt",
"watermark",
"totalSessions",
"totalCards",
"totalCorrect",
"currentStreak",
"lastActiveDate"
],
"properties": {
"updatedAt": {
"type": "string",
"format": "datetime"
},
"watermark": {
"type": "string",
"description": "rkey of the newest at.kotoba.session record folded into this summary so far; empty string if none yet. Session rkeys are TID (time-ordered), so a single watermark rkey is enough to resume folding only newer sessions."
},
"totalCards": {
"type": "integer",
"minimum": 0
},
"totalCorrect": {
"type": "integer",
"minimum": 0
},
"currentStreak": {
"type": "integer",
"minimum": 0
},
"lastDrilledAt": {
"type": "string",
"format": "datetime",
"description": "endedAt of the session lastDrilledPackRef came from, so folding a batch of sessions can tell which one was actually most recent."
},
"totalSessions": {
"type": "integer",
"minimum": 0
},
"lastActiveDate": {
"type": "string",
"description": "YYYY-MM-DD of the most recent session folded in; combined with currentStreak to decide at display time whether the streak is still current."
},
"lastDrilledPackRef": {
"type": "string",
"description": "at:// uri of the pack from the most recently *drilled* session that carried a packRef, so the home screen can default to it instead of the newest upload (#51)."
}
}
},
"description": "Single overwritten record: an incremental rollup of the session history, so a normal load doesn't have to cursor-walk every session ever recorded (#16). rkey is literally `self`."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}