{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "FSRS scheduling state for a single card.",
      "key": "tid",
      "record": {
        "properties": {
          "card": {
            "description": "AT-URI of the card this tracks.",
            "format": "at-uri",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "deck": {
            "description": "Record key (rkey) of the owning deck.",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "difficulty": {
            "description": "FSRS difficulty (float stored as string).",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "direction": {
            "description": "Study direction this schedule tracks; absent means forward (front to back).",
            "enum": [
              "forward",
              "reverse"
            ],
            "type": "string"
          },
          "dueAt": {
            "description": "When the card should be shown next.",
            "format": "datetime",
            "type": "string"
          },
          "firstReviewedAt": {
            "description": "When the card was first rated; absent for cards studied before this was recorded.",
            "format": "datetime",
            "type": "string"
          },
          "lapses": {
            "description": "Number of times a learned card was forgotten.",
            "type": "integer"
          },
          "lastRating": {
            "enum": [
              "again",
              "hard",
              "good",
              "easy"
            ],
            "type": "string"
          },
          "lastReviewedAt": {
            "format": "datetime",
            "type": "string"
          },
          "repetitions": {
            "description": "Number of times the card was rated.",
            "type": "integer"
          },
          "shortTermStep": {
            "description": "Index into the short-term intervals while learning or relearning; absent otherwise.",
            "type": "integer"
          },
          "stability": {
            "description": "FSRS stability (float stored as string).",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "state": {
            "enum": [
              "new",
              "learning",
              "review",
              "relearning"
            ],
            "type": "string"
          }
        },
        "required": [
          "card",
          "dueAt",
          "stability",
          "difficulty",
          "repetitions",
          "lapses",
          "state",
          "lastReviewedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "space.opendeck.progress",
  "lexicon": 1
}
