{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-saved-search-schema.json",
  "title": "SavedSearch",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-agents-api-openapi.yml#/components/schemas/SavedSearch",
  "type": "object",
  "required": [
    "id",
    "label",
    "filters",
    "sortKey",
    "route",
    "browserPath",
    "apiPath",
    "resultCount",
    "savedAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "filters": {
      "type": "object",
      "required": [
        "query",
        "types"
      ],
      "properties": {
        "query": {
          "type": "string"
        },
        "types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "license": {
          "type": "string"
        },
        "task": {
          "type": "string"
        },
        "framework": {
          "type": "string"
        },
        "format": {
          "type": "string"
        },
        "worksWith": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "hosting": {
          "type": "string"
        },
        "reviewStatus": {
          "type": "string",
          "enum": [
            "",
            "first-review",
            "needs-evidence",
            "reviewed",
            "benchmark"
          ]
        },
        "scanStatus": {
          "type": "string"
        },
        "minCardCompleteness": {
          "type": "string"
        },
        "verifiedOnly": {
          "type": "boolean"
        },
        "commercialOnly": {
          "type": "boolean"
        },
        "semanticMode": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    },
    "sortKey": {
      "type": "string",
      "enum": [
        "best",
        "ready",
        "mirrorable",
        "trust",
        "updated",
        "downloads",
        "stars",
        "mirrors",
        "name",
        "size",
        "license"
      ]
    },
    "route": {
      "type": "string"
    },
    "browserPath": {
      "type": "string"
    },
    "apiPath": {
      "type": "string"
    },
    "resultCount": {
      "type": "number"
    },
    "savedAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "notificationsEnabled": {
      "type": "boolean"
    },
    "alert": {
      "$ref": "https://huggingbay.xyz/api/schemas#/$defs/SavedSearchAlert"
    },
    "alertState": {
      "$ref": "https://huggingbay.xyz/api/schemas#/$defs/SavedSearchAlertState"
    }
  },
  "additionalProperties": true
}