{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/opoint/json-schema/opoint-tag-report-search-schema.json",
  "title": "TagReportSearch",
  "description": "Tag report query builder.\n\nThe previous way of selecting content for a report was only based on\nstimestamp_used, using the stimestamp field in the request body.\n\nSince we need more fine grained selection based on stimestamp_set, we\nmigrate to a tagged union serializer, and make the old and the new request\nbody format mutually exclusive to ease transition.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opoint-search-api-openapi.yml#/components/schemas/TagReportSearch",
  "type": "object",
  "properties": {
    "stimestamps": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "selections": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TagReportSelection"
      }
    }
  },
  "$defs": {
    "TagReportSelection": {
      "type": "object",
      "description": "Ways of selecting content from tags for reports.\n\nRepresented by a tagged union choosing between ways of selecting content,\neither from an old report or all the unused content, or only some of the\nunused articles.",
      "properties": {
        "type": {
          "$ref": "#/$defs/TagReportSelectionTypeEnum"
        },
        "timestamp": {
          "type": "integer"
        },
        "from_timestamp": {
          "type": "integer"
        },
        "to_timestamp": {
          "type": "integer"
        }
      },
      "required": [
        "type"
      ]
    },
    "TagReportSelectionTypeEnum": {
      "enum": [
        "tagged",
        "used"
      ],
      "type": "string",
      "description": "* `tagged` - tagged\n* `used` - used"
    }
  }
}