{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openhandle/json-schema/openhandle-twitter-profile-schema.json",
  "title": "TwitterProfile",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openhandle-twitter-api-openapi.yml#/components/schemas/TwitterProfile",
  "additionalProperties": false,
  "properties": {
    "avatar": {
      "anyOf": [
        {
          "$ref": "#/$defs/TwitterImage"
        },
        {
          "type": "null"
        }
      ]
    },
    "banner": {
      "anyOf": [
        {
          "$ref": "#/$defs/TwitterImage"
        },
        {
          "type": "null"
        }
      ]
    },
    "bio": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "format": "date-time",
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "displayName": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "entities": {
      "$ref": "#/$defs/TwitterProfileEntities"
    },
    "externalUrl": {
      "format": "uri",
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "handle": {
      "minLength": 1,
      "type": "string"
    },
    "hasCustomTimelines": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "id": {
      "minLength": 1,
      "type": "string"
    },
    "isLifelineInstitution": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isPrivate": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isSuspended": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isVerified": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "labels": {
      "items": {
        "$ref": "#/$defs/TwitterLabel"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "location": {
      "anyOf": [
        {
          "$ref": "#/$defs/TwitterProfileLocation"
        },
        {
          "type": "null"
        }
      ]
    },
    "metrics": {
      "$ref": "#/$defs/TwitterProfileMetrics"
    },
    "pinnedPostIds": {
      "items": {
        "minLength": 1,
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "professional": {
      "anyOf": [
        {
          "$ref": "#/$defs/TwitterProfessional"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscriptions": {
      "$ref": "#/$defs/TwitterSubscriptions"
    },
    "url": {
      "format": "uri",
      "minLength": 1,
      "type": "string"
    },
    "verification": {
      "$ref": "#/$defs/TwitterVerification"
    },
    "visibility": {
      "$ref": "#/$defs/TwitterVisibility"
    },
    "withheld": {
      "$ref": "#/$defs/TwitterWithheld"
    }
  },
  "required": [
    "id",
    "handle",
    "displayName",
    "bio",
    "url",
    "externalUrl",
    "createdAt",
    "location",
    "avatar",
    "banner",
    "isPrivate",
    "isSuspended",
    "isVerified",
    "hasCustomTimelines",
    "isLifelineInstitution",
    "metrics",
    "verification",
    "pinnedPostIds",
    "entities",
    "withheld",
    "subscriptions",
    "visibility",
    "professional",
    "labels"
  ],
  "type": "object",
  "$defs": {
    "TwitterEntity": {
      "additionalProperties": false,
      "properties": {
        "displayName": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "displayUrl": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "handle": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "mediaId": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "range": {
          "anyOf": [
            {
              "$ref": "#/$defs/TwitterRange"
            },
            {
              "type": "null"
            }
          ]
        },
        "shortUrl": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "text": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "range",
        "shortUrl",
        "url",
        "displayUrl",
        "text",
        "handle",
        "id",
        "displayName",
        "mediaId"
      ],
      "type": "object"
    },
    "TwitterImage": {
      "additionalProperties": false,
      "properties": {
        "altText": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "isNft": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "role": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "shape": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "url",
        "role",
        "width",
        "height",
        "altText",
        "shape",
        "isNft"
      ],
      "type": "object"
    },
    "TwitterLabel": {
      "additionalProperties": false,
      "properties": {
        "description": {
          "anyOf": [
            {
              "$ref": "#/$defs/TwitterRichText"
            },
            {
              "type": "null"
            }
          ]
        },
        "icon": {
          "anyOf": [
            {
              "$ref": "#/$defs/TwitterImage"
            },
            {
              "type": "null"
            }
          ]
        },
        "text": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "text",
        "icon",
        "url",
        "description"
      ],
      "type": "object"
    },
    "TwitterPlace": {
      "additionalProperties": false,
      "properties": {
        "country": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "countryCode": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "fullName": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "fullName",
        "type",
        "country",
        "countryCode"
      ],
      "type": "object"
    },
    "TwitterProfessional": {
      "additionalProperties": false,
      "properties": {
        "categories": {
          "items": {
            "$ref": "#/$defs/TwitterProfessionalCategory"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "categories"
      ],
      "type": "object"
    },
    "TwitterProfessionalCategory": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name"
      ],
      "type": "object"
    },
    "TwitterProfileEntities": {
      "additionalProperties": false,
      "properties": {
        "bio": {
          "items": {
            "$ref": "#/$defs/TwitterEntity"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "externalUrl": {
          "items": {
            "$ref": "#/$defs/TwitterEntity"
          },
          "type": [
            "array",
            "null"
          ]
        }
      },
      "required": [
        "bio",
        "externalUrl"
      ],
      "type": "object"
    },
    "TwitterProfileLocation": {
      "additionalProperties": false,
      "properties": {
        "place": {
          "anyOf": [
            {
              "$ref": "#/$defs/TwitterPlace"
            },
            {
              "type": "null"
            }
          ]
        },
        "text": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "text",
        "place"
      ],
      "type": "object"
    },
    "TwitterProfileMetrics": {
      "additionalProperties": false,
      "properties": {
        "affiliates": {
          "type": [
            "integer",
            "null"
          ]
        },
        "creatorSubscriptions": {
          "type": [
            "integer",
            "null"
          ]
        },
        "followers": {
          "type": [
            "integer",
            "null"
          ]
        },
        "following": {
          "type": [
            "integer",
            "null"
          ]
        },
        "likedPosts": {
          "type": [
            "integer",
            "null"
          ]
        },
        "mediaPosts": {
          "type": [
            "integer",
            "null"
          ]
        },
        "posts": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "followers",
        "following",
        "posts",
        "likedPosts",
        "mediaPosts",
        "creatorSubscriptions",
        "affiliates"
      ],
      "type": "object"
    },
    "TwitterRange": {
      "additionalProperties": false,
      "properties": {
        "end": {
          "type": "integer"
        },
        "start": {
          "type": "integer"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    },
    "TwitterRichText": {
      "additionalProperties": false,
      "properties": {
        "entities": {
          "items": {
            "$ref": "#/$defs/TwitterEntity"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "text": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "text",
        "entities"
      ],
      "type": "object"
    },
    "TwitterSubscriptions": {
      "additionalProperties": false,
      "properties": {
        "isEligible": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "isEligible"
      ],
      "type": "object"
    },
    "TwitterVerification": {
      "additionalProperties": false,
      "properties": {
        "isBlueVerified": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "legacyVerified": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "legacyVerified",
        "type",
        "isBlueVerified"
      ],
      "type": "object"
    },
    "TwitterVisibility": {
      "additionalProperties": false,
      "properties": {
        "hasHiddenLikesOnProfile": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "hasHiddenSubscriptionsOnProfile": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "hasHiddenLikesOnProfile",
        "hasHiddenSubscriptionsOnProfile"
      ],
      "type": "object"
    },
    "TwitterWithheld": {
      "additionalProperties": false,
      "properties": {
        "copyright": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "description": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "scope": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "copyright",
        "description",
        "scope"
      ],
      "type": "object"
    }
  }
}