# win.tomo-x.rogaining.defs

- Kind: defs
- Authority: rogaining.tomo-x.win
- Lexicon: 1
- Published by [tomo-x.win](https://lexicon.garden/identity/did:plc:qcwvyds5tixmcwkwrg3hxgxd), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:qcwvyds5tixmcwkwrg3hxgxd/win.tomo-x.rogaining.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:qcwvyds5tixmcwkwrg3hxgxd/win.tomo-x.rogaining.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:qcwvyds5tixmcwkwrg3hxgxd/win.tomo-x.rogaining.defs/analytics)

## #checkpointView (`win.tomo-x.rogaining.defs#checkpointView`)

Type: object

### Properties

- `cid` (string · cid, required)
- `imageUrl` (string · uri): URL of the checkpoint image.
- `indexedAt` (string · datetime, required)
- `internalImageUrls` (array): URLs of the internal images. Only returned to the event's author.
  - Constraints: maxLength: 10
  - `items` (string · uri)
- `record` (unknown, required): The win.tomo-x.rogaining.checkpoint record.
- `uri` (string · at-uri, required)

## #eventView (`win.tomo-x.rogaining.defs#eventView`)

Type: object

### Properties

- `approver` (ref)
  - Reference: `app.bsky.actor.defs#profileViewBasic`
- `author` (ref, required)
  - Reference: `app.bsky.actor.defs#profileViewBasic`
- `checkpointCount` (integer)
  - Constraints: minimum: 0
- `cid` (string · cid, required)
- `imageUrl` (string · uri)
- `indexedAt` (string · datetime, required)
- `participantCount` (integer)
  - Constraints: minimum: 0
- `record` (unknown, required): The win.tomo-x.rogaining.event record.
- `teamCount` (integer)
  - Constraints: minimum: 0
- `uri` (string · at-uri, required)

## #location (`win.tomo-x.rogaining.defs#location`)

Type: object

Coordinates as decimal degrees encoded as strings (lexicon has no float type), e.g. "35.681236".

### Properties

- `latitude` (string, required)
  - Constraints: maxLength: 20
- `longitude` (string, required)
  - Constraints: maxLength: 20

## #rankingEntry (`win.tomo-x.rogaining.defs#rankingEntry`)

Type: object

### Properties

- `approvedCount` (integer, required): Number of distinct non-goal checkpoints with an approved submission.
  - Constraints: minimum: 0
- `rank` (integer, required)
  - Constraints: minimum: 1
- `team` (ref, required)
  - Reference: `win.tomo-x.rogaining.defs#teamView`
- `totalPoints` (integer, required): Sum of approved checkpoint points and the team's finish-time bonus.
  - Constraints: minimum: 0

## #submissionView (`win.tomo-x.rogaining.defs#submissionView`)

Type: object

### Properties

- `approvalUri` (string · at-uri): AT-URI of the approve record, if approved.
- `author` (ref, required)
  - Reference: `app.bsky.actor.defs#profileViewBasic`
- `cid` (string · cid, required)
- `distanceMeters` (integer): Distance between the submitted location and the checkpoint, for the approver's review.
  - Constraints: minimum: 0
- `indexedAt` (string · datetime, required)
- `photoUrl` (string · uri)
- `reason` (string): The reason of the approve or reject record that decided the status.
- `record` (unknown, required): The win.tomo-x.rogaining.submit record.
- `rejectionUri` (string · at-uri): AT-URI of the reject record, if rejected.
- `status` (string, required): Decided by one valid approve or reject record for the submission's current cid, made by the event's author or approver. The author's records take precedence over the approver's; among one account's records, the one with the newest createdAt wins. approved or rejected by that record, otherwise pending. Only approved submissions count for the ranking.
  - Constraints: knownValues: pending | approved | rejected
- `team` (string · at-uri, required): The team the author belongs to in this event.
- `uri` (string · at-uri, required)
- `withinEventPeriod` (boolean): Whether the submission's createdAt is between the event's startsAt and endsAt, for the approver's review.

## #teamView (`win.tomo-x.rogaining.defs#teamView`)

Type: object

### Properties

- `cid` (string · cid, required)
- `indexedAt` (string · datetime, required)
- `members` (array, required): Profiles of the team members.
  - `items` (ref)
    - Reference: `app.bsky.actor.defs#profileViewBasic`
- `record` (unknown, required): The win.tomo-x.rogaining.team record.
- `uri` (string · at-uri, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "checkpointView": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "imageUrl": {
          "description": "URL of the checkpoint image.",
          "format": "uri",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "internalImageUrls": {
          "description": "URLs of the internal images. Only returned to the event's author.",
          "items": {
            "format": "uri",
            "type": "string"
          },
          "maxLength": 10,
          "type": "array"
        },
        "record": {
          "description": "The win.tomo-x.rogaining.checkpoint record.",
          "type": "unknown"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "record",
        "indexedAt"
      ],
      "type": "object"
    },
    "eventView": {
      "properties": {
        "approver": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "author": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "checkpointCount": {
          "minimum": 0,
          "type": "integer"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "imageUrl": {
          "format": "uri",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "participantCount": {
          "minimum": 0,
          "type": "integer"
        },
        "record": {
          "description": "The win.tomo-x.rogaining.event record.",
          "type": "unknown"
        },
        "teamCount": {
          "minimum": 0,
          "type": "integer"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "indexedAt"
      ],
      "type": "object"
    },
    "location": {
      "description": "Coordinates as decimal degrees encoded as strings (lexicon has no float type), e.g. \"35.681236\".",
      "properties": {
        "latitude": {
          "maxLength": 20,
          "type": "string"
        },
        "longitude": {
          "maxLength": 20,
          "type": "string"
        }
      },
      "required": [
        "latitude",
        "longitude"
      ],
      "type": "object"
    },
    "rankingEntry": {
      "properties": {
        "approvedCount": {
          "description": "Number of distinct non-goal checkpoints with an approved submission.",
          "minimum": 0,
          "type": "integer"
        },
        "rank": {
          "minimum": 1,
          "type": "integer"
        },
        "team": {
          "ref": "win.tomo-x.rogaining.defs#teamView",
          "type": "ref"
        },
        "totalPoints": {
          "description": "Sum of approved checkpoint points and the team's finish-time bonus.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "team",
        "rank",
        "totalPoints",
        "approvedCount"
      ],
      "type": "object"
    },
    "submissionView": {
      "properties": {
        "approvalUri": {
          "description": "AT-URI of the approve record, if approved.",
          "format": "at-uri",
          "type": "string"
        },
        "author": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "distanceMeters": {
          "description": "Distance between the submitted location and the checkpoint, for the approver's review.",
          "minimum": 0,
          "type": "integer"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "photoUrl": {
          "format": "uri",
          "type": "string"
        },
        "reason": {
          "description": "The reason of the approve or reject record that decided the status.",
          "type": "string"
        },
        "record": {
          "description": "The win.tomo-x.rogaining.submit record.",
          "type": "unknown"
        },
        "rejectionUri": {
          "description": "AT-URI of the reject record, if rejected.",
          "format": "at-uri",
          "type": "string"
        },
        "status": {
          "description": "Decided by one valid approve or reject record for the submission's current cid, made by the event's author or approver. The author's records take precedence over the approver's; among one account's records, the one with the newest createdAt wins. approved or rejected by that record, otherwise pending. Only approved submissions count for the ranking.",
          "knownValues": [
            "pending",
            "approved",
            "rejected"
          ],
          "type": "string"
        },
        "team": {
          "description": "The team the author belongs to in this event.",
          "format": "at-uri",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "withinEventPeriod": {
          "description": "Whether the submission's createdAt is between the event's startsAt and endsAt, for the approver's review.",
          "type": "boolean"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "team",
        "record",
        "status",
        "indexedAt"
      ],
      "type": "object"
    },
    "teamView": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "members": {
          "description": "Profiles of the team members.",
          "items": {
            "ref": "app.bsky.actor.defs#profileViewBasic",
            "type": "ref"
          },
          "type": "array"
        },
        "record": {
          "description": "The win.tomo-x.rogaining.team record.",
          "type": "unknown"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "record",
        "members",
        "indexedAt"
      ],
      "type": "object"
    }
  },
  "id": "win.tomo-x.rogaining.defs",
  "lexicon": 1
}
```
