# org.atgrp.mod.defs

- Kind: defs
- Authority: mod.atgrp.org
- Lexicon: 1
- Published by [lex.atgrp.org](https://lexicon.garden/identity/did:plc:4pt2cnpyvfgn5b7uxwn2shwv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.mod.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.mod.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.mod.defs/analytics)

## #appealEvent (`org.atgrp.mod.defs#appealEvent`)

Type: object

An appeal was filed.

### Properties

- `note` (string)
  - Constraints: maxLength: 20000, maxGraphemes: 2000

## #ejectEvent (`org.atgrp.mod.defs#ejectEvent`)

Type: object

The subject was ejected from the group.

### Properties


## #eventView (`org.atgrp.mod.defs#eventView`)

Type: object

An event in a subject's moderation history.

### Properties

- `cid` (string · cid): If set, a specific version of the record.
- `createdAt` (string · datetime, required)
- `createdBy` (string · did): May be withheld to protect reporters and moderators.
- `event` (union, required)
  - One of: `#reportEvent`, `#appealEvent`, `#statusEvent`, `#tagEvent`, `#labelEvent`, `#ejectEvent`
- `eventId` (string, required)
  - Constraints: minLength: 1, maxLength: 512
- `subject` (string · uri, required): An account DID or record URI.

## #labelEvent (`org.atgrp.mod.defs#labelEvent`)

Type: object

A label record was written or deleted.

### Properties

- `deleted` (boolean)
  - Constraints: default: false
- `uri` (string · at-uri, required): The label record.
- `val` (string, required)
  - Constraints: minLength: 1, maxLength: 128

## #reasonMisleading (`org.atgrp.mod.defs#reasonMisleading`)

Type: token

Misleading content, impersonation, or scams.

## #reasonNsfw (`org.atgrp.mod.defs#reasonNsfw`)

Type: token

Unwanted or unlabeled NSFW content.

## #reasonOther (`org.atgrp.mod.defs#reasonOther`)

Type: token

Anything else.

## #reasonRude (`org.atgrp.mod.defs#reasonRude`)

Type: token

Rude, harassing, or hateful content.

## #reasonSpam (`org.atgrp.mod.defs#reasonSpam`)

Type: token

Spam or unwanted promotion.

## #reasonType (`org.atgrp.mod.defs#reasonType`)

Type: string

Constraints: knownValues: org.atgrp.mod.defs#reasonSpam | org.atgrp.mod.defs#reasonViolation | org.atgrp.mod.defs#reasonMisleading | org.atgrp.mod.defs#reasonNsfw | org.atgrp.mod.defs#reasonRude | org.atgrp.mod.defs#reasonOther

## #reasonViolation (`org.atgrp.mod.defs#reasonViolation`)

Type: token

Breaks a group rule.

## #reportEvent (`org.atgrp.mod.defs#reportEvent`)

Type: object

A report was filed.

### Properties

- `reason` (string)
  - Constraints: maxLength: 20000, maxGraphemes: 2000
- `reasonType` (ref, required)
  - Reference: `#reasonType`
- `rule` (string · at-uri)

## #statusEvent (`org.atgrp.mod.defs#statusEvent`)

Type: object

A moderator changed the subject's status or added a note.

### Properties

- `note` (string): Only visible to moderators.
  - Constraints: maxLength: 20000, maxGraphemes: 2000
- `status` (string, required): The status after this event.
  - Constraints: enum: open | resolved

## #subjectView (`org.atgrp.mod.defs#subjectView`)

Type: object

A subject in the moderation queue.

### Properties

- `cid` (string · cid): If set, a specific version of the record.
- `createdAt` (string · datetime, required)
- `reportCount` (integer)
  - Constraints: minimum: 0
- `status` (string, required)
  - Constraints: enum: open | resolved
- `subject` (string · uri, required): An account DID or record URI.
- `tags` (array): Free-form moderator tags in label value syntax ([a-z-]+).
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 128
- `updatedAt` (string · datetime, required)

## #tagEvent (`org.atgrp.mod.defs#tagEvent`)

Type: object

A moderator added or removed tags.

### Properties

- `add` (array)
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 128
- `remove` (array)
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 128

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "appealEvent": {
      "description": "An appeal was filed.",
      "properties": {
        "note": {
          "maxGraphemes": 2000,
          "maxLength": 20000,
          "type": "string"
        }
      },
      "type": "object"
    },
    "ejectEvent": {
      "description": "The subject was ejected from the group.",
      "properties": {},
      "type": "object"
    },
    "eventView": {
      "description": "An event in a subject's moderation history.",
      "properties": {
        "cid": {
          "description": "If set, a specific version of the record.",
          "format": "cid",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "createdBy": {
          "description": "May be withheld to protect reporters and moderators.",
          "format": "did",
          "type": "string"
        },
        "event": {
          "refs": [
            "#reportEvent",
            "#appealEvent",
            "#statusEvent",
            "#tagEvent",
            "#labelEvent",
            "#ejectEvent"
          ],
          "type": "union"
        },
        "eventId": {
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        "subject": {
          "description": "An account DID or record URI.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "eventId",
        "createdAt",
        "subject",
        "event"
      ],
      "type": "object"
    },
    "labelEvent": {
      "description": "A label record was written or deleted.",
      "properties": {
        "deleted": {
          "default": false,
          "type": "boolean"
        },
        "uri": {
          "description": "The label record.",
          "format": "at-uri",
          "type": "string"
        },
        "val": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "uri",
        "val"
      ],
      "type": "object"
    },
    "reasonMisleading": {
      "description": "Misleading content, impersonation, or scams.",
      "type": "token"
    },
    "reasonNsfw": {
      "description": "Unwanted or unlabeled NSFW content.",
      "type": "token"
    },
    "reasonOther": {
      "description": "Anything else.",
      "type": "token"
    },
    "reasonRude": {
      "description": "Rude, harassing, or hateful content.",
      "type": "token"
    },
    "reasonSpam": {
      "description": "Spam or unwanted promotion.",
      "type": "token"
    },
    "reasonType": {
      "knownValues": [
        "org.atgrp.mod.defs#reasonSpam",
        "org.atgrp.mod.defs#reasonViolation",
        "org.atgrp.mod.defs#reasonMisleading",
        "org.atgrp.mod.defs#reasonNsfw",
        "org.atgrp.mod.defs#reasonRude",
        "org.atgrp.mod.defs#reasonOther"
      ],
      "type": "string"
    },
    "reasonViolation": {
      "description": "Breaks a group rule.",
      "type": "token"
    },
    "reportEvent": {
      "description": "A report was filed.",
      "properties": {
        "reason": {
          "maxGraphemes": 2000,
          "maxLength": 20000,
          "type": "string"
        },
        "reasonType": {
          "ref": "#reasonType",
          "type": "ref"
        },
        "rule": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "reasonType"
      ],
      "type": "object"
    },
    "statusEvent": {
      "description": "A moderator changed the subject's status or added a note.",
      "properties": {
        "note": {
          "description": "Only visible to moderators.",
          "maxGraphemes": 2000,
          "maxLength": 20000,
          "type": "string"
        },
        "status": {
          "description": "The status after this event.",
          "enum": [
            "open",
            "resolved"
          ],
          "type": "string"
        }
      },
      "required": [
        "status"
      ],
      "type": "object"
    },
    "subjectView": {
      "description": "A subject in the moderation queue.",
      "properties": {
        "cid": {
          "description": "If set, a specific version of the record.",
          "format": "cid",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "reportCount": {
          "minimum": 0,
          "type": "integer"
        },
        "status": {
          "enum": [
            "open",
            "resolved"
          ],
          "type": "string"
        },
        "subject": {
          "description": "An account DID or record URI.",
          "format": "uri",
          "type": "string"
        },
        "tags": {
          "description": "Free-form moderator tags in label value syntax ([a-z-]+).",
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "subject",
        "status",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    },
    "tagEvent": {
      "description": "A moderator added or removed tags.",
      "properties": {
        "add": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        },
        "remove": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "id": "org.atgrp.mod.defs",
  "lexicon": 1
}
```
