{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/juzpost/json-schema/juzpost-account-page-schema.json",
  "title": "AccountPage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/juzpost-accounts-api-openapi.yml#/components/schemas/AccountPage",
  "allOf": [
    {
      "$ref": "#/$defs/PageEnvelope"
    },
    {
      "type": "object",
      "description": "A page of connected social accounts.",
      "properties": {
        "data": {
          "type": "array",
          "description": "The accounts in this page.",
          "items": {
            "$ref": "#/$defs/Account"
          }
        }
      }
    }
  ],
  "$defs": {
    "Account": {
      "type": "object",
      "description": "A connected social account. Access and refresh tokens are never serialized here.\n",
      "required": [
        "id",
        "username",
        "platform",
        "avatarUrl",
        "isActive",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The account id. Pass these values in `socialAccountIds` when scheduling.\n"
        },
        "username": {
          "type": "string",
          "description": "The handle or channel name on the platform."
        },
        "platform": {
          "type": "string",
          "description": "Which network this account is on, for example `tiktok`, `youtube`, `instagram`,\n`x`, `bluesky` or `pinterest`.\n"
        },
        "avatarUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "Profile picture URL, or null if the platform gave none."
        },
        "isActive": {
          "type": "boolean",
          "description": "Whether the connection is still usable. An inactive account normally needs\nreconnecting in the dashboard before it can publish.\n"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the account was connected."
        }
      }
    },
    "PageEnvelope": {
      "type": "object",
      "description": "Shared shape of every paginated response: a `data` array plus `pagination` state.\n",
      "required": [
        "data",
        "pagination"
      ],
      "properties": {
        "data": {
          "type": "array",
          "description": "The rows in this page, ordered by the requested sort and direction.",
          "items": {}
        },
        "pagination": {
          "$ref": "#/$defs/PaginationMeta"
        }
      }
    },
    "PaginationMeta": {
      "type": "object",
      "description": "Page state returned by every list operation. Keyset-based, so it stays correct while\nrows are being inserted, and it deliberately carries no total count.\n",
      "required": [
        "limit",
        "nextCursor",
        "hasMore"
      ],
      "properties": {
        "limit": {
          "type": "integer",
          "description": "The page size actually applied, after clamping to 1-100."
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Pass this back as the `cursor` query parameter to fetch the next page. It is `null`\nwhen there is no next page.\n"
        },
        "hasMore": {
          "type": "boolean",
          "description": "True when at least one more page exists. Stop paginating when this is false rather\nthan when the data array is short.\n"
        }
      }
    }
  }
}