{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stashr-me/json-schema/stashr-me-bookmark-summary-page-schema.json",
  "title": "BookmarkSummaryPage",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stashr-me-openapi.json#/components/schemas/BookmarkSummaryPage",
  "properties": {
    "degraded": {
      "description": "Present when search retrieval quality was reduced; see BookmarkPage.searchDegraded",
      "items": {
        "enum": [
          "semantic_unavailable",
          "image_rank_unavailable"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/BookmarkSummaryHit"
      },
      "type": "array"
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "rankMode": {
      "description": "The ranking that actually ran",
      "enum": [
        "post",
        "image"
      ],
      "type": "string"
    },
    "requestedRankMode": {
      "description": "Present only when rankMode differs from what was requested",
      "enum": [
        "post",
        "image"
      ],
      "type": "string"
    }
  },
  "required": [
    "items",
    "nextCursor",
    "rankMode"
  ],
  "type": "object",
  "$defs": {
    "BookmarkSummaryHit": {
      "description": "Compact discovery view of a bookmark: bounded text snippet, tag names, and lightweight media refs — no raw content blocks or platformData.",
      "properties": {
        "archived": {
          "type": "boolean"
        },
        "author": {
          "type": [
            "string",
            "null"
          ]
        },
        "capturedAt": {
          "format": "date-time",
          "type": "string"
        },
        "contentCreatedAt": {
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "contentType": {
          "type": "string"
        },
        "favorite": {
          "type": "boolean"
        },
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "matchedMedia": {
          "description": "Present on image-ranked search hits: the ranked image and its AI caption",
          "properties": {
            "altText": {
              "type": [
                "string",
                "null"
              ]
            },
            "caption": {
              "type": "string"
            },
            "height": {
              "type": [
                "integer",
                "null"
              ]
            },
            "ref": {
              "type": "string"
            },
            "type": {
              "type": "string"
            },
            "url": {
              "type": [
                "string",
                "null"
              ]
            },
            "width": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "media": {
          "items": {
            "properties": {
              "altText": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ref": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "ref",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "mediaCount": {
          "type": "integer"
        },
        "platform": {
          "type": "string"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "text": {
          "description": "Bounded plain-text snippet (max 600 chars)",
          "type": "string"
        },
        "title": {
          "description": "Real title only; null when the source has none",
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "url",
        "platform",
        "contentType",
        "author",
        "capturedAt",
        "contentCreatedAt",
        "favorite",
        "archived",
        "tags",
        "text",
        "media",
        "mediaCount"
      ],
      "type": "object"
    }
  }
}