# computer.localnetwork.directory.defs

> Views served by the Local Network directory, the HappyView AppView that indexes published projects, their managers' DJ records, press kits and shows, and follows.

- Kind: defs
- Authority: directory.localnetwork.computer
- Lexicon: 1
- Published by [localnetwork.computer](https://lexicon.garden/identity/did:plc:d42l64gsczg6qh2vo243xv5l), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.defs/analytics)

## #artistCredit (`computer.localnetwork.directory.defs#artistCredit`)

Type: object

### Properties

- `mbid` (string): Their MusicBrainz artist ID, as a bare lowercase UUID.
  - Constraints: maxLength: 36
- `name` (string, required)
  - Constraints: maxLength: 3000

## #djView (`computer.localnetwork.directory.defs#djView`)

Type: object

A DJ and the active projects they manage.

### Properties

- `did` (string · did, required)
- `projects` (array, required)
  - `items` (ref)
    - Reference: `#projectLink`

## #facet (`computer.localnetwork.directory.defs#facet`)

Type: object

### Properties

- `count` (integer, required)
  - Constraints: minimum: 0
- `value` (string, required)
  - Constraints: maxLength: 48

## #match (`computer.localnetwork.directory.defs#match`)

Type: object

How well a project fits a show.

### Properties

- `breakdown` (ref, required)
  - Reference: `#matchBreakdown`
- `inRange` (boolean, required): False when the project is farther than the search radius and doesn't travel that far.
- `project` (ref, required)
  - Reference: `#projectView`
- `reasons` (array, required)
  - `items` (ref)
    - Reference: `#matchNote`
- `score` (integer, required): Weighted fit across every factor.
  - Constraints: minimum: 0, maximum: 100
- `warnings` (array, required)
  - `items` (ref)
    - Reference: `#matchNote`

## #matchBreakdown (`computer.localnetwork.directory.defs#matchBreakdown`)

Type: object

Each factor's fit before weighting. Weights: genre 40, distance 25, budget 15, capacity 8, setType 7, format 5.

### Properties

- `budget` (integer, required)
  - Constraints: minimum: 0, maximum: 100
- `capacity` (integer, required)
  - Constraints: minimum: 0, maximum: 100
- `distance` (integer, required)
  - Constraints: minimum: 0, maximum: 100
- `format` (integer, required)
  - Constraints: minimum: 0, maximum: 100
- `genre` (integer, required)
  - Constraints: minimum: 0, maximum: 100
- `setType` (integer, required)
  - Constraints: minimum: 0, maximum: 100

## #matchNote (`computer.localnetwork.directory.defs#matchNote`)

Type: object

One reason a project fits a show, or one concern. Clients turn the code into text.

### Properties

- `code` (string, required)
  - Constraints: maxLength: 32, knownValues: plays | adjacentSound | noGenreOverlap | locationUnknown | local | nearby | travels | outOfRange | fitsBudget | aboveBudget | wellAboveBudget | fitsRoom | biggerRoom | smallerRoom | setType | formats | differentSetup
- `distanceM` (integer): For nearby, travels, and outOfRange.
  - Constraints: minimum: 0
- `formats` (array): For formats: the formats both sides share.
  - `items` (string)
    - Constraints: maxLength: 32
- `genres` (array): For plays: the project's closely matching genres.
  - `items` (string)
    - Constraints: maxLength: 48
- `setType` (string): For setType.
  - Constraints: maxLength: 32

## #performerView (`computer.localnetwork.directory.defs#performerView`)

Type: object

A performer the directory found: a published project, or a listed DJ's profile. Exactly one of the two is set.

### Properties

- `profile` (ref)
  - Reference: `#profileView`
- `project` (ref)
  - Reference: `#projectView`

## #place (`computer.localnetwork.directory.defs#place`)

Type: object

### Properties

- `city` (string, required)
  - Constraints: maxLength: 1000
- `count` (integer, required)
  - Constraints: minimum: 0
- `country` (string, required)
  - Constraints: maxLength: 10

## #play (`computer.localnetwork.directory.defs#play`)

Type: object

One time a DJ played a track.

### Properties

- `did` (string · did, required): The DJ: the set's author.
- `set` (ref, required)
  - Reference: `#setView`
- `startSeconds` (integer): When it starts in the set, when the set knows.
  - Constraints: minimum: 0

## #profileView (`computer.localnetwork.directory.defs#profileView`)

Type: object

A DJ's profile that staff list in the directory, as the directory indexed it.

### Properties

- `cid` (string · cid, required)
- `distanceM` (integer): Meters from the searched location, when the search had one and the profile has coordinates.
  - Constraints: minimum: 0
- `genres` (array, required): The genres it was searched by: its performer section's, or when that names none, the ones the DJ plays most by their computer.localnetwork.dj.profile.
  - `items` (string)
    - Constraints: maxLength: 48
- `listing` (string · at-uri, required): The root's computer.localnetwork.listing.profile that lists it.
- `record` (unknown, required): The computer.localnetwork.profile record.
- `uri` (string · at-uri, required)

## #projectLink (`computer.localnetwork.directory.defs#projectLink`)

Type: object

### Properties

- `name` (string, required)
  - Constraints: maxLength: 640
- `slug` (string, required)
  - Constraints: maxLength: 64

## #projectView (`computer.localnetwork.directory.defs#projectView`)

Type: object

A published project as the directory indexed it.

### Properties

- `cid` (string · cid, required)
- `distanceM` (integer): Meters from the searched location, when the search had one and the project has coordinates.
  - Constraints: minimum: 0
- `record` (unknown, required): The computer.localnetwork.project record.
- `uri` (string · at-uri, required)

## #recordView (`computer.localnetwork.directory.defs#recordView`)

Type: object

A record as the directory indexed it. Its collection's record script can leave fields out and add its own.

### Properties

- `cid` (string · cid, required)
- `uri` (string · at-uri, required)
- `value` (unknown, required)

## #setView (`computer.localnetwork.directory.defs#setView`)

Type: object

A computer.localnetwork.dj.set by one of a project's managers, as the directory keeps it: what it was and where, without its tracks.

### Properties

- `cid` (string · cid, required): The set's current version.
- `date` (string, required): The day it was played, as YYYY-MM-DD.
  - Constraints: minLength: 10, maxLength: 10
- `kind` (string)
  - Constraints: maxLength: 640
- `location` (ref)
  - Reference: `community.lexicon.location.address`
- `title` (string)
  - Constraints: maxLength: 1000
- `trackCount` (integer, required)
  - Constraints: minimum: 0
- `uri` (string · at-uri, required)
- `venue` (string)
  - Constraints: maxLength: 1000

## #showView (`computer.localnetwork.directory.defs#showView`)

Type: object

A show as the directory keeps it, with the project it's for.

### Properties

- `cid` (string · cid, required)
- `distanceM` (integer): Meters from the searched location, when the search had one and the show has coordinates.
  - Constraints: minimum: 0
- `project` (ref, required)
  - Reference: `#projectView`
- `record` (unknown, required): The computer.localnetwork.show record.
- `uri` (string · at-uri, required)

## #supportedArtist (`computer.localnetwork.directory.defs#supportedArtist`)

Type: object

An artist whose tracks DJs played. An artist is their MusicBrainz ID, else their name in any case; a name some sets give one MBID counts as that MBID's. A DJ is an act: a project whose managers are all counted as one, and only while it's active.

### Properties

- `djCount` (integer, required): How many DJs that is.
  - Constraints: minimum: 0
- `mbid` (string): Their MusicBrainz artist ID, as a bare lowercase UUID.
  - Constraints: maxLength: 36
- `name` (string, required): The name sets credit them as most.
  - Constraints: maxLength: 3000
- `supports` (integer, required): Each DJ's distinct tracks of theirs, at most 5 per DJ, summed.
  - Constraints: minimum: 0

## #supportedTrack (`computer.localnetwork.directory.defs#supportedTrack`)

Type: object

A track DJs played, as its latest play names it. A track is its recording's MusicBrainz ID, else its ISRC, else its credit and title in any case; a track without an ID counts as the one other plays give it, when only one fits.

### Properties

- `artist` (string): The artist credit, as one line.
  - Constraints: maxLength: 3000
- `artists` (array, required): The artists it credits, one by one, or its whole credit as one.
  - `items` (ref)
    - Reference: `#artistCredit`
- `id` (string, required): Opaque: tells tracks apart within one answer and between answers. Clients shouldn't read meaning into it.
  - Constraints: maxLength: 6006
- `isrc` (string)
  - Constraints: maxLength: 12
- `recordingMbId` (string): Its MusicBrainz recording ID, as a bare lowercase UUID.
  - Constraints: maxLength: 36
- `supports` (integer, required): How many DJs played it.
  - Constraints: minimum: 0
- `title` (string, required)
  - Constraints: maxLength: 3000

## #trackPlays (`computer.localnetwork.directory.defs#trackPlays`)

Type: object

A track and every time it was played.

### Properties

- `plays` (array, required)
  - `items` (ref)
    - Reference: `#play`
- `track` (ref, required)
  - Reference: `#supportedTrack`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "artistCredit": {
      "properties": {
        "mbid": {
          "description": "Their MusicBrainz artist ID, as a bare lowercase UUID.",
          "maxLength": 36,
          "type": "string"
        },
        "name": {
          "maxLength": 3000,
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "djView": {
      "description": "A DJ and the active projects they manage.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "projects": {
          "items": {
            "ref": "#projectLink",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "did",
        "projects"
      ],
      "type": "object"
    },
    "facet": {
      "properties": {
        "count": {
          "minimum": 0,
          "type": "integer"
        },
        "value": {
          "maxLength": 48,
          "type": "string"
        }
      },
      "required": [
        "value",
        "count"
      ],
      "type": "object"
    },
    "match": {
      "description": "How well a project fits a show.",
      "properties": {
        "breakdown": {
          "ref": "#matchBreakdown",
          "type": "ref"
        },
        "inRange": {
          "description": "False when the project is farther than the search radius and doesn't travel that far.",
          "type": "boolean"
        },
        "project": {
          "ref": "#projectView",
          "type": "ref"
        },
        "reasons": {
          "items": {
            "ref": "#matchNote",
            "type": "ref"
          },
          "type": "array"
        },
        "score": {
          "description": "Weighted fit across every factor.",
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "warnings": {
          "items": {
            "ref": "#matchNote",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "project",
        "score",
        "inRange",
        "breakdown",
        "reasons",
        "warnings"
      ],
      "type": "object"
    },
    "matchBreakdown": {
      "description": "Each factor's fit before weighting. Weights: genre 40, distance 25, budget 15, capacity 8, setType 7, format 5.",
      "properties": {
        "budget": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "capacity": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "distance": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "format": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "genre": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "setType": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "genre",
        "distance",
        "budget",
        "capacity",
        "setType",
        "format"
      ],
      "type": "object"
    },
    "matchNote": {
      "description": "One reason a project fits a show, or one concern. Clients turn the code into text.",
      "properties": {
        "code": {
          "knownValues": [
            "plays",
            "adjacentSound",
            "noGenreOverlap",
            "locationUnknown",
            "local",
            "nearby",
            "travels",
            "outOfRange",
            "fitsBudget",
            "aboveBudget",
            "wellAboveBudget",
            "fitsRoom",
            "biggerRoom",
            "smallerRoom",
            "setType",
            "formats",
            "differentSetup"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "distanceM": {
          "description": "For nearby, travels, and outOfRange.",
          "minimum": 0,
          "type": "integer"
        },
        "formats": {
          "description": "For formats: the formats both sides share.",
          "items": {
            "maxLength": 32,
            "type": "string"
          },
          "type": "array"
        },
        "genres": {
          "description": "For plays: the project's closely matching genres.",
          "items": {
            "maxLength": 48,
            "type": "string"
          },
          "type": "array"
        },
        "setType": {
          "description": "For setType.",
          "maxLength": 32,
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    },
    "performerView": {
      "description": "A performer the directory found: a published project, or a listed DJ's profile. Exactly one of the two is set.",
      "properties": {
        "profile": {
          "ref": "#profileView",
          "type": "ref"
        },
        "project": {
          "ref": "#projectView",
          "type": "ref"
        }
      },
      "type": "object"
    },
    "place": {
      "properties": {
        "city": {
          "maxLength": 1000,
          "type": "string"
        },
        "count": {
          "minimum": 0,
          "type": "integer"
        },
        "country": {
          "maxLength": 10,
          "type": "string"
        }
      },
      "required": [
        "city",
        "country",
        "count"
      ],
      "type": "object"
    },
    "play": {
      "description": "One time a DJ played a track.",
      "properties": {
        "did": {
          "description": "The DJ: the set's author.",
          "format": "did",
          "type": "string"
        },
        "set": {
          "ref": "#setView",
          "type": "ref"
        },
        "startSeconds": {
          "description": "When it starts in the set, when the set knows.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "did",
        "set"
      ],
      "type": "object"
    },
    "profileView": {
      "description": "A DJ's profile that staff list in the directory, as the directory indexed it.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "distanceM": {
          "description": "Meters from the searched location, when the search had one and the profile has coordinates.",
          "minimum": 0,
          "type": "integer"
        },
        "genres": {
          "description": "The genres it was searched by: its performer section's, or when that names none, the ones the DJ plays most by their computer.localnetwork.dj.profile.",
          "items": {
            "maxLength": 48,
            "type": "string"
          },
          "type": "array"
        },
        "listing": {
          "description": "The root's computer.localnetwork.listing.profile that lists it.",
          "format": "at-uri",
          "type": "string"
        },
        "record": {
          "description": "The computer.localnetwork.profile record.",
          "type": "unknown"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "record",
        "listing",
        "genres"
      ],
      "type": "object"
    },
    "projectLink": {
      "properties": {
        "name": {
          "maxLength": 640,
          "type": "string"
        },
        "slug": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "slug",
        "name"
      ],
      "type": "object"
    },
    "projectView": {
      "description": "A published project as the directory indexed it.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "distanceM": {
          "description": "Meters from the searched location, when the search had one and the project has coordinates.",
          "minimum": 0,
          "type": "integer"
        },
        "record": {
          "description": "The computer.localnetwork.project record.",
          "type": "unknown"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "record"
      ],
      "type": "object"
    },
    "recordView": {
      "description": "A record as the directory indexed it. Its collection's record script can leave fields out and add its own.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "value": {
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "cid",
        "value"
      ],
      "type": "object"
    },
    "setView": {
      "description": "A computer.localnetwork.dj.set by one of a project's managers, as the directory keeps it: what it was and where, without its tracks.",
      "properties": {
        "cid": {
          "description": "The set's current version.",
          "format": "cid",
          "type": "string"
        },
        "date": {
          "description": "The day it was played, as YYYY-MM-DD.",
          "maxLength": 10,
          "minLength": 10,
          "type": "string"
        },
        "kind": {
          "maxLength": 640,
          "type": "string"
        },
        "location": {
          "ref": "community.lexicon.location.address",
          "type": "ref"
        },
        "title": {
          "maxLength": 1000,
          "type": "string"
        },
        "trackCount": {
          "minimum": 0,
          "type": "integer"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "venue": {
          "maxLength": 1000,
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "date",
        "trackCount"
      ],
      "type": "object"
    },
    "showView": {
      "description": "A show as the directory keeps it, with the project it's for.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "distanceM": {
          "description": "Meters from the searched location, when the search had one and the show has coordinates.",
          "minimum": 0,
          "type": "integer"
        },
        "project": {
          "ref": "#projectView",
          "type": "ref"
        },
        "record": {
          "description": "The computer.localnetwork.show record.",
          "type": "unknown"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "record",
        "project"
      ],
      "type": "object"
    },
    "supportedArtist": {
      "description": "An artist whose tracks DJs played. An artist is their MusicBrainz ID, else their name in any case; a name some sets give one MBID counts as that MBID's. A DJ is an act: a project whose managers are all counted as one, and only while it's active.",
      "properties": {
        "djCount": {
          "description": "How many DJs that is.",
          "minimum": 0,
          "type": "integer"
        },
        "mbid": {
          "description": "Their MusicBrainz artist ID, as a bare lowercase UUID.",
          "maxLength": 36,
          "type": "string"
        },
        "name": {
          "description": "The name sets credit them as most.",
          "maxLength": 3000,
          "type": "string"
        },
        "supports": {
          "description": "Each DJ's distinct tracks of theirs, at most 5 per DJ, summed.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "name",
        "supports",
        "djCount"
      ],
      "type": "object"
    },
    "supportedTrack": {
      "description": "A track DJs played, as its latest play names it. A track is its recording's MusicBrainz ID, else its ISRC, else its credit and title in any case; a track without an ID counts as the one other plays give it, when only one fits.",
      "properties": {
        "artist": {
          "description": "The artist credit, as one line.",
          "maxLength": 3000,
          "type": "string"
        },
        "artists": {
          "description": "The artists it credits, one by one, or its whole credit as one.",
          "items": {
            "ref": "#artistCredit",
            "type": "ref"
          },
          "type": "array"
        },
        "id": {
          "description": "Opaque: tells tracks apart within one answer and between answers. Clients shouldn't read meaning into it.",
          "maxLength": 6006,
          "type": "string"
        },
        "isrc": {
          "maxLength": 12,
          "type": "string"
        },
        "recordingMbId": {
          "description": "Its MusicBrainz recording ID, as a bare lowercase UUID.",
          "maxLength": 36,
          "type": "string"
        },
        "supports": {
          "description": "How many DJs played it.",
          "minimum": 0,
          "type": "integer"
        },
        "title": {
          "maxLength": 3000,
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "artists",
        "supports"
      ],
      "type": "object"
    },
    "trackPlays": {
      "description": "A track and every time it was played.",
      "properties": {
        "plays": {
          "items": {
            "ref": "#play",
            "type": "ref"
          },
          "type": "array"
        },
        "track": {
          "ref": "#supportedTrack",
          "type": "ref"
        }
      },
      "required": [
        "track",
        "plays"
      ],
      "type": "object"
    }
  },
  "description": "Views served by the Local Network directory, the HappyView AppView that indexes published projects, their managers' DJ records, press kits and shows, and follows.",
  "id": "computer.localnetwork.directory.defs",
  "lexicon": 1
}
```
