# work.lexical.collection

> Published by [lexical.work](https://lexicon.garden/identity/did:plc:6acm263n23glqje6xrd2mgbt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:6acm263n23glqje6xrd2mgbt/work.lexical.collection)
- [Documentation](https://lexicon.garden/lexicon/did:plc:6acm263n23glqje6xrd2mgbt/work.lexical.collection/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:6acm263n23glqje6xrd2mgbt/work.lexical.collection/examples)

## Definitions

### `work.lexical.collection`

**Type**: `record`

A named, optionally ranked collection of works.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The name of the collection. |
| `tags` | `array` | No | Optional tags for the collection. |
| `facets` | `array` | No | Facets for rich text in the description. Clients must accept but may ignore any or all facets. |
| `ranked` | `boolean` | No | If true, item position values within the collection are meaningful. |
| `listType` | `string` | No | Optional category for the collection. Known values are non-exhaustive; clients must accept but may ignore unknown types. |
| `description` | `string` | No | An optional description of the collection. |

## Raw Schema

```json
{
  "id": "work.lexical.collection",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "required": true,
            "maxLength": 256,
            "description": "The name of the collection.",
            "maxGraphemes": 1024
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": false,
              "maxLength": 64,
              "maxGraphemes": 256
            },
            "maxLength": 16,
            "description": "Optional tags for the collection."
          },
          "facets": {
            "type": "array",
            "items": {
              "ref": "social.lexical.richtext.facet",
              "type": "ref",
              "nullable": false
            },
            "nullable": false,
            "required": false,
            "description": "Facets for rich text in the description. Clients must accept but may ignore any or all facets."
          },
          "ranked": {
            "type": "boolean",
            "description": "If true, item position values within the collection are meaningful."
          },
          "listType": {
            "type": "string",
            "maxLength": 64,
            "description": "Optional category for the collection. Known values are non-exhaustive; clients must accept but may ignore unknown types.",
            "knownValues": [
              "watchlist",
              "watched",
              "favorites",
              "list"
            ],
            "maxGraphemes": 256
          },
          "description": {
            "type": "string",
            "maxLength": 2048,
            "description": "An optional description of the collection.",
            "maxGraphemes": 8192
          }
        }
      },
      "description": "A named, optionally ranked collection of works."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
