{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://castdeck.studio/developers/schemas/projected-event.schema.json",
  "title": "ProjectedEvent",
  "type": "object",
  "required": [
    "kind",
    "platform",
    "id",
    "timestamp"
  ],
  "properties": {
    "kind": {
      "enum": [
        "comment",
        "gift",
        "membership",
        "follow",
        "stats"
      ]
    },
    "platform": {
      "enum": [
        "youtube",
        "twitch",
        "twitcasting",
        "kick",
        "nicolive",
        "whowatch"
      ]
    },
    "id": {
      "type": "string"
    },
    "timestamp": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "isMember": {
      "type": "boolean"
    },
    "isModerator": {
      "type": "boolean"
    },
    "isOwner": {
      "type": "boolean"
    },
    "anonymous": {
      "type": "boolean"
    },
    "tier": {
      "type": "string"
    },
    "gift": {
      "type": "object"
    },
    "membershipEvent": {
      "type": "string"
    },
    "userId": {
      "type": "string",
      "description": "rich level only"
    },
    "avatarUrl": {
      "type": "string",
      "description": "rich level only"
    },
    "memberMonths": {
      "type": "number",
      "description": "rich level only"
    },
    "stats": {
      "type": "object"
    }
  },
  "additionalProperties": true
}
