app.thedistance.activity

thedistance.app

{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "aspectRatio": {
      "description": "Width and height of the image, used for layout before the image loads.",
      "properties": {
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    },
    "image": {
      "properties": {
        "alt": {
          "description": "Alt text for the image.",
          "maxLength": 3000,
          "type": "string"
        },
        "aspectRatio": {
          "ref": "#aspectRatio",
          "type": "ref"
        },
        "image": {
          "accept": [
            "image/jpeg",
            "image/png",
            "image/webp"
          ],
          "maxSize": 10000000,
          "type": "blob"
        }
      },
      "required": [
        "image"
      ],
      "type": "object"
    },
    "main": {
      "description": "A recorded physical activity such as a bike ride.",
      "key": "tid",
      "record": {
        "properties": {
          "avgCadence": {
            "description": "Average cadence in revolutions per minute.",
            "minimum": 0,
            "type": "integer"
          },
          "avgHeartRate": {
            "description": "Average heart rate in beats per minute.",
            "minimum": 0,
            "type": "integer"
          },
          "avgPower": {
            "description": "Average power output in watts.",
            "minimum": 0,
            "type": "integer"
          },
          "avgSpeed": {
            "description": "Average speed in meters per second. String-encoded decimal number.",
            "maxLength": 64,
            "type": "string"
          },
          "calories": {
            "description": "Estimated calories burned.",
            "minimum": 0,
            "type": "integer"
          },
          "createdAt": {
            "description": "Timestamp of when this record was created.",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "User-provided description of the activity.",
            "maxLength": 3000,
            "type": "string"
          },
          "device": {
            "description": "Name of the device that recorded the activity.",
            "maxLength": 300,
            "type": "string"
          },
          "distance": {
            "description": "Total distance in meters. String-encoded decimal number, e.g. '51214.6'.",
            "maxLength": 64,
            "type": "string"
          },
          "elapsedTime": {
            "description": "Total elapsed time in seconds, including stopped time.",
            "minimum": 0,
            "type": "integer"
          },
          "elevationGain": {
            "description": "Total elevation gain in meters. String-encoded decimal number.",
            "maxLength": 64,
            "type": "string"
          },
          "images": {
            "description": "Photos from the activity.",
            "items": {
              "ref": "#image",
              "type": "ref"
            },
            "maxLength": 8,
            "type": "array"
          },
          "maxCadence": {
            "description": "Maximum cadence in revolutions per minute.",
            "minimum": 0,
            "type": "integer"
          },
          "maxHeartRate": {
            "description": "Maximum heart rate in beats per minute.",
            "minimum": 0,
            "type": "integer"
          },
          "maxPower": {
            "description": "Maximum power output in watts.",
            "minimum": 0,
            "type": "integer"
          },
          "maxSpeed": {
            "description": "Maximum speed in meters per second. String-encoded decimal number.",
            "maxLength": 64,
            "type": "string"
          },
          "movingTime": {
            "description": "Time spent in motion in seconds.",
            "minimum": 0,
            "type": "integer"
          },
          "polyline": {
            "description": "Encoded polyline string representing a simplified, privacy-trimmed route for map display. Uses Google's encoded polyline algorithm format. Ingestion services should simplify polylines to fit within the 20,000 byte limit. This limit may be revisited if it proves insufficient.",
            "maxLength": 20000,
            "type": "string"
          },
          "source": {
            "description": "Where the activity data was imported from.",
            "knownValues": [
              "garmin",
              "strava",
              "wahoo",
              "manual",
              "fit-file",
              "gpx-file"
            ],
            "maxLength": 128,
            "type": "string"
          },
          "sportType": {
            "description": "The type of activity.",
            "knownValues": [
              "ride"
            ],
            "maxLength": 128,
            "type": "string"
          },
          "startedAt": {
            "description": "When the activity started.",
            "format": "datetime",
            "type": "string"
          },
          "title": {
            "description": "User-provided name for the activity.",
            "maxLength": 300,
            "type": "string"
          }
        },
        "required": [
          "sportType",
          "startedAt",
          "elapsedTime",
          "movingTime",
          "distance",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.thedistance.activity",
  "lexicon": 1
}

Validate Record

Validate a record against app.thedistance.activity

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:x52h4ttzfk5rxxdmzinoevgo
CID
bafyreied54mn53ibqbh5bsccwft5idlf7gbpvksu3sxeqrsityhkl23tji
Indexed At
2026-04-20 18:27 UTC
AT-URI
at://did:plc:x52h4ttzfk5rxxdmzinoevgo/com.atproto.lexicon.schema/app.thedistance.activity

Version History (3 versions)

Similar Lexicons

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • A sports activity or outdoor adventure record logged on Treeline.

  • PROVISIONAL: activities are generic enough that they belong in a community-driven lexicon rather than an app namespace. When a community schema stabilizes, Kimbia will migrate to it and deprecate this one in its favor.

  • A recording of an activity. Like running, walking, lifting weights, etc. Helpful to create the rkey tid from the start time and clock id 23 so you can upsert easily.

  • A fitness workout record

Lexicon Garden

@