# app.attrails.route

> Published by [attrails.app](https://lexicon.garden/identity/did:plc:q7v2r4sxk4pecbwmaucvb2vn)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.route)
- [Documentation](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.route/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:q7v2r4sxk4pecbwmaucvb2vn/app.attrails.route/examples)

## Definitions

### `app.attrails.route#commute`

**Type**: `token`

Utility / commuting.

Utility / commuting.

### `app.attrails.route#cyclingDetails`

**Type**: `object`

Cycling-specific attributes of a route.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `discipline` | `string` | No |  |

### `app.attrails.route#gravelBike`

**Type**: `token`

Gravel / adventure cycling.

Gravel / adventure cycling.

### `app.attrails.route`

**Type**: `record`

A cycling, running, hiking, walking, etc. route shared by a user. The associated track file is stored as a blob.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `activity` | `string` | Yes | The activity this route is intended for. Open enum; unknown values are allowed. |
| `createdAt` | `string` (datetime) | Yes |  |
| `description` | `string` | No | Description of the route, as CommonMark markdown. Clients must not render raw HTML. |
| `details` | `union` | No | Activity-specific attributes. Open union: new activity detail types can be added later without breaking existing clients. |
| `difficulty` | `string` | No | Author's subjective difficulty for the stated activity. |
| `images` | `array` | No |  |
| `labels` | `union` | No | Self-label values for this route, e.g. to flag sensitive photos. |
| `langs` | `array` | No | Languages of this record's text (name, description, tags, image alt text), as BCP-47 tags. If absent, consumers should assume English ('en'). |
| `name` | `string` | Yes | Name of the route. |
| `surface` | `string` | No | Predominant surface. Activity-neutral. |
| `tags` | `array` | No | Free-form tags, stored without a leading '#'. |
| `track` | `blob` | Yes | The route's track, commonly as a GPX file. Subject to max size limitations imposed by the user's PDS, so large routes might need to be simplified or compressed to fit. |

### `app.attrails.route#mtb`

**Type**: `token`

Mountain biking.

Mountain biking.

### `app.attrails.route#road`

**Type**: `token`

Road cycling.

Road cycling.

### `app.attrails.route#touring`

**Type**: `token`

Multi-day touring / bikepacking.

Multi-day touring / bikepacking.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "commute": {
      "description": "Utility / commuting.",
      "type": "token"
    },
    "cyclingDetails": {
      "description": "Cycling-specific attributes of a route.",
      "properties": {
        "discipline": {
          "knownValues": [
            "app.attrails.route#road",
            "app.attrails.route#gravelBike",
            "app.attrails.route#mtb",
            "app.attrails.route#touring",
            "app.attrails.route#commute"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "gravelBike": {
      "description": "Gravel / adventure cycling.",
      "type": "token"
    },
    "main": {
      "description": "A cycling, running, hiking, walking, etc. route shared by a user. The associated track file is stored as a blob.",
      "key": "tid",
      "record": {
        "properties": {
          "activity": {
            "description": "The activity this route is intended for. Open enum; unknown values are allowed.",
            "knownValues": [
              "app.attrails.defs#cycling",
              "app.attrails.defs#running",
              "app.attrails.defs#hiking",
              "app.attrails.defs#walking",
              "app.attrails.defs#other"
            ],
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Description of the route, as CommonMark markdown. Clients must not render raw HTML.",
            "maxGraphemes": 3000,
            "maxLength": 30000,
            "type": "string"
          },
          "details": {
            "description": "Activity-specific attributes. Open union: new activity detail types can be added later without breaking existing clients.",
            "refs": [
              "app.attrails.route#cyclingDetails"
            ],
            "type": "union"
          },
          "difficulty": {
            "description": "Author's subjective difficulty for the stated activity.",
            "knownValues": [
              "app.attrails.defs#easy",
              "app.attrails.defs#moderate",
              "app.attrails.defs#hard",
              "app.attrails.defs#extreme"
            ],
            "type": "string"
          },
          "images": {
            "items": {
              "ref": "app.attrails.defs#image",
              "type": "ref"
            },
            "maxLength": 10,
            "type": "array"
          },
          "labels": {
            "description": "Self-label values for this route, e.g. to flag sensitive photos.",
            "refs": [
              "com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "langs": {
            "description": "Languages of this record's text (name, description, tags, image alt text), as BCP-47 tags. If absent, consumers should assume English ('en').",
            "items": {
              "format": "language",
              "type": "string"
            },
            "maxLength": 3,
            "type": "array"
          },
          "name": {
            "description": "Name of the route.",
            "maxGraphemes": 100,
            "maxLength": 1000,
            "minLength": 1,
            "type": "string"
          },
          "surface": {
            "description": "Predominant surface. Activity-neutral.",
            "knownValues": [
              "app.attrails.defs#paved",
              "app.attrails.defs#gravel",
              "app.attrails.defs#trail",
              "app.attrails.defs#mixed"
            ],
            "type": "string"
          },
          "tags": {
            "description": "Free-form tags, stored without a leading '#'.",
            "items": {
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "maxLength": 20,
            "type": "array"
          },
          "track": {
            "accept": [
              "application/gpx+xml",
              "application/xml",
              "text/xml"
            ],
            "description": "The route's track, commonly as a GPX file. Subject to max size limitations imposed by the user's PDS, so large routes might need to be simplified or compressed to fit.",
            "maxSize": 976563,
            "type": "blob"
          }
        },
        "required": [
          "name",
          "activity",
          "track",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "mtb": {
      "description": "Mountain biking.",
      "type": "token"
    },
    "road": {
      "description": "Road cycling.",
      "type": "token"
    },
    "touring": {
      "description": "Multi-day touring / bikepacking.",
      "type": "token"
    }
  },
  "id": "app.attrails.route",
  "lexicon": 1
}
```
