{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rumoro-dev/json-schema/rumoro-dev-person-schema.json",
  "title": "Person",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rumoro-dev-people-api-openapi.yml#/components/schemas/Person",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The person's id (aut_...), which is the id of their main account. An account merged into a person leads to that person."
    },
    "platform": {
      "type": "string",
      "enum": [
        "bluesky",
        "hackernews",
        "github",
        "stackoverflow",
        "devto",
        "reddit",
        "x",
        "youtube",
        "news",
        "linkedin",
        "tiktok",
        "instagram",
        "appstore",
        "googleplay",
        "trustpilot",
        "googlemaps",
        "rss"
      ],
      "description": "The main account's platform. See `accounts` for all of them."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name shown on their latest post. Null if the platform has none."
    },
    "handle": {
      "type": [
        "string",
        "null"
      ],
      "description": "The main account's handle, written the platform's way."
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Link to the main account's profile."
    },
    "avatarUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The account's id (aut_...). The main account's id is the person's id."
          },
          "platform": {
            "type": "string",
            "enum": [
              "bluesky",
              "hackernews",
              "github",
              "stackoverflow",
              "devto",
              "reddit",
              "x",
              "youtube",
              "news",
              "linkedin",
              "tiktok",
              "instagram",
              "appstore",
              "googleplay",
              "trustpilot",
              "googlemaps",
              "rss"
            ],
            "description": "The platform. Review platforms are appstore, googleplay, trustpilot and googlemaps (a place's Google reviews)."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name shown on the platform."
          },
          "handle": {
            "type": [
              "string",
              "null"
            ],
            "description": "The handle taken from the profile link, written the platform's way."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to the profile."
          }
        },
        "required": [
          "id",
          "platform",
          "name",
          "handle",
          "url"
        ]
      },
      "description": "All accounts this workspace counts as this person, starting with the main one."
    },
    "reach": {
      "type": "object",
      "properties": {
        "followers": {
          "type": [
            "integer",
            "null"
          ]
        },
        "following": {
          "type": [
            "integer",
            "null"
          ]
        },
        "posts": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "followers",
        "following",
        "posts"
      ],
      "description": "Counts from the platform, taken from their latest post. Null where a platform lacks the number."
    },
    "profile": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "bio": {
          "type": [
            "string",
            "null"
          ]
        },
        "company": {
          "type": [
            "string",
            "null"
          ]
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "website": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filled in only for a public address on the platform."
        },
        "links": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "minLength": 1
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "provider",
              "url"
            ]
          },
          "description": "Other accounts linked from the person's profile."
        },
        "fetchedAt": {
          "type": "string",
          "description": "Last profile fetch time."
        }
      },
      "required": [
        "bio",
        "company",
        "location",
        "website",
        "email",
        "links",
        "fetchedAt"
      ],
      "description": "Details from the public profile. Null until the profile is fetched."
    },
    "stats": {
      "type": "object",
      "properties": {
        "mentions": {
          "type": "integer",
          "minimum": 0,
          "description": "All their matches in this workspace, relevant or not."
        },
        "relevant": {
          "type": "integer",
          "minimum": 0,
          "description": "How many of them scored as relevant."
        },
        "sentiment": {
          "type": "object",
          "properties": {
            "positive": {
              "type": "integer",
              "minimum": 0
            },
            "neutral": {
              "type": "integer",
              "minimum": 0
            },
            "negative": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "positive",
            "neutral",
            "negative"
          ]
        },
        "firstSeenAt": {
          "type": "string",
          "description": "Time of their first matched post."
        },
        "lastSeenAt": {
          "type": "string",
          "description": "Time of their latest matched post."
        }
      },
      "required": [
        "mentions",
        "relevant",
        "sentiment",
        "firstSeenAt",
        "lastSeenAt"
      ],
      "description": "Counted from this workspace's matches only."
    },
    "annotations": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "notes": {
          "type": "string"
        },
        "muted": {
          "type": "boolean",
          "description": "Their posts are kept out of the feed and all channels. Collection and billing still happen."
        }
      },
      "required": [
        "tags",
        "notes",
        "muted"
      ],
      "description": "Notes and tags your workspace added to the person."
    },
    "outreach": {
      "type": "object",
      "properties": {
        "owner": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "id": {
              "type": "string",
              "description": "The member's user id."
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "name",
            "email"
          ],
          "description": "The teammate responsible for this contact. Null when no one is, or when that member has left the workspace."
        },
        "stage": {
          "type": "string",
          "enum": [
            "not_contacted",
            "contacted",
            "replied",
            "in_talks",
            "customer",
            "not_a_fit"
          ],
          "description": "The outreach stage your team has reached with this person."
        },
        "lastContactedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "Time of the latest logged activity. Null when no contact was logged."
        }
      },
      "required": [
        "owner",
        "stage",
        "lastContactedAt"
      ],
      "description": "Your outreach to this person. Logging the first activity makes the member who reached out the owner, if there was none, and moves not_contacted to contacted."
    }
  },
  "required": [
    "id",
    "platform",
    "name",
    "handle",
    "url",
    "avatarUrl",
    "accounts",
    "reach",
    "profile",
    "stats",
    "annotations",
    "outreach"
  ]
}