# social.sthenos.alpha.workout

> A completed training session: an ordered list of exercises, each with the sets actually performed.

- Kind: record
- Record key: tid
- Authority: alpha.sthenos.social
- Lexicon: 1
- Published by [sthenos.social](https://lexicon.garden/identity/did:plc:we3onmbrfloqk6xmmtkojddy), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:we3onmbrfloqk6xmmtkojddy/social.sthenos.alpha.workout)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:we3onmbrfloqk6xmmtkojddy/social.sthenos.alpha.workout/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:we3onmbrfloqk6xmmtkojddy/social.sthenos.alpha.workout/analytics)

## Record (`social.sthenos.alpha.workout`)

Type: record · key tid

### Properties

- `completedAt` (string · datetime, required): ISO 8601 timestamp marking when the session was completed.
- `createdAt` (string · datetime, required): ISO 8601 timestamp of record creation.
- `exercises` (array, required): Ordered exercises performed in this session. Array order is the canonical order; no separate sort field is needed because records are replaced wholesale on edit.
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#exerciseEntry`
- `name` (string): Optional display name for the session, e.g. "Push Day A".
  - Constraints: maxLength: 640, maxGraphemes: 64
- `notes` (string): Optional freeform notes about the session.
  - Constraints: maxLength: 10000, maxGraphemes: 1000
- `startedAt` (string · datetime, required): ISO 8601 timestamp marking when the session was started.

## #exerciseEntry (`social.sthenos.alpha.workout#exerciseEntry`)

Type: object

One exercise performed within a workout, with the sets performed for it. Either 'exercise' (a backing record reference) or 'name' (an inline label) should be present; entries missing both should be ignored by consumers.

### Properties

- `exercise` (ref): Strong reference (uri + cid) to the social.sthenos.alpha.exercise record performed. Optional: omit for an inline/custom exercise with no backing record, in which case 'name' should be set.
  - Reference: `com.atproto.repo.strongRef`
- `name` (string): Display name for an inline/custom exercise when 'exercise' is omitted, or an optional override label when it is present.
  - Constraints: maxLength: 640, maxGraphemes: 64
- `sets` (array, required): Sets performed for this exercise, in order. Array order is the canonical order; no separate sort field is needed because records are replaced wholesale on edit.
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#set`

## #set (`social.sthenos.alpha.workout#set`)

Type: object

A single performed set.

### Properties

- `reps` (integer, required): Number of repetitions performed.
  - Constraints: minimum: 0, maximum: 1000
- `weight` (ref): The weight lifted in this set. Optional; omit for bodyweight or unweighted sets.
  - Reference: `#weight`

## #weight (`social.sthenos.alpha.workout#weight`)

Type: object

A weight value paired with its unit.

### Properties

- `unit` (string, required): Unit the value is expressed in.
  - Constraints: knownValues: kg | lb
- `value` (string, required): Decimal weight expressed as a string to preserve exact user-entered precision (e.g. "22.5").
  - Constraints: minLength: 1, maxLength: 12

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "exerciseEntry": {
      "description": "One exercise performed within a workout, with the sets performed for it. Either 'exercise' (a backing record reference) or 'name' (an inline label) should be present; entries missing both should be ignored by consumers.",
      "properties": {
        "exercise": {
          "description": "Strong reference (uri + cid) to the social.sthenos.alpha.exercise record performed. Optional: omit for an inline/custom exercise with no backing record, in which case 'name' should be set.",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "name": {
          "description": "Display name for an inline/custom exercise when 'exercise' is omitted, or an optional override label when it is present.",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "sets": {
          "description": "Sets performed for this exercise, in order. Array order is the canonical order; no separate sort field is needed because records are replaced wholesale on edit.",
          "items": {
            "ref": "#set",
            "type": "ref"
          },
          "maxLength": 100,
          "type": "array"
        }
      },
      "required": [
        "sets"
      ],
      "type": "object"
    },
    "main": {
      "description": "A completed training session: an ordered list of exercises, each with the sets actually performed.",
      "key": "tid",
      "record": {
        "properties": {
          "completedAt": {
            "description": "ISO 8601 timestamp marking when the session was completed.",
            "format": "datetime",
            "type": "string"
          },
          "createdAt": {
            "description": "ISO 8601 timestamp of record creation.",
            "format": "datetime",
            "type": "string"
          },
          "exercises": {
            "description": "Ordered exercises performed in this session. Array order is the canonical order; no separate sort field is needed because records are replaced wholesale on edit.",
            "items": {
              "ref": "#exerciseEntry",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "name": {
            "description": "Optional display name for the session, e.g. \"Push Day A\".",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "notes": {
            "description": "Optional freeform notes about the session.",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "startedAt": {
            "description": "ISO 8601 timestamp marking when the session was started.",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "startedAt",
          "completedAt",
          "createdAt",
          "exercises"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "set": {
      "description": "A single performed set.",
      "properties": {
        "reps": {
          "description": "Number of repetitions performed.",
          "maximum": 1000,
          "minimum": 0,
          "type": "integer"
        },
        "weight": {
          "description": "The weight lifted in this set. Optional; omit for bodyweight or unweighted sets.",
          "ref": "#weight",
          "type": "ref"
        }
      },
      "required": [
        "reps"
      ],
      "type": "object"
    },
    "weight": {
      "description": "A weight value paired with its unit.",
      "properties": {
        "unit": {
          "description": "Unit the value is expressed in.",
          "knownValues": [
            "kg",
            "lb"
          ],
          "type": "string"
        },
        "value": {
          "description": "Decimal weight expressed as a string to preserve exact user-entered precision (e.g. \"22.5\").",
          "maxLength": 12,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "value",
        "unit"
      ],
      "type": "object"
    }
  },
  "id": "social.sthenos.alpha.workout",
  "lexicon": 1
}
```
