{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ufcalendar-com/json-schema/ufcalendar-com-roster-moves-response-schema.json",
  "title": "RosterMovesResponse",
  "description": "Newest first.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ufcalendar-com-openapi.json#/components/schemas/RosterMovesResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RosterMove"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "org": {
          "type": "string"
        },
        "since": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "The `since=` bound applied."
        },
        "until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "The `until=` bound applied (a date covers the whole UTC day)."
        },
        "kind": {
          "oneOf": [
            {
              "$ref": "#/$defs/RosterMoveKind"
            },
            {
              "type": "null"
            }
          ]
        },
        "fighter_id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The `fighter=` filter, resolved."
        },
        "note": {
          "type": "string",
          "description": "Always present: how a move is dated."
        },
        "pagination": {
          "$ref": "#/$defs/Pagination"
        },
        "ignored_params": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Present only when the request carried query parameters this endpoint does not take — they were ignored. Same list as the `X-UFCalendar-Ignored-Params` header. Sorted, unique."
        }
      },
      "required": [
        "org",
        "since",
        "until",
        "kind",
        "fighter_id",
        "note",
        "pagination"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "additionalProperties": false,
  "$defs": {
    "FighterRef": {
      "type": "object",
      "description": "The one fighter-reference shape every card, fight and search row carries.",
      "properties": {
        "id": {
          "type": "integer"
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "nickname": {
          "type": [
            "string",
            "null"
          ]
        },
        "nationality": {
          "type": [
            "string",
            "null"
          ],
          "description": "Country NAME as the source spells it (e.g. `United States`)."
        },
        "country_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO 3166-1 alpha-2 derived from `nationality`; null when the name is unknown to our table."
        }
      },
      "required": [
        "id",
        "slug",
        "name",
        "nickname",
        "nationality",
        "country_code"
      ],
      "additionalProperties": false
    },
    "Pagination": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opaque; pass as `?cursor=`. Null on the last page."
        },
        "has_more": {
          "type": "boolean"
        },
        "limit": {
          "type": "integer",
          "description": "The page size actually applied (out-of-range `limit` values are clamped)."
        }
      },
      "required": [
        "next_cursor",
        "has_more",
        "limit"
      ],
      "additionalProperties": false
    },
    "RosterMove": {
      "type": "object",
      "description": "One confirmed roster move, as published by the promotion.",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Stable id of the move (the `roster.changed` delivery carries the same object)."
        },
        "fighter": {
          "$ref": "#/$defs/FighterRef"
        },
        "org": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/RosterMoveKind"
        },
        "from_status": {
          "oneOf": [
            {
              "$ref": "#/$defs/RosterStatus"
            },
            {
              "type": "null"
            }
          ],
          "description": "Null on a signing."
        },
        "to_status": {
          "$ref": "#/$defs/RosterStatus"
        },
        "observed_at": {
          "type": "string",
          "format": "date-time",
          "description": "The first read showing the new status: the move happened at or before it."
        },
        "previous_checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "The last read showing the old status: the move happened after it."
        },
        "backfilled": {
          "type": "boolean",
          "description": "true = reconstructed from archived profile pages, not observed live."
        }
      },
      "required": [
        "id",
        "fighter",
        "org",
        "kind",
        "from_status",
        "to_status",
        "observed_at",
        "previous_checked_at",
        "backfilled"
      ],
      "additionalProperties": false
    },
    "RosterMoveKind": {
      "type": "string",
      "enum": [
        "signed",
        "left",
        "retired",
        "returned"
      ],
      "description": "`signed` = newly listed as active, `left` = no longer listed on the roster, `retired` = listed as retired, `returned` = listed as active again."
    },
    "RosterStatus": {
      "type": "string",
      "enum": [
        "active",
        "off_roster",
        "retired"
      ],
      "description": "The promotion's own published roster status: `active` = listed on its roster, `off_roster` = no longer listed (the promotion does not say why), `retired` = listed as retired."
    }
  }
}