{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A flashcard deck. rkey is the client's deck id (see the `id` property below), written via putRecord — this makes a retried push idempotent (a network-timeout retry overwrites the same rkey instead of creating a duplicate) rather than requiring the client to track which pushes already succeeded. Note: unlike most other app.studynext.* records this property is named `id`, not `localId`.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "description": "Deck creation date in YYYY-MM-DD format; not a timestamp.",
            "type": "string"
          },
          "defaultNewCardsPerDay": {
            "minimum": 0,
            "type": "integer"
          },
          "description": {
            "maxLength": 1500,
            "type": "string"
          },
          "id": {
            "description": "Matches local FlashDeck.id and equals this record's own rkey (see the record-level description above). Preserve the full identifier without truncation.",
            "maxLength": 512,
            "type": "string"
          },
          "name": {
            "maxLength": 600,
            "type": "string"
          },
          "parentId": {
            "description": "Parent deck's id, for a deck imported from an Anki \"Parent::Child\" subdeck. Absent for top-level decks.",
            "maxLength": 512,
            "type": "string"
          },
          "pdsRkey": {
            "description": "Canonical migrated TID rkey. It points to a create-only copy while the legacy source record remains readable.",
            "format": "tid",
            "type": "string"
          },
          "planId": {
            "description": "Owning plan id for decks dedicated to a 'problem-by-problem' plan. Such decks are hidden from card lists and deck task generation. Old clients ignore this field.",
            "maxLength": 100,
            "type": "string"
          },
          "sortOrder": {
            "type": "integer"
          },
          "subjectId": {
            "description": "Subject id from the shared subject master (settings.subjects), same as plans/materials. Old clients ignore this field.",
            "maxLength": 300,
            "type": "string"
          },
          "subjectName": {
            "description": "Denormalized subject name for display. Old clients ignore this field.",
            "maxLength": 600,
            "type": "string"
          },
          "thumbnailCode": {
            "maxLength": 300,
            "type": "string"
          },
          "updatedAt": {
            "description": "Legacy YYYY-MM-DD or ISO 8601 datetime (new clients).",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "sortOrder",
          "defaultNewCardsPerDay"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.studynext.decks",
  "lexicon": 1
}
