# org.atgrp.mod.defs

Shared definitions

Shared definitions in the Atmosphere Groups standard, as published on the network. The page: https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-defs/

- Published at: at://did:plc:4pt2cnpyvfgn5b7uxwn2shwv/com.atproto.lexicon.schema/org.atgrp.mod.defs
- In the spec: https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-defs/, the same schema

## The schema as published

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