# social.sthenos.alpha.workout

> Published by [sthenos.social](https://lexicon.garden/identity/did:plc:we3onmbrfloqk6xmmtkojddy)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:we3onmbrfloqk6xmmtkojddy/social.sthenos.alpha.workout)
- [Documentation](https://lexicon.garden/lexicon/did:plc:we3onmbrfloqk6xmmtkojddy/social.sthenos.alpha.workout/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:we3onmbrfloqk6xmmtkojddy/social.sthenos.alpha.workout/examples)

## Definitions

### `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.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `exercise` | `ref` → `com.atproto.repo.strongRef` | No | 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. |
| `name` | `string` | No | Display name for an inline/custom exercise when 'exercise' is omitted, or an optional override label when it is present. |
| `sets` | `array` | Yes | 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. |

### `social.sthenos.alpha.workout`

**Type**: `record`

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

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `completedAt` | `string` (datetime) | Yes | ISO 8601 timestamp marking when the session was completed. |
| `createdAt` | `string` (datetime) | Yes | ISO 8601 timestamp of record creation. |
| `exercises` | `array` | Yes | 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. |
| `name` | `string` | No | Optional display name for the session, e.g. "Push Day A". |
| `notes` | `string` | No | Optional freeform notes about the session. |
| `startedAt` | `string` (datetime) | Yes | ISO 8601 timestamp marking when the session was started. |

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

**Type**: `object`

A single performed set.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `reps` | `integer` | Yes | Number of repetitions performed. |
| `weight` | `ref` → `#weight` | No | The weight lifted in this set. Optional; omit for bodyweight or unweighted sets. |

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

**Type**: `object`

A weight value paired with its unit.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `unit` | `string` | Yes | Unit the value is expressed in. |
| `value` | `string` | Yes | Decimal weight expressed as a string to preserve exact user-entered precision (e.g. "22.5"). |

## Raw 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
}
```
