{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postlake-dev/json-schema/postlake-dev-discovered-post-schema.json",
  "title": "DiscoveredPost",
  "description": "A post found by searching or browsing, rather than one you published. Deliberately not the Post shape: far less is known about someone else's post, and a shape full of nulls invites you to assume they are readable.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postlake-dev-openapi.json#/components/schemas/DiscoveredPost",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "platform": {
      "type": "string"
    },
    "author": {
      "$ref": "#/$defs/SocialActor"
    },
    "text": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "url": {
      "type": [
        "string",
        "null"
      ]
    },
    "mediaType": {
      "type": "string",
      "enum": [
        "text",
        "image",
        "video",
        "other"
      ],
      "description": "'other' keeps a new network media type from breaking a parser that switches on this."
    },
    "isReply": {
      "type": "boolean"
    },
    "isQuote": {
      "type": "boolean"
    },
    "authorHidden": {
      "type": "boolean",
      "description": "True when the network REFUSES to name the author, as opposed to us failing to read it. Instagram hashtag results are the case: Meta rejects the username field on media returned by a tag search, so author.handle is necessarily empty. Treat an empty handle WITHOUT this flag as a bug; with it, as the network's rule."
    }
  },
  "$defs": {
    "SocialActor": {
      "type": "object",
      "properties": {
        "handle": {
          "type": "string"
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ]
        },
        "avatarUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The network's own id, for follow/block/mute"
        }
      }
    }
  }
}