# space.opendeck.session

> Published by [opendeck.space](https://lexicon.garden/identity/did:plc:5xoilbawtptc3wha4zplgkwd)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:5xoilbawtptc3wha4zplgkwd/space.opendeck.session)
- [Documentation](https://lexicon.garden/lexicon/did:plc:5xoilbawtptc3wha4zplgkwd/space.opendeck.session/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:5xoilbawtptc3wha4zplgkwd/space.opendeck.session/examples)

## Definitions

### `space.opendeck.session`

**Type**: `record`

A finished study session. Written once; the source of study history and activity stats.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `activeSeconds` | `integer` | Yes | Time spent on cards, with idle gaps capped. |
| `again` | `integer` | Yes |  |
| `deck` | `string` | No | Record key (rkey) of the studied deck. |
| `direction` | `string` | No | Study direction; absent means forward (front to back). |
| `easy` | `integer` | Yes |  |
| `endedAt` | `string` (datetime) | Yes |  |
| `good` | `integer` | Yes |  |
| `hard` | `integer` | Yes |  |
| `newCards` | `integer` | Yes | Cards rated for the first time in this direction. |
| `repetitions` | `integer` | Yes |  |
| `startedAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A finished study session. Written once; the source of study history and activity stats.",
      "key": "tid",
      "record": {
        "properties": {
          "activeSeconds": {
            "description": "Time spent on cards, with idle gaps capped.",
            "type": "integer"
          },
          "again": {
            "type": "integer"
          },
          "deck": {
            "description": "Record key (rkey) of the studied deck.",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "direction": {
            "description": "Study direction; absent means forward (front to back).",
            "enum": [
              "forward",
              "reverse"
            ],
            "type": "string"
          },
          "easy": {
            "type": "integer"
          },
          "endedAt": {
            "format": "datetime",
            "type": "string"
          },
          "good": {
            "type": "integer"
          },
          "hard": {
            "type": "integer"
          },
          "newCards": {
            "description": "Cards rated for the first time in this direction.",
            "type": "integer"
          },
          "repetitions": {
            "type": "integer"
          },
          "startedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "startedAt",
          "endedAt",
          "activeSeconds",
          "repetitions",
          "again",
          "hard",
          "good",
          "easy",
          "newCards"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "space.opendeck.session",
  "lexicon": 1
}
```
