# so.sprk.labeler.defs

> Published by [sprk.so](https://lexicon.garden/identity/did:plc:cveom2iroj3mt747sd4qqnr2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.labeler.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.labeler.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.labeler.defs/examples)

## Definitions

### `so.sprk.labeler.defs#labelerView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `labels` | `array` | No |  |
| `viewer` | `ref` → `#labelerViewerState` | No |  |
| `creator` | `ref` → `so.sprk.actor.defs#profileView` | Yes |  |
| `indexedAt` | `string` (datetime) | Yes |  |
| `likeCount` | `integer` | No |  |

### `so.sprk.labeler.defs#labelerPolicies`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `labelValues` | `array` | Yes | The label values which this labeler publishes. May include global or custom labels. |
| `labelValueDefinitions` | `array` | No | Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. |

### `so.sprk.labeler.defs#labelerViewerState`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `like` | `string` (at-uri) | No |  |

### `so.sprk.labeler.defs#labelerViewDetailed`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `labels` | `array` | No |  |
| `viewer` | `ref` → `#labelerViewerState` | No |  |
| `creator` | `ref` → `so.sprk.actor.defs#profileView` | Yes |  |
| `policies` | `ref` → `so.sprk.labeler.defs#labelerPolicies` | Yes |  |
| `indexedAt` | `string` (datetime) | Yes |  |
| `likeCount` | `integer` | No |  |
| `reasonTypes` | `array` | No | The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. |
| `subjectTypes` | `array` | No | The set of subject types (account, record, etc) this service accepts reports on. |
| `subjectCollections` | `array` | No | Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. |

## Raw Schema

```json
{
  "id": "so.sprk.labeler.defs",
  "defs": {
    "labelerView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "creator",
        "indexedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "labels": {
          "type": "array",
          "items": {
            "ref": "com.atproto.label.defs#label",
            "type": "ref"
          }
        },
        "viewer": {
          "ref": "#labelerViewerState",
          "type": "ref"
        },
        "creator": {
          "ref": "so.sprk.actor.defs#profileView",
          "type": "ref"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        },
        "likeCount": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "labelerPolicies": {
      "type": "object",
      "required": [
        "labelValues"
      ],
      "properties": {
        "labelValues": {
          "type": "array",
          "items": {
            "ref": "com.atproto.label.defs#labelValue",
            "type": "ref"
          },
          "description": "The label values which this labeler publishes. May include global or custom labels."
        },
        "labelValueDefinitions": {
          "type": "array",
          "items": {
            "ref": "com.atproto.label.defs#labelValueDefinition",
            "type": "ref"
          },
          "description": "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler."
        }
      }
    },
    "labelerViewerState": {
      "type": "object",
      "properties": {
        "like": {
          "type": "string",
          "format": "at-uri"
        }
      }
    },
    "labelerViewDetailed": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "creator",
        "policies",
        "indexedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "labels": {
          "type": "array",
          "items": {
            "ref": "com.atproto.label.defs#label",
            "type": "ref"
          }
        },
        "viewer": {
          "ref": "#labelerViewerState",
          "type": "ref"
        },
        "creator": {
          "ref": "so.sprk.actor.defs#profileView",
          "type": "ref"
        },
        "policies": {
          "ref": "so.sprk.labeler.defs#labelerPolicies",
          "type": "ref"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        },
        "likeCount": {
          "type": "integer",
          "minimum": 0
        },
        "reasonTypes": {
          "type": "array",
          "items": {
            "ref": "com.atproto.moderation.defs#reasonType",
            "type": "ref"
          },
          "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed."
        },
        "subjectTypes": {
          "type": "array",
          "items": {
            "ref": "com.atproto.moderation.defs#subjectType",
            "type": "ref"
          },
          "description": "The set of subject types (account, record, etc) this service accepts reports on."
        },
        "subjectCollections": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "nsid"
          },
          "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
