# app.fitsky.workout

> Published by [thatsit.dev](https://lexicon.garden/identity/did:plc:tr7zlhacx3fete5s7cx5tyjd)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:tr7zlhacx3fete5s7cx5tyjd/app.fitsky.workout)
- [Documentation](https://lexicon.garden/lexicon/did:plc:tr7zlhacx3fete5s7cx5tyjd/app.fitsky.workout/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:tr7zlhacx3fete5s7cx5tyjd/app.fitsky.workout/examples)

## Definitions

### `app.fitsky.workout`

**Type**: `record`

A fitness workout record

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes |  |
| `notes` | `string` | No |  |
| `title` | `string` | Yes |  |
| `status` | `string` | No | Whether the workout is in progress or finished. Omitted for legacy workouts (treat as completed). |
| `details` | `union` | No |  |
| `endedAt` | `string` (datetime) | No |  |
| `ogImage` | `blob` | No | Open Graph preview image for social sharing |
| `planUri` | `string` (at-uri) | No | Reference to the workoutPlan used, if any |
| `duration` | `integer` | Yes | Duration in seconds |
| `createdAt` | `string` (datetime) | Yes |  |
| `startedAt` | `string` (datetime) | Yes |  |
| `milestones` | `array` | No | Progress milestones for linear workouts |
| `visibility` | `ref` → `#visibilitySettings` | No |  |

### `app.fitsky.workout#exercise`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes |  |
| `sets` | `array` | Yes |  |

### `app.fitsky.workout#milestone`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `note` | `string` | No |  |
| `type` | `string` | Yes |  |
| `timestamp` | `string` (datetime) | Yes |  |
| `valueMeters` | `integer` | No | Milestone value in meters |

### `app.fitsky.workout#routePoint`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `latE6` | `integer` | Yes | Latitude in microdegrees (degrees * 1,000,000) |
| `lngE6` | `integer` | Yes | Longitude in microdegrees (degrees * 1,000,000) |
| `timestamp` | `string` (datetime) | Yes |  |

### `app.fitsky.workout#exerciseSet`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `reps` | `integer` | No |  |
| `weightGrams` | `integer` | No | Weight in grams |

### `app.fitsky.workout#cardioDetails`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `steps` | `integer` | No |  |
| `calories` | `integer` | No |  |
| `heartRate` | `ref` → `#heartRateData` | No |  |
| `cardioZones` | `ref` → `#cardioZoneData` | No |  |
| `routePoints` | `array` | No | GPS route points recorded during the workout |
| `distanceMeters` | `integer` | No | Distance in meters |
| `heartRateSamples` | `array` | No |  |
| `paceSecondsPerKm` | `integer` | No | Pace in seconds per kilometer |
| `elevationGainMeters` | `integer` | No | Elevation gain in meters |

### `app.fitsky.workout#heartRateData`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `avg` | `integer` | No |  |
| `max` | `integer` | No |  |
| `min` | `integer` | No |  |
| `resting` | `integer` | No |  |

### `app.fitsky.workout#cardioZoneData`

**Type**: `object`

Time in seconds spent in each heart rate zone

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `zone5Max` | `integer` | No |  |
| `zone1Rest` | `integer` | No |  |
| `zone2Easy` | `integer` | No |  |
| `zone3Aerobic` | `integer` | No |  |
| `zone4Threshold` | `integer` | No |  |

### `app.fitsky.workout#heartRateSample`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bpm` | `integer` | Yes |  |
| `timestamp` | `string` (datetime) | Yes |  |

### `app.fitsky.workout#strengthDetails`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `steps` | `integer` | No |  |
| `calories` | `integer` | No |  |
| `exercises` | `array` | No |  |
| `heartRate` | `ref` → `#heartRateData` | No |  |
| `cardioZones` | `ref` → `#cardioZoneData` | No |  |
| `heartRateSamples` | `array` | No |  |

### `app.fitsky.workout#hiitSportsDetails`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `sport` | `string` | No |  |
| `steps` | `integer` | No |  |
| `rounds` | `integer` | No |  |
| `calories` | `integer` | No |  |
| `heartRate` | `ref` → `#heartRateData` | No |  |
| `intensity` | `string` | No |  |
| `cardioZones` | `ref` → `#cardioZoneData` | No |  |
| `routePoints` | `array` | No | GPS route points recorded during the workout |
| `distanceMeters` | `integer` | No | Distance in meters |
| `heartRateSamples` | `array` | No |  |
| `paceSecondsPerKm` | `integer` | No | Pace in seconds per kilometer |

### `app.fitsky.workout#flexibilityDetails`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `steps` | `integer` | No |  |
| `calories` | `integer` | No |  |
| `heartRate` | `ref` → `#heartRateData` | No |  |
| `intensity` | `string` | No |  |
| `movements` | `integer` | No |  |
| `cardioZones` | `ref` → `#cardioZoneData` | No |  |
| `heartRateSamples` | `array` | No |  |

### `app.fitsky.workout#visibilitySettings`

**Type**: `object`

Controls which fields are visible to other users in the Fitsky UI. Note: ATProto repos are public — this is UI-level privacy only.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `notes` | `string` | No |  |
| `steps` | `string` | No |  |
| `details` | `string` | No |  |
| `calories` | `string` | No |  |
| `heartRate` | `string` | No |  |
| `cardioZones` | `string` | No |  |

## Raw Schema

```json
{
  "id": "app.fitsky.workout",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "type",
          "title",
          "startedAt",
          "duration",
          "createdAt"
        ],
        "properties": {
          "type": {
            "type": "string",
            "maxLength": 64,
            "knownValues": [
              "running",
              "cycling",
              "swimming",
              "walking",
              "weightlifting",
              "bodyweight",
              "yoga",
              "hiit",
              "sports",
              "stretching",
              "hiking"
            ]
          },
          "notes": {
            "type": "string",
            "maxLength": 2048
          },
          "title": {
            "type": "string",
            "maxLength": 256
          },
          "status": {
            "type": "string",
            "maxLength": 64,
            "description": "Whether the workout is in progress or finished. Omitted for legacy workouts (treat as completed).",
            "knownValues": [
              "active",
              "completed"
            ]
          },
          "details": {
            "refs": [
              "#cardioDetails",
              "#strengthDetails",
              "#flexibilityDetails",
              "#hiitSportsDetails"
            ],
            "type": "union"
          },
          "endedAt": {
            "type": "string",
            "format": "datetime"
          },
          "ogImage": {
            "type": "blob",
            "accept": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ],
            "maxSize": 1000000,
            "description": "Open Graph preview image for social sharing"
          },
          "planUri": {
            "type": "string",
            "format": "at-uri",
            "description": "Reference to the workoutPlan used, if any"
          },
          "duration": {
            "type": "integer",
            "minimum": 0,
            "description": "Duration in seconds"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "startedAt": {
            "type": "string",
            "format": "datetime"
          },
          "milestones": {
            "type": "array",
            "items": {
              "ref": "#milestone",
              "type": "ref"
            },
            "description": "Progress milestones for linear workouts"
          },
          "visibility": {
            "ref": "#visibilitySettings",
            "type": "ref"
          }
        }
      },
      "description": "A fitness workout record"
    },
    "exercise": {
      "type": "object",
      "required": [
        "name",
        "sets"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 128
        },
        "sets": {
          "type": "array",
          "items": {
            "ref": "#exerciseSet",
            "type": "ref"
          }
        }
      }
    },
    "milestone": {
      "type": "object",
      "required": [
        "type",
        "timestamp"
      ],
      "properties": {
        "note": {
          "type": "string",
          "maxLength": 512
        },
        "type": {
          "type": "string",
          "maxLength": 64,
          "knownValues": [
            "distance",
            "lap",
            "note"
          ]
        },
        "timestamp": {
          "type": "string",
          "format": "datetime"
        },
        "valueMeters": {
          "type": "integer",
          "minimum": 0,
          "description": "Milestone value in meters"
        }
      }
    },
    "routePoint": {
      "type": "object",
      "required": [
        "latE6",
        "lngE6",
        "timestamp"
      ],
      "properties": {
        "latE6": {
          "type": "integer",
          "description": "Latitude in microdegrees (degrees * 1,000,000)"
        },
        "lngE6": {
          "type": "integer",
          "description": "Longitude in microdegrees (degrees * 1,000,000)"
        },
        "timestamp": {
          "type": "string",
          "format": "datetime"
        }
      }
    },
    "exerciseSet": {
      "type": "object",
      "properties": {
        "reps": {
          "type": "integer"
        },
        "weightGrams": {
          "type": "integer",
          "minimum": 0,
          "description": "Weight in grams"
        }
      }
    },
    "cardioDetails": {
      "type": "object",
      "properties": {
        "steps": {
          "type": "integer"
        },
        "calories": {
          "type": "integer"
        },
        "heartRate": {
          "ref": "#heartRateData",
          "type": "ref"
        },
        "cardioZones": {
          "ref": "#cardioZoneData",
          "type": "ref"
        },
        "routePoints": {
          "type": "array",
          "items": {
            "ref": "#routePoint",
            "type": "ref"
          },
          "description": "GPS route points recorded during the workout"
        },
        "distanceMeters": {
          "type": "integer",
          "minimum": 0,
          "description": "Distance in meters"
        },
        "heartRateSamples": {
          "type": "array",
          "items": {
            "ref": "#heartRateSample",
            "type": "ref"
          }
        },
        "paceSecondsPerKm": {
          "type": "integer",
          "minimum": 0,
          "description": "Pace in seconds per kilometer"
        },
        "elevationGainMeters": {
          "type": "integer",
          "minimum": 0,
          "description": "Elevation gain in meters"
        }
      }
    },
    "heartRateData": {
      "type": "object",
      "properties": {
        "avg": {
          "type": "integer"
        },
        "max": {
          "type": "integer"
        },
        "min": {
          "type": "integer"
        },
        "resting": {
          "type": "integer"
        }
      }
    },
    "cardioZoneData": {
      "type": "object",
      "properties": {
        "zone5Max": {
          "type": "integer"
        },
        "zone1Rest": {
          "type": "integer"
        },
        "zone2Easy": {
          "type": "integer"
        },
        "zone3Aerobic": {
          "type": "integer"
        },
        "zone4Threshold": {
          "type": "integer"
        }
      },
      "description": "Time in seconds spent in each heart rate zone"
    },
    "heartRateSample": {
      "type": "object",
      "required": [
        "timestamp",
        "bpm"
      ],
      "properties": {
        "bpm": {
          "type": "integer"
        },
        "timestamp": {
          "type": "string",
          "format": "datetime"
        }
      }
    },
    "strengthDetails": {
      "type": "object",
      "properties": {
        "steps": {
          "type": "integer"
        },
        "calories": {
          "type": "integer"
        },
        "exercises": {
          "type": "array",
          "items": {
            "ref": "#exercise",
            "type": "ref"
          }
        },
        "heartRate": {
          "ref": "#heartRateData",
          "type": "ref"
        },
        "cardioZones": {
          "ref": "#cardioZoneData",
          "type": "ref"
        },
        "heartRateSamples": {
          "type": "array",
          "items": {
            "ref": "#heartRateSample",
            "type": "ref"
          }
        }
      }
    },
    "hiitSportsDetails": {
      "type": "object",
      "properties": {
        "sport": {
          "type": "string",
          "maxLength": 128
        },
        "steps": {
          "type": "integer"
        },
        "rounds": {
          "type": "integer"
        },
        "calories": {
          "type": "integer"
        },
        "heartRate": {
          "ref": "#heartRateData",
          "type": "ref"
        },
        "intensity": {
          "type": "string",
          "maxLength": 64,
          "knownValues": [
            "light",
            "moderate",
            "intense"
          ]
        },
        "cardioZones": {
          "ref": "#cardioZoneData",
          "type": "ref"
        },
        "routePoints": {
          "type": "array",
          "items": {
            "ref": "#routePoint",
            "type": "ref"
          },
          "description": "GPS route points recorded during the workout"
        },
        "distanceMeters": {
          "type": "integer",
          "minimum": 0,
          "description": "Distance in meters"
        },
        "heartRateSamples": {
          "type": "array",
          "items": {
            "ref": "#heartRateSample",
            "type": "ref"
          }
        },
        "paceSecondsPerKm": {
          "type": "integer",
          "minimum": 0,
          "description": "Pace in seconds per kilometer"
        }
      }
    },
    "flexibilityDetails": {
      "type": "object",
      "properties": {
        "steps": {
          "type": "integer"
        },
        "calories": {
          "type": "integer"
        },
        "heartRate": {
          "ref": "#heartRateData",
          "type": "ref"
        },
        "intensity": {
          "type": "string",
          "maxLength": 64,
          "knownValues": [
            "light",
            "moderate",
            "intense"
          ]
        },
        "movements": {
          "type": "integer"
        },
        "cardioZones": {
          "ref": "#cardioZoneData",
          "type": "ref"
        },
        "heartRateSamples": {
          "type": "array",
          "items": {
            "ref": "#heartRateSample",
            "type": "ref"
          }
        }
      }
    },
    "visibilitySettings": {
      "type": "object",
      "properties": {
        "notes": {
          "type": "string",
          "default": "public",
          "maxLength": 64,
          "knownValues": [
            "public",
            "private"
          ]
        },
        "steps": {
          "type": "string",
          "default": "public",
          "maxLength": 64,
          "knownValues": [
            "public",
            "private"
          ]
        },
        "details": {
          "type": "string",
          "default": "public",
          "maxLength": 64,
          "knownValues": [
            "public",
            "private"
          ]
        },
        "calories": {
          "type": "string",
          "default": "public",
          "maxLength": 64,
          "knownValues": [
            "public",
            "private"
          ]
        },
        "heartRate": {
          "type": "string",
          "default": "private",
          "maxLength": 64,
          "knownValues": [
            "public",
            "private"
          ]
        },
        "cardioZones": {
          "type": "string",
          "default": "private",
          "maxLength": 64,
          "knownValues": [
            "public",
            "private"
          ]
        }
      },
      "description": "Controls which fields are visible to other users in the Fitsky UI. Note: ATProto repos are public — this is UI-level privacy only."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
